Skip to content

Commit 9b8cdc4

Browse files
committed
cleanup the config a "bit"
1 parent 321dac7 commit 9b8cdc4

14 files changed

Lines changed: 1327 additions & 1708 deletions

SU2_CFD/include/output/CFVMOutput.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,7 @@ class CFVMOutput : public COutput{
3434
/*!
3535
* \brief Constructor of the class
3636
*/
37-
CFVMOutput(CConfig *config, unsigned short nDim, bool femOutput);
38-
39-
/*!
40-
* \brief Destructor of the class.
41-
*/
42-
~CFVMOutput(void) = default;
37+
CFVMOutput(const CConfig *config, unsigned short nDim, bool femOutput);
4338

4439
/*!
4540
* \brief Add Coordinates to output.

SU2_CFD/include/output/CFlowCompOutput.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class CFlowCompOutput final: public CFlowOutput {
4747
* \brief Constructor of the class
4848
* \param[in] config - Definition of the particular problem.
4949
*/
50-
CFlowCompOutput(CConfig *config, unsigned short nDim);
50+
CFlowCompOutput(const CConfig *config, unsigned short nDim);
5151

5252
/*!
5353
* \brief Load the history output field values

SU2_CFD/include/output/CFlowOutput.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class CFlowOutput : public CFVMOutput{
3838
* \brief Constructor of the class
3939
* \param[in] config - Definition of the particular problem.
4040
*/
41-
CFlowOutput(CConfig *config, unsigned short nDim, bool femOutput);
41+
CFlowOutput(const CConfig *config, unsigned short nDim, bool femOutput);
4242

4343
/*!
4444
* \brief Add flow surface output fields
@@ -50,10 +50,10 @@ class CFlowOutput : public CFVMOutput{
5050
* \brief Set flow surface output field values
5151
* \param[in] solver - The container holding all solution data.
5252
* \param[in] geometry - Geometrical definition of the problem.
53-
* \param[in] config - Definition of the particular problem.
53+
* \param[in,out] config - Definition of the particular problem.
5454
* \param[in] output - Boolean indicating whether information should be written to screen
5555
*/
56-
void SetAnalyzeSurface(CSolver *solver, CGeometry *geometry, CConfig *config, bool output);
56+
void SetAnalyzeSurface(const CSolver *solver, const CGeometry *geometry, CConfig *config, bool output);
5757

5858
/*!
5959
* \brief Add aerodynamic coefficients as output fields
@@ -152,10 +152,9 @@ class CFlowOutput : public CFVMOutput{
152152
/*!
153153
* \brief Write the forces breakdown file
154154
* \param[in] config - Definition of the particular problem per zone.
155-
* \param[in] geometry - Geometrical definition of the problem.
156-
* \param[in] solver_container - The container holding all solution data.
155+
* \param[in] flow_solver - The container holding all solution data.
157156
*/
158-
void WriteForcesBreakdown(CConfig *config, CGeometry *geometry, CSolver **solver_container);
157+
void WriteForcesBreakdown(const CConfig *config, const CSolver *flow_solver) const;
159158

160159
/*!
161160
* \brief Set the time averaged output fields.

SU2_CFD/include/output/CMultizoneOutput.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,7 @@ class CMultizoneOutput final: public COutput {
6161
/*!
6262
* \brief Constructor of the class.
6363
*/
64-
CMultizoneOutput(CConfig *driver_config, CConfig** config, unsigned short nDim);
65-
66-
/*!
67-
* \brief Destructor of the class.
68-
*/
69-
~CMultizoneOutput(void) override;
64+
CMultizoneOutput(const CConfig *driver_config, const CConfig* const* config, unsigned short nDim);
7065

7166
/*!
7267
* \brief Load the multizone history output field values

SU2_CFD/include/output/COutput.hpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,21 @@ class COutput {
5757

5858
/*----------------------------- General ----------------------------*/
5959

60-
int rank, /*!< \brief MPI Rank. */
61-
size; /*!< \brief MPI Size. */
60+
const int rank; /*!< \brief MPI Rank. */
61+
const int size; /*!< \brief MPI Size. */
6262

63-
unsigned short nDim; /*!< \brief Physical Dimension */
63+
const unsigned short nDim; /*!< \brief Physical Dimension */
6464

65-
bool multiZone, /*!< \brief Boolean to store whether we are running a multizone problem */
66-
gridMovement, /*!< \brief Boolean to store whether we have grid movement enabled */
67-
femOutput; /*!< \brief Boolean to store whether we should use the FEM routines */
65+
const bool multiZone; /*!< \brief Boolean to store whether we are running a multizone problem */
66+
const bool gridMovement; /*!< \brief Boolean to store whether we have grid movement enabled */
67+
const bool femOutput; /*!< \brief Boolean to store whether we should use the FEM routines */
68+
const bool si_units;
69+
const bool us_units;
6870

6971
/*----------------------------- Screen and history output ----------------------------*/
7072

73+
const unsigned short fieldWidth = 12; /*!< \brief Width of each column for the screen output (hardcoded for now) */
7174
string historySep; /*!< \brief Character which separates values in the history file */
72-
unsigned short fieldWidth; /*!< \brief Width of each column for the screen output (hardcoded for now) */
7375
bool noWriting; /*!< \brief Boolean indicating whether a screen/history output should be written */
7476
unsigned long curTimeIter, /*!< \brief Current value of the time iteration index */
7577
curAbsTimeIter, /*!< \brief Current value of the time iteration index */
@@ -250,7 +252,7 @@ class COutput {
250252
/*!
251253
* \brief Constructor of the class.
252254
*/
253-
COutput(CConfig *config, unsigned short nDim, bool femOutput);
255+
COutput(const CConfig *config, unsigned short nDim, bool femOutput);
254256

255257
/*!
256258
* \brief Preprocess the volume output by setting the requested volume output fields.

SU2_CFD/src/output/CFVMOutput.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "../../../Common/include/geometry/CGeometry.hpp"
3030

3131

32-
CFVMOutput::CFVMOutput(CConfig *config, unsigned short nDim, bool fem_output) : COutput (config, nDim, fem_output){ }
32+
CFVMOutput::CFVMOutput(const CConfig *config, unsigned short nDim, bool fem_output) : COutput (config, nDim, fem_output){ }
3333

3434
void CFVMOutput::AddCoordinates() {
3535

SU2_CFD/src/output/CFlowCompFEMOutput.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ CFlowCompFEMOutput::CFlowCompFEMOutput(CConfig *config, unsigned short nDim) : C
3535

3636
turb_model = config->GetKind_Turb_Model();
3737

38-
gridMovement = config->GetGrid_Movement();
39-
4038
/*--- Set the default history fields if nothing is set in the config file ---*/
4139

4240
if (nRequestedHistoryFields == 0){

SU2_CFD/src/output/CFlowCompOutput.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,14 @@
2525
* License along with SU2. If not, see <http://www.gnu.org/licenses/>.
2626
*/
2727

28-
2928
#include "../../include/output/CFlowCompOutput.hpp"
3029

3130
#include "../../../Common/include/geometry/CGeometry.hpp"
3231
#include "../../include/solvers/CSolver.hpp"
3332

34-
CFlowCompOutput::CFlowCompOutput(CConfig *config, unsigned short nDim) : CFlowOutput(config, nDim, false) {
33+
CFlowCompOutput::CFlowCompOutput(const CConfig *config, unsigned short nDim) : CFlowOutput(config, nDim, false) {
3534

3635
turb_model = config->GetKind_Turb_Model();
37-
gridMovement = config->GetDynamic_Grid();
3836

3937
/*--- Set the default history fields if nothing is set in the config file ---*/
4038

SU2_CFD/src/output/CFlowIncOutput.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ CFlowIncOutput::CFlowIncOutput(CConfig *config, unsigned short nDim) : CFlowOutp
3939

4040
weakly_coupled_heat = config->GetWeakly_Coupled_Heat();
4141

42-
gridMovement = config->GetDynamic_Grid();
43-
streamwisePeriodic = (config->GetKind_Streamwise_Periodic() != ENUM_STREAMWISE_PERIODIC::NONE);
42+
streamwisePeriodic = (config->GetKind_Streamwise_Periodic() != ENUM_STREAMWISE_PERIODIC::NONE);
4443
streamwisePeriodic_temperature = config->GetStreamwise_Periodic_Temperature();
4544

4645
/*--- Set the default history fields if nothing is set in the config file ---*/
@@ -93,8 +92,7 @@ CFlowIncOutput::CFlowIncOutput(CConfig *config, unsigned short nDim) : CFlowOutp
9392

9493
/*--- Set the default convergence field --- */
9594

96-
if (convFields.empty() ) convFields.emplace_back("RMS_PRESSURE");
97-
95+
if (convFields.empty()) convFields.emplace_back("RMS_PRESSURE");
9896

9997
}
10098

0 commit comments

Comments
 (0)