Skip to content

Commit 392e31f

Browse files
committed
more const
1 parent f956724 commit 392e31f

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

SU2_CFD/include/drivers/CDriver.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -370,57 +370,57 @@ class CDriver {
370370
* \brief Get the total drag.
371371
* \return Total drag.
372372
*/
373-
passivedouble Get_Drag();
373+
passivedouble Get_Drag() const;
374374

375375
/*!
376376
* \brief Get the total lift.
377377
* \return Total lift.
378378
*/
379-
passivedouble Get_Lift();
379+
passivedouble Get_Lift() const;
380380

381381
/*!
382382
* \brief Get the total x moment.
383383
* \return Total x moment.
384384
*/
385-
passivedouble Get_Mx();
385+
passivedouble Get_Mx() const;
386386

387387
/*!
388388
* \brief Get the total y moment.
389389
* \return Total y moment.
390390
*/
391-
passivedouble Get_My();
391+
passivedouble Get_My() const;
392392

393393
/*!
394394
* \brief Get the total z moment.
395395
* \return Total z moment.
396396
*/
397-
passivedouble Get_Mz();
397+
passivedouble Get_Mz() const;
398398

399399
/*!
400400
* \brief Get the total drag coefficient.
401401
* \return Total drag coefficient.
402402
*/
403-
passivedouble Get_DragCoeff();
403+
passivedouble Get_DragCoeff() const;
404404

405405
/*!
406406
* \brief Get the total lift coefficient.
407407
* \return Total lift coefficient.
408408
*/
409-
passivedouble Get_LiftCoeff();
409+
passivedouble Get_LiftCoeff() const;
410410

411411
/*!
412412
* \brief Get the number of vertices (halo nodes included) from a specified marker.
413413
* \param[in] iMarker - Marker identifier.
414414
* \return Number of vertices.
415415
*/
416-
unsigned long GetNumberVertices(unsigned short iMarker);
416+
unsigned long GetNumberVertices(unsigned short iMarker) const;
417417

418418
/*!
419419
* \brief Get the number of halo vertices from a specified marker.
420420
* \param[in] iMarker - Marker identifier.
421421
* \return Number of vertices.
422422
*/
423-
unsigned long GetNumberHaloVertices(unsigned short iMarker);
423+
unsigned long GetNumberHaloVertices(unsigned short iMarker) const;
424424

425425
/*!
426426
* \brief Check if a vertex is physical or not (halo node) on a specified marker.

SU2_CFD/src/python_wrapper_structure.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void CDriver::PythonInterface_Preprocessing(CConfig **config, CGeometry ****geom
6363
/* Functions related to the global performance indices (Lift, Drag, ecc..) */
6464
/////////////////////////////////////////////////////////////////////////////
6565

66-
passivedouble CDriver::Get_Drag() {
66+
passivedouble CDriver::Get_Drag() const {
6767

6868
unsigned short val_iZone = ZONE_0;
6969
unsigned short FinestMesh = config_container[val_iZone]->GetFinestMesh();
@@ -78,7 +78,7 @@ passivedouble CDriver::Get_Drag() {
7878
return SU2_TYPE::GetValue(val_Drag);
7979
}
8080

81-
passivedouble CDriver::Get_Lift() {
81+
passivedouble CDriver::Get_Lift() const {
8282

8383
unsigned short val_iZone = ZONE_0;
8484
unsigned short FinestMesh = config_container[val_iZone]->GetFinestMesh();
@@ -93,7 +93,7 @@ passivedouble CDriver::Get_Lift() {
9393
return SU2_TYPE::GetValue(val_Lift);
9494
}
9595

96-
passivedouble CDriver::Get_Mx(){
96+
passivedouble CDriver::Get_Mx() const {
9797

9898
unsigned short val_iZone = ZONE_0;
9999
unsigned short FinestMesh = config_container[val_iZone]->GetFinestMesh();
@@ -110,7 +110,7 @@ passivedouble CDriver::Get_Mx(){
110110
return SU2_TYPE::GetValue(val_Mx);
111111
}
112112

113-
passivedouble CDriver::Get_My(){
113+
passivedouble CDriver::Get_My() const {
114114

115115
unsigned short val_iZone = ZONE_0;
116116
unsigned short FinestMesh = config_container[val_iZone]->GetFinestMesh();
@@ -127,7 +127,7 @@ passivedouble CDriver::Get_My(){
127127
return SU2_TYPE::GetValue(val_My);
128128
}
129129

130-
passivedouble CDriver::Get_Mz() {
130+
passivedouble CDriver::Get_Mz() const {
131131

132132
unsigned short val_iZone = ZONE_0;
133133
unsigned short FinestMesh = config_container[val_iZone]->GetFinestMesh();
@@ -144,7 +144,7 @@ passivedouble CDriver::Get_Mz() {
144144
return SU2_TYPE::GetValue(val_Mz);
145145
}
146146

147-
passivedouble CDriver::Get_DragCoeff() {
147+
passivedouble CDriver::Get_DragCoeff() const {
148148

149149
unsigned short val_iZone = ZONE_0;
150150
unsigned short FinestMesh = config_container[val_iZone]->GetFinestMesh();
@@ -155,7 +155,7 @@ passivedouble CDriver::Get_DragCoeff() {
155155
return SU2_TYPE::GetValue(CDrag);
156156
}
157157

158-
passivedouble CDriver::Get_LiftCoeff() {
158+
passivedouble CDriver::Get_LiftCoeff() const {
159159

160160
unsigned short val_iZone = ZONE_0;
161161
unsigned short FinestMesh = config_container[val_iZone]->GetFinestMesh();
@@ -170,13 +170,13 @@ passivedouble CDriver::Get_LiftCoeff() {
170170
/* Functions to obtain information from the geometry/mesh */
171171
/////////////////////////////////////////////////////////////////////////////
172172

173-
unsigned long CDriver::GetNumberVertices(unsigned short iMarker){
173+
unsigned long CDriver::GetNumberVertices(unsigned short iMarker) const {
174174

175175
return geometry_container[ZONE_0][INST_0][MESH_0]->nVertex[iMarker];
176176

177177
}
178178

179-
unsigned long CDriver::GetNumberHaloVertices(unsigned short iMarker){
179+
unsigned long CDriver::GetNumberHaloVertices(unsigned short iMarker) const {
180180

181181
unsigned long nHaloVertices, iVertex, iPoint;
182182

0 commit comments

Comments
 (0)