Skip to content

Commit 5764b02

Browse files
committed
allow nB can be negative for NEOS-BQS
1 parent 65d33ce commit 5764b02

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/readindata.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,13 @@ void read_FOdata::regulate_surface_cells(std::vector<FO_surf> &surf_ptr) {
884884
surf_i.Sn, visCoefficients);
885885
status = 0;
886886
} else {
887-
status = getValuesFromHRGEOS(surf_i.Edec, surf_i.Bn, eosVar);
887+
status = getValuesFromHRGEOS(
888+
surf_i.Edec, std::abs(surf_i.Bn), eosVar);
889+
if (surf_i.Bn < 0.) {
890+
eosVar[2] = - eosVar[2];
891+
eosVar[3] = - eosVar[3];
892+
eosVar[4] = - eosVar[4];
893+
}
888894
}
889895
if (status == 0) { // success
890896
//cout << "check: Tdec = " << surf_i.Tdec << " GeV, "

0 commit comments

Comments
 (0)