MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
FvBndryCell< nDim, SysEqn > Class Template Reference

#include <fvcartesianbndrycell.h>

Inheritance diagram for FvBndryCell< nDim, SysEqn >:
[legend]
Collaboration diagram for FvBndryCell< nDim, SysEqn >:
[legend]

Classes

struct  BodySurface
 
struct  BodySurfaceVariables
 
struct  WallModelBCVars
 

Public Member Functions

void allocateElements (void *, void *, const MInt)
 
void moveElements (void *)
 

Static Public Member Functions

static void init (MInt, MInt, MInt, MInt, MInt)
 
static MInt staticElementSize ()
 

Public Attributes

MBoolm_externalFaces = nullptr
 
MInt m_cellId
 
MInt m_periodicCellId
 
MInt m_linkedCellId
 
MIntm_associatedSrfc
 
MFloat m_volume
 
MFloat m_gapDistance = std::numeric_limits<MFloat>::max()
 
MFloatm_coordinates = nullptr
 
MFloatm_masterCoordinates = nullptr
 
std::vector< MIntm_recNghbrIds
 
std::vector< MFloatm_cellVarsRecConst
 
std::vector< MFloatm_cellDerivRecConst
 
std::vector< MFloatm_faceVertices
 
std::vector< std::vector< MInt > > m_faceStream
 
MBool m_isWMCell = false
 
WallModelBCVarsm_wmBCVars = nullptr
 
BodySurface ** m_srfcs = nullptr
 
BodySurfaceVariables ** m_srfcVariables = nullptr
 
MInt m_noSrfcs
 

Static Public Attributes

static MInt m_noSpecies
 
static MInt m_noRansEquations
 
static MInt m_noEdges
 
static MInt m_maxNoSurfaces
 
static MInt m_noNghbrs
 
static MInt m_noVariables
 

Detailed Description

template<MInt nDim, class SysEqn>
class FvBndryCell< nDim, SysEqn >

Definition at line 16 of file fvcartesianbndrycell.h.

Member Function Documentation

◆ allocateElements()

template<MInt nDim, class SysEqn >
void FvBndryCell< nDim, SysEqn >::allocateElements ( void *  cellPtr,
void *  ,
const  MInt 
)

Definition at line 51 of file fvcartesianbndrycell.cpp.

51 {
52 // TRACE();
53
54 // Initialize non-static member variables:
55 m_linkedCellId = -1;
56 m_noSrfcs = 1;
57
58 // Member pointers are set to the cell memory here:
59 moveElements(cellPtr);
60}
void moveElements(void *)

◆ init()

template<MInt nDim, class SysEqn >
void FvBndryCell< nDim, SysEqn >::init ( MInt   ,
MInt  ,
MInt  ,
MInt  ,
MInt   
)
static

Definition at line 33 of file fvcartesianbndrycell.cpp.

34 {
35 TRACE();
36
37 m_noSpecies = noSpecies;
38 if(noRansEquations == -1) {
40 } else {
42 }
43 m_noEdges = (nDim == 2) ? 4 : 24;
44 m_maxNoSurfaces = maxNoSurfaces;
45 m_noNghbrs = 2 * nDim;
47}
static MInt m_noEdges
static MInt m_maxNoSurfaces
static MInt m_noSpecies
static MInt m_noNghbrs
static MInt m_noRansEquations
static MInt m_noVariables
MInt noRansEquations(RansMethod ransMethod)

◆ moveElements()

template<MInt nDim, class SysEqn >
void FvBndryCell< nDim, SysEqn >::moveElements ( void *  cellPtr)

Sets cell pointers to the memory location cellPtr: NOTE: this cell is not aligned! cellPtr points to the beginning of the cell memory solver within the rawMemory solver. Conservative aligning requires approx. O(maxNoVarsPerCell*maxNoCells) extra memory.

Definition at line 67 of file fvcartesianbndrycell.cpp.

