MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
maia::fv::ConservativeVariables< nd > Struct Template Reference

Static indices for accessing conservative variables in nd spatial dimensions. More...

#include <variables.h>

Collaboration diagram for maia::fv::ConservativeVariables< nd >:
[legend]

Public Member Functions

 ConservativeVariables (const MInt noSpecies, const MInt noRans)
 
 ~ConservativeVariables ()
 

Public Attributes

const MInt RHO_Z
 
const MInt RHO_C
 
const MInt m_noSpecies
 
const MInt m_noRansEquations
 
const MInt noVariables
 
MIntRHO_NN = nullptr
 
MIntRHO_Y = nullptr
 

Static Public Attributes

static constexpr MInt RHO_U = 0
 
static constexpr MInt RHO_V = 1
 
static constexpr MInt RHO_W = nd == 3 ? 2 : variables::Segfault
 
static constexpr std::array< MInt, 3 > RHO_VV = {0, 1, 2}
 ConservativeVariables: More...
 
static constexpr MInt RHO_E = nd
 
static constexpr MInt RHO = nd + 1
 
static constexpr MInt RHO_N = nd + 2
 

Detailed Description

template<MInt nd>
struct maia::fv::ConservativeVariables< nd >

Definition at line 199 of file variables.h.

Constructor & Destructor Documentation

◆ ConservativeVariables()

template<MInt nd>
maia::fv::ConservativeVariables< nd >::ConservativeVariables ( const MInt  noSpecies,
const MInt  noRans 
)
explicit

Definition at line 21 of file variables.cpp.

22 : RHO_Z(nd + 2 + noRans),
23 RHO_C(nd + 2 + noRans),
24 m_noSpecies(noSpecies),
25 m_noRansEquations(noRans),
26 noVariables(nd + 2 + noRans + noSpecies) {
27 if(m_noRansEquations > 0) {
28 mAlloc(RHO_NN, m_noRansEquations, "maia::fv::ConservativeVariables::RHO_NN", AT_);
29 for(MInt i = 0; i < m_noRansEquations; ++i) {
30 RHO_NN[i] = RHO_N + i;
31 }
32 }
33 if(m_noSpecies > 0) {
34 mAlloc(RHO_Y, m_noSpecies, "maia::fv::ConservativeVariables::RHO_Y", AT_);
35 for(MInt i = 0; i < m_noSpecies; ++i) {
36 RHO_Y[i] = RHO_Z + i;
37 }
38 }
39}
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
int32_t MInt
Definition: maiatypes.h:62
static constexpr MInt RHO_N
Definition: variables.h:208

◆ ~ConservativeVariables()

Definition at line 43 of file variables.cpp.

43 {
45}
MBool mDeallocate(T *&a)
deallocates the memory previously allocated for element 'a'
Definition: alloc.h:544

Member Data Documentation

◆ m_noRansEquations

template<MInt nd>
const MInt maia::fv::ConservativeVariables< nd >::m_noRansEquations

Definition at line 211 of file variables.h.

◆ m_noSpecies

template<MInt nd>
const MInt maia::fv::ConservativeVariables< nd >::m_noSpecies

Definition at line 210 of file variables.h.

◆ noVariables

template<MInt nd>
const MInt maia::fv::ConservativeVariables< nd >::noVariables

Definition at line 212 of file variables.h.

◆ RHO

template<MInt nd>
constexpr MInt maia::fv::ConservativeVariables< nd >::RHO = nd + 1
staticconstexpr

Definition at line 205 of file variables.h.

◆ RHO_C

template<MInt nd>
const MInt maia::fv::ConservativeVariables< nd >::RHO_C

Definition at line 207 of file variables.h.

◆ RHO_E

template<MInt nd>
constexpr MInt maia::fv::ConservativeVariables< nd >::RHO_E = nd
staticconstexpr

Definition at line 204 of file variables.h.

◆ RHO_N

template<MInt nd>
constexpr MInt maia::fv::ConservativeVariables< nd >::RHO_N = nd + 2
staticconstexpr

Definition at line 208 of file variables.h.

◆ RHO_NN

template<MInt nd>
MInt* maia::fv::ConservativeVariables< nd >::RHO_NN = nullptr

Definition at line 214 of file variables.h.

◆ RHO_U

template<MInt nd>
constexpr MInt maia::fv::ConservativeVariables< nd >::RHO_U = 0
staticconstexpr

Definition at line 200 of file variables.h.

◆ RHO_V

template<MInt nd>
constexpr MInt maia::fv::ConservativeVariables< nd >::RHO_V = 1
staticconstexpr

Definition at line 201 of file variables.h.

◆ RHO_VV

template<MInt nd>
const std::array< MInt, 3 > maia::fv::ConservativeVariables< nd >::RHO_VV = {0, 1, 2}
staticconstexpr

Definition at line 203 of file variables.h.

◆ RHO_W

template<MInt nd>
constexpr MInt maia::fv::ConservativeVariables< nd >::RHO_W = nd == 3 ? 2 : variables::Segfault
staticconstexpr

Definition at line 202 of file variables.h.

◆ RHO_Y

template<MInt nd>
MInt* maia::fv::ConservativeVariables< nd >::RHO_Y = nullptr

Definition at line 215 of file variables.h.

◆ RHO_Z

template<MInt nd>
const MInt maia::fv::ConservativeVariables< nd >::RHO_Z

Definition at line 206 of file variables.h.


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