Skip to content

Commit 443190f

Browse files
Rename to VariableType and Remove duplicate compilations due to templates
Code suggestions by pcarruscag Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
1 parent 58d3df3 commit 443190f

5 files changed

Lines changed: 5 additions & 15 deletions

File tree

SU2_CFD/include/solvers/CScalarSolver.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
/*!
3636
* \class CScalarSolver
3737
* \brief Main class for defining a scalar solver.
38-
* \tparam TVariable - Class of C*Variable of the specific solver
38+
* \tparam VariableType - Class of variable used by the solver inheriting from this template.
3939
*/
4040
template <class TVariable>
4141
class CScalarSolver : public CSolver {
@@ -74,7 +74,7 @@ class CScalarSolver : public CSolver {
7474
/*!
7575
* \brief The highest level in the variable hierarchy this solver can safely use.
7676
*/
77-
TVariable* nodes = nullptr;
77+
VariableType* nodes = nullptr;
7878

7979
/*!
8080
* \brief Return nodes to allow CSolver::base_nodes to be set.

SU2_CFD/src/solvers/CTransLMSolver.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,10 @@
2525
* License along with SU2. If not, see <http://www.gnu.org/licenses/>.
2626
*/
2727

28-
#include "../../include/solvers/CScalarSolver.inl"
2928
#include "../../include/solvers/CTransLMSolver.hpp"
3029
#include "../../include/variables/CTransLMVariable.hpp"
3130
#include "../../include/variables/CTurbSAVariable.hpp"
3231

33-
/*--- Explicit instantiation of the parent class of CTurbSolver,
34-
* to spread the compilation over multiple cpp files. ---*/
35-
template class CScalarSolver<CTurbVariable>;
36-
3732
/*--- This is the implementation of the Langtry-Menter transition model.
3833
The main reference for this model is:Langtry, Menter, AIAA J. 47(12) 2009
3934
DOI: https://doi.org/10.2514/1.42362 ---*/

SU2_CFD/src/solvers/CTurbSASolver.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,11 @@
2525
* License along with SU2. If not, see <http://www.gnu.org/licenses/>.
2626
*/
2727

28-
#include "../../include/solvers/CScalarSolver.inl"
2928
#include "../../include/solvers/CTurbSASolver.hpp"
3029
#include "../../include/variables/CTurbSAVariable.hpp"
3130
#include "../../../Common/include/parallelization/omp_structure.hpp"
3231
#include "../../../Common/include/toolboxes/geometry_toolbox.hpp"
3332

34-
/*--- Explicit instantiation of the parent class of CTurbSolver,
35-
* to spread the compilation over multiple cpp files. ---*/
36-
template class CScalarSolver<CTurbVariable>;
3733

3834
CTurbSASolver::CTurbSASolver(void) : CTurbSolver(false) { }
3935

SU2_CFD/src/solvers/CTurbSSTSolver.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,11 @@
2525
* License along with SU2. If not, see <http://www.gnu.org/licenses/>.
2626
*/
2727

28-
#include "../../include/solvers/CScalarSolver.inl"
2928
#include "../../include/solvers/CTurbSSTSolver.hpp"
3029
#include "../../include/variables/CTurbSSTVariable.hpp"
3130
#include "../../../Common/include/parallelization/omp_structure.hpp"
3231
#include "../../../Common/include/toolboxes/geometry_toolbox.hpp"
3332

34-
/*--- Explicit instantiation of the parent class of CTurbSolver,
35-
* to spread the compilation over multiple cpp files. ---*/
36-
template class CScalarSolver<CTurbVariable>;
3733

3834
CTurbSSTSolver::CTurbSSTSolver(void) : CTurbSolver(true) { }
3935

SU2_CFD/src/solvers/CTurbSolver.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@
2828
#include "../../include/solvers/CTurbSolver.hpp"
2929
#include "../../../Common/include/parallelization/omp_structure.hpp"
3030
#include "../../../Common/include/toolboxes/geometry_toolbox.hpp"
31+
#include "../../include/solvers/CScalarSolver.inl"
3132

33+
/*--- Explicit instantiation of the parent class of CTurbSolver. ---*/
34+
template class CScalarSolver<CTurbVariable>;
3235

3336
CTurbSolver::CTurbSolver(bool conservative) : CScalarSolver<CTurbVariable>(conservative) { }
3437

0 commit comments

Comments
 (0)