diff --git a/Common/include/geometry_structure.hpp b/Common/include/geometry_structure.hpp index 09e1d3859617..f7732060e9a6 100644 --- a/Common/include/geometry_structure.hpp +++ b/Common/include/geometry_structure.hpp @@ -902,12 +902,6 @@ class CGeometry { */ virtual void DivideConnectivity(CConfig *config, unsigned short Elem_Type); - /*! - * \brief A virtual member. - * \param[in] config - Definition of the particular problem. - */ - virtual void SetPeriodicBoundary(CConfig *config); - /*! * \brief A virtual member. * \param[in] geometry - Geometrical definition of the problem. @@ -1001,13 +995,6 @@ class CGeometry { */ virtual void SetBoundSensitivity(CConfig *config); - /*! - * \brief A virtual member. - * \param[in] geometry - Geometrical definition of the problem. - * \param[in] config - Definition of the particular problem. - */ - virtual void SetPeriodicBoundary(CGeometry *geometry, CConfig *config); - /*! * \brief Set the data containers for customized boundary conditions. * \param[in] config - Definition of the particular problem. @@ -1041,30 +1028,6 @@ class CGeometry { */ virtual void SetGridVelocity(CConfig *config, unsigned long iter); - /*! - * \brief A virtual member. - * \param[in] config - Definition of the particular problem. - */ - virtual void Set_MPI_Coord(CConfig *config); - - /*! - * \brief A virtual member. - * \param[in] config - Definition of the particular problem. - */ - virtual void Set_MPI_GridVel(CConfig *config); - - /*! - * \brief A virtual member. - * \param[in] config - Definition of the particular problem. - */ - virtual void Set_MPI_OldCoord(CConfig *config); - - /*! - * \brief A virtual member. - * \param[in] config - Definition of the particular problem. - */ - virtual void Set_MPI_MaxLength(CConfig *config); - /*! * \brief A virtual member. * \param[in] geometry - Geometry of the fine mesh. @@ -2273,36 +2236,6 @@ void UpdateTurboVertex(CConfig *config,unsigned short val_iZone, unsigned short * \param[in] config - Definition of the particular problem. */ void SetGridVelocity(CConfig *config, unsigned long iter); - - /*! - * \brief Perform the MPI communication for the grid coordinates (dynamic meshes). - * \param[in] config - Definition of the particular problem. - */ - void Set_MPI_Coord(CConfig *config); - - /*! - * \brief Perform the MPI communication for the grid velocities. - * \param[in] config - Definition of the particular problem. - */ - void Set_MPI_GridVel(CConfig *config); - - /*! - * \brief Perform the MPI communication for the grid coordinates (dynamic meshes) for restart purposes. - * \param[in] config - Definition of the particular problem. - */ - void Set_MPI_OldCoord(CConfig *config); - - /*! - * \brief Perform the MPI communication for the max grid spacing. - * \param[in] config - Definition of the particular problem. - */ - void Set_MPI_MaxLength(CConfig *config); - - /*! - * \brief Set the periodic boundary conditions. - * \param[in] config - Definition of the particular problem. - */ - void SetPeriodicBoundary(CConfig *config); /*! * \brief Do an implicit smoothing of the grid coordinates. diff --git a/Common/include/geometry_structure.inl b/Common/include/geometry_structure.inl index 1f990c1afb38..f3f9ce7cd050 100644 --- a/Common/include/geometry_structure.inl +++ b/Common/include/geometry_structure.inl @@ -137,19 +137,7 @@ inline void CGeometry::SetTranslationalVelocity(CConfig *config, unsigned short inline void CGeometry::SetGridVelocity(CConfig *config, unsigned long iter) { } -inline void CGeometry::SetRestricted_GridVelocity(CGeometry *fine_mesh, CConfig *config) { } - -inline void CGeometry::Set_MPI_Coord(CConfig *config) { } - -inline void CGeometry::Set_MPI_GridVel(CConfig *config) { } - -inline void CGeometry::Set_MPI_OldCoord(CConfig *config) { } - -inline void CGeometry::Set_MPI_MaxLength(CConfig *config) { } - -inline void CGeometry::SetPeriodicBoundary(CConfig *config) { } - -inline void CGeometry::SetPeriodicBoundary(CGeometry *geometry, CConfig *config) { } +inline void CGeometry::SetRestricted_GridVelocity(CGeometry *fine_mesh, CConfig *config) { } inline void CGeometry::SetSendReceive(CConfig *config) { } diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp index 57ea16296920..8347ea3e27ae 100644 --- a/Common/include/option_structure.hpp +++ b/Common/include/option_structure.hpp @@ -174,19 +174,6 @@ enum ANSWER { YES = 1 /*!< \brief Boolean definition of yes. */ }; -/*! - * \brief Verbosity level - */ -enum VERB_LEVEL { - VERB_NONE = 0, /*!< \brief No verbosity. */ - VERB_MEDIUM = 1, /*!< \brief Medium level of verbosity. */ - VERB_HIGH = 2 /*!< \brief High level of verbosity. */ -}; -static const map Verb_Map = CCreateMap -("NONE", VERB_NONE) -("MEDIUM", VERB_MEDIUM) -("HIGH", VERB_HIGH); - /*! * \brief Average method for marker analyze */ diff --git a/Common/src/config_structure.cpp b/Common/src/config_structure.cpp index 79a08a2195bc..9f477449aae1 100644 --- a/Common/src/config_structure.cpp +++ b/Common/src/config_structure.cpp @@ -1684,9 +1684,6 @@ void CConfig::SetConfig_Options(unsigned short val_iZone, unsigned short val_nZo * Options: AREA, MASSFLUX * \n Use with MARKER_ANALYZE. \ingroup Config*/ addEnumOption("MARKER_ANALYZE_AVERAGE", Kind_Average, Average_Map, AVERAGE_MASSFLUX); - /*!\brief CONSOLE_OUTPUT_VERBOSITY - * \n DESCRIPTION: Verbosity level for console output \ingroup Config*/ - addEnumOption("CONSOLE_OUTPUT_VERBOSITY", Console_Output_Verb, Verb_Map, VERB_HIGH); /*!\brief COMM_LEVEL * \n DESCRIPTION: Level of MPI communications during runtime \ingroup Config*/ addEnumOption("COMM_LEVEL", Comm_Level, Comm_Map, COMM_FULL); diff --git a/Common/src/geometry_structure.cpp b/Common/src/geometry_structure.cpp index 671c22b2faf9..4f5e4378e903 100644 --- a/Common/src/geometry_structure.cpp +++ b/Common/src/geometry_structure.cpp @@ -15944,949 +15944,6 @@ void CPhysicalGeometry::SetGridVelocity(CConfig *config, unsigned long iter) { } -void CPhysicalGeometry::Set_MPI_Coord(CConfig *config) { - - unsigned short iDim, iMarker, MarkerS, MarkerR; - unsigned long iVertex, iPoint, nVertexS, nVertexR, nBufferS_Vector, nBufferR_Vector; - su2double rotMatrix[3][3], angles[3] = {0.0,0.0,0.0}, theta, cosTheta, sinTheta, phi, cosPhi, sinPhi, psi, cosPsi, sinPsi, *Buffer_Receive_Coord = NULL, *Buffer_Send_Coord = NULL, *Coord = NULL, *newCoord = NULL; - su2double translation[3] = {0.0,0.0,0.0}; - newCoord = new su2double[nDim]; - -#ifdef HAVE_MPI - int send_to, receive_from; - SU2_MPI::Status status; -#endif - - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - - if ((config->GetMarker_All_KindBC(iMarker) == SEND_RECEIVE) && - (config->GetMarker_All_SendRecv(iMarker) > 0)) { - - MarkerS = iMarker; MarkerR = iMarker+1; - -#ifdef HAVE_MPI - send_to = config->GetMarker_All_SendRecv(MarkerS)-1; - receive_from = abs(config->GetMarker_All_SendRecv(MarkerR))-1; -#endif - - nVertexS = nVertex[MarkerS]; nVertexR = nVertex[MarkerR]; - nBufferS_Vector = nVertexS*nDim; nBufferR_Vector = nVertexR*nDim; - - /*--- Allocate Receive and send buffers ---*/ - - Buffer_Receive_Coord = new su2double [nBufferR_Vector]; - Buffer_Send_Coord = new su2double[nBufferS_Vector]; - - /*--- Copy the coordinates that should be sended ---*/ - - for (iVertex = 0; iVertex < nVertexS; iVertex++) { - iPoint = vertex[MarkerS][iVertex]->GetNode(); - Coord = node[iPoint]->GetCoord(); - for (iDim = 0; iDim < nDim; iDim++) - Buffer_Send_Coord[iDim*nVertexS+iVertex] = Coord[iDim]; - } - -#ifdef HAVE_MPI - /*--- Send/Receive information using Sendrecv ---*/ - SU2_MPI::Sendrecv(Buffer_Send_Coord, nBufferS_Vector, MPI_DOUBLE, send_to,0, - Buffer_Receive_Coord, nBufferR_Vector, MPI_DOUBLE, receive_from,0, MPI_COMM_WORLD, &status); -#else - - /*--- Receive information without MPI ---*/ - for (iVertex = 0; iVertex < nVertexR; iVertex++) { - for (iDim = 0; iDim < nDim; iDim++) - Buffer_Receive_Coord[iDim*nVertexR+iVertex] = Buffer_Send_Coord[iDim*nVertexR+iVertex]; - } - -#endif - - /*--- Deallocate send buffer ---*/ - - delete [] Buffer_Send_Coord; - - /*--- Do the coordinate transformation ---*/ - - for (iVertex = 0; iVertex < nVertexR; iVertex++) { - - /*--- Find point and its type of transformation ---*/ - - iPoint = vertex[MarkerR][iVertex]->GetNode(); - //iPeriodic_Index = vertex[MarkerR][iVertex]->GetRotation_Type(); - - /*--- Retrieve the supplied periodic information. ---*/ - - //angles = config->GetPeriodicRotation(iPeriodic_Index); - //translation = config->GetPeriodicTranslate(iPeriodic_Index); - - /*--- Store angles separately for clarity. ---*/ - - theta = angles[0]; phi = angles[1]; psi = angles[2]; - cosTheta = cos(theta); cosPhi = cos(phi); cosPsi = cos(psi); - sinTheta = sin(theta); sinPhi = sin(phi); sinPsi = sin(psi); - - /*--- Compute the rotation matrix. Note that the implicit - ordering is rotation about the x-axis, y-axis, - then z-axis. Note that this is the transpose of the matrix - used during the preprocessing stage. ---*/ - - rotMatrix[0][0] = cosPhi*cosPsi; rotMatrix[1][0] = sinTheta*sinPhi*cosPsi - cosTheta*sinPsi; rotMatrix[2][0] = cosTheta*sinPhi*cosPsi + sinTheta*sinPsi; - rotMatrix[0][1] = cosPhi*sinPsi; rotMatrix[1][1] = sinTheta*sinPhi*sinPsi + cosTheta*cosPsi; rotMatrix[2][1] = cosTheta*sinPhi*sinPsi - sinTheta*cosPsi; - rotMatrix[0][2] = -sinPhi; rotMatrix[1][2] = sinTheta*cosPhi; rotMatrix[2][2] = cosTheta*cosPhi; - - /*--- Copy coordinates before performing transformation. ---*/ - - for (iDim = 0; iDim < nDim; iDim++) - newCoord[iDim] = Buffer_Receive_Coord[iDim*nVertexR+iVertex]; - - /*--- Rotate the coordinates. ---*/ - - if (nDim == 2) { - newCoord[0] = (rotMatrix[0][0]*Buffer_Receive_Coord[0*nVertexR+iVertex] + - rotMatrix[0][1]*Buffer_Receive_Coord[1*nVertexR+iVertex]) - translation[0]; - newCoord[1] = (rotMatrix[1][0]*Buffer_Receive_Coord[0*nVertexR+iVertex] + - rotMatrix[1][1]*Buffer_Receive_Coord[1*nVertexR+iVertex]) - translation[1]; - } - else { - newCoord[0] = (rotMatrix[0][0]*Buffer_Receive_Coord[0*nVertexR+iVertex] + - rotMatrix[0][1]*Buffer_Receive_Coord[1*nVertexR+iVertex] + - rotMatrix[0][2]*Buffer_Receive_Coord[2*nVertexR+iVertex]); - newCoord[1] = (rotMatrix[1][0]*Buffer_Receive_Coord[0*nVertexR+iVertex] + - rotMatrix[1][1]*Buffer_Receive_Coord[1*nVertexR+iVertex] + - rotMatrix[1][2]*Buffer_Receive_Coord[2*nVertexR+iVertex]); - newCoord[2] = (rotMatrix[2][0]*Buffer_Receive_Coord[0*nVertexR+iVertex] + - rotMatrix[2][1]*Buffer_Receive_Coord[1*nVertexR+iVertex] + - rotMatrix[2][2]*Buffer_Receive_Coord[2*nVertexR+iVertex]); - } - - /*--- Copy transformed coordinates back into buffer. ---*/ - - for (iDim = 0; iDim < nDim; iDim++) - node[iPoint]->SetCoord(iDim, newCoord[iDim]); - - } - - /*--- Deallocate receive buffer. ---*/ - - delete [] Buffer_Receive_Coord; - - } - - } - - delete [] newCoord; - -} - -void CPhysicalGeometry::Set_MPI_GridVel(CConfig *config) { - - unsigned short iDim, iMarker, MarkerS, MarkerR; - unsigned long iVertex, iPoint, nVertexS, nVertexR, nBufferS_Vector, nBufferR_Vector; - su2double rotMatrix[3][3], angles[3] = {0.0,0.0,0.0}, theta, cosTheta, sinTheta, phi, cosPhi, sinPhi, psi, cosPsi, sinPsi, *Buffer_Receive_GridVel = NULL, *Buffer_Send_GridVel = NULL, *GridVel = NULL, *newGridVel = NULL; - - newGridVel = new su2double[nDim]; - -#ifdef HAVE_MPI - int send_to, receive_from; - SU2_MPI::Status status; -#endif - - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - - if ((config->GetMarker_All_KindBC(iMarker) == SEND_RECEIVE) && - (config->GetMarker_All_SendRecv(iMarker) > 0)) { - - MarkerS = iMarker; MarkerR = iMarker+1; - -#ifdef HAVE_MPI - send_to = config->GetMarker_All_SendRecv(MarkerS)-1; - receive_from = abs(config->GetMarker_All_SendRecv(MarkerR))-1; -#endif - - nVertexS = nVertex[MarkerS]; nVertexR = nVertex[MarkerR]; - nBufferS_Vector = nVertexS*nDim; nBufferR_Vector = nVertexR*nDim; - - /*--- Allocate Receive and send buffers ---*/ - - Buffer_Receive_GridVel = new su2double [nBufferR_Vector]; - Buffer_Send_GridVel = new su2double[nBufferS_Vector]; - - /*--- Copy the grid velocity that should be sended ---*/ - - for (iVertex = 0; iVertex < nVertexS; iVertex++) { - iPoint = vertex[MarkerS][iVertex]->GetNode(); - GridVel = node[iPoint]->GetGridVel(); - for (iDim = 0; iDim < nDim; iDim++) - Buffer_Send_GridVel[iDim*nVertexS+iVertex] = GridVel[iDim]; - } - -#ifdef HAVE_MPI - /*--- Send/Receive information using Sendrecv ---*/ - SU2_MPI::Sendrecv(Buffer_Send_GridVel, nBufferS_Vector, MPI_DOUBLE, send_to,0, - Buffer_Receive_GridVel, nBufferR_Vector, MPI_DOUBLE, receive_from,0, MPI_COMM_WORLD, &status); -#else - - /*--- Receive information without MPI ---*/ - for (iVertex = 0; iVertex < nVertexR; iVertex++) { - for (iDim = 0; iDim < nDim; iDim++) - Buffer_Receive_GridVel[iDim*nVertexR+iVertex] = Buffer_Send_GridVel[iDim*nVertexR+iVertex]; - } - -#endif - - /*--- Deallocate send buffer ---*/ - - delete [] Buffer_Send_GridVel; - - /*--- Do the coordinate transformation ---*/ - - for (iVertex = 0; iVertex < nVertexR; iVertex++) { - - /*--- Find point and its type of transformation ---*/ - - iPoint = vertex[MarkerR][iVertex]->GetNode(); - //iPeriodic_Index = vertex[MarkerR][iVertex]->GetRotation_Type(); - - /*--- Retrieve the supplied periodic information. ---*/ - - //angles = config->GetPeriodicRotation(iPeriodic_Index); - - /*--- Store angles separately for clarity. ---*/ - theta = angles[0]; phi = angles[1]; psi = angles[2]; - cosTheta = cos(theta); cosPhi = cos(phi); cosPsi = cos(psi); - sinTheta = sin(theta); sinPhi = sin(phi); sinPsi = sin(psi); - - /*--- Compute the rotation matrix. Note that the implicit - ordering is rotation about the x-axis, y-axis, - then z-axis. Note that this is the transpose of the matrix - used during the preprocessing stage. ---*/ - - rotMatrix[0][0] = cosPhi*cosPsi; rotMatrix[1][0] = sinTheta*sinPhi*cosPsi - cosTheta*sinPsi; rotMatrix[2][0] = cosTheta*sinPhi*cosPsi + sinTheta*sinPsi; - rotMatrix[0][1] = cosPhi*sinPsi; rotMatrix[1][1] = sinTheta*sinPhi*sinPsi + cosTheta*cosPsi; rotMatrix[2][1] = cosTheta*sinPhi*sinPsi - sinTheta*cosPsi; - rotMatrix[0][2] = -sinPhi; rotMatrix[1][2] = sinTheta*cosPhi; rotMatrix[2][2] = cosTheta*cosPhi; - - /*--- Copy grid velocity before performing transformation. ---*/ - - for (iDim = 0; iDim < nDim; iDim++) - newGridVel[iDim] = Buffer_Receive_GridVel[iDim*nVertexR+iVertex]; - - if (nDim == 2) { - newGridVel[0] = (rotMatrix[0][0]*Buffer_Receive_GridVel[0*nVertexR+iVertex] + - rotMatrix[0][1]*Buffer_Receive_GridVel[1*nVertexR+iVertex]); - newGridVel[1] = (rotMatrix[1][0]*Buffer_Receive_GridVel[0*nVertexR+iVertex] + - rotMatrix[1][1]*Buffer_Receive_GridVel[1*nVertexR+iVertex]); - } - else { - newGridVel[0] = (rotMatrix[0][0]*Buffer_Receive_GridVel[0*nVertexR+iVertex] + - rotMatrix[0][1]*Buffer_Receive_GridVel[1*nVertexR+iVertex] + - rotMatrix[0][2]*Buffer_Receive_GridVel[2*nVertexR+iVertex]); - newGridVel[1] = (rotMatrix[1][0]*Buffer_Receive_GridVel[0*nVertexR+iVertex] + - rotMatrix[1][1]*Buffer_Receive_GridVel[1*nVertexR+iVertex] + - rotMatrix[1][2]*Buffer_Receive_GridVel[2*nVertexR+iVertex]); - newGridVel[2] = (rotMatrix[2][0]*Buffer_Receive_GridVel[0*nVertexR+iVertex] + - rotMatrix[2][1]*Buffer_Receive_GridVel[1*nVertexR+iVertex] + - rotMatrix[2][2]*Buffer_Receive_GridVel[2*nVertexR+iVertex]); - } - - /*--- Copy transformed grid velocity back into buffer. ---*/ - - for (iDim = 0; iDim < nDim; iDim++) - node[iPoint]->SetGridVel(iDim, newGridVel[iDim]); - - } - - /*--- Deallocate receive buffer ---*/ - - delete [] Buffer_Receive_GridVel; - - } - - } - - delete [] newGridVel; - -} - -void CPhysicalGeometry::Set_MPI_OldCoord(CConfig *config) { - - unsigned short iDim, iMarker, MarkerS, MarkerR; - unsigned long iVertex, iPoint, nVertexS, nVertexR, nBufferS_Vector, nBufferR_Vector; - su2double rotMatrix[3][3], angles[3] = {0.0,0.0,0.0}, theta, cosTheta, sinTheta, phi, cosPhi, sinPhi, psi, cosPsi, sinPsi; - - su2double *Buffer_Receive_Coord_n = NULL, *Buffer_Send_Coord_n = NULL, *Coord_n = NULL, *newCoord_n = NULL; - - newCoord_n = new su2double[nDim]; - -#ifdef HAVE_MPI - int send_to, receive_from; - SU2_MPI::Status status; -#endif - - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - - if ((config->GetMarker_All_KindBC(iMarker) == SEND_RECEIVE) && - (config->GetMarker_All_SendRecv(iMarker) > 0)) { - - MarkerS = iMarker; MarkerR = iMarker+1; - -#ifdef HAVE_MPI - send_to = config->GetMarker_All_SendRecv(MarkerS)-1; - receive_from = abs(config->GetMarker_All_SendRecv(MarkerR))-1; -#endif - - nVertexS = nVertex[MarkerS]; nVertexR = nVertex[MarkerR]; - nBufferS_Vector = nVertexS*nDim; nBufferR_Vector = nVertexR*nDim; - - /*--- Allocate Receive and send buffers ---*/ - - Buffer_Receive_Coord_n = new su2double [nBufferR_Vector]; - Buffer_Send_Coord_n = new su2double[nBufferS_Vector]; - - /*--- Copy the coordinates that should be sended ---*/ - - for (iVertex = 0; iVertex < nVertexS; iVertex++) { - iPoint = vertex[MarkerS][iVertex]->GetNode(); - Coord_n = node[iPoint]->GetCoord_n(); - for (iDim = 0; iDim < nDim; iDim++) - Buffer_Send_Coord_n[iDim*nVertexS+iVertex] = Coord_n[iDim]; - } - -#ifdef HAVE_MPI - /*--- Send/Receive information using Sendrecv ---*/ - SU2_MPI::Sendrecv(Buffer_Send_Coord_n, nBufferS_Vector, MPI_DOUBLE, send_to,0, - Buffer_Receive_Coord_n, nBufferR_Vector, MPI_DOUBLE, receive_from,0, MPI_COMM_WORLD, &status); -#else - - /*--- Receive information without MPI ---*/ - for (iVertex = 0; iVertex < nVertexR; iVertex++) { - for (iDim = 0; iDim < nDim; iDim++) - Buffer_Receive_Coord_n[iDim*nVertexR+iVertex] = Buffer_Send_Coord_n[iDim*nVertexR+iVertex]; - } - -#endif - - /*--- Deallocate send buffer ---*/ - - delete [] Buffer_Send_Coord_n; - - /*--- Do the coordinate transformation ---*/ - - for (iVertex = 0; iVertex < nVertexR; iVertex++) { - - /*--- Find point and its type of transformation ---*/ - - iPoint = vertex[MarkerR][iVertex]->GetNode(); - //iPeriodic_Index = vertex[MarkerR][iVertex]->GetRotation_Type(); - - /*--- Retrieve the supplied periodic information. ---*/ - - //angles = config->GetPeriodicRotation(iPeriodic_Index); - - /*--- Store angles separately for clarity. ---*/ - - theta = angles[0]; phi = angles[1]; psi = angles[2]; - cosTheta = cos(theta); cosPhi = cos(phi); cosPsi = cos(psi); - sinTheta = sin(theta); sinPhi = sin(phi); sinPsi = sin(psi); - - /*--- Compute the rotation matrix. Note that the implicit - ordering is rotation about the x-axis, y-axis, - then z-axis. Note that this is the transpose of the matrix - used during the preprocessing stage. ---*/ - - rotMatrix[0][0] = cosPhi*cosPsi; rotMatrix[1][0] = sinTheta*sinPhi*cosPsi - cosTheta*sinPsi; rotMatrix[2][0] = cosTheta*sinPhi*cosPsi + sinTheta*sinPsi; - rotMatrix[0][1] = cosPhi*sinPsi; rotMatrix[1][1] = sinTheta*sinPhi*sinPsi + cosTheta*cosPsi; rotMatrix[2][1] = cosTheta*sinPhi*sinPsi - sinTheta*cosPsi; - rotMatrix[0][2] = -sinPhi; rotMatrix[1][2] = sinTheta*cosPhi; rotMatrix[2][2] = cosTheta*cosPhi; - - /*--- Copy coordinates before performing transformation. ---*/ - - for (iDim = 0; iDim < nDim; iDim++) - newCoord_n[iDim] = Buffer_Receive_Coord_n[iDim*nVertexR+iVertex]; - - /*--- Rotate the coordinates. ---*/ - - if (nDim == 2) { - newCoord_n[0] = (rotMatrix[0][0]*Buffer_Receive_Coord_n[0*nVertexR+iVertex] + - rotMatrix[0][1]*Buffer_Receive_Coord_n[1*nVertexR+iVertex]); - newCoord_n[1] = (rotMatrix[1][0]*Buffer_Receive_Coord_n[0*nVertexR+iVertex] + - rotMatrix[1][1]*Buffer_Receive_Coord_n[1*nVertexR+iVertex]); - } - else { - newCoord_n[0] = (rotMatrix[0][0]*Buffer_Receive_Coord_n[0*nVertexR+iVertex] + - rotMatrix[0][1]*Buffer_Receive_Coord_n[1*nVertexR+iVertex] + - rotMatrix[0][2]*Buffer_Receive_Coord_n[2*nVertexR+iVertex]); - newCoord_n[1] = (rotMatrix[1][0]*Buffer_Receive_Coord_n[0*nVertexR+iVertex] + - rotMatrix[1][1]*Buffer_Receive_Coord_n[1*nVertexR+iVertex] + - rotMatrix[1][2]*Buffer_Receive_Coord_n[2*nVertexR+iVertex]); - newCoord_n[2] = (rotMatrix[2][0]*Buffer_Receive_Coord_n[0*nVertexR+iVertex] + - rotMatrix[2][1]*Buffer_Receive_Coord_n[1*nVertexR+iVertex] + - rotMatrix[2][2]*Buffer_Receive_Coord_n[2*nVertexR+iVertex]); - } - - /*--- Copy transformed coordinates back into buffer. ---*/ - - node[iPoint]->SetCoord_n(newCoord_n); - - } - - /*--- Deallocate receive buffer. ---*/ - - delete [] Buffer_Receive_Coord_n; - - } - - } - - delete [] newCoord_n; - - /*--------------------------------------------------------------------------------------------------*/ - /*--- We repeat the process for the coordinate n-1, in the case that the simulation is 2nd order ---*/ - /*--------------------------------------------------------------------------------------------------*/ - - if (config->GetUnsteady_Simulation() == DT_STEPPING_2ND) { - - su2double *Buffer_Receive_Coord_n1 = NULL, *Buffer_Send_Coord_n1 = NULL, *Coord_n1 = NULL, *newCoord_n1 = NULL; - newCoord_n1 = new su2double[nDim]; - - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - - if ((config->GetMarker_All_KindBC(iMarker) == SEND_RECEIVE) && - (config->GetMarker_All_SendRecv(iMarker) > 0)) { - - MarkerS = iMarker; MarkerR = iMarker+1; - -#ifdef HAVE_MPI - send_to = config->GetMarker_All_SendRecv(MarkerS)-1; - receive_from = abs(config->GetMarker_All_SendRecv(MarkerR))-1; -#endif - - nVertexS = nVertex[MarkerS]; nVertexR = nVertex[MarkerR]; - nBufferS_Vector = nVertexS*nDim; nBufferR_Vector = nVertexR*nDim; - - /*--- Allocate Receive and send buffers ---*/ - - Buffer_Receive_Coord_n1 = new su2double [nBufferR_Vector]; - Buffer_Send_Coord_n1 = new su2double[nBufferS_Vector]; - - /*--- Copy the coordinates that should be sended ---*/ - - for (iVertex = 0; iVertex < nVertexS; iVertex++) { - iPoint = vertex[MarkerS][iVertex]->GetNode(); - Coord_n1 = node[iPoint]->GetCoord_n1(); - for (iDim = 0; iDim < nDim; iDim++) - Buffer_Send_Coord_n1[iDim*nVertexS+iVertex] = Coord_n1[iDim]; - } - -#ifdef HAVE_MPI - /*--- Send/Receive information using Sendrecv ---*/ - SU2_MPI::Sendrecv(Buffer_Send_Coord_n1, nBufferS_Vector, MPI_DOUBLE, send_to,0, - Buffer_Receive_Coord_n1, nBufferR_Vector, MPI_DOUBLE, receive_from,0, MPI_COMM_WORLD, &status); -#else - - /*--- Receive information without MPI ---*/ - for (iVertex = 0; iVertex < nVertexR; iVertex++) { - for (iDim = 0; iDim < nDim; iDim++) - Buffer_Receive_Coord_n1[iDim*nVertexR+iVertex] = Buffer_Send_Coord_n1[iDim*nVertexR+iVertex]; - } - -#endif - - /*--- Deallocate send buffer ---*/ - - delete [] Buffer_Send_Coord_n1; - - /*--- Do the coordinate transformation ---*/ - - for (iVertex = 0; iVertex < nVertexR; iVertex++) { - - /*--- Find point and its type of transformation ---*/ - - iPoint = vertex[MarkerR][iVertex]->GetNode(); - //iPeriodic_Index = vertex[MarkerR][iVertex]->GetRotation_Type(); - - /*--- Retrieve the supplied periodic information. ---*/ - - //angles = config->GetPeriodicRotation(iPeriodic_Index); - - /*--- Store angles separately for clarity. ---*/ - - theta = angles[0]; phi = angles[1]; psi = angles[2]; - cosTheta = cos(theta); cosPhi = cos(phi); cosPsi = cos(psi); - sinTheta = sin(theta); sinPhi = sin(phi); sinPsi = sin(psi); - - /*--- Compute the rotation matrix. Note that the implicit - ordering is rotation about the x-axis, y-axis, - then z-axis. Note that this is the transpose of the matrix - used during the preprocessing stage. ---*/ - - rotMatrix[0][0] = cosPhi*cosPsi; rotMatrix[1][0] = sinTheta*sinPhi*cosPsi - cosTheta*sinPsi; rotMatrix[2][0] = cosTheta*sinPhi*cosPsi + sinTheta*sinPsi; - rotMatrix[0][1] = cosPhi*sinPsi; rotMatrix[1][1] = sinTheta*sinPhi*sinPsi + cosTheta*cosPsi; rotMatrix[2][1] = cosTheta*sinPhi*sinPsi - sinTheta*cosPsi; - rotMatrix[0][2] = -sinPhi; rotMatrix[1][2] = sinTheta*cosPhi; rotMatrix[2][2] = cosTheta*cosPhi; - - /*--- Copy coordinates before performing transformation. ---*/ - - for (iDim = 0; iDim < nDim; iDim++) - newCoord_n1[iDim] = Buffer_Receive_Coord_n1[iDim*nVertexR+iVertex]; - - /*--- Rotate the coordinates. ---*/ - - if (nDim == 2) { - newCoord_n1[0] = (rotMatrix[0][0]*Buffer_Receive_Coord_n1[0*nVertexR+iVertex] + - rotMatrix[0][1]*Buffer_Receive_Coord_n1[1*nVertexR+iVertex]); - newCoord_n1[1] = (rotMatrix[1][0]*Buffer_Receive_Coord_n1[0*nVertexR+iVertex] + - rotMatrix[1][1]*Buffer_Receive_Coord_n1[1*nVertexR+iVertex]); - } - else { - newCoord_n1[0] = (rotMatrix[0][0]*Buffer_Receive_Coord_n1[0*nVertexR+iVertex] + - rotMatrix[0][1]*Buffer_Receive_Coord_n1[1*nVertexR+iVertex] + - rotMatrix[0][2]*Buffer_Receive_Coord_n1[2*nVertexR+iVertex]); - newCoord_n1[1] = (rotMatrix[1][0]*Buffer_Receive_Coord_n1[0*nVertexR+iVertex] + - rotMatrix[1][1]*Buffer_Receive_Coord_n1[1*nVertexR+iVertex] + - rotMatrix[1][2]*Buffer_Receive_Coord_n1[2*nVertexR+iVertex]); - newCoord_n1[2] = (rotMatrix[2][0]*Buffer_Receive_Coord_n1[0*nVertexR+iVertex] + - rotMatrix[2][1]*Buffer_Receive_Coord_n1[1*nVertexR+iVertex] + - rotMatrix[2][2]*Buffer_Receive_Coord_n1[2*nVertexR+iVertex]); - } - - /*--- Copy transformed coordinates back into buffer. ---*/ - - node[iPoint]->SetCoord_n1(newCoord_n1); - - } - - /*--- Deallocate receive buffer. ---*/ - - delete [] Buffer_Receive_Coord_n1; - - } - - } - - delete [] newCoord_n1; - - } - - /*--------------------------------------------------------------------------------------------------*/ - -} - -void CPhysicalGeometry::Set_MPI_MaxLength(CConfig *config) { - - unsigned short iMarker, MarkerS, MarkerR; - unsigned long iVertex, iPoint, nVertexS, nVertexR, nBufferS, nBufferR; - su2double *Buffer_Receive = NULL, *Buffer_Send = NULL; - -#ifdef HAVE_MPI - int send_to, receive_from; - SU2_MPI::Status status; -#endif - - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - - if ((config->GetMarker_All_KindBC(iMarker) == SEND_RECEIVE) && - (config->GetMarker_All_SendRecv(iMarker) > 0)) { - - MarkerS = iMarker; MarkerR = iMarker+1; - -#ifdef HAVE_MPI - send_to = config->GetMarker_All_SendRecv(MarkerS)-1; - receive_from = abs(config->GetMarker_All_SendRecv(MarkerR))-1; -#endif - - nVertexS = nVertex[MarkerS]; nVertexR = nVertex[MarkerR]; - nBufferS = nVertexS; nBufferR = nVertexR; - - /*--- Allocate Receive and send buffers ---*/ - - Buffer_Receive = new su2double [nBufferR]; - Buffer_Send = new su2double[nBufferS]; - - /*--- Copy the grid velocity that should be sent ---*/ - - for (iVertex = 0; iVertex < nVertexS; iVertex++) { - iPoint = vertex[MarkerS][iVertex]->GetNode(); - const su2double max_length = node[iPoint]->GetMaxLength(); - Buffer_Send[iVertex] = max_length; - } - -#ifdef HAVE_MPI - /*--- Send/Receive information using Sendrecv ---*/ - SU2_MPI::Sendrecv(Buffer_Send, nBufferS, MPI_DOUBLE, send_to, 0, - Buffer_Receive, nBufferR, MPI_DOUBLE, receive_from, 0, - MPI_COMM_WORLD, &status); -#else - - /*--- Receive information without MPI ---*/ - for (iVertex = 0; iVertex < nVertexR; iVertex++) { - Buffer_Receive[iVertex] = Buffer_Send[iVertex]; - } - -#endif - - /*--- Deallocate send buffer ---*/ - - delete [] Buffer_Send; - - - for (iVertex = 0; iVertex < nVertexR; iVertex++) { - iPoint = vertex[MarkerR][iVertex]->GetNode(); - node[iPoint]->SetMaxLength(Buffer_Receive[iVertex]); - } - - /*--- Deallocate receive buffer ---*/ - - delete [] Buffer_Receive; - - } - - } - -} - -void CPhysicalGeometry::SetPeriodicBoundary(CConfig *config) { - - unsigned short iMarker, jMarker, kMarker = 0, iPeriodic, iDim, nPeriodic = 0, VTK_Type; - unsigned long iNode, iIndex, iVertex, iPoint, iElem, kElem; - unsigned long jElem, kPoint = 0, jVertex = 0, jPoint = 0, pPoint = 0, nPointPeriodic, newNodes[4] = {0,0,0,0}; - vector::iterator IterElem, IterPoint[MAX_NUMBER_PERIODIC][2]; - su2double *center, *angles, rotMatrix[3][3] = {{0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}}, - translation[3], *trans, theta, phi, psi, cosTheta, sinTheta, cosPhi, sinPhi, cosPsi, sinPsi, - dx, dy, dz, rotCoord[3], epsilon = 1e-10, mindist = 1e6, *Coord_i, *Coord_j, dist = 0.0; - bool isBadMatch = false; - - /*--- Check this dimensionalization ---*/ - - vector OldBoundaryElems[100]; - vector::iterator IterNewElem[100]; - - /*--- We only create the mirror structure for the second boundary ---*/ - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - if (config->GetMarker_All_KindBC(iMarker) == PERIODIC_BOUNDARY) { - /*--- Evaluate the number of periodic boundary conditions ---*/ - nPeriodic++; - } - } - bool *CreateMirror = new bool[nPeriodic+1]; - CreateMirror[0] = false; - for (iPeriodic = 1; iPeriodic <= nPeriodic; iPeriodic++) { - if (iPeriodic <= nPeriodic/2) CreateMirror[iPeriodic] = false; - else CreateMirror[iPeriodic] = true; - } - - /*--- Send an initial message to the console. ---*/ - cout << "Setting the periodic boundary conditions." << endl; - - /*--- Loop through each marker to find any periodic boundaries. ---*/ - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) - if (config->GetMarker_All_KindBC(iMarker) == PERIODIC_BOUNDARY) { - - /*--- Get marker index of the periodic donor boundary. ---*/ - jMarker = config->GetMarker_Periodic_Donor(config->GetMarker_All_TagBound(iMarker)); - - /*--- Write some info to the console. ---*/ - cout << "Checking " << config->GetMarker_All_TagBound(iMarker); - cout << " boundary against periodic donor, " << config->GetMarker_All_TagBound(jMarker) << ". "; - - /*--- Retrieve the supplied periodic information. ---*/ - center = config->GetPeriodicRotCenter(config->GetMarker_All_TagBound(iMarker)); - angles = config->GetPeriodicRotAngles(config->GetMarker_All_TagBound(iMarker)); - trans = config->GetPeriodicTranslation(config->GetMarker_All_TagBound(iMarker)); - - /*--- Store (center+trans) as it is constant and will be added on. ---*/ - translation[0] = center[0] + trans[0]; - translation[1] = center[1] + trans[1]; - translation[2] = center[2] + trans[2]; - - /*--- Store angles separately for clarity. Compute sines/cosines. ---*/ - theta = angles[0]; - phi = angles[1]; - psi = angles[2]; - - cosTheta = cos(theta); cosPhi = cos(phi); cosPsi = cos(psi); - sinTheta = sin(theta); sinPhi = sin(phi); sinPsi = sin(psi); - - /*--- Compute the rotation matrix. Note that the implicit - ordering is rotation about the x-axis, y-axis, then z-axis. ---*/ - rotMatrix[0][0] = cosPhi*cosPsi; - rotMatrix[1][0] = cosPhi*sinPsi; - rotMatrix[2][0] = -sinPhi; - - rotMatrix[0][1] = sinTheta*sinPhi*cosPsi - cosTheta*sinPsi; - rotMatrix[1][1] = sinTheta*sinPhi*sinPsi + cosTheta*cosPsi; - rotMatrix[2][1] = sinTheta*cosPhi; - - rotMatrix[0][2] = cosTheta*sinPhi*cosPsi + sinTheta*sinPsi; - rotMatrix[1][2] = cosTheta*sinPhi*sinPsi - sinTheta*cosPsi; - rotMatrix[2][2] = cosTheta*cosPhi; - - /*--- Loop through all vertices and find/set the periodic point. ---*/ - for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { - - /*--- Retrieve node information for this boundary point. ---*/ - iPoint = vertex[iMarker][iVertex]->GetNode(); - Coord_i = node[iPoint]->GetCoord(); - - /*--- Get the position vector from rot center to point. ---*/ - dx = Coord_i[0] - center[0]; - dy = Coord_i[1] - center[1]; - if (nDim == 3) { - dz = Coord_i[2] - center[2]; - } else { - dz = 0.0; - } - - /*--- Compute transformed point coordinates. ---*/ - rotCoord[0] = rotMatrix[0][0]*dx - + rotMatrix[0][1]*dy - + rotMatrix[0][2]*dz + translation[0]; - - rotCoord[1] = rotMatrix[1][0]*dx - + rotMatrix[1][1]*dy - + rotMatrix[1][2]*dz + translation[1]; - - rotCoord[2] = rotMatrix[2][0]*dx - + rotMatrix[2][1]*dy - + rotMatrix[2][2]*dz + translation[2]; - - /*--- Perform a search to find the closest donor point. ---*/ - mindist = 1e10; - for (jVertex = 0; jVertex < nVertex[jMarker]; jVertex++) { - - /*--- Retrieve information for this jPoint. ---*/ - jPoint = vertex[jMarker][jVertex]->GetNode(); - Coord_j = node[jPoint]->GetCoord(); - - /*--- Check the distance between the computed periodic - location and this jPoint. ---*/ - dist = 0.0; - for (iDim = 0; iDim < nDim; iDim++) { - dist += (Coord_j[iDim]-rotCoord[iDim])*(Coord_j[iDim]-rotCoord[iDim]); - } - dist = sqrt(dist); - - /*--- Store vertex information if this is the closest - point found thus far. ---*/ - if (dist < mindist) { mindist = dist; pPoint = jPoint; } - } - - /*--- Set the periodic point for this iPoint. ---*/ - vertex[iMarker][iVertex]->SetDonorPoint(pPoint, MASTER_NODE); - - /*--- Print warning if the nearest point was not within - the specified tolerance. Computation will continue. ---*/ - if (mindist > epsilon) { - isBadMatch = true; - cout.precision(10); - cout << endl; - cout << " Bad match for point " << iPoint << ".\tNearest"; - cout << " donor distance: " << scientific << mindist << "."; - } - } - - /*--- Print final warning when finding bad matches. ---*/ - if (isBadMatch) { - cout << endl; - cout << "\n !!! Warning !!!" << endl; - cout << "Bad matches found. Computation will continue, but be cautious.\n"; - } - cout << endl; - isBadMatch = false; - - } - - /*--- Create a vector to identify the points that belong to each periodic boundary condition ---*/ - bool *PeriodicBC = new bool [nPoint]; - for (iPoint = 0; iPoint < nPoint; iPoint++) PeriodicBC[iPoint] = false; - - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) - if (config->GetMarker_All_KindBC(iMarker) == PERIODIC_BOUNDARY) - for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { - iPoint = vertex[iMarker][iVertex]->GetNode(); - PeriodicBC[iPoint] = true; - } - - /*--- Determine the new points that must be added to each periodic boundary, - note that only one of the boundaries require the extra data ---*/ - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - if (config->GetMarker_All_KindBC(iMarker) == PERIODIC_BOUNDARY) { - iPeriodic = config->GetMarker_All_PerBound(iMarker); - - /*--- An integer identify the periodic boundary condition --*/ - for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { - - /*--- iPoint is the original point on the surface and jPoint is the - equivalent point in the other periodic surface ---*/ - iPoint = vertex[iMarker][iVertex]->GetNode(); - jPoint = vertex[iMarker][iVertex]->GetDonorPoint(); - - /*--- First the case in which it is necessary to create a mirror set of elements ---*/ - if (CreateMirror[iPeriodic]) { - /*--- Now we must determine the neighbor points (including indirect ones) to the periodic points - and store all the information (in this list we do not include the points - that already belong to the periodic boundary), we also add the elements that - share a point with the periodic boundary condition ---*/ - for (iIndex = 0; iIndex < node[jPoint]->GetnElem(); iIndex++) { - iElem = node[jPoint]->GetElem(iIndex); - PeriodicElem[iPeriodic].push_back(iElem); - for (unsigned short iNode = 0; iNode < elem[iElem]->GetnNodes(); iNode ++) { - kPoint = elem[iElem]->GetNode(iNode); - if (!PeriodicBC[kPoint]) PeriodicPoint[iPeriodic][0].push_back(kPoint); - } - } - } - /*--- Second the case where no new element is added, neither points ---*/ - else { - PeriodicPoint[iPeriodic][0].push_back(jPoint); - PeriodicPoint[iPeriodic][1].push_back(iPoint); - } - } - } - } - - /*--- Sort the points that must be sended and delete repeated points ---*/ - for (iPeriodic = 1; iPeriodic <= nPeriodic; iPeriodic++) { - if (CreateMirror[iPeriodic]) { - sort( PeriodicPoint[iPeriodic][0].begin(), PeriodicPoint[iPeriodic][0].end()); - IterPoint[iPeriodic][0] = unique( PeriodicPoint[iPeriodic][0].begin(), PeriodicPoint[iPeriodic][0].end()); - PeriodicPoint[iPeriodic][0].resize( IterPoint[iPeriodic][0] - PeriodicPoint[iPeriodic][0].begin() ); - } - } - - /*--- Create a list of the points that receive the values (only the new points) ---*/ - nPointPeriodic = nPoint; - for (iPeriodic = 1; iPeriodic <= nPeriodic; iPeriodic++) { - if (CreateMirror[iPeriodic]) { - for (iPoint = 0; iPoint < PeriodicPoint[iPeriodic][0].size(); iPoint++) { - PeriodicPoint[iPeriodic][1].push_back(nPointPeriodic); - nPointPeriodic++; - } - } - } - - /*--- Sort the elements that must be replicated in the periodic boundary - and delete the repeated elements ---*/ - for (iPeriodic = 1; iPeriodic <= nPeriodic; iPeriodic++) { - if (CreateMirror[iPeriodic]) { - sort( PeriodicElem[iPeriodic].begin(), PeriodicElem[iPeriodic].end()); - IterElem = unique( PeriodicElem[iPeriodic].begin(), PeriodicElem[iPeriodic].end()); - PeriodicElem[iPeriodic].resize( IterElem - PeriodicElem[iPeriodic].begin() ); - } - } - - /*--- Check all SEND points to see if they also lie on another boundary. ---*/ - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { - - /*--- iPoint is a node that lies on the current marker. ---*/ - iPoint = vertex[iMarker][iVertex]->GetNode(); - - /*--- Search through SEND points to check for iPoint. ---*/ - for (iPeriodic = 1; iPeriodic <= nPeriodic; iPeriodic++) { - if (CreateMirror[iPeriodic]) { - - /*--- jPoint is the SEND point. ---*/ - for (iElem = 0; iElem < PeriodicPoint[iPeriodic][0].size(); iElem++) { - jPoint = PeriodicPoint[iPeriodic][0][iElem]; - - /*--- If the two match, then jPoint lies on this boundary. - However, we are concerned with the new points, so we - will store kPoint instead. ---*/ - if (iPoint == jPoint) { -// kPoint = PeriodicPoint[iPeriodic][1][iElem]; - - /*--- We also want the type of boundary element that this point - was within, so that we know what type of element to add - built from the new points. ---*/ - bool isJPoint, isPeriodic; - for (jElem = 0; jElem < nElem_Bound[iMarker]; jElem++) { - isJPoint = false; isPeriodic = false; - for (iNode = 0; iNode < bound[iMarker][jElem]->GetnNodes(); iNode++) { - if (bound[iMarker][jElem]->GetNode(iNode) == jPoint) isJPoint = true; - if (PeriodicBC[bound[iMarker][jElem]->GetNode(iNode)]) isPeriodic = true; - } - - /*--- If both points were found, store this element. ---*/ - if (isJPoint && isPeriodic) { - OldBoundaryElems[iMarker].push_back(jElem); - } - - } - - } - } - } - } - } - } - - /*--- Sort the elements that must be added and remove duplicates. ---*/ - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - sort( OldBoundaryElems[iMarker].begin(), OldBoundaryElems[iMarker].end()); - IterNewElem[iMarker] = unique( OldBoundaryElems[iMarker].begin(), OldBoundaryElems[iMarker].end()); - OldBoundaryElems[iMarker].resize( IterNewElem[iMarker] - OldBoundaryElems[iMarker].begin() ); - } - - /*--- Create the new boundary elements. Points making up these new - elements must either be SEND/RECEIVE or periodic points. ---*/ - nNewElem_Bound = new unsigned long[nMarker]; - newBound = new CPrimalGrid**[nMarker]; - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - - nNewElem_Bound[iMarker] = OldBoundaryElems[iMarker].size(); - newBound[iMarker] = new CPrimalGrid*[nNewElem_Bound[iMarker]]; - - /*--- Loop through all new elements to be added. ---*/ - for (iElem = 0; iElem < nNewElem_Bound[iMarker]; iElem++) { - jElem = OldBoundaryElems[iMarker][iElem]; - - /*--- Loop through all nodes of this element. ---*/ - for (iNode = 0; iNode < bound[iMarker][jElem]->GetnNodes(); iNode++) { - pPoint = bound[iMarker][jElem]->GetNode(iNode); - - /*--- Check if this node is a send point. If so, the corresponding - receive point will be used in making the new boundary element. ---*/ - for (iPeriodic = 1; iPeriodic <= nPeriodic; iPeriodic++) { - for (kElem = 0; kElem < PeriodicPoint[iPeriodic][0].size(); kElem++) { - if (pPoint == PeriodicPoint[iPeriodic][0][kElem]) newNodes[iNode] = PeriodicPoint[iPeriodic][1][kElem]; - } - } - - /*--- Check if this node is a periodic point. If so, the corresponding - periodic point will be used in making the new boundary element. ---*/ - if (PeriodicBC[pPoint]) { - - /*--- Find the corresponding periodic point. ---*/ - for (jMarker = 0; jMarker < config->GetnMarker_All(); jMarker++) { - if (config->GetMarker_All_KindBC(jMarker) == PERIODIC_BOUNDARY) { - for (iVertex = 0; iVertex < nVertex[jMarker]; iVertex++) { - if (pPoint == vertex[jMarker][iVertex]->GetNode()) {kMarker = jMarker; jVertex = iVertex;} - } - } - } - newNodes[iNode] = vertex[kMarker][jVertex]->GetDonorPoint(); - } - } - - /*--- Now instantiate the new element. ---*/ - VTK_Type = bound[iMarker][jElem]->GetVTK_Type(); - switch(VTK_Type) { - case LINE: - newBound[iMarker][iElem] = new CLine(newNodes[0], newNodes[1],2); - break; - case TRIANGLE: - newBound[iMarker][iElem] = new CTriangle(newNodes[0], newNodes[1], newNodes[2],3); - break; - case QUADRILATERAL: - newBound[iMarker][iElem] = new CQuadrilateral(newNodes[0], newNodes[1], newNodes[2], newNodes[3],3); - break; - } - - } - } - - delete [] PeriodicBC; - delete [] CreateMirror; - -} - void CPhysicalGeometry::FindNormal_Neighbor(CConfig *config) { su2double cos_max, scalar_prod, norm_vect, norm_Normal, cos_alpha, diff_coord, *Normal; unsigned long Point_Normal, jPoint; diff --git a/Common/src/toolboxes/MMS/CVerificationSolution.cpp b/Common/src/toolboxes/MMS/CVerificationSolution.cpp index 0cec658b51ee..8c8f5507ae25 100644 --- a/Common/src/toolboxes/MMS/CVerificationSolution.cpp +++ b/Common/src/toolboxes/MMS/CVerificationSolution.cpp @@ -150,7 +150,7 @@ void CVerificationSolution::SetVerificationError(unsigned long nDOFsGlobal, CConfig *config) { /* Disable the reduce for the error to avoid overhead if requested. */ - if (config->GetConsole_Output_Verb() == VERB_HIGH) { + if (config->GetComm_Level() == COMM_FULL) { /*--- Get the number of ranks and the MPI communicator. ---*/ int size = SU2_MPI::GetSize(); diff --git a/SU2_DOT/src/SU2_DOT.cpp b/SU2_DOT/src/SU2_DOT.cpp index 59298cc5b653..2237b257f7a6 100644 --- a/SU2_DOT/src/SU2_DOT.cpp +++ b/SU2_DOT/src/SU2_DOT.cpp @@ -107,7 +107,7 @@ int main(int argc, char *argv[]) { } /*--- Initialize the configuration of the driver ---*/ - driver_config = new CConfig(config_file_name, SU2_DOT, ZONE_0, nZone, 0, VERB_NONE); + driver_config = new CConfig(config_file_name, SU2_DOT, ZONE_0, nZone, 0, false); /*--- Initialize a char to store the zone filename ---*/ char zone_file_name[MAX_STRING_SIZE]; @@ -127,10 +127,10 @@ int main(int argc, char *argv[]) { if (multizone){ strcpy(zone_file_name, driver_config->GetConfigFilename(iZone).c_str()); - config_container[iZone] = new CConfig(zone_file_name, SU2_DOT, iZone, nZone, 0, VERB_HIGH); + config_container[iZone] = new CConfig(zone_file_name, SU2_DOT, iZone, nZone, 0, true); } else{ - config_container[iZone] = new CConfig(config_file_name, SU2_DOT, iZone, nZone, 0, VERB_HIGH); + config_container[iZone] = new CConfig(config_file_name, SU2_DOT, iZone, nZone, 0, true); } config_container[iZone]->SetMPICommunicator(MPICommunicator); diff --git a/SU2_SOL/src/SU2_SOL.cpp b/SU2_SOL/src/SU2_SOL.cpp index c2ef3c67e039..ab0d7c700dc3 100644 --- a/SU2_SOL/src/SU2_SOL.cpp +++ b/SU2_SOL/src/SU2_SOL.cpp @@ -99,7 +99,7 @@ int main(int argc, char *argv[]) { } /*--- Initialize the configuration of the driver ---*/ - driver_config = new CConfig(config_file_name, SU2_SOL, ZONE_0, nZone, 0, VERB_NONE); + driver_config = new CConfig(config_file_name, SU2_SOL, ZONE_0, nZone, 0, false); /*--- Initialize a char to store the zone filename ---*/ char zone_file_name[MAX_STRING_SIZE]; diff --git a/TestCases/coupled_cht/incompressible/configFlow.cfg b/TestCases/coupled_cht/incompressible/configFlow.cfg index 2ad7340f2f02..bf817523d633 100644 --- a/TestCases/coupled_cht/incompressible/configFlow.cfg +++ b/TestCases/coupled_cht/incompressible/configFlow.cfg @@ -135,5 +135,4 @@ WRT_RESIDUALS= YES WRT_LIMITERS= NO WRT_SHARPEDGES= NO LOW_MEMORY_OUTPUT= NO -CONSOLE_OUTPUT_VERBOSITY= HIGH READ_BINARY_RESTART= YES diff --git a/TestCases/coupled_cht/incompressible/configSolid.cfg b/TestCases/coupled_cht/incompressible/configSolid.cfg index 925958895d54..4a6002bacdd3 100644 --- a/TestCases/coupled_cht/incompressible/configSolid.cfg +++ b/TestCases/coupled_cht/incompressible/configSolid.cfg @@ -92,5 +92,4 @@ WRT_RESIDUALS= YES WRT_LIMITERS= NO WRT_SHARPEDGES= NO LOW_MEMORY_OUTPUT= NO -CONSOLE_OUTPUT_VERBOSITY= HIGH READ_BINARY_RESTART= YES diff --git a/TestCases/coupled_cht/incompressible/coupled_cht_incompressible.cfg b/TestCases/coupled_cht/incompressible/coupled_cht_incompressible.cfg index a4ffaf6e90f0..545694f8da24 100644 --- a/TestCases/coupled_cht/incompressible/coupled_cht_incompressible.cfg +++ b/TestCases/coupled_cht/incompressible/coupled_cht_incompressible.cfg @@ -218,6 +218,4 @@ WRT_SHARPEDGES= NO LOW_MEMORY_OUTPUT= NO -CONSOLE_OUTPUT_VERBOSITY= HIGH - READ_BINARY_RESTART= YES diff --git a/TestCases/deformation/cylindrical_ffd/def_cylindrical.cfg b/TestCases/deformation/cylindrical_ffd/def_cylindrical.cfg index 19c88176bf06..519a574a0e52 100644 --- a/TestCases/deformation/cylindrical_ffd/def_cylindrical.cfg +++ b/TestCases/deformation/cylindrical_ffd/def_cylindrical.cfg @@ -333,6 +333,3 @@ WRT_SHARPEDGES= NO % % Minimize the required output memory LOW_MEMORY_OUTPUT= NO -% -% Verbosity of console output: NONE removes minor MPI overhead (NONE, HIGH) -CONSOLE_OUTPUT_VERBOSITY= HIGH diff --git a/TestCases/deformation/spherical_ffd/def_spherical.cfg b/TestCases/deformation/spherical_ffd/def_spherical.cfg index 2765315b76fb..c041eff5ae51 100644 --- a/TestCases/deformation/spherical_ffd/def_spherical.cfg +++ b/TestCases/deformation/spherical_ffd/def_spherical.cfg @@ -336,6 +336,3 @@ WRT_SHARPEDGES= NO % % Minimize the required output memory LOW_MEMORY_OUTPUT= NO -% -% Verbosity of console output: NONE removes minor MPI overhead (NONE, HIGH) -CONSOLE_OUTPUT_VERBOSITY= HIGH diff --git a/TestCases/deformation/spherical_ffd/def_spherical_bspline.cfg b/TestCases/deformation/spherical_ffd/def_spherical_bspline.cfg index a073c8685d88..361cb5f80100 100644 --- a/TestCases/deformation/spherical_ffd/def_spherical_bspline.cfg +++ b/TestCases/deformation/spherical_ffd/def_spherical_bspline.cfg @@ -343,6 +343,3 @@ WRT_SHARPEDGES= NO % % Minimize the required output memory LOW_MEMORY_OUTPUT= NO -% -% Verbosity of console output: NONE removes minor MPI overhead (NONE, HIGH) -CONSOLE_OUTPUT_VERBOSITY= HIGH diff --git a/TestCases/disc_adj_euler/arina2k/Arina2KRS.cfg b/TestCases/disc_adj_euler/arina2k/Arina2KRS.cfg index 142528de8101..e5ea67755481 100644 --- a/TestCases/disc_adj_euler/arina2k/Arina2KRS.cfg +++ b/TestCases/disc_adj_euler/arina2k/Arina2KRS.cfg @@ -653,9 +653,6 @@ WRT_SURFACE= NO % Minimize the required output memory LOW_MEMORY_OUTPUT= NO % -% Verbosity of console output: NONE removes minor MPI overhead (NONE, HIGH) -CONSOLE_OUTPUT_VERBOSITY= HIGH -% % Write binary restart files (YES, NO) WRT_BINARY_RESTART= YES % diff --git a/TestCases/disc_adj_euler/cylinder3D/inv_cylinder3D.cfg b/TestCases/disc_adj_euler/cylinder3D/inv_cylinder3D.cfg index cf03194efd0f..77c4efa35c90 100644 --- a/TestCases/disc_adj_euler/cylinder3D/inv_cylinder3D.cfg +++ b/TestCases/disc_adj_euler/cylinder3D/inv_cylinder3D.cfg @@ -361,9 +361,6 @@ WRT_SURFACE= NO % Minimize the required output memory LOW_MEMORY_OUTPUT= NO % -% Verbosity of console output: NONE removes minor MPI overhead (NONE, HIGH) -CONSOLE_OUTPUT_VERBOSITY= HIGH -% % Write binary restart files (YES, NO) WRT_BINARY_RESTART= YES % diff --git a/TestCases/disc_adj_heat/disc_adj_heat.cfg b/TestCases/disc_adj_heat/disc_adj_heat.cfg index 20bfefd5b655..a6fcdbe02f75 100644 --- a/TestCases/disc_adj_heat/disc_adj_heat.cfg +++ b/TestCases/disc_adj_heat/disc_adj_heat.cfg @@ -245,8 +245,6 @@ WRT_SHARPEDGES= NO LOW_MEMORY_OUTPUT= NO -CONSOLE_OUTPUT_VERBOSITY= HIGH - %WRT_BINARY_RESTART= NO %READ_BINARY_RESTART= NO diff --git a/TestCases/py_wrapper/flatPlate_rigidMotion/flatPlate_rigidMotion_Conf.cfg b/TestCases/py_wrapper/flatPlate_rigidMotion/flatPlate_rigidMotion_Conf.cfg index 7dee5b94dabd..ba251e577267 100644 --- a/TestCases/py_wrapper/flatPlate_rigidMotion/flatPlate_rigidMotion_Conf.cfg +++ b/TestCases/py_wrapper/flatPlate_rigidMotion/flatPlate_rigidMotion_Conf.cfg @@ -603,9 +603,6 @@ WRT_SURFACE= NO % Minimize the required output memory LOW_MEMORY_OUTPUT= NO % -% Verbosity of console output: NONE removes minor MPI overhead (NONE, HIGH) -CONSOLE_OUTPUT_VERBOSITY= HIGH -% % Write binary restart files (YES, NO) WRT_BINARY_RESTART= YES % diff --git a/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg b/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg index 5379ea3b1a27..4d8051718181 100644 --- a/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg +++ b/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg @@ -603,9 +603,6 @@ WRT_SURFACE= NO % Minimize the required output memory LOW_MEMORY_OUTPUT= NO % -% Verbosity of console output: NONE removes minor MPI overhead (NONE, HIGH) -CONSOLE_OUTPUT_VERBOSITY= HIGH -% % Write binary restart files (YES, NO) WRT_BINARY_RESTART= YES % diff --git a/TestCases/rans/propeller/propeller.cfg b/TestCases/rans/propeller/propeller.cfg index 21fdcbe3d260..4bfec0fe08a1 100644 --- a/TestCases/rans/propeller/propeller.cfg +++ b/TestCases/rans/propeller/propeller.cfg @@ -293,6 +293,3 @@ WRT_SHARPEDGES= NO % % Minimize the required output memory LOW_MEMORY_OUTPUT= NO -% -% Verbosity of console output: NONE removes minor MPI overhead (NONE, HIGH) -CONSOLE_OUTPUT_VERBOSITY= HIGH diff --git a/config_template.cfg b/config_template.cfg index ade449fc26e0..4e058385e8a4 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -1360,9 +1360,6 @@ WRT_SURFACE= NO % Minimize the required output memory LOW_MEMORY_OUTPUT= NO % -% Verbosity of console output: NONE removes minor MPI overhead (NONE, HIGH) -CONSOLE_OUTPUT_VERBOSITY= HIGH -% % Write binary restart files (YES, NO) WRT_BINARY_RESTART= YES %