Skip to content

Commit 26a437a

Browse files
authored
Merge pull request #1988 from su2code/refactor_driver_methods
Refactor Driver classes method names
2 parents 527f42b + 72858e8 commit 26a437a

16 files changed

Lines changed: 154 additions & 156 deletions

SU2_CFD/include/drivers/CDiscAdjMultizoneDriver.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class CDiscAdjMultizoneDriver : public CMultizoneDriver {
211211
/*!
212212
* \brief Initialize the adjoint value of the objective function.
213213
*/
214-
void SetAdj_ObjFunction();
214+
void SetAdjObjFunction();
215215

216216
/*!
217217
* \brief Summary of all routines to evaluate the adjoints in iZone.
@@ -236,31 +236,31 @@ class CDiscAdjMultizoneDriver : public CMultizoneDriver {
236236
* \brief Add Solution vector to External.
237237
* \param[in] iZone - Zone index.
238238
*/
239-
void Add_Solution_To_External(unsigned short iZone);
239+
void AddSolutionToExternal(unsigned short iZone);
240240

241241
/*!
242242
* \brief Puts dual time derivative vector to External.
243243
*/
244-
void Set_External_To_DualTimeDer();
244+
void SetExternalToDualTimeDer();
245245

246246
/*!
247247
* \brief Add External_Old vector to Solution.
248248
* \param[in] iZone - Zone index.
249249
*/
250-
void Add_External_To_Solution(unsigned short iZone);
250+
void AddExternalToSolution(unsigned short iZone);
251251

252252
/*!
253253
* \brief Puts Solution into SolutionOld.
254254
* \param[in] iZone - Zone index.
255255
*/
256-
void Set_SolutionOld_To_Solution(unsigned short iZone);
256+
void SetSolutionOldToSolution(unsigned short iZone);
257257

258258
/*!
259259
* \brief Extract contribution of iZone to jZone with BGS relaxation.
260260
* \param[in] iZone - Source zone (the one that was initialized).
261261
* \param[in] jZone - Target zone (the one that transfers to iZone in the primal problem).
262262
*/
263-
void Update_Cross_Term(unsigned short iZone, unsigned short jZone);
263+
void UpdateCrossTerm(unsigned short iZone, unsigned short jZone);
264264

265265
/*!
266266
* \brief Compute BGS residuals.

SU2_CFD/include/drivers/CDiscAdjSinglezoneDriver.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class CDiscAdjSinglezoneDriver : public CSinglezoneDriver {
111111
/*!
112112
* \brief Initialize the adjoint value of the objective function.
113113
*/
114-
void SetAdj_ObjFunction(void);
114+
void SetAdjObjFunction(void);
115115

116116
/*!
117117
* \brief Record the main computational path.

SU2_CFD/include/drivers/CDriver.hpp

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -97,62 +97,62 @@ class CDriver : public CDriverBase {
9797
/*!
9898
* \brief Destructor of the class.
9999
*/
100-
virtual ~CDriver(void);
100+
~CDriver(void) override;
101101

102102
/*!
103103
* \brief A virtual member.
104104
*/
105-
virtual void Run(){};
105+
void Run() override{};
106106

107107
protected:
108108
/*!
109-
* \brief Init_Containers
109+
* \brief Initialize containers.
110110
*/
111-
void SetContainers_Null();
111+
void InitializeContainers();
112112

113113
/*!
114114
* \brief Read in the config and mesh files.
115115
* \param[in] config - Definition of the particular problem.
116116
* \param[in] driver_config - Definition of the driver configuration.
117117
*/
118-
void Input_Preprocessing(CConfig**& config, CConfig*& driver_config);
118+
void PreprocessInput(CConfig**& config, CConfig*& driver_config);
119119

120120
/*!
121121
* \brief Construction of the edge-based data structure and the multi-grid structure.
122122
* \param[in] config - Definition of the particular problem.
123123
* \param[in] geometry - Geometrical definition of the problem.
124124
* \param[in] dummy - Definition of the dummy driver.
125125
*/
126-
void Geometrical_Preprocessing(CConfig* config, CGeometry**& geometry, bool dummy);
126+
void InitializeGeometry(CConfig* config, CGeometry**& geometry, bool dummy);
127127

128128
/*!
129129
* \brief Do the geometrical preprocessing for the DG FEM solver.
130130
* \param[in] config - Definition of the particular problem.
131131
* \param[in] geometry - Geometrical definition of the problem.
132132
*/
133-
void Geometrical_Preprocessing_DGFEM(CConfig* config, CGeometry**& geometry);
133+
void InitializeGeometryDGFEM(CConfig* config, CGeometry**& geometry);
134134

135135
/*!
136-
* \brief Geometrical_Preprocessing_FVM
136+
* \brief InitializeGeometryFVM
137137
* \param[in] config - Definition of the particular problem.
138138
* \param[in] geometry - Geometrical definition of the problem.
139139
*/
140-
void Geometrical_Preprocessing_FVM(CConfig* config, CGeometry**& geometry);
140+
void InitializeGeometryFVM(CConfig* config, CGeometry**& geometry);
141141

142142
/*!
143143
* \brief Definition of the physics iteration class or within a single zone.
144144
* \param[in] config - Definition of the particular problem.
145145
* \param[in] iteration - Pointer to the iteration container to be instantiated.
146146
*/
147-
void Iteration_Preprocessing(CConfig* config, CIteration*& iteration) const;
147+
void PreprocessIteration(CConfig* config, CIteration*& iteration) const;
148148

149149
/*!
150150
* \brief Definition and allocation of all solution classes.
151151
* \param[in] config - Definition of the particular problem.
152152
* \param[in] geometry - Geometrical definition of the problem.
153153
* \param[in] solver - Container vector with all the solutions.
154154
*/
155-
void Solver_Preprocessing(CConfig* config, CGeometry** geometry, CSolver***& solver);
155+
void InitializeSolver(CConfig* config, CGeometry** geometry, CSolver***& solver);
156156

157157
/*!
158158
* \brief Restart of the solvers from the restart files.
@@ -161,7 +161,7 @@ class CDriver : public CDriverBase {
161161
* \param[in] config - Definition of the particular problem.
162162
* \param[in] update_geo - Boolean to indicate if geometry should be updated.
163163
*/
164-
void Solver_Restart(CSolver*** solver, CGeometry** geometry, CConfig* config, bool update_geo);
164+
void RestartSolver(CSolver*** solver, CGeometry** geometry, CConfig* config, bool update_geo);
165165

166166
/*!
167167
* \brief Definition and allocation of all solution classes.
@@ -170,15 +170,15 @@ class CDriver : public CDriverBase {
170170
* \param[in] config - Definition of the particular problem.
171171
* \param[in] val_iInst - Current solver instance.
172172
*/
173-
void Solver_Postprocessing(CSolver**** solver, CGeometry** geometry, CConfig* config, unsigned short val_iInst);
173+
void FinalizeSolver(CSolver**** solver, CGeometry** geometry, CConfig* config, unsigned short val_iInst);
174174

175175
/*!
176176
* \brief Definition and allocation of all integration classes.
177177
* \param[in] config - Definition of the particular problem.
178178
* \param[in] solver - Container vector with all the solutions.
179179
* \param[in] integration - Container vector with all the integration methods.
180180
*/
181-
void Integration_Preprocessing(CConfig* config, CSolver** solver, CIntegration**& integration) const;
181+
void InitializeIntegration(CConfig* config, CSolver** solver, CIntegration**& integration) const;
182182

183183
/*!
184184
* \brief Definition and allocation of all integration classes.
@@ -187,7 +187,7 @@ class CDriver : public CDriverBase {
187187
* \param[in] config - Definition of the particular problem.
188188
* \param[in] val_iInst - Current solver instance.
189189
*/
190-
void Integration_Postprocessing(CIntegration*** integration, CGeometry** geometry, CConfig* config,
190+
void FinalizeIntegration(CIntegration*** integration, CGeometry** geometry, CConfig* config,
191191
unsigned short val_iInst);
192192

193193
/*!
@@ -199,7 +199,7 @@ class CDriver : public CDriverBase {
199199
* \param[in] interface - Class defining the physical transfer of information.
200200
* \param[in] interpolation - Object defining the interpolation.
201201
*/
202-
void Interface_Preprocessing(CConfig** config, CSolver***** solver, CGeometry**** geometry,
202+
void InitializeInterface(CConfig** config, CSolver***** solver, CGeometry**** geometry,
203203
unsigned short** interface_types, CInterface*** interface,
204204
vector<vector<unique_ptr<CInterpolator>>>& interpolation);
205205

@@ -210,7 +210,7 @@ class CDriver : public CDriverBase {
210210
* \param[in] solver - Container vector with all the solutions.
211211
* \param[in] numerics - Description of the numerical method (the way in which the equations are solved).
212212
*/
213-
void Numerics_Preprocessing(CConfig* config, CGeometry** geometry, CSolver*** solver, CNumerics****& numerics) const;
213+
void InitializeNumerics(CConfig* config, CGeometry** geometry, CSolver*** solver, CNumerics****& numerics) const;
214214

215215
/*!
216216
* \brief Helper to instantiate turbulence numerics specialized for different flow solvers.
@@ -240,7 +240,7 @@ class CDriver : public CDriverBase {
240240
* \param[in] config - Definition of the particular problem.
241241
* \param[in] val_iInst - Current solver instance.
242242
*/
243-
void Numerics_Postprocessing(CNumerics***** numerics, CSolver*** solver, CGeometry** geometry, CConfig* config,
243+
void FinalizeNumerics(CNumerics***** numerics, CSolver*** solver, CGeometry** geometry, CConfig* config,
244244
unsigned short val_iInst);
245245

246246
/*!
@@ -252,7 +252,7 @@ class CDriver : public CDriverBase {
252252
* \param[in] grid_movement - Volume grid movement classes of the problem.
253253
* \param[in] surface_movement - Surface movement classes of the problem.
254254
*/
255-
void DynamicMesh_Preprocessing(CConfig* config, CGeometry** geometry, CSolver*** solver, CIteration* iteration,
255+
void PreprocessDynamicMesh(CConfig* config, CGeometry** geometry, CSolver*** solver, CIteration* iteration,
256256
CVolumetricMovement*& grid_movement, CSurfaceMovement*& surface_movement) const;
257257

258258
/*!
@@ -262,7 +262,7 @@ class CDriver : public CDriverBase {
262262
* \param[in] geometry - Geometrical definition of the problem.
263263
* \param[in] solver - Container vector with all the solutions.
264264
*/
265-
void PythonInterfacePreprocessing(CConfig** config, CGeometry**** geometry, CSolver***** solver);
265+
void PreprocessPythonInterface(CConfig** config, CGeometry**** geometry, CSolver***** solver);
266266

267267
/*!
268268
* \brief Preprocess the output container.
@@ -271,15 +271,15 @@ class CDriver : public CDriverBase {
271271
* \param[in] output_container - Container vector with all the outputs.
272272
* \param[in] driver_output - Definition of the driver output.
273273
*/
274-
void Output_Preprocessing(CConfig** config, CConfig* driver_config, COutput**& output_container,
274+
void PreprocessOutput(CConfig** config, CConfig* driver_config, COutput**& output_container,
275275
COutput*& driver_output);
276276

277277
/*!
278278
* \brief Initiate value for static mesh movement such as the gridVel for the ROTATING frame.
279279
* \param[in] config - Definition of the particular problem.
280280
* \param[in] geometry - Geometrical definition of the problem.
281281
*/
282-
void StaticMesh_Preprocessing(const CConfig* config, CGeometry** geometry);
282+
void PreprocessStaticMesh(const CConfig* config, CGeometry** geometry);
283283

284284
/*!
285285
* \brief Initiate value for static mesh movement such as the gridVel for the ROTATING frame.
@@ -288,73 +288,73 @@ class CDriver : public CDriverBase {
288288
* \param[in] solver - Container vector with all the solutions.
289289
* \param[in] interface - Class defining the physical transfer of information.
290290
*/
291-
void Turbomachinery_Preprocessing(CConfig** config, CGeometry**** geometry, CSolver***** solver,
291+
void PreprocessTurbomachinery(CConfig** config, CGeometry**** geometry, CSolver***** solver,
292292
CInterface*** interface);
293293

294294
/*!
295295
* \brief A virtual member.
296296
* \param[in] donorZone - zone in which the displacements will be predicted.
297297
* \param[in] targetZone - zone which receives the predicted displacements.
298298
*/
299-
virtual void Predict_Displacements(unsigned short donorZone, unsigned short targetZone) {}
299+
virtual void PredictDisplacements(unsigned short donorZone, unsigned short targetZone) {}
300300

301301
/*!
302302
* \brief A virtual member.
303303
* \param[in] donorZone - zone in which the tractions will be predicted.
304304
* \param[in] targetZone - zone which receives the predicted traction.
305305
*/
306-
virtual void Predict_Tractions(unsigned short donorZone, unsigned short targetZone) {}
306+
virtual void PredictTractions(unsigned short donorZone, unsigned short targetZone) {}
307307

308308
/*!
309309
* \brief A virtual member.
310310
* \param[in] donorZone - zone in which the displacements will be transferred.
311311
* \param[in] targetZone - zone which receives the tractions transferred.
312312
*/
313-
virtual void Transfer_Displacements(unsigned short donorZone, unsigned short targetZone) {}
313+
virtual void TransferDisplacements(unsigned short donorZone, unsigned short targetZone) {}
314314

315315
/*!
316316
* \brief A virtual member.
317317
* \param[in] donorZone - zone from which the tractions will be transferred.
318318
* \param[in] targetZone - zone which receives the tractions transferred.
319319
*/
320-
virtual void Transfer_Tractions(unsigned short donorZone, unsigned short targetZone) {}
320+
virtual void TransferTractions(unsigned short donorZone, unsigned short targetZone) {}
321321

322322
/*!
323323
* \brief A virtual member.
324324
* \param[in] donorZone - origin of the information.
325325
* \param[in] targetZone - destination of the information.
326326
* \param[in] iOuterIter - Fluid-Structure Interaction subiteration.
327327
*/
328-
virtual void Relaxation_Displacements(unsigned short donorZone, unsigned short targetZone, unsigned long iOuterIter) {}
328+
virtual void RelaxationDisplacements(unsigned short donorZone, unsigned short targetZone, unsigned long iOuterIter) {}
329329

330330
/*!
331331
* \brief A virtual member.
332332
* \param[in] donorZone - origin of the information.
333333
* \param[in] targetZone - destination of the information.
334334
* \param[in] iOuterIter - Fluid-Structure Interaction subiteration.
335335
*/
336-
virtual void Relaxation_Tractions(unsigned short donorZone, unsigned short targetZone, unsigned long iOuterIter) {}
336+
virtual void RelaxationTractions(unsigned short donorZone, unsigned short targetZone, unsigned long iOuterIter) {}
337337

338338
/*!
339339
* \brief A virtual member to run a Block Gauss-Seidel iteration in multi-zone problems.
340340
*/
341-
virtual void Run_GaussSeidel() {}
341+
virtual void RunGaussSeidel() {}
342342

343343
/*!
344344
* \brief A virtual member to run a Block-Jacobi iteration in multi-zone problems.
345345
*/
346-
virtual void Run_Jacobi() {}
346+
virtual void RunJacobi() {}
347347

348348
/*!
349349
* \brief A virtual member.
350350
*/
351-
virtual void Update() {}
351+
void Update() override {}
352352

353353
/*!
354354
* \brief Print out the direct residuals.
355355
* \param[in] kind_recording - Type of recording (full list in ENUM_RECORDING, option_structure.hpp)
356356
*/
357-
void Print_DirectResidual(RECORDING kind_recording);
357+
void PrintDirectResidual(RECORDING kind_recording);
358358

359359
/*!
360360
* \brief Set the solution of all solvers (adjoint or primal) in a zone.
@@ -417,7 +417,7 @@ class CDriver : public CDriverBase {
417417
/*!
418418
* \brief Deallocation routine
419419
*/
420-
void Finalize();
420+
void Finalize() override;
421421

422422
/*!
423423
* \brief A virtual member.
@@ -494,7 +494,7 @@ class CDriver : public CDriverBase {
494494
* \param[in] geometry - Geometrical definition of the problem.
495495
* \param[in] config - Definition of the particular problem.
496496
*/
497-
void Inlet_Preprocessing(CSolver*** solver, CGeometry** geometry, CConfig* config) const;
497+
void PreprocessInlet(CSolver*** solver, CGeometry** geometry, CConfig* config) const;
498498

499499
/*!
500500
* \brief Set the position of the heat source.
@@ -503,14 +503,14 @@ class CDriver : public CDriverBase {
503503
* \param[in] pos_y - Position Y.
504504
* \param[in] pos_z - Position Z.
505505
*/
506-
void SetHeatSource_Position(passivedouble alpha, passivedouble pos_x, passivedouble pos_y, passivedouble pos_z);
506+
void SetHeatSourcePosition(passivedouble alpha, passivedouble pos_x, passivedouble pos_y, passivedouble pos_z);
507507

508508
/*!
509509
* \brief Set the direction of the inlet.
510510
* \param[in] iMarker - Marker index.
511511
* \param[in] alpha - Angle (Zpos).
512512
*/
513-
void SetInlet_Angle(unsigned short iMarker, passivedouble alpha);
513+
void SetInletAngle(unsigned short iMarker, passivedouble alpha);
514514

515515
/// \}
516516

@@ -594,7 +594,7 @@ class CFluidDriver : public CDriver {
594594
/*!
595595
* \brief Transfer data among different zones (multiple zone).
596596
*/
597-
void Transfer_Data(unsigned short donorZone, unsigned short targetZone);
597+
void TransferData(unsigned short donorZone, unsigned short targetZone);
598598
};
599599

600600
/*!
@@ -691,7 +691,7 @@ class CHBDriver : public CFluidDriver {
691691
* \brief Computation of the Harmonic Balance operator matrix for harmonic balance.
692692
* \author A. Rubino, S. Nimmagadda
693693
*/
694-
void ComputeHB_Operator();
694+
void ComputeHBOperator();
695695

696696
/*!
697697
* \brief Update the solution for the Harmonic Balance.

0 commit comments

Comments
 (0)