Skip to content

Commit 38803d8

Browse files
committed
Removing some const specifiers from setters.
1 parent 5236b8a commit 38803d8

9 files changed

Lines changed: 38 additions & 38 deletions

File tree

Common/include/geometry/CGeometry.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -522,14 +522,14 @@ class CGeometry {
522522
* \param[in] val_marker - Marker of the boundary.
523523
* \param[in] val_index - Index of the marker.
524524
*/
525-
inline void SetMarker_Tag(unsigned short val_marker, string val_index) const { Tag_to_Marker[val_marker] = std::move(val_index); }
525+
inline void SetMarker_Tag(unsigned short val_marker, string val_index) { Tag_to_Marker[val_marker] = std::move(val_index); }
526526

527527
/*!
528528
* \brief Set the number of boundary elements.
529529
* \param[in] val_marker - Marker of the boundary.
530530
* \param[in] val_nelem_bound - Number of boundary elements.
531531
*/
532-
inline void SetnElem_Bound(unsigned short val_marker, unsigned long val_nelem_bound) const {
532+
inline void SetnElem_Bound(unsigned short val_marker, unsigned long val_nelem_bound) {
533533
nElem_Bound[val_marker]= val_nelem_bound;
534534
}
535535

@@ -867,27 +867,27 @@ class CGeometry {
867867
* \param[in] config - Definition of the particular problem.
868868
* \param[in] print - Display information on screen.
869869
*/
870-
void SetRotationalVelocity(CConfig *config, bool print = false) const;
870+
void SetRotationalVelocity(CConfig *config, bool print = false);
871871

872872
/*!
873873
* \brief Set the rotational velocity of the points on the shroud markers to 0.
874874
* \param[in] config - Definition of the particular problem.
875875
*/
876-
void SetShroudVelocity(CConfig *config) const;
876+
void SetShroudVelocity(CConfig *config);
877877

878878
/*!
879879
* \brief Set the translational velocity at each node.
880880
* \param[in] config - Definition of the particular problem.
881881
* \param[in] print - Display information on screen.
882882
*/
883-
void SetTranslationalVelocity(CConfig *config, bool print = false) const;
883+
void SetTranslationalVelocity(CConfig *config, bool print = false);
884884

885885
/*!
886886
* \brief Set the grid velocity via finite differencing at each node.
887887
* \param[in] config - Definition of the particular problem.
888888
* \param[in] iter - Current physical time step.
889889
*/
890-
void SetGridVelocity(CConfig *config, unsigned long iter) const;
890+
void SetGridVelocity(CConfig *config, unsigned long iter);
891891

892892
/*!
893893
* \brief A virtual member.
@@ -1585,7 +1585,7 @@ class CGeometry {
15851585
* \brief Compute and store the volume of the elements.
15861586
* \param[in] config - Problem configuration.
15871587
*/
1588-
void SetElemVolume(CConfig *config) const;
1588+
void SetElemVolume(CConfig *config);
15891589

15901590
/*!
15911591
* \brief Set the multigrid index for the current geometry object.

Common/include/grid_movement_structure.hpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ class CFreeFormDefBox : public CGridMovement {
539539
* \param[in] val_coord - Coordinates of the corner point with index <i>val_icornerpoints</i>.
540540
* \param[in] val_icornerpoints - Index of the corner point.
541541
*/
542-
void SetCoordCornerPoints(const su2double *val_coord, unsigned short val_icornerpoints) const;
542+
void SetCoordCornerPoints(const su2double *val_coord, unsigned short val_icornerpoints);
543543

544544
/*!
545545
* \overload
@@ -548,7 +548,7 @@ class CFreeFormDefBox : public CGridMovement {
548548
* \param[in] val_zcoord - Z coordinate of the corner point with index <i>val_icornerpoints</i>.
549549
* \param[in] val_icornerpoints - Index of the corner point.
550550
*/
551-
void SetCoordCornerPoints(su2double val_xcoord, su2double val_ycoord, su2double val_zcoord, unsigned short val_icornerpoints) const;
551+
void SetCoordCornerPoints(su2double val_xcoord, su2double val_ycoord, su2double val_zcoord, unsigned short val_icornerpoints);
552552

553553
/*!
554554
* \brief Set the coordinates of the control points.
@@ -557,7 +557,7 @@ class CFreeFormDefBox : public CGridMovement {
557557
* \param[in] jDegree - Index of the FFDBox, j direction.
558558
* \param[in] kDegree - Index of the FFDBox, k direction.
559559
*/
560-
void SetCoordControlPoints(const su2double *val_coord, unsigned short iDegree, unsigned short jDegree, unsigned short kDegree) const;
560+
void SetCoordControlPoints(const su2double *val_coord, unsigned short iDegree, unsigned short jDegree, unsigned short kDegree);
561561

562562
/*!
563563
* \brief Set the coordinates of the control points.
@@ -566,7 +566,7 @@ class CFreeFormDefBox : public CGridMovement {
566566
* \param[in] jDegree - Index of the FFDBox, j direction.
567567
* \param[in] kDegree - Index of the FFDBox, k direction.
568568
*/
569-
void SetCoordControlPoints_Copy(const su2double *val_coord, unsigned short iDegree, unsigned short jDegree, unsigned short kDegree) const;
569+
void SetCoordControlPoints_Copy(const su2double *val_coord, unsigned short iDegree, unsigned short jDegree, unsigned short kDegree);
570570

571571
/*!
572572
* \brief Set the coordinates of the control points.
@@ -575,7 +575,7 @@ class CFreeFormDefBox : public CGridMovement {
575575
* \param[in] jDegree - Index of the FFDBox, j direction.
576576
* \param[in] kDegree - Index of the FFDBox, k direction.
577577
*/
578-
void SetParCoordControlPoints(const su2double *val_coord, unsigned short iDegree, unsigned short jDegree, unsigned short kDegree) const;
578+
void SetParCoordControlPoints(const su2double *val_coord, unsigned short iDegree, unsigned short jDegree, unsigned short kDegree);
579579

580580
/*!
581581
* \brief Get the coordinates of the corner points.
@@ -613,7 +613,7 @@ class CFreeFormDefBox : public CGridMovement {
613613
/*!
614614
* \brief Set the control points in a parallelepiped (hexahedron).
615615
*/
616-
void SetControlPoints_Parallelepiped(void) const;
616+
void SetControlPoints_Parallelepiped(void);
617617

618618
/*!
619619
* \brief Set the control points of the final chuck in a unitary hexahedron free form.
@@ -626,7 +626,7 @@ class CFreeFormDefBox : public CGridMovement {
626626
* \param[in] val_index - Local index (i, j, k) of the control point.
627627
* \param[in] movement - Movement of the control point.
628628
*/
629-
void SetControlPoints(const unsigned short *val_index, const su2double *movement) const;
629+
void SetControlPoints(const unsigned short *val_index, const su2double *movement);
630630

631631
/*!
632632
* \brief Set the original value of the control points.
@@ -659,13 +659,13 @@ class CFreeFormDefBox : public CGridMovement {
659659
* \brief Set Cylindrical to Cartesians_ControlPoints.
660660
* \param[in] config - Definition of the particular problem.
661661
*/
662-
void SetCyl2Cart_ControlPoints(CConfig *config) const;
662+
void SetCyl2Cart_ControlPoints(CConfig *config);
663663

664664
/*!
665665
* \brief Set Cartesians to Cylindrical ControlPoints.
666666
* \param[in] config - Definition of the particular problem.
667667
*/
668-
void SetCart2Cyl_ControlPoints(CConfig *config) const;
668+
void SetCart2Cyl_ControlPoints(CConfig *config);
669669

670670
/*!
671671
* \brief Set Cylindrical to Cartesians_CornerPoints.
@@ -683,13 +683,13 @@ class CFreeFormDefBox : public CGridMovement {
683683
* \brief Set Spherical to Cartesians ControlPoints.
684684
* \param[in] config - Definition of the particular problem.
685685
*/
686-
void SetSphe2Cart_ControlPoints(CConfig *config) const;
686+
void SetSphe2Cart_ControlPoints(CConfig *config);
687687

688688
/*!
689689
* \brief SetCartesians to Spherical ControlPoints.
690690
* \param[in] config - Definition of the particular problem.
691691
*/
692-
void SetCart2Sphe_ControlPoints(CConfig *config) const;
692+
void SetCart2Sphe_ControlPoints(CConfig *config);
693693

694694
/*!
695695
* \brief Set Spherical to Cartesians_CornerPoints.

Common/include/grid_movement_structure.inl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,35 +137,35 @@ inline void CFreeFormDefBox::SetmOrder(unsigned short val_mOrder) { mOrder = val
137137

138138
inline void CFreeFormDefBox::SetnOrder(unsigned short val_nOrder) { nOrder = val_nOrder; nDegree = nOrder-1;}
139139

140-
inline void CFreeFormDefBox::SetCoordCornerPoints(const su2double *val_coord, unsigned short val_icornerpoints) const {
140+
inline void CFreeFormDefBox::SetCoordCornerPoints(const su2double *val_coord, unsigned short val_icornerpoints) {
141141
for (unsigned short iDim = 0; iDim < nDim; iDim++)
142142
Coord_Corner_Points[val_icornerpoints][iDim] = val_coord[iDim];
143143
}
144144

145-
inline void CFreeFormDefBox::SetCoordControlPoints(const su2double *val_coord, unsigned short iDegree, unsigned short jDegree, unsigned short kDegree) const {
145+
inline void CFreeFormDefBox::SetCoordControlPoints(const su2double *val_coord, unsigned short iDegree, unsigned short jDegree, unsigned short kDegree) {
146146
for (unsigned short iDim = 0; iDim < nDim; iDim++) {
147147
Coord_Control_Points[iDegree][jDegree][kDegree][iDim] = val_coord[iDim];
148148
}
149149
}
150150

151-
inline void CFreeFormDefBox::SetCoordControlPoints_Copy(const su2double *val_coord, unsigned short iDegree, unsigned short jDegree, unsigned short kDegree) const {
151+
inline void CFreeFormDefBox::SetCoordControlPoints_Copy(const su2double *val_coord, unsigned short iDegree, unsigned short jDegree, unsigned short kDegree) {
152152
for (unsigned short iDim = 0; iDim < nDim; iDim++) {
153153
Coord_Control_Points_Copy[iDegree][jDegree][kDegree][iDim] = val_coord[iDim];
154154
}
155155
}
156156

157-
inline void CFreeFormDefBox::SetParCoordControlPoints(const su2double *val_coord, unsigned short iDegree, unsigned short jDegree, unsigned short kDegree) const {
157+
inline void CFreeFormDefBox::SetParCoordControlPoints(const su2double *val_coord, unsigned short iDegree, unsigned short jDegree, unsigned short kDegree) {
158158
for (unsigned short iDim = 0; iDim < nDim; iDim++)
159159
ParCoord_Control_Points[iDegree][jDegree][kDegree][iDim] = val_coord[iDim];
160160
}
161161

162-
inline void CFreeFormDefBox::SetCoordCornerPoints(su2double val_xcoord, su2double val_ycoord, su2double val_zcoord, unsigned short val_icornerpoints) const {
162+
inline void CFreeFormDefBox::SetCoordCornerPoints(su2double val_xcoord, su2double val_ycoord, su2double val_zcoord, unsigned short val_icornerpoints) {
163163
Coord_Corner_Points[val_icornerpoints][0] = val_xcoord;
164164
Coord_Corner_Points[val_icornerpoints][1] = val_ycoord;
165165
Coord_Corner_Points[val_icornerpoints][2] = val_zcoord;
166166
}
167167

168-
inline void CFreeFormDefBox::SetControlPoints(const unsigned short *val_index, const su2double *movement) const {
168+
inline void CFreeFormDefBox::SetControlPoints(const unsigned short *val_index, const su2double *movement) {
169169
for (unsigned short iDim = 0; iDim < nDim; iDim++)
170170
Coord_Control_Points[val_index[0]][val_index[1]][val_index[2]][iDim] += movement[iDim];
171171
}

Common/src/geometry/CGeometry.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3628,7 +3628,7 @@ bool CGeometry::GetRadialNeighbourhood(const unsigned long iElem_global,
36283628
return finished;
36293629
}
36303630

3631-
void CGeometry::SetElemVolume(CConfig *config) const
3631+
void CGeometry::SetElemVolume(CConfig *config)
36323632
{
36333633
SU2_OMP_PARALLEL
36343634
{
@@ -3784,7 +3784,7 @@ void CGeometry::SetGeometryPlanes(CConfig *config) {
37843784
delete[] FaceArea;
37853785
}
37863786

3787-
void CGeometry::SetRotationalVelocity(CConfig *config, bool print) const {
3787+
void CGeometry::SetRotationalVelocity(CConfig *config, bool print) {
37883788

37893789
unsigned long iPoint;
37903790
unsigned short iDim;
@@ -3837,7 +3837,7 @@ void CGeometry::SetRotationalVelocity(CConfig *config, bool print) const {
38373837

38383838
}
38393839

3840-
void CGeometry::SetShroudVelocity(CConfig *config) const {
3840+
void CGeometry::SetShroudVelocity(CConfig *config) {
38413841

38423842
unsigned long iPoint, iVertex;
38433843
unsigned short iMarker, iMarkerShroud;
@@ -3856,7 +3856,7 @@ void CGeometry::SetShroudVelocity(CConfig *config) const {
38563856
}
38573857
}
38583858

3859-
void CGeometry::SetTranslationalVelocity(CConfig *config, bool print) const {
3859+
void CGeometry::SetTranslationalVelocity(CConfig *config, bool print) {
38603860

38613861
su2double xDot[3] = {0.0,0.0,0.0};
38623862

@@ -3879,7 +3879,7 @@ void CGeometry::SetTranslationalVelocity(CConfig *config, bool print) const {
38793879

38803880
}
38813881

3882-
void CGeometry::SetGridVelocity(CConfig *config, unsigned long iter) const {
3882+
void CGeometry::SetGridVelocity(CConfig *config, unsigned long iter) {
38833883

38843884
/*--- Get timestep and whether to use 1st or 2nd order backward finite differences ---*/
38853885

Common/src/grid_movement_structure.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7488,7 +7488,7 @@ void CFreeFormDefBox::SetUnitCornerPoints(void) {
74887488

74897489
}
74907490

7491-
void CFreeFormDefBox::SetControlPoints_Parallelepiped (void) const {
7491+
void CFreeFormDefBox::SetControlPoints_Parallelepiped (void) {
74927492
unsigned short iDim, iDegree, jDegree, kDegree;
74937493

74947494
/*--- Set base control points according to the notation of Vtk for hexahedrons ---*/
@@ -7605,7 +7605,7 @@ void CFreeFormDefBox::SetSupportCPChange(CFreeFormDefBox *FFDBox) {
76057605

76067606
}
76077607

7608-
void CFreeFormDefBox::SetCart2Cyl_ControlPoints(CConfig *config) const {
7608+
void CFreeFormDefBox::SetCart2Cyl_ControlPoints(CConfig *config) {
76097609

76107610
unsigned short iDegree, jDegree, kDegree;
76117611
su2double CartCoord[3];
@@ -7645,7 +7645,7 @@ void CFreeFormDefBox::SetCart2Cyl_ControlPoints(CConfig *config) const {
76457645

76467646
}
76477647

7648-
void CFreeFormDefBox::SetCyl2Cart_ControlPoints(CConfig *config) const {
7648+
void CFreeFormDefBox::SetCyl2Cart_ControlPoints(CConfig *config) {
76497649

76507650
unsigned short iDegree, jDegree, kDegree;
76517651
su2double PolarCoord[3];
@@ -7723,7 +7723,7 @@ void CFreeFormDefBox::SetCyl2Cart_CornerPoints(CConfig *config) {
77237723

77247724
}
77257725

7726-
void CFreeFormDefBox::SetCart2Sphe_ControlPoints(CConfig *config) const {
7726+
void CFreeFormDefBox::SetCart2Sphe_ControlPoints(CConfig *config) {
77277727

77287728
unsigned short iDegree, jDegree, kDegree;
77297729
su2double CartCoord[3];
@@ -7764,7 +7764,7 @@ void CFreeFormDefBox::SetCart2Sphe_ControlPoints(CConfig *config) const {
77647764

77657765
}
77667766

7767-
void CFreeFormDefBox::SetSphe2Cart_ControlPoints(CConfig *config) const {
7767+
void CFreeFormDefBox::SetSphe2Cart_ControlPoints(CConfig *config) {
77687768

77697769
unsigned short iDegree, jDegree, kDegree;
77707770
su2double PolarCoord[3];

SU2_CFD/include/solvers/CEulerSolver.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class CEulerSolver : public CSolver {
8383

8484
void allocate(int size); /*!< \brief Allocates arrays. */
8585

86-
void setZero(int i) const; /*!< \brief Sets all values to zero at a particular index. */
86+
void setZero(int i); /*!< \brief Sets all values to zero at a particular index. */
8787
void setZero() { /*!< \brief Sets all values to zero for all indices. */
8888
for(int i=0; i<_size; ++i) setZero(i);
8989
}

SU2_CFD/include/solvers/CSolver.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ class CSolver {
601601
* \param[in] geometry - Geometrical definition of the problem.
602602
* \param[in] config - Definition of the particular problem.
603603
*/
604-
void SetGridVel_Gradient(CGeometry *geometry, CConfig *config) const;
604+
void SetGridVel_Gradient(CGeometry *geometry, CConfig *config);
605605

606606
/*!
607607
* \brief Compute slope limiter.

SU2_CFD/src/solvers/CEulerSolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ CEulerSolver::AeroCoeffsArray::~AeroCoeffsArray() {
4949
delete [] CoPz; delete [] CT; delete [] CQ; delete [] CMerit;
5050
}
5151

52-
void CEulerSolver::AeroCoeffsArray::setZero(int i) const {
52+
void CEulerSolver::AeroCoeffsArray::setZero(int i) {
5353
CD[i] = CL[i] = CSF[i] = CEff[i] = 0.0;
5454
CFx[i] = CFy[i] = CFz[i] = CMx[i] = 0.0;
5555
CMy[i] = CMz[i] = CoPx[i] = CoPy[i] = 0.0;

SU2_CFD/src/solvers/CSolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2892,7 +2892,7 @@ void CSolver::Update_Cross_Term(CConfig *config, su2passivematrix &cross_term) {
28922892
}
28932893
}
28942894

2895-
void CSolver::SetGridVel_Gradient(CGeometry *geometry, CConfig *config) const {
2895+
void CSolver::SetGridVel_Gradient(CGeometry *geometry, CConfig *config) {
28962896

28972897
/// TODO: No comms needed for this gradient? The Rmatrix should be allocated somewhere.
28982898

0 commit comments

Comments
 (0)