67 {
68 // TRACE();
69
74
75 unaligned_cell_wise::rowMajor2D(m_srfcs, cellPtr, m_maxNoSurfaces, 1);
76 for(MInt i = 0; i < m_maxNoSurfaces; ++i) {
77 unaligned_cell_wise::rowMajor1D(m_srfcs[i]->m_cutEdge, cellPtr, 2 * m_noEdges);
78 unaligned_cell_wise::rowMajor1D(m_srfcs[i]->m_bodyId, cellPtr, 2 * m_noEdges);
80 unaligned_cell_wise::rowMajor1D(m_srfcs[i]->m_normalVector, cellPtr, nDim);
81 unaligned_cell_wise::rowMajor1D(m_srfcs[i]->m_normalVectorCentroid, cellPtr, nDim);
82 unaligned_cell_wise::rowMajor1D(m_srfcs[i]->m_planeVector0, cellPtr, nDim);
83 unaligned_cell_wise::rowMajor1D(m_srfcs[i]->m_planeVector1, cellPtr, nDim);
84 unaligned_cell_wise::rowMajor2D(m_srfcs[i]->m_cutCoordinates, cellPtr, 2 * m_noEdges, nDim);
85 }
86
87 unaligned_cell_wise::rowMajor2D(m_srfcVariables, cellPtr, m_maxNoSurfaces, 1);
88 for(MInt i = 0; i < m_maxNoSurfaces; ++i) {
89 unaligned_cell_wise::rowMajor1D(m_srfcVariables[i]->m_srfcId, cellPtr, nDim);
90 unaligned_cell_wise::rowMajor1D(m_srfcVariables[i]->m_imageCoordinates, cellPtr, nDim);
95 // Invoke placement new operator to call constructor for std::vector on
96 // place in memory that was allocated before. If this is not done,
97 // std::vector will not work properly
98 new(&m_srfcVariables[i]->m_imagePointRecConst) std::vector<MFloat>();
99 }
100}
BodySurfaceVariables ** m_srfcVariables
BodySurface ** m_srfcs
MFloat * m_masterCoordinates
MFloat * m_coordinates
int32_t MInt
Definition: maiatypes.h:62
void rowMajor1D(T *&p, void *&base, const MInt Nrows)
Store 1D variables in row-majow order relative to the start of each cell's memory solver.
Definition: collector.h:307
std::vector< MFloat > m_imagePointRecConst

◆ staticElementSize()

template<MInt nDim, class SysEqn >
static MInt FvBndryCell< nDim, SysEqn >::staticElementSize ( )
inlinestatic

Definition at line 88 of file fvcartesianbndrycell.h.

88 {
89 return (sizeof(MBool) * (m_noNghbrs) + // external faces
90 sizeof(MInt)
91 * (m_noNghbrs + // associated surfaces
92 2 * m_noEdges * m_maxNoSurfaces + // bodyId
93 2 * m_noEdges * m_maxNoSurfaces + // cutEdge
94 nDim * m_maxNoSurfaces // srfcId
95 )
96 + sizeof(BcType) * m_noVariables * m_maxNoSurfaces + // variablesType
97 sizeof(MFloat)
98 * (2 * nDim + // coordinates, master coordinates
99 nDim * m_maxNoSurfaces + // coordinates BodySurface
100 m_noVariables * m_maxNoSurfaces + // imageVariables
101 nDim * m_maxNoSurfaces + // imageCoordinates
102 m_noVariables * m_maxNoSurfaces + // primVars
103 m_noVariables * m_maxNoSurfaces + // normalDeriv
104 4 * nDim * m_maxNoSurfaces + // normal vector, plane vectors
105 2 * m_noEdges * m_maxNoSurfaces * nDim // cut coordinates
106 )
107 + sizeof(MFloat*) * (2 * m_noEdges * m_maxNoSurfaces) + // cut coordinates
108 sizeof(BodySurface*) * m_maxNoSurfaces + sizeof(BodySurfaceVariables*) * m_maxNoSurfaces
109 + // pointer to struct
110 sizeof(BodySurface) * m_maxNoSurfaces + sizeof(BodySurfaceVariables) * m_maxNoSurfaces // structs
111 );
112 }
BcType
Definition: enums.h:334
double MFloat
Definition: maiatypes.h:52
bool MBool
Definition: maiatypes.h:58

Member Data Documentation

◆ m_associatedSrfc

template<MInt nDim, class SysEqn >
MInt* FvBndryCell< nDim, SysEqn >::m_associatedSrfc

Definition at line 30 of file fvcartesianbndrycell.h.

◆ m_cellDerivRecConst

template<MInt nDim, class SysEqn >
std::vector<MFloat> FvBndryCell< nDim, SysEqn >::m_cellDerivRecConst

Definition at line 37 of file fvcartesianbndrycell.h.

◆ m_cellId

template<MInt nDim, class SysEqn >
MInt FvBndryCell< nDim, SysEqn >::m_cellId

Definition at line 27 of file fvcartesianbndrycell.h.

◆ m_cellVarsRecConst

template<MInt nDim, class SysEqn >
std::vector<MFloat> FvBndryCell< nDim, SysEqn >::m_cellVarsRecConst

Definition at line 36 of file fvcartesianbndrycell.h.

◆ m_coordinates

