Merge pull request #5086 from akva2/fix_solvent_regression

fixed: setting solvent values should be conditional on enableSolvent
This commit is contained in:
Tor Harald Sandve 2024-01-03 09:09:33 +01:00 committed by GitHub
commit 3856421a88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1298,7 +1298,9 @@ public:
values.setPvtRegionIndex(pvtRegionIndex(context, spaceIdx, timeIdx));
values.assignNaive(initialFluidStates_[globalDofIdx]);
SolventModule::assignPrimaryVars(values, this->solventSaturation_[globalDofIdx], this->solventRsw_[globalDofIdx]);
SolventModule::assignPrimaryVars(values,
enableSolvent ? this->solventSaturation_[globalDofIdx] : 0.0,
enableSolvent ? this->solventRsw_[globalDofIdx] : 0.0);
if constexpr (enablePolymer)
values[Indices::polymerConcentrationIdx] = this->polymer_.concentration[globalDofIdx];