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

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

#include <variables.h>

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

Public Member Functions

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

Public Attributes

const MInt Z
 
const MInt C
 
const MInt m_noSpecies
 
const MInt m_noRansEquations
 
const MInt noVariables
 
MIntNN = nullptr
 
MIntY = nullptr
 

Static Public Attributes

static constexpr MInt U = 0
 
static constexpr MInt V = 1
 
static constexpr MInt W = nd == 3 ? 2 : variables::Segfault
 
static constexpr std::array< MInt, 3 > VV = {0, 1, 2}
 PrimitiveVariables: More...
 
static constexpr MInt RHO = nd
 
static constexpr MInt P = nd + 1
 
static constexpr MInt T = nd + 1
 
static constexpr MInt N = nd + 2
 

Detailed Description

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

Definition at line 224 of file variables.h.

Constructor & Destructor Documentation

◆ PrimitiveVariables()

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

Definition at line 57 of file variables.cpp.

58 : Z(nd + 2 + noRans),
59 C(nd + 2 + noRans),
60 m_noSpecies(noSpecies),
61 m_noRansEquations(noRans),
62 noVariables(nd + 2 + noRans + noSpecies) {
63 if(m_noRansEquations > 0) {
64 mAlloc(NN, m_noRansEquations, "maia::fv::PrimitiveVariables::NN", AT_);
65 for(MInt i = 0; i < m_noRansEquations; ++i) {
66 NN[i] = N + i;
67 }
68 }
69 if(m_noSpecies > 0) {
70 mAlloc(Y, m_noSpecies, "maia::fv::PrimitiveVariables::Y", AT_);
71 for(MInt i = 0; i < m_noSpecies; ++i) {
72 Y[i] = Z + i;
73 }
74 }
75}
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 N
Definition: variables.h:235

◆ ~PrimitiveVariables()

Definition at line 78 of file variables.cpp.

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

Member Data Documentation

◆ C

template<MInt nd>
const MInt maia::fv::PrimitiveVariables< nd >::C

Definition at line 234 of file variables.h.

◆ m_noRansEquations

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

Definition at line 238 of file variables.h.

◆ m_noSpecies

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

Definition at line 237 of file variables.h.

◆ N

template<MInt nd>
constexpr MInt maia::fv::PrimitiveVariables< nd >::N = nd + 2
staticconstexpr

Definition at line 235 of file variables.h.

◆ NN

template<MInt nd>
MInt* maia::fv::PrimitiveVariables< nd >::NN = nullptr

Definition at line 241 of file variables.h.

◆ noVariables

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

Definition at line 239 of file variables.h.

◆ P

template<MInt nd>
constexpr MInt maia::fv::PrimitiveVariables< nd >::P = nd + 1
staticconstexpr

Definition at line 230 of file variables.h.

◆ RHO

template<MInt nd>
constexpr MInt maia::fv::PrimitiveVariables< nd >::RHO = nd
staticconstexpr

Definition at line 229 of file variables.h.

◆ T

template<MInt nd>
constexpr MInt maia::fv::PrimitiveVariables< nd >::T = nd + 1
staticconstexpr

Definition at line 231 of file variables.h.

◆ U

template<MInt nd>
constexpr MInt maia::fv::PrimitiveVariables< nd >::U = 0
staticconstexpr

Definition at line 225 of file variables.h.

◆ V

template<MInt nd>
constexpr MInt maia::fv::PrimitiveVariables< nd >::V = 1
staticconstexpr

Definition at line 226 of file variables.h.

◆ VV

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

Definition at line 228 of file variables.h.

◆ W

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

Definition at line 227 of file variables.h.

◆ Y

template<MInt nd>
MInt* maia::fv::PrimitiveVariables< nd >::Y = nullptr

Definition at line 242 of file variables.h.

◆ Z

template<MInt nd>
const MInt maia::fv::PrimitiveVariables< nd >::Z

Definition at line 233 of file variables.h.


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