Skip to content

Commit d136052

Browse files
authored
Merge pull request #2714 from su2code/pedro/fix_muscl_ramp
fix for MUSCL ramp start iteration > 0
2 parents 5cbbbb9 + fd006de commit d136052

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

SU2_CFD/src/iteration/CFluidIteration.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,11 @@ void CFluidIteration::UpdateRamp(CGeometry**** geometry_container, CConfig** con
340340
const long unsigned updateFreq = RampMUSCLParam.rampMUSCLCoeff[RAMP_COEFF::UPDATE_FREQ];
341341
const long unsigned rampLength = RampMUSCLParam.rampMUSCLCoeff[RAMP_COEFF::FINAL_ITER];
342342
auto iterFrac = (static_cast<double>(iter - startIter)/static_cast<double>((rampLength + startIter) - startIter));
343-
if (iter < startIter) return;
344-
if ((iter == startIter) && (rank == MASTER_NODE)) cout << "Beginning to ramp MUSCL scheme..." << endl;
343+
if (iter < startIter) {
344+
config->SetMUSCLRampValue(0);
345+
return;
346+
}
347+
if (iter == startIter && rank == MASTER_NODE) cout << "Beginning to ramp MUSCL scheme..." << endl;
345348
if ((iter % updateFreq == 0 && iter < (rampLength + startIter)) || (iter == (rampLength + startIter))) {
346349
switch (RampMUSCLParam.Kind_MUSCLRamp) {
347350
case MUSCL_RAMP_TYPE::ITERATION:

0 commit comments

Comments
 (0)