@@ -76,7 +76,6 @@ void CDiscAdjHeatIteration::Preprocess(COutput* output, CIntegration**** integra
7676
7777 LoadUnsteady_Solution (geometry, solver, config, val_iZone, val_iInst, Direct_Iter);
7878 }
79-
8079 if ((TimeIter > 0 ) && dual_time) {
8180 /* --- Load solution timestep n - 2 ---*/
8281
@@ -126,9 +125,11 @@ void CDiscAdjHeatIteration::Preprocess(COutput* output, CIntegration**** integra
126125 /* --- Store flow solution also in the adjoint solver in order to be able to reset it later ---*/
127126
128127 if (TimeIter == 0 || dual_time) {
129- for (auto iPoint = 0ul ; iPoint < geometry[val_iZone][val_iInst][MESH_0]->GetnPoint (); iPoint++) {
130- solvers[MESH_0][ADJHEAT_SOL]->GetNodes ()->SetSolution_Direct (
131- iPoint, solvers[MESH_0][HEAT_SOL]->GetNodes ()->GetSolution (iPoint));
128+ for (auto iMesh = 0u ; iMesh <= config[val_iZone]->GetnMGLevels (); iMesh++) {
129+ for (auto iPoint = 0ul ; iPoint < geometry[val_iZone][val_iInst][iMesh]->GetnPoint (); iPoint++) {
130+ solvers[iMesh][ADJHEAT_SOL]->GetNodes ()->SetSolution_Direct (
131+ iPoint, solvers[iMesh][HEAT_SOL]->GetNodes ()->GetSolution (iPoint));
132+ }
132133 }
133134 }
134135
@@ -141,16 +142,16 @@ void CDiscAdjHeatIteration::LoadUnsteady_Solution(CGeometry**** geometry, CSolve
141142 int val_DirectIter) {
142143
143144 if (val_DirectIter >= 0 ) {
144- if (rank == MASTER_NODE && val_iZone == ZONE_0 )
145- cout << " Loading heat solution from direct iteration " << val_DirectIter << " ." << endl;
145+ if (rank == MASTER_NODE)
146+ cout << " Loading heat solution from direct iteration " << val_DirectIter << " for zone " << val_iZone << " ." << endl;
146147
147148 solver[val_iZone][val_iInst][MESH_0][HEAT_SOL]->LoadRestart (
148149 geometry[val_iZone][val_iInst], solver[val_iZone][val_iInst], config[val_iZone], val_DirectIter, false );
149150 }
150151 else {
151152 /* --- If there is no solution file we set the freestream condition ---*/
152- if (rank == MASTER_NODE && val_iZone == ZONE_0 )
153- cout << " Setting freestream conditions at direct iteration " << val_DirectIter << " ." << endl;
153+ if (rank == MASTER_NODE)
154+ cout << " Setting freestream conditions at direct iteration " << val_DirectIter << " for zone " << val_iZone << " ." << endl;
154155
155156 for (auto iMesh = 0u ; iMesh <= config[val_iZone]->GetnMGLevels (); iMesh++) {
156157 solver[val_iZone][val_iInst][iMesh][HEAT_SOL]->SetFreeStream_Solution (config[val_iZone]);
0 commit comments