Skip to content

Commit 811d581

Browse files
committed
Apply clang-format and some other cleanups.
1 parent ca16276 commit 811d581

9 files changed

Lines changed: 44 additions & 40 deletions

File tree

SU2_CFD/include/numerics/scalar/scalar_convection.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* \file turb_convection.hpp
2+
* \file scalar_convection.hpp
33
* \brief Delarations of numerics classes for discretization of
44
* convective fluxes in scalar problems.
55
* \author F. Palacios, T. Economon

SU2_CFD/include/numerics/scalar/scalar_diffusion.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* \file turb_diffusion.hpp
2+
* \file scalar_diffusion.hpp
33
* \brief Declarations of numerics classes for discretization of
44
* viscous fluxes in scalar problems.
55
* \author F. Palacios, T. Economon

SU2_CFD/include/numerics/scalar/scalar_sources.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/*!
2-
* \file turb_sources.hpp
3-
* \brief Delarations of numerics classes for integration of source
4-
* terms in scalar problems.
5-
* \author F. Palacios, T. Economon
2+
* \file scalar_sources.hpp
3+
* \brief Delarations of numerics classes for integration of source terms in scalar problems.
64
* \version 7.2.0 "Blackbird"
75
*
86
* SU2 Project Website: https://su2code.github.io

SU2_CFD/include/solvers/CScalarSolver.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* \brief Main class for defining a scalar solver.
3838
* \tparam TVariable - Class of C*Variable of the specific solver
3939
*/
40-
template<class TVariable>
40+
template <class TVariable>
4141
class CScalarSolver : public CSolver {
4242
protected:
4343
enum : size_t { MAXNDIM = 3 }; /*!< \brief Max number of space dimensions, used in some static arrays. */
@@ -147,10 +147,9 @@ class CScalarSolver : public CSolver {
147147
*/
148148
inline virtual void Viscous_Residual(unsigned long iEdge, CGeometry* geometry, CSolver** solver_container,
149149
CNumerics* numerics, CConfig* config) {
150-
151150
/*--- Define an empty object for solver specific numerics contribution. In case there are none, this default
152151
*--- implementation will be called ---*/
153-
auto SolverSpecificNumerics = [&](unsigned long iPoint, unsigned long jPoint) { };
152+
auto SolverSpecificNumerics = [&](unsigned long iPoint, unsigned long jPoint) {};
154153

155154
/*--- Now instantiate the generic implementation with the functor above. ---*/
156155

SU2_CFD/include/solvers/CScalarSolver.inl

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@
2424
* License along with SU2. If not, see <http://www.gnu.org/licenses/>.
2525
*/
2626

27-
#include "../../include/solvers/CScalarSolver.hpp"
28-
2927
#include "../../../Common/include/parallelization/omp_structure.hpp"
3028
#include "../../../Common/include/toolboxes/geometry_toolbox.hpp"
29+
#include "../../include/solvers/CScalarSolver.hpp"
3130

32-
template<class TVariable>
31+
template <class TVariable>
3332
CScalarSolver<TVariable>::CScalarSolver(bool conservative) : CSolver(), Conservative(conservative) {}
3433

35-
template<class TVariable>
34+
template <class TVariable>
3635
CScalarSolver<TVariable>::CScalarSolver(CGeometry* geometry, CConfig* config, bool conservative)
3736
: CSolver(), Conservative(conservative) {
3837
nMarker = config->GetnMarker_All();
@@ -75,12 +74,14 @@ CScalarSolver<TVariable>::CScalarSolver(CGeometry* geometry, CConfig* config, bo
7574
}
7675
}
7776

78-
template<class TVariable>
79-
CScalarSolver<TVariable>::~CScalarSolver() { delete nodes; }
77+
template <class TVariable>
78+
CScalarSolver<TVariable>::~CScalarSolver() {
79+
delete nodes;
80+
}
8081

81-
template<class TVariable>
82-
void CScalarSolver<TVariable>::Upwind_Residual(CGeometry* geometry, CSolver** solver_container, CNumerics** numerics_container,
83-
CConfig* config, unsigned short iMesh) {
82+
template <class TVariable>
83+
void CScalarSolver<TVariable>::Upwind_Residual(CGeometry* geometry, CSolver** solver_container,
84+
CNumerics** numerics_container, CConfig* config, unsigned short iMesh) {
8485
const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT);
8586
const bool muscl = config->GetMUSCL_Turb();
8687
const bool limiter = (config->GetKind_SlopeLimit_Turb() != NO_LIMITER);
@@ -239,7 +240,7 @@ void CScalarSolver<TVariable>::Upwind_Residual(CGeometry* geometry, CSolver** so
239240
}
240241
}
241242

242-
template<class TVariable>
243+
template <class TVariable>
243244
void CScalarSolver<TVariable>::SumEdgeFluxes(CGeometry* geometry) {
244245
SU2_OMP_FOR_STAT(omp_chunk_size)
245246
for (unsigned long iPoint = 0; iPoint < nPoint; ++iPoint) {
@@ -255,8 +256,9 @@ void CScalarSolver<TVariable>::SumEdgeFluxes(CGeometry* geometry) {
255256
END_SU2_OMP_FOR
256257
}
257258

258-
template<class TVariable>
259-
void CScalarSolver<TVariable>::BC_Periodic(CGeometry* geometry, CSolver** solver_container, CNumerics* numerics, CConfig* config) {
259+
template <class TVariable>
260+
void CScalarSolver<TVariable>::BC_Periodic(CGeometry* geometry, CSolver** solver_container, CNumerics* numerics,
261+
CConfig* config) {
260262
/*--- Complete residuals for periodic boundary conditions. We loop over
261263
the periodic BCs in matching pairs so that, in the event that there are
262264
adjacent periodic markers, the repeated points will have their residuals
@@ -269,8 +271,9 @@ void CScalarSolver<TVariable>::BC_Periodic(CGeometry* geometry, CSolver** solver
269271
}
270272
}
271273

272-
template<class TVariable>
273-
void CScalarSolver<TVariable>::PrepareImplicitIteration(CGeometry* geometry, CSolver** solver_container, CConfig* config) {
274+
template <class TVariable>
275+
void CScalarSolver<TVariable>::PrepareImplicitIteration(CGeometry* geometry, CSolver** solver_container,
276+
CConfig* config) {
274277
const auto flowNodes = solver_container[FLOW_SOL]->GetNodes();
275278

276279
/*--- Set shared residual variables to 0 and declare
@@ -329,8 +332,9 @@ void CScalarSolver<TVariable>::PrepareImplicitIteration(CGeometry* geometry, CSo
329332
SetResidual_RMS(geometry, config);
330333
}
331334

332-
template<class TVariable>
333-
void CScalarSolver<TVariable>::CompleteImplicitIteration(CGeometry* geometry, CSolver** solver_container, CConfig* config) {
335+
template <class TVariable>
336+
void CScalarSolver<TVariable>::CompleteImplicitIteration(CGeometry* geometry, CSolver** solver_container,
337+
CConfig* config) {
334338
const bool compressible = (config->GetKind_Regime() == ENUM_REGIME::COMPRESSIBLE);
335339

336340
const auto flowNodes = solver_container[FLOW_SOL]->GetNodes();
@@ -376,8 +380,9 @@ void CScalarSolver<TVariable>::CompleteImplicitIteration(CGeometry* geometry, CS
376380
CompleteComms(geometry, config, SOLUTION_EDDY);
377381
}
378382

379-
template<class TVariable>
380-
void CScalarSolver<TVariable>::ImplicitEuler_Iteration(CGeometry* geometry, CSolver** solver_container, CConfig* config) {
383+
template <class TVariable>
384+
void CScalarSolver<TVariable>::ImplicitEuler_Iteration(CGeometry* geometry, CSolver** solver_container,
385+
CConfig* config) {
381386
PrepareImplicitIteration(geometry, solver_container, config);
382387

383388
/*--- Solve or smooth the linear system. ---*/
@@ -401,10 +406,10 @@ void CScalarSolver<TVariable>::ImplicitEuler_Iteration(CGeometry* geometry, CSol
401406
CompleteImplicitIteration(geometry, solver_container, config);
402407
}
403408

404-
template<class TVariable>
409+
template <class TVariable>
405410
void CScalarSolver<TVariable>::SetResidual_DualTime(CGeometry* geometry, CSolver** solver_container, CConfig* config,
406-
unsigned short iRKStep, unsigned short iMesh,
407-
unsigned short RunTime_EqSystem) {
411+
unsigned short iRKStep, unsigned short iMesh,
412+
unsigned short RunTime_EqSystem) {
408413
const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT);
409414
const bool first_order = (config->GetTime_Marching() == TIME_MARCHING::DT_STEPPING_1ST);
410415
const bool second_order = (config->GetTime_Marching() == TIME_MARCHING::DT_STEPPING_2ND);
@@ -641,9 +646,9 @@ void CScalarSolver<TVariable>::SetResidual_DualTime(CGeometry* geometry, CSolver
641646
} // end dynamic grid
642647
}
643648

644-
template<class TVariable>
649+
template <class TVariable>
645650
void CScalarSolver<TVariable>::LoadRestart(CGeometry** geometry, CSolver*** solver, CConfig* config, int val_iter,
646-
bool val_update_geo) {
651+
bool val_update_geo) {
647652
/*--- Restart the solution from file information ---*/
648653

649654
unsigned short iVar, iMesh;

SU2_CFD/include/variables/CScalarVariable.hpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,17 @@ class CScalarVariable : public CVariable {
7979
* \param[in] iVar - Index of the variable.
8080
* \param[in] source - Value of the harmonic balance source term. for the index <i>iVar</i>.
8181
*/
82-
inline void SetHarmonicBalance_Source(unsigned long iPoint, unsigned long iVar, su2double source) final { HB_Source(iPoint,iVar) = source; }
82+
inline void SetHarmonicBalance_Source(unsigned long iPoint, unsigned long iVar, su2double source) final {
83+
HB_Source(iPoint, iVar) = source;
84+
}
8385

8486
/*!
8587
* \brief Get the harmonic balance source term.
8688
* \param[in] iPoint - Point index.
8789
* \param[in] iVar - Index of the variable.
8890
* \return Value of the harmonic balance source term for the index <i>val_var</i>.
8991
*/
90-
inline su2double GetHarmonicBalance_Source(unsigned long iPoint, unsigned long iVar) const final { return HB_Source(iPoint,iVar); }
92+
inline su2double GetHarmonicBalance_Source(unsigned long iPoint, unsigned long iVar) const final {
93+
return HB_Source(iPoint, iVar);
94+
}
9195
};

SU2_CFD/src/numerics/scalar/scalar_convection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* \file turb_convection.cpp
2+
* \file scalar_convection.cpp
33
* \brief Implementation of numerics classes to compute convective
44
* fluxes in scalar problems.
55
* \author F. Palacios, T. Economon

SU2_CFD/src/numerics/scalar/scalar_diffusion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* \file turb_diffusion.cpp
2+
* \file scalar_diffusion.cpp
33
* \brief Implementation of numerics classes to compute viscous
44
* fluxes in scalar problems.
55
* \author F. Palacios, T. Economon

SU2_CFD/src/numerics/scalar/scalar_sources.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/*!
2-
* \file turb_sources.cpp
3-
* \brief Implementation of numerics classes for integration of
4-
* scalar source-terms.
5-
* \author F. Palacios, T. Economon
2+
* \file scalar_sources.cpp
3+
* \brief Implementation of numerics classes for integration of scalar source-terms.
64
* \version 7.2.0 "Blackbird"
75
*
86
* SU2 Project Website: https://su2code.github.io

0 commit comments

Comments
 (0)