Skip to content

Commit 9e07ab8

Browse files
authored
Merge branch 'develop' into feature_MUSCL_ramp
2 parents 036af7c + e109712 commit 9e07ab8

126 files changed

Lines changed: 3465 additions & 800 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/regression.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
- config_set: BaseNoMPI-asan
128128
flags: '--buildtype=debugoptimized -Denable-openblas=true -Dwith-mpi=disabled -Denable-mlpcpp=true --warnlevel=3 --werror'
129129
- config_set: ReverseNoMPI-asan
130-
flags: '--buildtype=debugoptimized -Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled --warnlevel=3 --werror'
130+
flags: '--buildtype=debugoptimized --optimization=1 -Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled --warnlevel=3 --werror'
131131
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
132132
steps:
133133
- name: Cache Object Files

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@
3030
[submodule "externals/FADO"]
3131
path = externals/FADO
3232
url = https://github.com/pcarruscag/FADO.git
33+
[submodule "externals/eigen"]
34+
path = externals/eigen
35+
url = https://gitlab.com/libeigen/eigen.git

AUTHORS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Aniket C. Aranake
5656
Antonio Rubino
5757
Arne Bachmann
5858
Arne Voß
59+
Ayush Kumar
5960
Beckett Y. Zhou
6061
Benjamin S. Kirk
6162
Brendan Tracey
@@ -71,6 +72,7 @@ Eduardo Molina
7172
Edwin van der Weide
7273
Eitan Aberman
7374
Ethan Alan Hereth
75+
Ezgi Orbay Akcengiz
7476
Florian Dittmann
7577
Filip Hahs
7678
Francesco Poli

