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

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

#include <fcdescriptor.h>

Public Member Functions

 FcDescriptor ()=delete
 

Static Public Member Functions

static constexpr MFloat legendreFunction (const MInt order, const MFloat pos)
 
static constexpr MFloat legendreDerivFunction (const MInt order, const MFloat pos)
 
static constexpr void gaussPoint (const MInt order, MFloat *nodes, MFloat *weights)
 
static constexpr void nodePosition (const MInt node, const MInt nodesPerDir, MInt *nodePos)
 
static constexpr MFloat nodePosEquidist (const MInt order, const MInt node)
 
static constexpr MFloat nodePosLobattoPoints (MInt i, MInt j)
 
static constexpr MInt nghbrCellOfVertex (MInt i, MInt j)
 
static constexpr MInt nghbrCellOfEdge (MInt i, MInt j)
 
static constexpr MInt nghbrCellOfSurface (MInt i)
 
static constexpr MFloat vertexPosition (MInt i, MInt j)
 
static constexpr MFloat edgePosition (MInt i, MInt j)
 
static constexpr MFloat surfacePosition (MInt i, MInt j)
 
static constexpr MInt vertexIdOfOppCell (MInt i, MInt j)
 
static constexpr MInt edgeIdOfOppCell (MInt i, MInt j)
 
static constexpr MInt surfaceIdOfOppCell (MInt i)
 

Detailed Description

template<MInt D>
struct FcDescriptor< 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 168 of file fcdescriptor.h.

Constructor & Destructor Documentation

◆ FcDescriptor()

template<MInt D>
FcDescriptor< D >::FcDescriptor ( )
delete

Member Function Documentation

◆ edgeIdOfOppCell()

template<MInt D>
static constexpr MInt FcDescriptor< D >::edgeIdOfOppCell ( MInt  i,
MInt  j 
)
inlinestaticconstexpr

Definition at line 222 of file fcdescriptor.h.

222{ return fcDescriptor::oppositeEdge3d[i][j]; }
constexpr MInt oppositeEdge3d[12][3]
Definition: fcdescriptor.h:67

◆ edgePosition()

template<MInt D>
static constexpr MFloat FcDescriptor< D >::edgePosition ( MInt  i,
MInt  j 
)
inlinestaticconstexpr

Definition at line 216 of file fcdescriptor.h.

216{ return fcDescriptor::edgePos3d[i][j]; }
constexpr MFloat edgePos3d[12][3]
Definition: fcdescriptor.h:55

◆ gaussPoint()

template<MInt D>
static constexpr void FcDescriptor< D >::gaussPoint ( const MInt  order,
MFloat nodes,
MFloat weights 
)
inlinestaticconstexpr

Definition at line 185 of file fcdescriptor.h.

