MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
fvcartesianbndrycell.h
Go to the documentation of this file.
1// Copyright (C) 2024 The m-AIA AUTHORS
2//
3// This file is part of m-AIA (https://git.rwth-aachen.de/aia/m-AIA/m-AIA)
4//
5// SPDX-License-Identifier: LGPL-3.0-only
6
7#ifndef FVBNDRYCELL_H
8#define FVBNDRYCELL_H
9
10#include <vector>
12#include "INCLUDE/maiatypes.h"
13#include "enums.h"
14
15template <MInt nDim, class SysEqn>
17 public:
18 static void init(MInt, MInt, MInt, MInt, MInt);
22 static MInt m_maxNoSurfaces; // 1 with original boundary formulation, > 1 for complex boundary formulation
25
32 MFloat m_gapDistance = std::numeric_limits<MFloat>::max();
35 std::vector<MInt> m_recNghbrIds; // neighbors involved in the cell vars reconstruction
36 std::vector<MFloat> m_cellVarsRecConst; // constants to reconstruct the variables at the cell centroid
37 std::vector<MFloat> m_cellDerivRecConst; // constants to reconstruct the derivatives at the cell centroid
38 std::vector<MFloat> m_faceVertices; // face vertices for split face stream
39 std::vector<std::vector<MInt>> m_faceStream; // face stream for split faces
40
41 // WMLES
43
51 };
52
53 struct BodySurface {
56 MInt* m_bodyId = nullptr;
58 MInt* m_cutEdge = nullptr;
67 };
68
72 MInt* m_srfcId = nullptr;
73 MFloat* m_imageCoordinates = nullptr; // needed for complex boundary formulation
74 MFloat* m_imageVariables = nullptr; // needed for complex boundary formulation
75 BcType* m_variablesType = nullptr; // Dirichlet, Neumann or Robin
76 MFloat* m_primVars = nullptr; // the primitive variables in the surface centroid
78 nullptr; // the derivatives of primitive variables in surface-normal direction at the surface centroid
79 std::vector<MFloat> m_imagePointRecConst; // constants to reconstruct the variables at the image point centroid
80 MFloat m_robinFactor; // the preFactor 'a' in Robin-type boundary conditions du/dn + a*u = b
81 };
82
84 BodySurface** m_srfcs = nullptr;
87
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
109 + // pointer to struct
110 sizeof(BodySurface) * m_maxNoSurfaces + sizeof(BodySurfaceVariables) * m_maxNoSurfaces // structs
111 );
112 }
113
114 void allocateElements(void*, void*, const MInt);
115 void moveElements(void*);
116};
117
118#endif
static MInt m_noEdges
static MInt m_maxNoSurfaces
void moveElements(void *)
WallModelBCVars * m_wmBCVars
static MInt staticElementSize()
BodySurfaceVariables ** m_srfcVariables
BodySurface ** m_srfcs
std::vector< MFloat > m_cellDerivRecConst
static MInt m_noSpecies
MFloat * m_masterCoordinates
std::vector< std::vector< MInt > > m_faceStream
static MInt m_noNghbrs
std::vector< MFloat > m_cellVarsRecConst
static MInt m_noRansEquations
void allocateElements(void *, void *, const MInt)
MFloat * m_coordinates
std::vector< MInt > m_recNghbrIds
std::vector< MFloat > m_faceVertices
static void init(MInt, MInt, MInt, MInt, MInt)
static MInt m_noVariables
BcType
Definition: enums.h:334
int32_t MInt
Definition: maiatypes.h:62
double MFloat
Definition: maiatypes.h:52
bool MBool
Definition: maiatypes.h:58
std::vector< MFloat > m_imagePointRecConst