Skip to content

Commit e973bc4

Browse files
committed
Added config preprocessing output
1 parent 3383a95 commit e973bc4

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

Common/src/CConfig.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6992,6 +6992,21 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
69926992

69936993
auto PrintLimiterInfo = [&](const LIMITER kind_limiter, const su2double kappa) {
69946994
cout << "Second order integration in space, with slope limiter.\n";
6995+
if (RampMUSCL) {
6996+
cout << "Ramping MUSCL sheme from first to second order starting at iter " << RampMUSCLParam.rampMUSCLCoeff[RAMP_COEFF::INITIAL_VALUE]
6997+
<< ", ending at iter " << RampMUSCLParam.rampMUSCLCoeff[RAMP_COEFF::FINAL_ITER] + RampMUSCLParam.rampMUSCLCoeff[RAMP_COEFF::INITIAL_VALUE]
6998+
<< ", updating every " << RampMUSCLParam.rampMUSCLCoeff[RAMP_COEFF::UPDATE_FREQ] << " iterations." << endl;
6999+
string MUSCLRampType;
7000+
switch (RampMUSCLParam.Kind_MUSCLRamp) {
7001+
case MUSCL_RAMP_TYPE::ITERATION:
7002+
MUSCLRampType = "linear";
7003+
break;
7004+
case MUSCL_RAMP_TYPE::SMOOTH_FUNCTION:
7005+
MUSCLRampType = "cosine";
7006+
break;
7007+
}
7008+
cout << "Ramp applied according to a " << MUSCLRampType << " function, raised to the power " << RampMUSCLParam.RampMUSCLPower << "." << endl;
7009+
}
69957010
if (kappa != 0.0) cout << "U-MUSCL reconstruction, with coefficient: " << kappa << ".\n";
69967011
switch (kind_limiter) {
69977012
case LIMITER::NONE:

SU2_CFD/src/iteration/CFluidIteration.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,11 @@ void CFluidIteration::UpdateRamp(CGeometry**** geometry_container, CConfig** con
338338
const auto RampMUSCLParam = config->GetMUSCLRampParam();
339339
const long unsigned startIter = RampMUSCLParam.rampMUSCLCoeff[RAMP_COEFF::INITIAL_VALUE];
340340
const long unsigned updateFreq = RampMUSCLParam.rampMUSCLCoeff[RAMP_COEFF::UPDATE_FREQ];
341-
const long unsigned finalIter = RampMUSCLParam.rampMUSCLCoeff[RAMP_COEFF::FINAL_ITER];
342-
auto iterFrac = (static_cast<double>(iter - startIter)/static_cast<double>(finalIter - startIter));
341+
const long unsigned rampLength = RampMUSCLParam.rampMUSCLCoeff[RAMP_COEFF::FINAL_ITER];
342+
auto iterFrac = (static_cast<double>(iter - startIter)/static_cast<double>((rampLength + startIter) - startIter));
343343
if (iter < startIter) return;
344344
if ((iter == startIter) && (rank == MASTER_NODE)) cout << "Beginning to ramp MUSCL scheme..." << endl;
345-
if ((iter % updateFreq == 0 && iter < finalIter) || (iter == finalIter)) {
345+
if ((iter % updateFreq == 0 && iter < (rampLength + startIter)) || (iter == (rampLength + startIter))) {
346346
switch (RampMUSCLParam.Kind_MUSCLRamp) {
347347
case MUSCL_RAMP_TYPE::ITERATION:
348348
config->SetMUSCLRampValue(std::pow(std::min<double>(1.0, iterFrac), RampMUSCLParam.RampMUSCLPower));

0 commit comments

Comments
 (0)