MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
LbLatticeDescriptorBase< D > Struct Template Reference

LB lattice descriptor for arrays depending on D. More...

#include <lblatticedescriptor.h>

Inheritance diagram for LbLatticeDescriptorBase< D >:
[legend]

Public Member Functions

 LbLatticeDescriptorBase ()=delete
 

Static Public Member Functions

static constexpr MInt dirFld (MInt i, MInt j, MInt k)
 
static constexpr MInt distType (MInt i)
 Type of the distribution (0:rest, 1:face, 2:edge, 3:corner) More...
 
static constexpr MInt idFld (MInt i, MInt j)
 
static constexpr MInt intNghbrArray (MInt i, MInt j)
 
static constexpr MFloat linearInterpolationCoefficients (MInt i, MInt j)
 
static constexpr MInt mFld1 (MInt i)
 
static constexpr MInt mFld2 (MInt i)
 
static constexpr MInt nFld (MInt i, MInt j)
 
static constexpr MInt pFld (MInt i, MInt j)
 
static constexpr MInt componentFld (MInt i, MInt j)
 
static constexpr MInt nodalConnectivityVector (MInt i, MInt j)
 
static constexpr MInt oppositeDist (MInt i)
 
static constexpr MFloat ppdfDir (MInt i, MInt j)
 
static constexpr const MFloatppdfDir (MInt i)
 

Detailed Description

template<MInt D>
struct LbLatticeDescriptorBase< D >
Author
Miro Gondrum
Date
27.05.2021 Wrapper struct to easily access LB arrays depending on number of space dimension D.

Definition at line 246 of file lblatticedescriptor.h.

Constructor & Destructor Documentation

◆ LbLatticeDescriptorBase()

Member Function Documentation

◆ componentFld()

template<MInt D>
static constexpr MInt LbLatticeDescriptorBase< D >::componentFld ( MInt  i,
MInt  j 
)
inlinestaticconstexpr

Definition at line 274 of file lblatticedescriptor.h.

274 {
275 if(i % 2 == 0) {
276 return nFld(i / 2, j);
277 } else {
278 return pFld(i / 2, j);
279 }
280 }
static constexpr MInt pFld(MInt i, MInt j)
static constexpr MInt nFld(MInt i, MInt j)

◆ dirFld()

template<MInt D>
static constexpr MInt LbLatticeDescriptorBase< D >::dirFld ( MInt  i,
MInt  j,
MInt  k 
)
inlinestaticconstexpr

Definition at line 249 of file lblatticedescriptor.h.

249 {
250 if(D == 2) {
251 return lbDescriptor::dirFld2[i][j];
252 } // else if(D == 3) {
253 return lbDescriptor::dirFld3[i][j][k];
254 }
constexpr MInt dirFld2[3][3]
Convert directions into distribution id.
constexpr MInt dirFld3[3][3][3]

◆ distType()

template<MInt D>
static constexpr MInt LbLatticeDescriptorBase< D >::distType ( MInt  i)
inlinestaticconstexpr

Definition at line 257 of file lblatticedescriptor.h.

257 {
258 MInt sum = 0;
259 for(MInt k = 0; k < D; k++) {
260 sum += std::abs(idFld(i, k) - 1);
261 }
262 return sum;
263 }
int32_t MInt
Definition: maiatypes.h:62
static constexpr MInt idFld(MInt i, MInt j)

◆ idFld()

template<MInt D>
static constexpr MInt LbLatticeDescriptorBase< D >::idFld ( MInt  i,
MInt  j 
)
inlinestaticconstexpr

Definition at line 264 of file lblatticedescriptor.h.

264{ return lbDescriptor::idFld<D>[i][j]; }

◆ intNghbrArray()

template<MInt D>
static constexpr MInt LbLatticeDescriptorBase< D >::intNghbrArray ( MInt  i,
MInt  j 
)
inlinestaticconstexpr

Definition at line 265 of file lblatticedescriptor.h.

265{ return lbDescriptor::intNghbrArray<D>[i][j]; }

◆ linearInterpolationCoefficients()

template<MInt D>
static constexpr MFloat LbLatticeDescriptorBase< D >::linearInterpolationCoefficients ( MInt  i,
MInt  j 
)
inlinestaticconstexpr

Definition at line 266 of file lblatticedescriptor.h.

266 {
267 return lbDescriptor::linearInterpolationCoefficients<D>[i][j];
268 }

◆ mFld1()

template<MInt D>
static constexpr MInt LbLatticeDescriptorBase< D >::mFld1 ( MInt  i)
inlinestaticconstexpr

Definition at line 269 of file lblatticedescriptor.h.

269{ return lbDescriptor::mFld1<D>[i]; }

◆ mFld2()

template<MInt D>
static constexpr MInt LbLatticeDescriptorBase< D >::mFld2 ( MInt  i)
inlinestaticconstexpr

Definition at line 270 of file lblatticedescriptor.h.

270{ return lbDescriptor::mFld2[i]; }
constexpr MInt mFld2[24]
Ids for the calculation of the second term of the maxwellian.

◆ nFld()

template<MInt D>
static constexpr MInt LbLatticeDescriptorBase< D >::nFld ( MInt  i,
MInt  j 
)
inlinestaticconstexpr

Definition at line 272 of file lblatticedescriptor.h.

272{ return lbDescriptor::nFld<D>[i][j]; }

◆ nodalConnectivityVector()

template<MInt D>
static constexpr MInt LbLatticeDescriptorBase< D >::nodalConnectivityVector ( MInt  i,
MInt  j 
)
inlinestaticconstexpr

Definition at line 282 of file lblatticedescriptor.h.

282 {
283 return lbDescriptor::nodalConnectivityVector<D>[i][j];
284 }

◆ oppositeDist()

template<MInt D>
static constexpr MInt LbLatticeDescriptorBase< D >::oppositeDist ( MInt  i)
inlinestaticconstexpr

Definition at line 285 of file lblatticedescriptor.h.

285{ return lbDescriptor::oppositeDist<D>[i]; }

◆ pFld()

template<MInt D>
static constexpr MInt LbLatticeDescriptorBase< D >::pFld ( MInt  i,
MInt  j 
)
inlinestaticconstexpr

Definition at line 273 of file lblatticedescriptor.h.

273{ return lbDescriptor::pFld<D>[i][j]; }

◆ ppdfDir() [1/2]

template<MInt D>
static constexpr const MFloat * LbLatticeDescriptorBase< D >::ppdfDir ( MInt  i)
inlinestaticconstexpr

Definition at line 287 of file lblatticedescriptor.h.

287{ return lbDescriptor::ppdfDir<D>[i]; }

◆ ppdfDir() [2/2]

template<MInt D>
static constexpr MFloat LbLatticeDescriptorBase< D >::ppdfDir ( MInt  i,
MInt  j 
)
inlinestaticconstexpr

Definition at line 286 of file lblatticedescriptor.h.

286{ return lbDescriptor::ppdfDir<D>[i][j]; }

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