DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
Euler.hpp File Reference

Core type definitions, enumerations, and distributed array wrappers for compressible Navier-Stokes / RANS solvers in the DNDSR CFD framework. More...

#include "DNDS/Defines.hpp"
#include "DNDS/DeviceStorage.hpp"
#include "DNDS/EigenUtil.hpp"
#include "DNDS/ConfigEnum.hpp"
#include "CFV/VRDefines.hpp"
#include "DNDS/Errors.hpp"
Include dependency graph for Euler.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  DNDS::Euler::ArrayDOFV< nVarsFixed >
 MPI-parallel distributed array of per-cell Degrees-of-Freedom (conservative variable vectors). More...
 
class  DNDS::Euler::ArrayRECV< nVarsFixed >
 MPI-parallel distributed array of per-cell reconstruction coefficient matrices. More...
 
class  DNDS::Euler::ArrayGRADV< nVarsFixed, gDim >
 MPI-parallel distributed array of per-cell gradient matrices. More...
 
class  DNDS::Euler::JacobianValue< nVarsFixed >
 Placeholder container for implicit-solver Jacobian matrix storage. More...
 
struct  DNDS::Euler::EulerModelTraits< model >
 Compile-time traits for EulerModel variants. More...
 

Namespaces

namespace  DNDS
 the host side operators are provided as implemented
 
namespace  DNDS::Euler
 

Macros

#define DNDS_FV_EULEREVALUATOR_GET_FIXED_EIGEN_SEQS
 Declares compile-time Eigen index sequences for sub-vector access into conservative state vectors.
 

Enumerations

enum  DNDS::Euler::EulerModel {
  DNDS::Euler::NS = 0 , DNDS::Euler::NS_SA = 1 , DNDS::Euler::NS_2D = 2 , DNDS::Euler::NS_3D = 3 ,
  DNDS::Euler::NS_SA_3D = 4 , DNDS::Euler::NS_2EQ = 5 , DNDS::Euler::NS_2EQ_3D = 6 , DNDS::Euler::NS_EX = 101 ,
  DNDS::Euler::NS_EX_3D = 102
}
 Enumerates the available compressible flow solver model configurations. More...
 
enum  DNDS::Euler::RANSModel {
  DNDS::Euler::RANS_Unknown = 0 , DNDS::Euler::RANS_None , DNDS::Euler::RANS_SA , DNDS::Euler::RANS_KOWilcox ,
  DNDS::Euler::RANS_KOSST , DNDS::Euler::RANS_RKE
}
 Enumerates the available RANS turbulence closure models. More...
 

Functions

 DNDS::Euler::DNDS_DEFINE_ENUM_JSON (RANSModel, { {RANS_Unknown, nullptr}, {RANS_None, "RANS_None"}, {RANS_SA, "RANS_SA"}, {RANS_KOWilcox, "RANS_KOWilcox"}, {RANS_KOSST, "RANS_KOSST"}, {RANS_RKE, "RANS_RKE"}, }) const expr static inline int getnVarsFixed(const EulerModel model)
 Returns the compile-time (fixed) number of conservative variables for a given model.
 

Detailed Description

Core type definitions, enumerations, and distributed array wrappers for compressible Navier-Stokes / RANS solvers in the DNDSR CFD framework.

This header defines:

  • EulerModel and RANSModel enumerations for selecting physics models and turbulence closures.
  • Compile-time query functions (getnVarsFixed, getDim_Fixed, getGeomDim_Fixed) that map model enumerants to their variable counts and dimensionality.
  • EulerModelTraits, a trait struct that bundles all model properties for use in template-parameterized solver code.
  • MPI-parallel distributed array wrappers (ArrayDOFV, ArrayRECV, ArrayGRADV) that extend CFV storage types with element-wise arithmetic, dot products, norms, and MPI collective reductions. These are the primary data containers for conservative variables, reconstruction coefficients, and gradients throughout the Euler/RANS solvers.
  • JacobianValue, a placeholder for implicit-solver Jacobian storage in various formats.
  • The DNDS_FV_EULEREVALUATOR_GET_FIXED_EIGEN_SEQS macro, which declares compile-time Eigen sequence objects for efficient sub-vector indexing into conservative state vectors.

Definition in file Euler.hpp.

Macro Definition Documentation

◆ DNDS_FV_EULEREVALUATOR_GET_FIXED_EIGEN_SEQS

#define DNDS_FV_EULEREVALUATOR_GET_FIXED_EIGEN_SEQS
Value:
static const auto Seq012 = Eigen::seq(Eigen::fix<0>, Eigen::fix<dim - 1>); \
static const auto Seq12 = Eigen::seq(Eigen::fix<1>, Eigen::fix<dim - 1>); \
static const auto Seq123 = Eigen::seq(Eigen::fix<1>, Eigen::fix<dim>); \
static const auto Seq23 = Eigen::seq(Eigen::fix<2>, Eigen::fix<dim>); \
static const auto Seq234 = Eigen::seq(Eigen::fix<2>, Eigen::fix<dim + 1>); \
static const auto Seq34 = Eigen::seq(Eigen::fix<3>, Eigen::fix<dim + 1>); \
static const auto Seq01234 = Eigen::seq(Eigen::fix<0>, Eigen::fix<dim + 1>); \
static const auto SeqG012 = Eigen::seq(Eigen::fix<0>, Eigen::fix<gDim - 1>); \
static const auto SeqI52Last = Eigen::seq(Eigen::fix<I4 + 1>, EigenLast); \
static const auto I4 = dim + 1;

Declares compile-time Eigen index sequences for sub-vector access into conservative state vectors.

This macro is intended to be expanded inside EulerEvaluator methods (or any templated context where dim, gDim, and I4 are available). It creates static const Eigen fixed-size sequences that enable zero-overhead slicing of Eigen vectors representing the conservative variable state \(\mathbf{U} = [\rho,\; \rho u,\; \rho v,\; \rho w,\; E,\; \ldots]\).

The naming convention encodes the index range (inclusive on both ends):

Name Range (indices) Typical use
Seq012 [0, dim-1] All spatial indices (0-based), e.g. x,y,z coords
Seq12 [1, dim-1] Spatial indices excluding the first
Seq123 [1, dim] Momentum components (rhoU, rhoV, rhoW)
Seq23 [2, dim] Momentum components excluding rhoU
Seq234 [2, dim+1] Momentum tail through energy index
Seq34 [3, dim+1] Last momentum component(s) and energy
Seq01234 [0, dim+1] Full base NS variables (rho through E)
SeqG012 [0, gDim-1] Geometry-dimension spatial indices
SeqI52Last [I4+1, last] Turbulence/extension variables after energy
I4 dim+1 Index of the energy variable in the state vector
Note
Requires dim (physics dimension), gDim (geometry dimension), and EigenLast (alias for Eigen::last) to be in scope.

Definition at line 56 of file Euler.hpp.