Skip to content

Commit 9c1aec0

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into move_fem_files
2 parents 7dd940d + 661d5fa commit 9c1aec0

43 files changed

Lines changed: 380 additions & 380 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Common/include/CConfig.hpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,13 +1322,13 @@ class CConfig {
13221322
* \brief Print the header to screen
13231323
* \param val_software - Kind of software component
13241324
*/
1325-
void SetHeader(unsigned short val_software);
1325+
void SetHeader(unsigned short val_software) const;
13261326

13271327
/*!
13281328
* \brief Get the MPI communicator of SU2.
13291329
* \return MPI communicator of SU2.
13301330
*/
1331-
SU2_MPI::Comm GetMPICommunicator();
1331+
SU2_MPI::Comm GetMPICommunicator() const;
13321332

13331333
/*!
13341334
* \brief Set the MPI communicator for SU2.
@@ -3937,7 +3937,7 @@ class CConfig {
39373937
* \brief Get flag for whether a second gradient calculation is required for upwind reconstruction alone.
39383938
* \return <code>TRUE</code> means that a second gradient will be calculated for upwind reconstruction.
39393939
*/
3940-
bool GetReconstructionGradientRequired(void) { return ReconstructionGradientRequired; }
3940+
bool GetReconstructionGradientRequired(void) const { return ReconstructionGradientRequired; }
39413941

39423942
/*!
39433943
* \brief Get flag for whether a least-squares gradient method is being applied.
@@ -5403,13 +5403,13 @@ class CConfig {
54035403
* \brief Append the zone index to the restart or the solution files.
54045404
* \return Name of the restart file for the flow variables.
54055405
*/
5406-
string GetMultizone_FileName(string val_filename, int val_iZone, string ext);
5406+
string GetMultizone_FileName(string val_filename, int val_iZone, string ext) const;
54075407

54085408
/*!
54095409
* \brief Append the zone index to the restart or the solution files.
54105410
* \return Name of the restart file for the flow variables.
54115411
*/
5412-
string GetMultizone_HistoryFileName(string val_filename, int val_iZone, string ext);
5412+
string GetMultizone_HistoryFileName(string val_filename, int val_iZone, string ext) const;
54135413

54145414
/*!
54155415
* \brief Append the instance index to the restart or the solution files.
@@ -5483,7 +5483,7 @@ class CConfig {
54835483
* \param[in] val_iter - Unsteady iteration number or time instance.
54845484
* \return Name of the file with the iteration number for an unsteady solution file.
54855485
*/
5486-
string GetUnsteady_FileName(string val_filename, int val_iter, string ext);
5486+
string GetUnsteady_FileName(string val_filename, int val_iter, string ext) const;
54875487

54885488
/*!
54895489
* \brief Append the input filename string with the appropriate objective function extension.
@@ -5688,7 +5688,7 @@ class CConfig {
56885688
* \param[in] val - new value of the origin
56895689
* \return The mesh motion origin.
56905690
*/
5691-
void SetMotion_Origin(su2double* val) { for (int iDim = 0; iDim < 3; iDim++) Motion_Origin[iDim] = val[iDim]; }
5691+
void SetMotion_Origin(const su2double* val) { for (int iDim = 0; iDim < 3; iDim++) Motion_Origin[iDim] = val[iDim]; }
56925692

56935693
/*!
56945694
* \brief Get the mesh motion origin.
@@ -5703,7 +5703,7 @@ class CConfig {
57035703
* \param[in] val - new value of the origin
57045704
* \param[in] iMarkerMoving - Index of the moving marker (as specified in Marker_Moving)
57055705
*/
5706-
void SetMarkerMotion_Origin(su2double* val, unsigned short iMarkerMoving) {
5706+
void SetMarkerMotion_Origin(const su2double* val, unsigned short iMarkerMoving) {
57075707
for (int iDim = 0; iDim < 3; iDim++) MarkerMotion_Origin[3*iMarkerMoving + iDim] = val[iDim];
57085708
}
57095709

@@ -8338,7 +8338,7 @@ class CConfig {
83388338
* \brief Get the current number of non-physical reconstructions for 2nd-order upwinding.
83398339
* \return Current number of non-physical reconstructions for 2nd-order upwinding.
83408340
*/
8341-
unsigned long GetNonphysical_Reconstr(void) { return Nonphys_Reconstr; }
8341+
unsigned long GetNonphysical_Reconstr(void) const { return Nonphys_Reconstr; }
83428342

83438343
/*!
83448344
* \brief Given arrays x[1..n] and y[1..n] containing a tabulated function, i.e., yi = f(xi), with
@@ -8401,7 +8401,7 @@ class CConfig {
84018401
*
84028402
* \brief Set freestream turbonormal for initializing solution.
84038403
*/
8404-
void SetFreeStreamTurboNormal(su2double* turboNormal);
8404+
void SetFreeStreamTurboNormal(const su2double* turboNormal);
84058405

84068406
/*!
84078407
*

Common/include/fem/fem_gauss_jacobi_quadrature.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,14 @@ class CGaussJacobiQuadrature {
164164
* \brief Function in the original implementation of John Burkardt to compute
165165
the integration points of the Gauss-Jacobi quadrature rule.
166166
*/
167-
void scqf(int nt, passivedouble t[], int mlt[], passivedouble wts[], int nwts, int ndx[],
167+
void scqf(int nt, const passivedouble t[], const int mlt[], const passivedouble wts[], int nwts, int ndx[],
168168
passivedouble swts[], passivedouble st[], int kind, passivedouble alpha,
169169
passivedouble beta, passivedouble a, passivedouble b);
170170

171171
/*!
172172
* \brief Function in the original implementation of John Burkardt to compute
173173
the integration points of the Gauss-Jacobi quadrature rule.
174174
*/
175-
void sgqf(int nt, passivedouble aj[], passivedouble bj[], passivedouble zemu, passivedouble t[],
175+
void sgqf(int nt, const passivedouble aj[], passivedouble bj[], passivedouble zemu, passivedouble t[],
176176
passivedouble wts[]);
177177
};

Common/include/fem/fem_geometry_structure.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,13 +532,13 @@ class CMeshFEM: public CGeometry {
532532
* \brief Function, which makes available the number of owned volume elements in the local FEM mesh.
533533
* \return Number of owned volume elements of the local FEM mesh.
534534
*/
535-
inline unsigned long GetNVolElemOwned(void) {return nVolElemOwned;}
535+
inline unsigned long GetNVolElemOwned(void) const {return nVolElemOwned;}
536536

537537
/*!
538538
* \brief Function, which makes available the total number of volume elements in the local FEM mesh.
539539
* \return Total number of volume elements of the local FEM mesh.
540540
*/
541-
inline unsigned long GetNVolElemTot(void) {return nVolElemTot;}
541+
inline unsigned long GetNVolElemTot(void) const {return nVolElemTot;}
542542

543543
/*!
544544
* \brief Function, which makes available the volume elements in the local FEM mesh.

Common/include/fem/fem_standard_element.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class CFEMStandardElementBase {
119119
* \brief Function, which makes available the polynomial order that must be integrated exactly.
120120
* \return The polynomial order that must be integrated exactly.
121121
*/
122-
inline unsigned short GetOrderExact(void){return orderExact;}
122+
inline unsigned short GetOrderExact(void) const {return orderExact;}
123123

124124
/*!
125125
* \brief Static function, which computes the inverse of the given square matrix.
@@ -698,7 +698,7 @@ class CFEMStandardElementBase {
698698
* \return The value of the viscous penalty parameter.
699699
*/
700700
su2double ViscousPenaltyParameter(const unsigned short VTK_TypeElem,
701-
const unsigned short nPolyElem);
701+
const unsigned short nPolyElem) const;
702702
private:
703703
/*!
704704
* \brief Function, which determines the 1D Gauss Legendre integration points and weights.
@@ -1117,7 +1117,7 @@ class CFEMStandardElement : public CFEMStandardElementBase {
11171117
unsigned short vert0,
11181118
unsigned short vert1,
11191119
unsigned short vert2,
1120-
unsigned short vert3);
1120+
unsigned short vert3) const;
11211121

11221122
/*!
11231123
* \brief Function, which changes the given triangular connectivity, such that the direction coincides
@@ -1130,7 +1130,7 @@ class CFEMStandardElement : public CFEMStandardElementBase {
11301130
void ChangeDirectionTriangleConn(vector<unsigned short> &connTriangle,
11311131
unsigned short vert0,
11321132
unsigned short vert1,
1133-
unsigned short vert2);
1133+
unsigned short vert2) const;
11341134

11351135
/*!
11361136
* \brief Function, which copies the data of the given object into the current object.

Common/include/geometry/CGeometry.hpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ class CGeometry {
295295
* \param[in] commType - Enumerated type for the quantity to be communicated.
296296
* \param[in] val_reverse - Boolean controlling forward or reverse communication between neighbors.
297297
*/
298-
void PostP2PRecvs(CGeometry *geometry, CConfig *config, unsigned short commType, bool val_reverse);
298+
void PostP2PRecvs(CGeometry *geometry, CConfig *config, unsigned short commType, bool val_reverse) const;
299299

300300
/*!
301301
* \brief Routine to launch a single non-blocking send once the buffer is loaded for a point-to-point commucation.
@@ -306,7 +306,7 @@ class CGeometry {
306306
* \param[in] val_iMessage - Index of the message in the order they are stored.
307307
* \param[in] val_reverse - Boolean controlling forward or reverse communication between neighbors.
308308
*/
309-
void PostP2PSends(CGeometry *geometry, CConfig *config, unsigned short commType, int val_iMessage, bool val_reverse);
309+
void PostP2PSends(CGeometry *geometry, CConfig *config, unsigned short commType, int val_iMessage, bool val_reverse) const;
310310

311311
/*!
312312
* \brief Routine to set up persistent data structures for periodic communications.
@@ -338,7 +338,7 @@ class CGeometry {
338338
* \param[in] commType - Enumerated type for the quantity to be communicated.
339339
* \param[in] val_iMessage - Index of the message in the order they are stored.
340340
*/
341-
void PostPeriodicSends(CGeometry *geometry, CConfig *config, unsigned short commType, int val_iMessage);
341+
void PostPeriodicSends(CGeometry *geometry, CConfig *config, unsigned short commType, int val_iMessage) const;
342342

343343
/*!
344344
* \brief Routine to load a geometric quantity into the data structures for MPI point-to-point communication and to
@@ -347,7 +347,7 @@ class CGeometry {
347347
* \param[in] config - Definition of the particular problem.
348348
* \param[in] commType - Enumerated type for the quantity to be communicated.
349349
*/
350-
void InitiateComms(CGeometry *geometry, CConfig *config, unsigned short commType);
350+
void InitiateComms(CGeometry *geometry, CConfig *config, unsigned short commType) const;
351351

352352
/*!
353353
* \brief Routine to complete the set of non-blocking communications launched by InitiateComms() and unpacking of the data into the geometry class.
@@ -473,15 +473,15 @@ class CGeometry {
473473
* \param[in] second_point - Second point of the edge.
474474
* \return Index of the edge.
475475
*/
476-
long FindEdge(unsigned long first_point, unsigned long second_point);
476+
long FindEdge(unsigned long first_point, unsigned long second_point) const;
477477

478478
/*!
479479
* \brief Get the edge index from using the nodes of the edge.
480480
* \param[in] first_point - First point of the edge.
481481
* \param[in] second_point - Second point of the edge.
482482
* \return Index of the edge.
483483
*/
484-
bool CheckEdge(unsigned long first_point, unsigned long second_point);
484+
bool CheckEdge(unsigned long first_point, unsigned long second_point) const;
485485

486486
/*!
487487
* \brief Get the distance between a plane (defined by three point) and a point.
@@ -491,12 +491,12 @@ class CGeometry {
491491
* \param[in] kCoord - Coordinates of the third point that defines the plane.
492492
* \return Signed distance.
493493
*/
494-
su2double Point2Plane_Distance(su2double *Coord, su2double *iCoord, su2double *jCoord, su2double *kCoord);
494+
su2double Point2Plane_Distance(const su2double *Coord, const su2double *iCoord, const su2double *jCoord, const su2double *kCoord);
495495

496496
/*!
497497
* \brief Create a file for testing the geometry.
498498
*/
499-
void TestGeometry(void);
499+
void TestGeometry(void) const;
500500

501501
/*!
502502
* \brief A virtual member.
@@ -919,7 +919,7 @@ class CGeometry {
919919
su2double MinXCoord, su2double MaxXCoord,
920920
su2double MinYCoord, su2double MaxYCoord,
921921
su2double MinZCoord, su2double MaxZCoord,
922-
su2double *FlowVariable,
922+
const su2double *FlowVariable,
923923
vector<su2double> &Xcoord_Airfoil, vector<su2double> &Ycoord_Airfoil,
924924
vector<su2double> &Zcoord_Airfoil, vector<su2double> &Variable_Airfoil,
925925
bool original_surface, CConfig *config);
@@ -1219,38 +1219,38 @@ class CGeometry {
12191219
* \param[in] Intersection - Definition of the particular problem.
12201220
* \return If the intersection has has been successful.
12211221
*/
1222-
bool SegmentIntersectsPlane(su2double *Segment_P0, su2double *Segment_P1, su2double Variable_P0, su2double Variable_P1,
1223-
su2double *Plane_P0, su2double *Plane_Normal, su2double *Intersection, su2double &Variable_Interp);
1222+
bool SegmentIntersectsPlane(const su2double *Segment_P0, const su2double *Segment_P1, su2double Variable_P0, su2double Variable_P1,
1223+
const su2double *Plane_P0, const su2double *Plane_Normal, su2double *Intersection, su2double &Variable_Interp);
12241224

12251225
/*!
12261226
* \brief Ray Intersects Triangle (Moller and Trumbore algorithm)
12271227
*/
1228-
bool RayIntersectsTriangle(su2double orig[3], su2double dir[3],
1229-
su2double vert0[3], su2double vert1[3], su2double vert2[3],
1228+
bool RayIntersectsTriangle(const su2double orig[3], const su2double dir[3],
1229+
const su2double vert0[3], const su2double vert1[3], const su2double vert2[3],
12301230
su2double *intersect);
12311231

12321232
/*!
12331233
* \brief Segment Intersects Triangle
12341234
*/
1235-
bool SegmentIntersectsTriangle(su2double point0[3], su2double point1[3],
1235+
bool SegmentIntersectsTriangle(su2double point0[3], const su2double point1[3],
12361236
su2double vert0[3], su2double vert1[3], su2double vert2[3]);
12371237

12381238
/*!
12391239
* \brief Segment Intersects Line (for 2D FFD Intersection)
12401240
*/
1241-
bool SegmentIntersectsLine(su2double point0[2], su2double point1[2], su2double vert0[2], su2double vert1[2]);
1241+
bool SegmentIntersectsLine(const su2double point0[2], const su2double point1[2], const su2double vert0[2], const su2double vert1[2]);
12421242

12431243
/*!
12441244
* \brief Register the coordinates of the mesh nodes.
12451245
* \param[in] config
12461246
*/
1247-
void RegisterCoordinates(CConfig *config);
1247+
void RegisterCoordinates(CConfig *config) const;
12481248

12491249
/*!
12501250
* \brief Register the coordinates of the mesh nodes as output.
12511251
* \param[in] config
12521252
*/
1253-
void RegisterOutput_Coordinates(CConfig *config);
1253+
void RegisterOutput_Coordinates(CConfig *config) const;
12541254

12551255
/*!
12561256
* \brief Update the multi-grid structure and the wall-distance.

Common/include/geometry/CPhysicalGeometry.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,10 @@ class CPhysicalGeometry final : public CGeometry {
232232
* \param[in] countPerElem - Pieces of data per element communicated.
233233
*/
234234
void InitiateCommsAll(void *bufSend,
235-
int *nElemSend,
235+
const int *nElemSend,
236236
SU2_MPI::Request *sendReq,
237237
void *bufRecv,
238-
int *nElemRecv,
238+
const int *nElemRecv,
239239
SU2_MPI::Request *recvReq,
240240
unsigned short countPerElem,
241241
unsigned short commType);

Common/include/geometry/meshreader/CCGNSMeshReaderFVM.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ class CCGNSMeshReaderFVM: public CMeshReaderFVM {
126126
* \param[in] countPerElem - Pieces of data per element communicated.
127127
*/
128128
void InitiateCommsAll(void *bufSend,
129-
int *nElemSend,
129+
const int *nElemSend,
130130
SU2_MPI::Request *sendReq,
131131
void *bufRecv,
132-
int *nElemRecv,
132+
const int *nElemRecv,
133133
SU2_MPI::Request *recvReq,
134134
unsigned short countPerElem,
135135
unsigned short commType);

Common/include/geometry/meshreader/CMeshReaderFVM.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class CMeshReaderFVM {
8383
* \brief Get the physical dimension of the problem (2 or 3).
8484
* \returns Physical dimension of the problem.
8585
*/
86-
inline unsigned short GetDimension() {
86+
inline unsigned short GetDimension() const {
8787
return dimension;
8888
}
8989

@@ -125,7 +125,7 @@ class CMeshReaderFVM {
125125
* \brief Get the total number of markers in the mesh zone.
126126
* \returns Total number of markers in the mesh zone.
127127
*/
128-
inline unsigned long GetNumberOfMarkers() {
128+
inline unsigned long GetNumberOfMarkers() const {
129129
return numberOfMarkers;
130130
}
131131

@@ -141,31 +141,31 @@ class CMeshReaderFVM {
141141
* \brief Get the number of local grid points within the linear partition on this rank.
142142
* \returns Number of local grid points within the linear partition on this rank.
143143
*/
144-
inline unsigned long GetNumberOfLocalPoints() {
144+
inline unsigned long GetNumberOfLocalPoints() const {
145145
return numberOfLocalPoints;
146146
}
147147

148148
/*!
149149
* \brief Get the number of global grid points within the mesh file.
150150
* \returns Number of global grid points within the mesh file.
151151
*/
152-
inline unsigned long GetNumberOfGlobalPoints() {
152+
inline unsigned long GetNumberOfGlobalPoints() const {
153153
return numberOfGlobalPoints;
154154
}
155155

156156
/*!
157157
* \brief Get the number of local elements within the linear partition on this rank.
158158
* \returns Number of local elements within the linear partition on this rank.
159159
*/
160-
inline unsigned long GetNumberOfLocalElements() {
160+
inline unsigned long GetNumberOfLocalElements() const {
161161
return numberOfLocalElements;
162162
}
163163

164164
/*!
165165
* \brief Get the number of global elements within the mesh file.
166166
* \returns Number of global elements within the mesh file.
167167
*/
168-
inline unsigned long GetNumberOfGlobalElements() {
168+
inline unsigned long GetNumberOfGlobalElements() const {
169169
return numberOfGlobalElements;
170170
}
171171

0 commit comments

Comments
 (0)