Skip to content

Commit 02c1e4d

Browse files
committed
delete dead-code for "nearfield" and "interface" boundaries
1 parent 8e7bd69 commit 02c1e4d

26 files changed

+23
-1962
lines changed

Common/include/geometry/CGeometry.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -721,12 +721,6 @@ class CGeometry {
721721
*/
722722
inline virtual void VisualizeControlVolume(const CConfig *config) const {}
723723

724-
/*!
725-
* \brief A virtual member.
726-
* \param[in] config - Definition of the particular problem.
727-
*/
728-
inline virtual void MatchNearField(CConfig *config) {}
729-
730724
/*!
731725
* \brief A virtual member.
732726
* \param[in] config - Definition of the particular problem.

Common/include/geometry/CMultiGridGeometry.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,6 @@ class CMultiGridGeometry final : public CGeometry {
102102
*/
103103
void SetControlVolume(CConfig *config, CGeometry *geometry, unsigned short action) override;
104104

105-
/*!
106-
* \brief Mach the near field boundary condition.
107-
* \param[in] config - Definition of the particular problem.
108-
*/
109-
void MatchNearField(CConfig *config) override;
110-
111105
/*!
112106
* \brief Mach the near field boundary condition.
113107
* \param[in] config - Definition of the particular problem.

Common/include/geometry/CPhysicalGeometry.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -445,12 +445,6 @@ class CPhysicalGeometry final : public CGeometry {
445445
*/
446446
void VisualizeControlVolume(const CConfig *config) const override;
447447

448-
/*!
449-
* \brief Mach the near field boundary condition.
450-
* \param[in] config - Definition of the particular problem.
451-
*/
452-
void MatchNearField(CConfig *config) override;
453-
454448
/*!
455449
* \brief Mach the near field boundary condition.
456450
* \param[in] config - Definition of the particular problem.

Common/include/option_structure.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,9 +1076,6 @@ enum BC_TYPE {
10761076
PERIODIC_BOUNDARY = 6, /*!< \brief Periodic boundary definition. */
10771077
NEARFIELD_BOUNDARY = 7, /*!< \brief Near-Field boundary definition. */
10781078
CUSTOM_BOUNDARY = 10, /*!< \brief custom boundary definition. */
1079-
INTERFACE_BOUNDARY = 11, /*!< \brief Domain interface boundary definition. */
1080-
DIRICHLET = 12, /*!< \brief Boundary Euler wall definition. */
1081-
NEUMANN = 13, /*!< \brief Boundary Neumann definition. */
10821079
DISPLACEMENT_BOUNDARY = 14, /*!< \brief Boundary displacement definition. */
10831080
LOAD_BOUNDARY = 15, /*!< \brief Boundary Load definition. */
10841081
FLOWLOAD_BOUNDARY = 16, /*!< \brief Boundary Load definition. */

Common/src/geometry/CMultiGridGeometry.cpp

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,25 +1012,6 @@ void CMultiGridGeometry::SetVertex(CGeometry *fine_grid, CConfig *config) {
10121012
}
10131013
}
10141014

