@@ -3640,7 +3640,7 @@ void CPhysicalGeometry::SetBoundaries(CConfig *config) {
36403640 Point_Surface = bound[iMarker][iElem_Surface]->GetNode (iNode_Surface);
36413641 nodes->SetBoundary (Point_Surface, nMarker);
36423642 if (config->GetMarker_All_KindBC (iMarker) != SEND_RECEIVE &&
3643- config->GetMarker_All_KindBC (iMarker) != INTERFACE_BOUNDARY &&
3643+ config->GetMarker_All_KindBC (iMarker) != INTERNAL_BOUNDARY &&
36443644 config->GetMarker_All_KindBC (iMarker) != NEARFIELD_BOUNDARY &&
36453645 config->GetMarker_All_KindBC (iMarker) != PERIODIC_BOUNDARY)
36463646 nodes->SetPhysicalBoundary (Point_Surface, true );
@@ -4888,7 +4888,6 @@ void CPhysicalGeometry::SetRCM_Ordering(CConfig *config) {
48884888 nodes->SetBoundary (InvResult[iPoint], nMarker);
48894889 if (config->GetMarker_All_KindBC (iMarker) != SEND_RECEIVE &&
48904890 config->GetMarker_All_KindBC (iMarker) != INTERNAL_BOUNDARY &&
4891- config->GetMarker_All_KindBC (iMarker) != INTERFACE_BOUNDARY &&
48924891 config->GetMarker_All_KindBC (iMarker) != NEARFIELD_BOUNDARY &&
48934892 config->GetMarker_All_KindBC (iMarker) != PERIODIC_BOUNDARY)
48944893 nodes->SetPhysicalBoundary (InvResult[iPoint], true );
@@ -6653,183 +6652,6 @@ void CPhysicalGeometry::SetMaxLength(CConfig* config) {
66536652
66546653}
66556654
6656- void CPhysicalGeometry::MatchNearField (CConfig *config) {
6657-
6658- su2double epsilon = 1e-1 ;
6659-
6660- unsigned short nMarker_NearFieldBound = config->GetnMarker_NearFieldBound ();
6661-
6662- if (nMarker_NearFieldBound != 0 ) {
6663-
6664- unsigned short iMarker, iDim, jMarker, pMarker = 0 ;
6665- unsigned long iVertex, iPoint, pVertex = 0 , pPoint = 0 , jVertex, jPoint, iPointGlobal, jPointGlobal, jVertex_, pPointGlobal = 0 ;
6666- su2double *Coord_i, Coord_j[3 ], dist = 0.0 , mindist, maxdist_local, maxdist_global;
6667- int iProcessor, pProcessor = 0 ;
6668- unsigned long nLocalVertex_NearField = 0 , MaxLocalVertex_NearField = 0 ;
6669- int nProcessor = size;
6670-
6671- unsigned long *Buffer_Send_nVertex = new unsigned long [1 ];
6672- unsigned long *Buffer_Receive_nVertex = new unsigned long [nProcessor];
6673-
6674- if (rank == MASTER_NODE) cout << " Set NearField boundary conditions (if any)." << endl;
6675-
6676- /* --- Compute the number of vertex that have interfase boundary condition
6677- without including the ghost nodes ---*/
6678-
6679- nLocalVertex_NearField = 0 ;
6680- for (iMarker = 0 ; iMarker < config->GetnMarker_All (); iMarker++)
6681- if (config->GetMarker_All_KindBC (iMarker) == NEARFIELD_BOUNDARY)
6682- for (iVertex = 0 ; iVertex < GetnVertex (iMarker); iVertex++) {
6683- iPoint = vertex[iMarker][iVertex]->GetNode ();
6684- if (nodes->GetDomain (iPoint)) nLocalVertex_NearField ++;
6685- }
6686-
6687- Buffer_Send_nVertex[0 ] = nLocalVertex_NearField;
6688-
6689- /* --- Send NearField vertex information --*/
6690-
6691- SU2_MPI::Allreduce (&nLocalVertex_NearField, &MaxLocalVertex_NearField, 1 , MPI_UNSIGNED_LONG, MPI_MAX, SU2_MPI::GetComm ());
6692- SU2_MPI::Allgather (Buffer_Send_nVertex, 1 , MPI_UNSIGNED_LONG, Buffer_Receive_nVertex, 1 , MPI_UNSIGNED_LONG, SU2_MPI::GetComm ());
6693-
6694- su2double *Buffer_Send_Coord = new su2double [MaxLocalVertex_NearField*nDim];
6695- unsigned long *Buffer_Send_Point = new unsigned long [MaxLocalVertex_NearField];
6696- unsigned long *Buffer_Send_GlobalIndex = new unsigned long [MaxLocalVertex_NearField];
6697- unsigned long *Buffer_Send_Vertex = new unsigned long [MaxLocalVertex_NearField];
6698- unsigned long *Buffer_Send_Marker = new unsigned long [MaxLocalVertex_NearField];
6699-
6700- su2double *Buffer_Receive_Coord = new su2double [nProcessor*MaxLocalVertex_NearField*nDim];
6701- unsigned long *Buffer_Receive_Point = new unsigned long [nProcessor*MaxLocalVertex_NearField];
6702- unsigned long *Buffer_Receive_GlobalIndex = new unsigned long [nProcessor*MaxLocalVertex_NearField];
6703- unsigned long *Buffer_Receive_Vertex = new unsigned long [nProcessor*MaxLocalVertex_NearField];
6704- unsigned long *Buffer_Receive_Marker = new unsigned long [nProcessor*MaxLocalVertex_NearField];
6705-
6706- unsigned long nBuffer_Coord = MaxLocalVertex_NearField*nDim;
6707- unsigned long nBuffer_Point = MaxLocalVertex_NearField;
6708- unsigned long nBuffer_GlobalIndex = MaxLocalVertex_NearField;
6709- unsigned long nBuffer_Vertex = MaxLocalVertex_NearField;
6710- unsigned long nBuffer_Marker = MaxLocalVertex_NearField;
6711-
6712- for (iVertex = 0 ; iVertex < MaxLocalVertex_NearField; iVertex++) {
6713- Buffer_Send_Point[iVertex] = 0 ;
6714- Buffer_Send_GlobalIndex[iVertex] = 0 ;
6715- Buffer_Send_Vertex[iVertex] = 0 ;
6716- Buffer_Send_Marker[iVertex] = 0 ;
6717- for (iDim = 0 ; iDim < nDim; iDim++)
6718- Buffer_Send_Coord[iVertex*nDim+iDim] = 0.0 ;
6719- }
6720-
6721- /* --- Copy coordinates and point to the auxiliar vector --*/
6722-
6723- nLocalVertex_NearField = 0 ;
6724- for (iMarker = 0 ; iMarker < config->GetnMarker_All (); iMarker++)
6725- if (config->GetMarker_All_KindBC (iMarker) == NEARFIELD_BOUNDARY)
6726- for (iVertex = 0 ; iVertex < GetnVertex (iMarker); iVertex++) {
6727- iPoint = vertex[iMarker][iVertex]->GetNode ();
6728- iPointGlobal = nodes->GetGlobalIndex (iPoint);
6729- if (nodes->GetDomain (iPoint)) {
6730- Buffer_Send_Point[nLocalVertex_NearField] = iPoint;
6731- Buffer_Send_GlobalIndex[nLocalVertex_NearField] = iPointGlobal;
6732- Buffer_Send_Vertex[nLocalVertex_NearField] = iVertex;
6733- Buffer_Send_Marker[nLocalVertex_NearField] = iMarker;
6734- for (iDim = 0 ; iDim < nDim; iDim++)
6735- Buffer_Send_Coord[nLocalVertex_NearField*nDim+iDim] = nodes->GetCoord (iPoint, iDim);
6736- nLocalVertex_NearField++;
6737- }
6738- }
6739-
6740- SU2_MPI::Allgather (Buffer_Send_Coord, nBuffer_Coord, MPI_DOUBLE, Buffer_Receive_Coord, nBuffer_Coord, MPI_DOUBLE, SU2_MPI::GetComm ());
6741- SU2_MPI::Allgather (Buffer_Send_Point, nBuffer_Point, MPI_UNSIGNED_LONG, Buffer_Receive_Point, nBuffer_Point, MPI_UNSIGNED_LONG, SU2_MPI::GetComm ());
6742- SU2_MPI::Allgather (Buffer_Send_GlobalIndex, nBuffer_GlobalIndex, MPI_UNSIGNED_LONG, Buffer_Receive_GlobalIndex, nBuffer_GlobalIndex, MPI_UNSIGNED_LONG, SU2_MPI::GetComm ());
6743- SU2_MPI::Allgather (Buffer_Send_Vertex, nBuffer_Vertex, MPI_UNSIGNED_LONG, Buffer_Receive_Vertex, nBuffer_Vertex, MPI_UNSIGNED_LONG, SU2_MPI::GetComm ());
6744- SU2_MPI::Allgather (Buffer_Send_Marker, nBuffer_Marker, MPI_UNSIGNED_LONG, Buffer_Receive_Marker, nBuffer_Marker, MPI_UNSIGNED_LONG, SU2_MPI::GetComm ());
6745-
6746-
6747- /* --- Compute the closest point to a Near-Field boundary point ---*/
6748-
6749- maxdist_local = 0.0 ;
6750- for (iMarker = 0 ; iMarker < config->GetnMarker_All (); iMarker++) {
6751- if (config->GetMarker_All_KindBC (iMarker) == NEARFIELD_BOUNDARY) {
6752-
6753- for (iVertex = 0 ; iVertex < nVertex[iMarker]; iVertex++) {
6754- iPoint = vertex[iMarker][iVertex]->GetNode ();
6755- iPointGlobal = nodes->GetGlobalIndex (iPoint);
6756-
6757- if (nodes->GetDomain (iPoint)) {
6758-
6759- /* --- Coordinates of the boundary point ---*/
6760-
6761- Coord_i = nodes->GetCoord (iPoint); mindist = 1E6 ; pProcessor = 0 ; pPoint = 0 ;
6762-
6763- /* --- Loop over all the boundaries to find the pair ---*/
6764- for (iProcessor = 0 ; iProcessor < nProcessor; iProcessor++)
6765- for (jVertex = 0 ; jVertex < Buffer_Receive_nVertex[iProcessor]; jVertex++) {
6766- jPoint = Buffer_Receive_Point[iProcessor*MaxLocalVertex_NearField+jVertex];
6767- jPointGlobal = Buffer_Receive_GlobalIndex[iProcessor*MaxLocalVertex_NearField+jVertex];
6768- jVertex_ = Buffer_Receive_Vertex[iProcessor*MaxLocalVertex_NearField+jVertex];
6769- jMarker = Buffer_Receive_Marker[iProcessor*MaxLocalVertex_NearField+jVertex];
6770-
6771- if (jPointGlobal != iPointGlobal) {
6772-
6773- /* --- Compute the distance ---*/
6774-
6775- dist = 0.0 ; for (iDim = 0 ; iDim < nDim; iDim++) {
6776- Coord_j[iDim] = Buffer_Receive_Coord[(iProcessor*MaxLocalVertex_NearField+jVertex)*nDim+iDim];
6777- dist += pow (Coord_j[iDim]-Coord_i[iDim],2.0 );
6778- } dist = sqrt (dist);
6779-
6780- if (((dist < mindist) && (iProcessor != rank)) ||
6781- ((dist < mindist) && (iProcessor == rank) && (jPoint != iPoint))) {
6782- mindist = dist; pProcessor = iProcessor; pPoint = jPoint; pPointGlobal = jPointGlobal;
6783- pVertex = jVertex_; pMarker = jMarker;
6784- if (dist == 0.0 ) break ;
6785- }
6786- }
6787- }
6788-
6789- /* --- Store the value of the pair ---*/
6790-
6791- maxdist_local = max (maxdist_local, mindist);
6792- vertex[iMarker][iVertex]->SetDonorPoint (pPoint, pPointGlobal, pVertex, pMarker, pProcessor);
6793-
6794- if (mindist > epsilon) {
6795- cout.precision (10 );
6796- cout << endl;
6797- cout << " Bad match for point " << iPoint << " .\t Nearest" ;
6798- cout << " donor distance: " << scientific << mindist << " ." ;
6799- vertex[iMarker][iVertex]->SetDonorPoint (iPoint, iPointGlobal, pVertex, pMarker, pProcessor);
6800- maxdist_local = min (maxdist_local, 0.0 );
6801- }
6802-
6803- }
6804- }
6805- }
6806- }
6807-
6808- SU2_MPI::Reduce (&maxdist_local, &maxdist_global, 1 , MPI_DOUBLE, MPI_MAX, MASTER_NODE, SU2_MPI::GetComm ());
6809-
6810- if (rank == MASTER_NODE) cout <<" The max distance between points is: " << maxdist_global <<" ." << endl;
6811-
6812- delete[] Buffer_Send_Coord;
6813- delete[] Buffer_Send_Point;
6814-
6815- delete[] Buffer_Receive_Coord;
6816- delete[] Buffer_Receive_Point;
6817-
6818- delete[] Buffer_Send_nVertex;
6819- delete[] Buffer_Receive_nVertex;
6820-
6821- delete [] Buffer_Send_GlobalIndex;
6822- delete [] Buffer_Send_Vertex;
6823- delete [] Buffer_Send_Marker;
6824-
6825- delete [] Buffer_Receive_GlobalIndex;
6826- delete [] Buffer_Receive_Vertex;
6827- delete [] Buffer_Receive_Marker;
6828-
6829- }
6830-
6831- }
6832-
68336655void CPhysicalGeometry::MatchActuator_Disk (CConfig *config) {
68346656
68356657 su2double epsilon = 1e-1 ;
@@ -8618,7 +8440,7 @@ void CPhysicalGeometry::FindNormal_Neighbor(CConfig *config) {
86188440 for (iMarker = 0 ; iMarker < config->GetnMarker_All (); iMarker++) {
86198441
86208442 if (config->GetMarker_All_KindBC (iMarker) != SEND_RECEIVE &&
8621- config->GetMarker_All_KindBC (iMarker) != INTERFACE_BOUNDARY &&
8443+ config->GetMarker_All_KindBC (iMarker) != INTERNAL_BOUNDARY &&
86228444 config->GetMarker_All_KindBC (iMarker) != NEARFIELD_BOUNDARY ) {
86238445
86248446 for (iVertex = 0 ; iVertex < nVertex[iMarker]; iVertex++) {
0 commit comments