template<MInt nDim, class SysEqn >
MFloat* FvBndryCell< nDim, SysEqn >::m_coordinates = nullptr

Definition at line 33 of file fvcartesianbndrycell.h.

◆ m_externalFaces

template<MInt nDim, class SysEqn >
MBool* FvBndryCell< nDim, SysEqn >::m_externalFaces = nullptr

Definition at line 26 of file fvcartesianbndrycell.h.

◆ m_faceStream

template<MInt nDim, class SysEqn >
std::vector<std::vector<MInt> > FvBndryCell< nDim, SysEqn >::m_faceStream

Definition at line 39 of file fvcartesianbndrycell.h.

◆ m_faceVertices

template<MInt nDim, class SysEqn >
std::vector<MFloat> FvBndryCell< nDim, SysEqn >::m_faceVertices

Definition at line 38 of file fvcartesianbndrycell.h.

◆ m_gapDistance

template<MInt nDim, class SysEqn >
MFloat FvBndryCell< nDim, SysEqn >::m_gapDistance = std::numeric_limits<MFloat>::max()

Definition at line 32 of file fvcartesianbndrycell.h.

◆ m_isWMCell

template<MInt nDim, class SysEqn >
MBool FvBndryCell< nDim, SysEqn >::m_isWMCell = false

Definition at line 42 of file fvcartesianbndrycell.h.

◆ m_linkedCellId

template<MInt nDim, class SysEqn >
MInt FvBndryCell< nDim, SysEqn >::m_linkedCellId

Definition at line 29 of file fvcartesianbndrycell.h.

◆ m_masterCoordinates

template<MInt nDim, class SysEqn >
MFloat* FvBndryCell< nDim, SysEqn >::m_masterCoordinates = nullptr

Definition at line 34 of file fvcartesianbndrycell.h.

◆ m_maxNoSurfaces

template<MInt nDim, class SysEqn >
MInt FvBndryCell< nDim, SysEqn >::m_maxNoSurfaces
static

Definition at line 22 of file fvcartesianbndrycell.h.

◆ m_noEdges

template<MInt nDim, class SysEqn >
MInt FvBndryCell< nDim, SysEqn >::m_noEdges
static

Definition at line 21 of file fvcartesianbndrycell.h.

◆ m_noNghbrs

template<MInt nDim, class SysEqn >
MInt FvBndryCell< nDim, SysEqn >::m_noNghbrs
static

Definition at line 23 of file fvcartesianbndrycell.h.

◆ m_noRansEquations

template<MInt nDim, class SysEqn >
MInt FvBndryCell< nDim, SysEqn >::m_noRansEquations
static

Definition at line 20 of file fvcartesianbndrycell.h.

◆ m_noSpecies

template<MInt nDim, class SysEqn >
MInt FvBndryCell< nDim, SysEqn >::m_noSpecies
static

Definition at line 19 of file fvcartesianbndrycell.h.

◆ m_noSrfcs

template<MInt nDim, class SysEqn >
MInt FvBndryCell< nDim, SysEqn >::m_noSrfcs

Definition at line 86 of file fvcartesianbndrycell.h.

◆ m_noVariables

template<MInt nDim, class SysEqn >
MInt FvBndryCell< nDim, SysEqn >::m_noVariables
static

Definition at line 24 of file fvcartesianbndrycell.h.

◆ m_periodicCellId

template<MInt nDim, class SysEqn >
MInt FvBndryCell< nDim, SysEqn >::m_periodicCellId

Definition at line 28 of file fvcartesianbndrycell.h.

◆ m_recNghbrIds

template<MInt nDim, class SysEqn >
std::vector<MInt> FvBndryCell< nDim, SysEqn >::m_recNghbrIds

Definition at line 35 of file fvcartesianbndrycell.h.

◆ m_srfcs

template<MInt nDim, class SysEqn >
BodySurface** FvBndryCell< nDim, SysEqn >::m_srfcs = nullptr

Definition at line 84 of file fvcartesianbndrycell.h.

◆ m_srfcVariables

template<MInt nDim, class SysEqn >
BodySurfaceVariables** FvBndryCell< nDim, SysEqn >::m_srfcVariables = nullptr

Definition at line 85 of file fvcartesianbndrycell.h.

◆ m_volume

template<MInt nDim, class SysEqn >
MFloat FvBndryCell< nDim, SysEqn >::m_volume

Definition at line 31 of file fvcartesianbndrycell.h.

◆ m_wmBCVars

template<MInt nDim, class SysEqn >
WallModelBCVars* FvBndryCell< nDim, SysEqn >::m_wmBCVars = nullptr

Definition at line 83 of file fvcartesianbndrycell.h.


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