1015-
void CMultiGridGeometry::MatchNearField(CConfig *config) {
1016-
1017-
unsigned short iMarker;
1018-
unsigned long iVertex, iPoint;
1019-
int iProcessor = size;
1020-
1021-
for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) {
1022-
if (config->GetMarker_All_KindBC(iMarker) == NEARFIELD_BOUNDARY) {
1023-
for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) {
1024-
iPoint = vertex[iMarker][iVertex]->GetNode();
1025-
if (nodes->GetDomain(iPoint)) {
1026-
vertex[iMarker][iVertex]->SetDonorPoint(iPoint, nodes->GetGlobalIndex(iPoint), iVertex, iMarker, iProcessor);
1027-
}
1028-
}
1029-
}
1030-
}
1031-
1032-
}
1033-
10341015
void CMultiGridGeometry::MatchActuator_Disk(CConfig *config) {
10351016

10361017
unsigned short iMarker;
@@ -1337,7 +1318,7 @@ void CMultiGridGeometry::FindNormal_Neighbor(CConfig *config) {
13371318
for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) {
13381319

13391320
if (config->GetMarker_All_KindBC(iMarker) != SEND_RECEIVE &&
1340-
config->GetMarker_All_KindBC(iMarker) != INTERFACE_BOUNDARY &&
1321+
config->GetMarker_All_KindBC(iMarker) != INTERNAL_BOUNDARY &&
13411322
config->GetMarker_All_KindBC(iMarker) != NEARFIELD_BOUNDARY ) {
13421323

13431324
for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) {

Common/src/geometry/CPhysicalGeometry.cpp

Lines changed: 2 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -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 << ".\tNearest";
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-
68336655
void 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++) {

SU2_CFD/include/gradients/computeGradientsGreenGauss.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ void computeGradientsGreenGauss(CSolver* solver,
135135
for (size_t iMarker = 0; iMarker < geometry.GetnMarker(); ++iMarker)
136136
{
137137
if ((config.GetMarker_All_KindBC(iMarker) != INTERNAL_BOUNDARY) &&
138+
(config.GetMarker_All_KindBC(iMarker) != NEARFIELD_BOUNDARY) &&
138139
(config.GetMarker_All_KindBC(iMarker) != PERIODIC_BOUNDARY))
139140
{
140141
/*--- Work is shared in inner loop as two markers

SU2_CFD/include/solvers/CAdjEulerSolver.hpp

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,6 @@ class CAdjEulerSolver : public CSolver {
119119
unsigned short iMesh,
120120
unsigned long Iteration) override;
121121

122-
/*!
123-
* \brief Parallelization of Undivided Laplacian.
124-
* \param[in] geometry - Geometrical definition of the problem.
125-
* \param[in] config - Definition of the particular problem.
126-
*/
127-
void Set_MPI_Nearfield(CGeometry *geometry, CConfig *config);
128-
129122
/*!
130123
* \brief Parallelization of Undivided Laplacian.
131124
* \param[in] geometry - Geometrical definition of the problem.
@@ -143,16 +136,6 @@ class CAdjEulerSolver : public CSolver {
143136
CSolver **solver_container,
144137
CConfig *config) final;
145138

146-
/*!
147-
* \brief Compute the jump for the interior boundary problem.
148-
* \param[in] geometry - Geometrical definition of the problem.
149-
* \param[in] solver_container - Container vector with all the solutions.
150-
* \param[in] config - Definition of the particular problem.
151-
*/
152-
void SetIntBoundary_Jump(CGeometry *geometry,
153-
CSolver **solver_container,
154-
CConfig *config) final;
155-
156139
/*!
157140
* \brief Compute adjoint density at the infinity.
158141
* \return Value of the adjoint density at the infinity.
@@ -322,34 +305,6 @@ class CAdjEulerSolver : public CSolver {
322305
CConfig *config,
323306
unsigned short val_marker) override;
324307

325-
/*!
326-
* \brief Impose the interface boundary condition using the residual.
327-
* \param[in] geometry - Geometrical definition of the problem.
328-
* \param[in] solver_container - Container vector with all the solutions.
329-
* \param[in] numerics - Description of the numerical method.
330-
* \param[in] config - Definition of the particular problem.
331-
* \param[in] val_marker - Surface marker where the boundary condition is applied.
332-
*/
333-
void BC_Interface_Boundary(CGeometry *geometry,
334-
CSolver **solver_container,
335-
CNumerics *numerics,
336-
CConfig *config,
337-
unsigned short val_marker) final;
338-
339-
/*!
340-
* \brief Impose the near-field boundary condition using the residual.
341-
* \param[in] geometry - Geometrical definition of the problem.
342-
* \param[in] solver_container - Container vector with all the solutions.
343-
* \param[in] numerics - Description of the numerical method.
344-
* \param[in] config - Definition of the particular problem.
345-
* \param[in] val_marker - Surface marker where the boundary condition is applied.
346-
*/
347-
void BC_NearField_Boundary(CGeometry *geometry,
348-
CSolver **solver_container,
349-
CNumerics *numerics,
350-
CConfig *config,
351-
unsigned short val_marker) final;
352-
353308
/*!
354309
* \brief Impose an actuator disk inlet boundary condition.
355310
* \param[in] geometry - Geometrical definition of the problem.

0 commit comments

Comments
 (0)