185 {
187 }
void calculateLegendreGaussNodesAndWeights(MInt Nmax, MFloat *nodes, MFloat *wInt)
Calculate the Gauss integration nodes and weight for the Legendre polynomials on the interval [-1,...
Definition: maiamath.h:806

◆ legendreDerivFunction()

template<MInt D>
static constexpr MFloat FcDescriptor< D >::legendreDerivFunction ( const MInt  order,
const MFloat  pos 
)
inlinestaticconstexpr

Definition at line 178 of file fcdescriptor.h.

178 {
179 MFloat p = pos;
180 MFloat p_deriv = F1;
181 maia::math::calculateLegendrePolyAndDeriv(order, pos, &p, &p_deriv);
182 return p_deriv;
183 }
double MFloat
Definition: maiatypes.h:52
constexpr std::underlying_type< FcCell >::type p(const FcCell property)
Converts property name to underlying integer value.
void calculateLegendrePolyAndDeriv(MInt Nmax, MFloat x, MFloat *polynomial, MFloat *derivative)
Evaluates the Legendre polynomial and its derivative of degree Nmax at point x.
Definition: maiamath.h:754

◆ legendreFunction()

template<MInt D>
static constexpr MFloat FcDescriptor< D >::legendreFunction ( const MInt  order,
const MFloat  pos 
)
inlinestaticconstexpr

Definition at line 171 of file fcdescriptor.h.

171 {
172 MFloat p = pos;
173 MFloat p_deriv = F1;
174 maia::math::calculateLegendrePolyAndDeriv(order, pos, &p, &p_deriv);
175 return p;
176 }

◆ nghbrCellOfEdge()

template<MInt D>
static constexpr MInt FcDescriptor< D >::nghbrCellOfEdge ( MInt  i,
MInt  j 
)
inlinestaticconstexpr

Definition at line 210 of file fcdescriptor.h.

210{ return fcDescriptor::edgeNghbrs3d[i][j]; }
constexpr MInt edgeNghbrs3d[12][3]
Definition: fcdescriptor.h:36

◆ nghbrCellOfSurface()

template<MInt D>
static constexpr MInt FcDescriptor< D >::nghbrCellOfSurface ( MInt  i)
inlinestaticconstexpr

Definition at line 212 of file fcdescriptor.h.

212{ return fcDescriptor::surfaceNghbrs<D>[i]; }

◆ nghbrCellOfVertex()

template<MInt D>
static constexpr MInt FcDescriptor< D >::nghbrCellOfVertex ( MInt  i,
MInt  j 
)
inlinestaticconstexpr

Definition at line 208 of file fcdescriptor.h.

208{ return fcDescriptor::vertexNghbrs<D>[i][j]; }

◆ nodePosEquidist()

template<MInt D>
static constexpr MFloat FcDescriptor< D >::nodePosEquidist ( const MInt  order,
const MInt  node 
)
inlinestaticconstexpr

Definition at line 197 of file fcdescriptor.h.

197 {
198 const MFloat p = (MFloat)order;
199 const MFloat base = F2 / (p + F1);
200 const MFloat exp = (MFloat)node;
201
202 MFloat nodePos = -F1 + exp * base;
203 return nodePos;
204 }

◆ nodePosition()

template<MInt D>
static constexpr void FcDescriptor< D >::nodePosition ( const MInt  node,
const MInt  nodesPerDir,
MInt nodePos 
)
inlinestaticconstexpr

Definition at line 189 of file fcdescriptor.h.

189 {
190 MInt remainNoNodes = node;
191 for(MInt d = D - 1; d >= 0; d--) {
192 nodePos[d] = remainNoNodes % nodesPerDir;
193 remainNoNodes = remainNoNodes / nodesPerDir;
194 }
195 }
int32_t MInt
Definition: maiatypes.h:62

◆ nodePosLobattoPoints()

template<MInt D>
static constexpr MFloat FcDescriptor< D >::nodePosLobattoPoints ( MInt  i,
MInt  j 
)
inlinestaticconstexpr

Definition at line 206 of file fcdescriptor.h.

206{ return fcDescriptor::lobattoPoints[i][j]; }
constexpr MFloat lobattoPoints[4][3]
Definition: fcdescriptor.h:26

◆ surfaceIdOfOppCell()

template<MInt D>
static constexpr MInt FcDescriptor< D >::surfaceIdOfOppCell ( MInt  i)
inlinestaticconstexpr

Definition at line 224 of file fcdescriptor.h.

224{ return fcDescriptor::oppositeSurface<D>[i]; }

◆ surfacePosition()

template<MInt D>
static constexpr MFloat FcDescriptor< D >::surfacePosition ( MInt  i,
MInt  j 
)
inlinestaticconstexpr

Definition at line 218 of file fcdescriptor.h.

218{ return fcDescriptor::surfacePos<D>[i][j]; }

◆ vertexIdOfOppCell()

template<MInt D>
static constexpr MInt FcDescriptor< D >::vertexIdOfOppCell ( MInt  i,
MInt  j 
)
inlinestaticconstexpr

Definition at line 220 of file fcdescriptor.h.

220{ return fcDescriptor::oppositeVertex<D>[i][j]; }

◆ vertexPosition()

template<MInt D>
static constexpr MFloat FcDescriptor< D >::vertexPosition ( MInt  i,
MInt  j 
)
inlinestaticconstexpr

Definition at line 214 of file fcdescriptor.h.

214{ return fcDescriptor::vertexPos<D>[i][j]; }

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