diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 0c9d4d28b18..52d9d462bf4 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -2694,7 +2694,12 @@ class CConfig { * \brief Set the number of multigrid levels. * \param[in] val_nMGLevels - Index of the mesh were the CFL is applied */ - void SetMGLevels(unsigned short val_nMGLevels) { nMGLevels = val_nMGLevels; } + void SetMGLevels(unsigned short val_nMGLevels) { + nMGLevels = val_nMGLevels; + if (MGCycle == FULLMG_CYCLE) { + SetFinestMesh(val_nMGLevels); + } + } /*! * \brief Get the index of the finest grid. diff --git a/SU2_CFD/include/integration/CIntegration.hpp b/SU2_CFD/include/integration/CIntegration.hpp index 136d4c9ad59..fd01e565888 100644 --- a/SU2_CFD/include/integration/CIntegration.hpp +++ b/SU2_CFD/include/integration/CIntegration.hpp @@ -49,7 +49,7 @@ class CIntegration { size; /*!< \brief MPI Size. */ bool Convergence, /*!< \brief To indicate if the flow solver (direct, adjoint, or linearized) has converged or not. */ Convergence_FSI, /*!< \brief To indicate if the FSI problem has converged or not. */ - Convergence_FullMG; /*!< \brief Initial value of the residual to evaluate the convergence level. */ + Convergence_FullMG; /*!< \brief To indicate if the full multigrid has converged or not. */ /*! * \brief Do the space integration of the numerical system. diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index 7dc8c512f44..0860f66e88e 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -2516,10 +2516,8 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr for (iVertex = 0; iVertex < geometry->nVertex[iMarker]; iVertex++) { iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); - iPointNormal = geometry->vertex[iMarker][iVertex]->GetNormal_Neighbor(); Coord = geometry->nodes->GetCoord(iPoint); - Coord_Normal = geometry->nodes->GetCoord(iPointNormal); Normal = geometry->vertex[iMarker][iVertex]->GetNormal(); @@ -2585,13 +2583,15 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr CSkinFriction[iMarker](iVertex,iDim) = TauTangent[iDim] * factorFric; } - WallDistMod = GeometryToolbox::Distance(nDim, Coord, Coord_Normal); - /*--- Compute non-dimensional velocity and y+ ---*/ FrictionVel = sqrt(fabs(WallShearStress[iMarker][iVertex]) / Density); - - if (!wallfunctions) { + + if (!wallfunctions && (MGLevel == MESH_0 || geometry->nodes->GetDomain(iPoint))) { + // for CMultiGridGeometry, the normal neighbor of halo nodes in not set + iPointNormal = geometry->vertex[iMarker][iVertex]->GetNormal_Neighbor(); + Coord_Normal = geometry->nodes->GetCoord(iPointNormal); + WallDistMod = GeometryToolbox::Distance(nDim, Coord, Coord_Normal); YPlus[iMarker][iVertex] = WallDistMod * FrictionVel / (Viscosity / Density); } @@ -2628,7 +2628,7 @@ void CFVMFlowSolverBase::Friction_Forces(const CGeometry* geometr HeatFlux[iMarker][iVertex] = thermal_conductivity_tr*dTn + thermal_conductivity_ve*dTven; } - /*--- Note that y+, and heat are computed at the + /*--- Note that heat is computed at the halo cells (for visualization purposes), but not the forces ---*/ if ((geometry->nodes->GetDomain(iPoint)) && (Monitoring == YES)) { diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index e7b84ad7ead..67e8a172dcb 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -58,7 +58,7 @@ CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned sh /*--- Single grid simulation ---*/ - if (iMesh == MESH_0) { + if (iMesh == MESH_0 || config->GetMGCycle() == FULLMG_CYCLE) { /*--- Define some auxiliary vector related with the residual ---*/