Skip to content

Commit 1bffaab

Browse files
committed
Fix multigrid inconsistency for DA SetRecording.
Reviewed and requested change by @pcarruscag.
1 parent a893153 commit 1bffaab

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

SU2_CFD/src/drivers/CDiscAdjMultizoneDriver.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -572,10 +572,10 @@ void CDiscAdjMultizoneDriver::SetRecording(RECORDING kind_recording, Kind_Tape t
572572
/*--- Prepare for recording by resetting the solution to the initial converged solution. ---*/
573573

574574
for(iZone = 0; iZone < nZone; iZone++) {
575-
for (unsigned short iSol=0; iSol < MAX_SOLS; iSol++) {
576-
auto solver = solver_container[iZone][INST_0][MESH_0][iSol];
577-
if (solver && solver->GetAdjoint()) {
578-
for (unsigned short iMesh = 0; iMesh <= config_container[iZone]->GetnMGLevels(); iMesh++) {
575+
for (unsigned short iSol = 0; iSol < MAX_SOLS; iSol++) {
576+
for (unsigned short iMesh = 0; iMesh <= config_container[iZone]->GetnMGLevels(); iMesh++) {
577+
auto solver = solver_container[iZone][INST_0][iMesh][iSol];
578+
if (solver && solver->GetAdjoint()) {
579579
solver->SetRecording(geometry_container[iZone][INST_0][iMesh], config_container[iZone]);
580580
}
581581
}

SU2_CFD/src/drivers/CDiscAdjSinglezoneDriver.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ void CDiscAdjSinglezoneDriver::SetRecording(RECORDING kind_recording){
243243
/*--- Prepare for recording by resetting the solution to the initial converged solution. ---*/
244244

245245
for (unsigned short iSol=0; iSol < MAX_SOLS; iSol++) {
246-
auto solver = solver_container[ZONE_0][INST_0][MESH_0][iSol];
247-
if (solver && solver->GetAdjoint()) {
248-
for (unsigned short iMesh = 0; iMesh <= config_container[ZONE_0]->GetnMGLevels(); iMesh++) {
246+
for (unsigned short iMesh = 0; iMesh <= config_container[ZONE_0]->GetnMGLevels(); iMesh++) {
247+
auto solver = solver_container[ZONE_0][INST_0][iMesh][iSol];
248+
if (solver && solver->GetAdjoint()) {
249249
solver->SetRecording(geometry_container[ZONE_0][INST_0][iMesh], config_container[ZONE_0]);
250250
}
251251
}

0 commit comments

Comments
 (0)