diff --git a/SU2_CFD/src/solvers/CMeshSolver.cpp b/SU2_CFD/src/solvers/CMeshSolver.cpp index 3da0b843e6b..474112d3c73 100644 --- a/SU2_CFD/src/solvers/CMeshSolver.cpp +++ b/SU2_CFD/src/solvers/CMeshSolver.cpp @@ -969,7 +969,6 @@ void CMeshSolver::RestartOldGeometry(CGeometry *geometry, const CConfig *config) void CMeshSolver::Surface_Pitching(CGeometry *geometry, CConfig *config, unsigned long iter) { su2double deltaT, time_new, time_old, Lref; - const su2double* Coord = nullptr; su2double Center[3] = {0.0}, VarCoord[3] = {0.0}, Omega[3] = {0.0}, Ampl[3] = {0.0}, Phase[3] = {0.0}; su2double VarCoordAbs[3] = {0.0}; su2double rotCoord[3] = {0.0}, r[3] = {0.0}; @@ -1052,10 +1051,14 @@ void CMeshSolver::Surface_Pitching(CGeometry *geometry, CConfig *config, unsigne for (iVertex = 0; iVertex < geometry->nVertex[iMarker]; iVertex++) { - /*--- Index and coordinates of the current point ---*/ + /*--- Index and coordinates of the current point accounting for other + * motions that may be applied, e.g. plunging. ---*/ iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); - Coord = geometry->nodes->GetCoord(iPoint); + su2double Coord[3] = {0.0}; + for (iDim = 0; iDim < nDim; ++iDim) { + Coord[iDim] = nodes->GetMesh_Coord(iPoint, iDim) + nodes->GetBound_Disp(iPoint, iDim); + } /*--- Calculate non-dim. position from rotation center ---*/ @@ -1086,7 +1089,6 @@ void CMeshSolver::Surface_Pitching(CGeometry *geometry, CConfig *config, unsigne void CMeshSolver::Surface_Rotating(CGeometry *geometry, CConfig *config, unsigned long iter) { su2double deltaT, time_new, time_old, Lref; - const su2double* Coord = nullptr; su2double VarCoordAbs[3] = {0.0}; su2double Center[3] = {0.0}, VarCoord[3] = {0.0}, Omega[3] = {0.0}, rotCoord[3] = {0.0}, r[3] = {0.0}, Center_Aux[3] = {0.0}; @@ -1158,10 +1160,14 @@ void CMeshSolver::Surface_Rotating(CGeometry *geometry, CConfig *config, unsigne for (iVertex = 0; iVertex < geometry->nVertex[iMarker]; iVertex++) { - /*--- Index and coordinates of the current point ---*/ + /*--- Index and coordinates of the current point accounting for other + * motions that may be applied, e.g. plunging. ---*/ iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); - Coord = geometry->nodes->GetCoord(iPoint); + su2double Coord[3] = {0.0}; + for (iDim = 0; iDim < nDim; ++iDim) { + Coord[iDim] = nodes->GetMesh_Coord(iPoint, iDim) + nodes->GetBound_Disp(iPoint, iDim); + } /*--- Calculate non-dim. position from rotation center ---*/ diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index da01743218f..af97193431f 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -526,7 +526,7 @@ def main(): unst_deforming_naca0012.cfg_dir = "disc_adj_euler/naca0012_pitching_def" unst_deforming_naca0012.cfg_file = "inv_NACA0012_pitching_deform.cfg" unst_deforming_naca0012.test_iter = 5 - unst_deforming_naca0012.test_vals = [-3.665120, -3.793643, -3.716518, -3.148310] + unst_deforming_naca0012.test_vals = [-3.665126, -3.793497, -3.716496, -3.148290] unst_deforming_naca0012.unsteady = True unst_deforming_naca0012.enabled_with_tsan = False test_list.append(unst_deforming_naca0012)