Skip to content

Commit 8331045

Browse files
authored
Apply suggestions from code review
1 parent e93f258 commit 8331045

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

SU2_CFD/src/iteration/CIteration.cpp

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,29 +64,28 @@ void CIteration::SetGrid_Movement(CGeometry** geometry, CSurfaceMovement* surfac
6464
/*--- Set or update the translating frame mesh movement with the current translation rates,
6565
* which might be altered via the python interface. ---*/
6666

67-
if (rank == MASTER_NODE) cout << endl << " Setting translational grid velocities." << endl;
67+
if (rank == MASTER_NODE) cout << "\n Setting translational grid velocities." << endl;
6868

69-
/*--- Set the grid velocities on finest multigrid level for a translating reference frame. ---*/
70-
geometry[MESH_0]->SetTranslationalVelocity(config, true);
69+
/*--- Set the translational velocity on all grid levels. ---*/
7170

72-
/*--- Update the multigrid structure after moving the finest grid,
73-
* including computing the grid velocities on the coarser levels. ---*/
74-
grid_movement->UpdateMultiGrid(geometry, config);
71+
for (auto iMGlevel = 0u; iMGlevel <= config_container[ZONE_0]->GetnMGLevels(); iMGlevel++)
72+
geometry_container[iZone][INST_0][iMGlevel]->SetTranslationalVelocity(config, true);
7573

7674
break;
7775

7876
case ROTATING_FRAME:
7977
/*--- Set or update the rotating frame mesh movement with the current translation and rotation
8078
* rates, which might be altered via the python interface. ---*/
8179

82-
if (rank == MASTER_NODE) cout << endl << " Setting rotating frame grid velocities." << endl;
80+
if (rank == MASTER_NODE) cout << "\n Setting rotating frame grid velocities." << endl;
8381

84-
/*--- Set the grid velocities on finest multigrid level for a rotating reference frame. ---*/
85-
geometry[MESH_0]->SetRotationalVelocity(config, true);
82+
/*--- Set the grid velocities on all multigrid levels for a steadily
83+
rotating reference frame. ---*/
8684

87-
/*--- Update the multigrid structure after moving the finest grid,
88-
including computing the grid velocities on the coarser levels. ---*/
89-
grid_movement->UpdateMultiGrid(geometry, config);
85+
for (auto iMGlevel = 0u; iMGlevel <= config_container[ZONE_0]->GetnMGLevels(); iMGlevel++){
86+
geometry[iMGlevel]->SetRotationalVelocity(config, true);
87+
geometry[iMGlevel]->SetShroudVelocity(config);
88+
}
9089

9190
break;
9291
}

0 commit comments

Comments
 (0)