Common/include/CConfig.hpp

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ class CConfig {
199199
nMarker_Inlet, /*!< \brief Number of inlet flow markers. */
200200
nMarker_Inlet_Species, /*!< \brief Number of inlet species markers. */
201201
nSpecies_per_Inlet, /*!< \brief Number of species defined per inlet markers. */
202+
nMarker_Wall_Species, /*!< \brief Number of wall species markers. */
203+
nSpecies_per_Wall, /*!< \brief Number of species defined per wall markers. */
202204
nMarker_Inlet_Turb, /*!< \brief Number of inlet turbulent markers. */
203205
nTurb_Properties, /*!< \brief Number of turbulent properties per inlet markers. */
204206
nMarker_Riemann, /*!< \brief Number of Riemann flow markers. */
@@ -255,6 +257,7 @@ class CConfig {
255257
*Marker_ActDiskBemOutlet_Axis, /*!< \brief Actuator disk BEM outlet markers passed to MARKER_ACTDISK_BEM_AXIS. */
256258
*Marker_Inlet, /*!< \brief Inlet flow markers. */
257259
*Marker_Inlet_Species, /*!< \brief Inlet species markers. */
260+
*Marker_Wall_Species, /*!< \brief Wall species markers. */
258261
*Marker_Inlet_Turb, /*!< \brief Inlet turbulent markers. */
259262
*Marker_Riemann, /*!< \brief Riemann markers. */
260263
*Marker_Giles, /*!< \brief Giles markers. */
@@ -294,6 +297,8 @@ class CConfig {
294297
su2double **Inlet_Velocity; /*!< \brief Specified flow velocity vectors for supersonic inlet boundaries. */
295298
su2double **Inlet_SpeciesVal; /*!< \brief Specified species vector for inlet boundaries. */
296299
su2double **Inlet_TurbVal; /*!< \brief Specified turbulent intensity and viscosity ratio for inlet boundaries. */
300+
WALL_SPECIES_TYPE **Kind_Wall_Species; /*!< \brief Species boundary condition type for wall boundaries (FLUX or VALUE) per species. */
301+
su2double **Wall_SpeciesVal; /*!< \brief Specified species flux or value for wall boundaries per species. */
297302
su2double *EngineInflow_Target; /*!< \brief Specified fan face targets for nacelle boundaries. */
298303
su2double *Inflow_Mach; /*!< \brief Specified fan face mach for nacelle boundaries. */
299304
su2double *Inflow_Pressure; /*!< \brief Specified fan face pressure for nacelle boundaries. */
@@ -430,7 +435,7 @@ class CConfig {
430435
unsigned short nQuasiNewtonSamples; /*!< \brief Number of samples used in quasi-Newton solution methods. */
431436
bool UseVectorization; /*!< \brief Whether to use vectorized numerics schemes. */
432437
bool NewtonKrylov; /*!< \brief Use a coupled Newton method to solve the flow equations. */
433-
array<unsigned short,3> NK_IntParam{{20, 3, 2}}; /*!< \brief Integer parameters for NK method. */
438+
array<unsigned short,4> NK_IntParam{{20, 3, 2, 0}}; /*!< \brief Integer parameters for NK method. */
434439
array<su2double,5> NK_DblParam{{-2.0, 0.1, -3.0, 1e-4, 1.0}}; /*!< \brief Floating-point parameters for NK method. */
435440
su2double NK_Relaxation = 1.0;
436441

@@ -515,6 +520,7 @@ class CConfig {
515520
Kind_SlopeLimit_AdjFlow, /*!< \brief Slope limiter for the adjoint equation.*/
516521
Kind_SlopeLimit_Heat, /*!< \brief Slope limiter for the adjoint equation.*/
517522
Kind_SlopeLimit_Species; /*!< \brief Slope limiter for the species equation.*/
523+
LINEAR_SOLVER_INNER Kind_Linear_Solver_Inner; /*!< \brief Inner solver used in nested Krylov schemes. */
518524
unsigned short Kind_FluidModel, /*!< \brief Kind of the Fluid Model: Ideal, van der Waals, etc. */
519525
Kind_InitOption, /*!< \brief Kind of Init option to choose if initializing with Reynolds number or with thermodynamic conditions */
520526
Kind_GridMovement, /*!< \brief Kind of the static mesh movement. */
@@ -641,6 +647,7 @@ class CConfig {
641647
unsigned long Linear_Solver_Iter; /*!< \brief Max iterations of the linear solver for the implicit formulation. */
642648
unsigned long Deform_Linear_Solver_Iter; /*!< \brief Max iterations of the linear solver for the implicit formulation. */
643649
unsigned long Linear_Solver_Restart_Frequency; /*!< \brief Restart frequency of the linear solver for the implicit formulation. */
650+
unsigned long Linear_Solver_Restart_Deflation; /*!< \brief Number of vectors used for deflated restarts. */
644651
unsigned long Linear_Solver_Prec_Threads; /*!< \brief Number of threads per rank for ILU and LU_SGS preconditioners. */
645652
unsigned short Linear_Solver_ILU_n; /*!< \brief ILU fill=in level. */
646653
su2double SemiSpan; /*!< \brief Wing Semi span. */
@@ -756,6 +763,7 @@ class CConfig {
756763
SST_OPTIONS *SST_Options; /*!< \brief List of modifications/corrections/versions of SST turbulence model.*/
757764
SA_OPTIONS *SA_Options; /*!< \brief List of modifications/corrections/versions of SA turbulence model.*/
758765
LM_OPTIONS *LM_Options; /*!< \brief List of modifications/corrections/versions of SA turbulence model.*/
766+
ROUGHSST_MODEL Kind_RoughSST_Model; /*!< \brief List of modifications/corrections/versions of rough-wall boundary conditions for SST turbulence model.*/
759767
unsigned short nSST_Options; /*!< \brief Number of SST options specified. */
760768
unsigned short nSA_Options; /*!< \brief Number of SA options specified. */
761769
unsigned short nLM_Options; /*!< \brief Number of SA options specified. */
@@ -919,6 +927,7 @@ class CConfig {
919927
Initial_BCThrust, /*!< \brief Ratio of turbulent to laminar viscosity at the actuator disk. */
920928
Pressure_FreeStream, /*!< \brief Total pressure of the fluid. */
921929
Pressure_Thermodynamic, /*!< \brief Thermodynamic pressure of the fluid. */
930+
Standard_Ref_Temperature, /*!< \brief Standard reference temperature for multicomponent flows. */
922931
Temperature_FreeStream, /*!< \brief Total temperature of the fluid. */
923932
Temperature_ve_FreeStream; /*!< \brief Total vibrational-electronic temperature of the fluid. */
924933
unsigned short wallModel_MaxIter; /*!< \brief maximum number of iterations for the Newton method for the wall model */
@@ -1401,6 +1410,11 @@ class CConfig {
14011410
void addGilesOption(const string name, unsigned short & nMarker_Giles, string * & Marker_Giles, unsigned short* & option_field, const map<string, Tenum> & enum_map,
14021411
su2double* & var1, su2double* & var2, su2double** & FlowDir, su2double* & relaxfactor1, su2double* & relaxfactor2);
14031412

1413+
template <class Tenum>
1414+
void addWallSpeciesOption(const string name, unsigned short & nMarker_Wall_Species, string * & Marker_Wall_Species,
1415+
WALL_SPECIES_TYPE** & option_field, const map<string, Tenum> & enum_map,
1416+
su2double** & value, unsigned short & nSpecies_per_Wall);
1417+
14041418
void addExhaustOption(const string& name, unsigned short & nMarker_Exhaust, string * & Marker_Exhaust,
14051419
su2double* & Ttotal, su2double* & Ptotal);
14061420

@@ -1968,6 +1982,12 @@ class CConfig {
19681982
*/
19691983
su2double GetPressure_Thermodynamic(void) const { return Pressure_Thermodynamic; }
19701984

1985+
/*!
1986+
* \brief Get the value of the standard reference temperature for multicomponent flows.
1987+
* \return Standard reference temperature, Non-dimensionalized if it is needed for Non-Dimensional problems.
1988+
*/
1989+
su2double GetStandard_RefTemperatureND(void) const { return Standard_Ref_Temperature / Temperature_Ref; }
1990+
19711991
/*!
19721992
* \brief Get the value of the non-dimensionalized thermodynamic pressure.
19731993
* \return Non-dimensionalized thermodynamic pressure.
@@ -4291,6 +4311,10 @@ class CConfig {
42914311
*/
42924312
unsigned short GetKind_Linear_Solver(void) const { return Kind_Linear_Solver; }
42934313

4314+
/*!
4315+
* \brief Get the inner linear solver used in nested Krylov linear solvers.
4316+
*/
4317+
LINEAR_SOLVER_INNER GetKind_Linear_Solver_Inner(void) const { return Kind_Linear_Solver_Inner; }
42944318

42954319
/*!
42964320
* \brief Get the kind of preconditioner for the implicit solver.
@@ -4340,6 +4364,11 @@ class CConfig {
43404364
*/
43414365
unsigned long GetLinear_Solver_Restart_Frequency(void) const { return Linear_Solver_Restart_Frequency; }
43424366

4367+
/*!
4368+
* \brief Get the number of vectors used for deflated restarts.
4369+
*/
4370+
unsigned long GetLinear_Solver_Restart_Deflation(void) const { return Linear_Solver_Restart_Deflation; }
4371+
43434372
/*!
43444373
* \brief Get the relaxation factor for iterative linear smoothers.
43454374
* \return Relaxation factor.
@@ -4393,7 +4422,7 @@ class CConfig {
43934422
/*!
43944423
* \brief Get Newton-Krylov integer parameters.
43954424
*/
4396-
array<unsigned short,3> GetNewtonKrylovIntParam() const { return NK_IntParam; }
4425+
array<unsigned short,4> GetNewtonKrylovIntParam() const { return NK_IntParam; }
43974426

43984427
/*!
43994428
* \brief Get Newton-Krylov floating-point parameters.
@@ -7164,6 +7193,22 @@ class CConfig {
71647193
*/
71657194
const su2double* GetInlet_SpeciesVal(const string& val_index) const;
71667195

7196+
/*!
7197+
* \brief Get the species value at a wall boundary for a specific species
7198+
* \param[in] val_marker - Marker tag corresponding to the wall boundary.
7199+
* \param[in] iSpecies - Species index.
7200+
* \return The wall species value (flux or Dirichlet value).
7201+
*/
7202+
su2double GetWall_SpeciesVal(const string& val_marker, unsigned short iSpecies) const;
7203+
7204+
/*!
7205+
* \brief Get the species boundary condition type at a wall boundary for a specific species
7206+
* \param[in] val_marker - Marker tag corresponding to the wall boundary.
7207+
* \param[in] iSpecies - Species index.
7208+
* \return The wall species type (FLUX or VALUE).
7209+
*/
7210+
WALL_SPECIES_TYPE GetWall_SpeciesType(const string& val_marker, unsigned short iSpecies) const;
7211+
71677212
/*!
71687213
* \brief Get the turbulent properties values at an inlet boundary
71697214
* \param[in] val_index - Index corresponding to the inlet boundary.
@@ -10162,6 +10207,10 @@ class CConfig {
1016210207
*/
1016310208
LM_ParsedOptions GetLMParsedOptions() const { return lmParsedOptions; }
1016410209

10210+
/*!
10211+
* \brief Get rough-wall boundary conditions for SST.
10212+
*/
10213+
ROUGHSST_MODEL GetKindRoughSSTModel() const { return Kind_RoughSST_Model; }
1016510214

1016610215
/*!
1016710216
* \brief Get parsed option data structure for data-driven fluid model.

Common/include/geometry/meshreader/CSU2ASCIIMeshReaderBase.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,22 @@ class CSU2ASCIIMeshReaderBase : public CMeshReaderBase {
8181
* elements). \param[in,out] config - Problem configuration where some metadata is updated (e.g. AoA). \returns True
8282
* if single_pass was successful.
8383
*/
84-
bool ReadMetadata(const bool single_pass, CConfig* config);
84+
bool ReadMetadata(bool single_pass, CConfig* config);
8585

8686
/*!
8787
* \brief Reads the grid points from an SU2 zone into linear partitions across all ranks.
8888
*/
89-
virtual void ReadPointCoordinates(const bool single_pass = false);
89+
virtual void ReadPointCoordinates(bool single_pass = false);
9090

9191
/*!
9292
* \brief Reads the interior volume elements from one section of an SU2 zone into linear partitions across all ranks.
9393
*/
94-
virtual void ReadVolumeElementConnectivity(const bool single_pass = false);
94+
virtual void ReadVolumeElementConnectivity(bool single_pass = false);
9595

9696
/*!
9797
* \brief Reads the surface (boundary) elements from the SU2 zone.
9898
*/
99-
virtual void ReadSurfaceElementConnectivity(const bool single_pass = false);
99+
virtual void ReadSurfaceElementConnectivity(bool single_pass = false);
100100

101101
/*!
102102
* \brief Helper function to find the current zone in an SU2 ASCII mesh object.

Common/include/geometry/meshreader/CSU2ASCIIMeshReaderFEM.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,23 @@
3737
* \brief Reads a native SU2 ASCII grid into linear partitions for the finite element solver (FEM).
3838
* \author T. Economon, E. van der Weide
3939
*/
40-
class CSU2ASCIIMeshReaderFEM : public CSU2ASCIIMeshReaderBase {
40+
class CSU2ASCIIMeshReaderFEM final : public CSU2ASCIIMeshReaderBase {
4141
private:
4242
/*!
4343
* \brief Reads the grid points from an SU2 zone into linear partitions across all ranks.
4444
*/
45-
void ReadPointCoordinates();
45+
void ReadPointCoordinates(bool) override;
4646

4747
/*!
4848
* \brief Reads the interior volume elements from one section of an SU2 zone into linear partitions across all ranks.
4949
*/
50-
void ReadVolumeElementConnectivity();
50+
void ReadVolumeElementConnectivity(bool) override;
5151

5252
/*!
5353
* \brief Reads the surface (boundary) elements from one section of an SU2 zone into linear partitions across all
5454
* ranks.
5555
*/
56-
void ReadSurfaceElementConnectivity();
56+
void ReadSurfaceElementConnectivity(bool) override;
5757

5858
public:
5959
/*!

Common/include/geometry/meshreader/CSU2ASCIIMeshReaderFVM.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* \brief Reads a native SU2 ASCII grid into linear partitions for the finite volume solver (FVM).
3838
* \author T. Economon
3939
*/
40-
class CSU2ASCIIMeshReaderFVM : public CSU2ASCIIMeshReaderBase {
40+
class CSU2ASCIIMeshReaderFVM final : public CSU2ASCIIMeshReaderBase {
4141
private:
4242
/*!
4343
* \brief Splits a single surface actuator disk boundary into two separate markers (repeated points).

Common/include/linear_algebra/CPreconditioner.hpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
#pragma once
3030

31+
#include <functional>
3132
#include "../CConfig.hpp"
3233
#include "../geometry/CGeometry.hpp"
3334
#include "CSysVector.hpp"
@@ -305,6 +306,25 @@ class CPastixPreconditioner final : public CPreconditioner<ScalarType> {
305306
inline void Build() override { sparse_matrix.BuildPastixPreconditioner(geometry, config, kind_fact); }
306307
};
307308

309+
/*!
310+
* \class CAbstractPreconditioner
311+
* \brief Applies a std::function as the preconditioning operation.
312+
* \note This can be used to treat almost anything as a preconditioner.
313+
*/
314+
template <class ScalarType>
315+
class CAbstractPreconditioner final : public CPreconditioner<ScalarType> {
316+
private:
317+
std::function<void(const CSysVector<ScalarType>&, CSysVector<ScalarType>&)> impl;
318+
319+
public:
320+
CAbstractPreconditioner() = delete;
321+
322+
template <class F>
323+
explicit CAbstractPreconditioner(const F& function) : impl(function) {}
324+
325+
inline void operator()(const CSysVector<ScalarType>& u, CSysVector<ScalarType>& v) const override { impl(u, v); }
326+
};
327+
308328
template <class ScalarType>
309329
CPreconditioner<ScalarType>* CPreconditioner<ScalarType>::Create(ENUM_LINEAR_SOLVER_PREC kind,
310330
CSysMatrix<ScalarType>& jacobian, CGeometry* geometry,

0 commit comments

Comments
 (0)