MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
FvSysEqnDetChem< nDim >::PrimitiveVariables Struct Reference

Static indices for accessing primitive variables in nDim spatial dimensions. More...

#include <fvcartesiansyseqndetchem.h>

Collaboration diagram for FvSysEqnDetChem< nDim >::PrimitiveVariables:
[legend]

Public Member Functions

 PrimitiveVariables (const MInt noSpecies)
 Construct a new FvSysEqnDetChem<nDim>::PrimitiveVariables::PrimitiveVariables object. More...
 
void getPrimitiveVariableNames (MString *names)
 
 ~PrimitiveVariables ()
 Destroy the FvSysEqnDetChem<nDim>::PrimitiveVariables::PrimitiveVariables object. More...
 

Public Attributes

MUint m_noSpecies
 
const MInt noVariables
 
const std::array< MString, nDim+3 > varNames
 
MIntY = nullptr
 

Static Public Attributes

static const MInt Segfault = std::numeric_limits<MInt>::min()
 
static constexpr MInt U = 0
 
static constexpr MInt V = 1
 
static constexpr MInt W = (nDim == 3) ? 2 : Segfault
 
static constexpr std::array< MInt, nDim > VV = getArray012()
 
static constexpr MInt RHO = nDim
 
static constexpr MInt P = nDim + 1
 
static constexpr MInt C = nDim + 2
 

Detailed Description

template<MInt nDim>
struct FvSysEqnDetChem< nDim >::PrimitiveVariables

Definition at line 230 of file fvcartesiansyseqndetchem.h.

Constructor & Destructor Documentation

◆ PrimitiveVariables()

template<MInt nDim>
FvSysEqnDetChem< nDim >::PrimitiveVariables::PrimitiveVariables ( const MInt  noSpecies)
Template Parameters
nDimNumber of dimensions
Parameters
noSpeciesNumber of species

Definition at line 85 of file fvcartesiansyseqndetchem.cpp.

86 : m_noSpecies(noSpecies), noVariables(nDim + 2 + noSpecies) {
87 if(m_noSpecies > 0) {
88 mAlloc(Y, m_noSpecies, "FvSysEqnNS::PrimitiveVariables::Y", AT_);
89 for(MUint i = 0; i < m_noSpecies; ++i) {
90 Y[i] = C + i;
91 }
92 }
93}
void mAlloc(T *&a, const MLong N, const MString &objectName, MString function)
allocates memory for one-dimensional array 'a' of size N
Definition: alloc.h:173
uint32_t MUint
Definition: maiatypes.h:63

◆ ~PrimitiveVariables()

template<MInt nDim>
FvSysEqnDetChem< nDim >::PrimitiveVariables::~PrimitiveVariables
Template Parameters
nDimNumber of dimensions

Definition at line 101 of file fvcartesiansyseqndetchem.cpp.

101 {
102 mDeallocate(Y);
103}
MBool mDeallocate(T *&a)
deallocates the memory previously allocated for element 'a'
Definition: alloc.h:544

Member Function Documentation

◆ getPrimitiveVariableNames()

template<MInt nDim>
void FvSysEqnDetChem< nDim >::PrimitiveVariables::getPrimitiveVariableNames ( MString names)
inline

Definition at line 259 of file fvcartesiansyseqndetchem.h.

259 {
260 for(MInt i = 0; i < noVariables; i++) {
261 names[i] = varNames[i];
262 }
263 };
int32_t MInt
Definition: maiatypes.h:62
const std::array< MString, nDim+3 > varNames

Member Data Documentation

◆ C

template<MInt nDim>
constexpr MInt FvSysEqnDetChem< nDim >::PrimitiveVariables::C = nDim + 2
staticconstexpr

Definition at line 240 of file fvcartesiansyseqndetchem.h.

◆ m_noSpecies

template<MInt nDim>
MUint FvSysEqnDetChem< nDim >::PrimitiveVariables::m_noSpecies

Definition at line 242 of file fvcartesiansyseqndetchem.h.

◆ noVariables

template<MInt nDim>
const MInt FvSysEqnDetChem< nDim >::PrimitiveVariables::noVariables

Definition at line 243 of file fvcartesiansyseqndetchem.h.

◆ P

template<MInt nDim>
constexpr MInt FvSysEqnDetChem< nDim >::PrimitiveVariables::P = nDim + 1
staticconstexpr

Definition at line 238 of file fvcartesiansyseqndetchem.h.

◆ RHO

template<MInt nDim>
constexpr MInt FvSysEqnDetChem< nDim >::PrimitiveVariables::RHO = nDim
staticconstexpr

Definition at line 237 of file fvcartesiansyseqndetchem.h.

◆ Segfault

template<MInt nDim>
const MInt FvSysEqnDetChem< nDim >::PrimitiveVariables::Segfault = std::numeric_limits<MInt>::min()
static

Definition at line 231 of file fvcartesiansyseqndetchem.h.

◆ U

template<MInt nDim>
constexpr MInt FvSysEqnDetChem< nDim >::PrimitiveVariables::U = 0
staticconstexpr

Definition at line 233 of file fvcartesiansyseqndetchem.h.

◆ V

template<MInt nDim>
constexpr MInt FvSysEqnDetChem< nDim >::PrimitiveVariables::V = 1
staticconstexpr

Definition at line 234 of file fvcartesiansyseqndetchem.h.

◆ varNames

template<MInt nDim>
const std::array<MString, nDim + 3> FvSysEqnDetChem< nDim >::PrimitiveVariables::varNames
Initial value:
= [] {
IF_CONSTEXPR(nDim == 2) {
std::array<MString, nDim + 3> a = {"u", "v", "rho", "p", "c"};
return a;
}
else {
std::array<MString, nDim + 3> a = {"u", "v", "w", "rho", "p", "c"};
return a;
}
}()
Definition: contexttypes.h:19

Definition at line 245 of file fvcartesiansyseqndetchem.h.

◆ VV

template<MInt nDim>
constexpr std::array<MInt, nDim> FvSysEqnDetChem< nDim >::PrimitiveVariables::VV = getArray012()
staticconstexpr

Definition at line 236 of file fvcartesiansyseqndetchem.h.

◆ W

template<MInt nDim>
constexpr MInt FvSysEqnDetChem< nDim >::PrimitiveVariables::W = (nDim == 3) ? 2 : Segfault
staticconstexpr

Definition at line 235 of file fvcartesiansyseqndetchem.h.

◆ Y

template<MInt nDim>
MInt* FvSysEqnDetChem< nDim >::PrimitiveVariables::Y = nullptr

Definition at line 256 of file fvcartesiansyseqndetchem.h.


The documentation for this struct was generated from the following files: