20 #ifndef GEOSX_FINITEVOLUME_FLUXAPPROXIMATIONBASE_HPP_ 21 #define GEOSX_FINITEVOLUME_FLUXAPPROXIMATIONBASE_HPP_ 69 enum class Tag { CELL, FACE, NODE };
122 template<
typename TYPE >
123 TYPE
const & getStencil(
MeshLevel const & mesh,
string const & name )
const;
128 template<
typename TYPE >
129 TYPE & getStencil(
MeshLevel & mesh,
string const & name )
const;
137 template<
typename LAMBDA >
138 void forAllStencils(
MeshLevel const & mesh, LAMBDA && lambda )
const;
148 template<
typename TYPE,
typename ... TYPES,
typename LAMBDA >
149 void forStencils(
MeshLevel const & mesh, LAMBDA && lambda )
const;
157 virtual void addToFractureStencil(
MeshLevel & mesh,
158 string const & faceElementRegionName,
159 bool const initFlag )
const = 0;
166 virtual void addEDFracToFractureStencil(
MeshLevel & mesh,
167 string const & embeddedSurfaceRegionName )
const = 0;
175 static constexpr
auto fieldNameString =
"fieldName";
177 static constexpr
auto coeffNameString =
"coefficientName";
179 static constexpr
auto targetRegionsString =
"targetRegions";
181 static constexpr
auto areaRelativeToleranceString =
"areaRelTol";
183 static constexpr
auto transMultiplierString =
"TransMultiplier";
188 static constexpr
auto cellStencilString =
"cellStencil";
190 static constexpr
auto fractureStencilString =
"fractureStencil";
199 static constexpr
auto stencilMeshGroupString =
"finiteVolumeStencils";
214 virtual void RegisterDataOnMesh(
Group *
const meshBodies )
override;
216 virtual void InitializePostInitialConditions_PreSubGroups(
Group *
const rootGroup )
override;
222 virtual void registerCellStencil(
Group & stencilGroup )
const = 0;
228 virtual void computeCellStencil(
MeshLevel & mesh )
const = 0;
234 virtual void registerFractureStencil(
Group & stencilGroup )
const = 0;
241 virtual void registerBoundaryStencil(
Group & stencilGroup,
242 string const & setName )
const = 0;
250 virtual void computeBoundaryStencil(
MeshLevel & mesh,
251 string const & setName,
271 template<
typename TYPE >
274 Group const & stencilGroup = mesh.
getGroupReference( groupKeyStruct::stencilMeshGroupString ).getGroupReference( getName() );
278 template<
typename TYPE >
281 Group & stencilGroup = mesh.
getGroupReference( groupKeyStruct::stencilMeshGroupString ).getGroupReference( getName() );
285 template<
typename LAMBDA >
289 forStencils< CellElementStencilTPFA, FaceElementStencil >( mesh, std::forward< LAMBDA >( lambda ) );
292 template<
typename TYPE,
typename ... TYPES,
typename LAMBDA >
295 Group const & stencilGroup = mesh.
getGroupReference( groupKeyStruct::stencilMeshGroupString ).getGroupReference( getName() );
296 stencilGroup.
forWrappers< TYPE, TYPES... >( [&] (
auto const & wrapper )
298 lambda( wrapper.reference() );
304 #endif //GEOSX_FINITEVOLUME_FLUXAPPROXIMATIONBASE_HPP_ string m_coeffName
name of the coefficient field
real64 m_areaRelTol
relative tolerance
void forStencils(MeshLevel const &mesh, LAMBDA &&lambda) const
Call a user-provided function for the each stencil according to the provided TYPE.
localIndex nodeIndex
node index
Class facilitating the representation of a multi-level discretization of a MeshBody.
localIndex index
cell index
bool operator==(CellDescriptor const &other)
Comparison operator between two CellDescriptors.
string m_fieldName
name of the primary solution field
double real64
64-bit floating point type.
Tag
Enum to classify the variable location.
TYPE const & getStencil(MeshLevel const &mesh, string const &name) const
Extract stencil stored under the mesh group.
localIndex region
region index
CellDescriptor cellIndex
CellDescriptor index.
GEOSX_DECLTYPE_AUTO_RETURN getReference(LOOKUP_TYPE const &lookup) const
Look up a wrapper and get reference to wrapped object.
localIndex subRegion
subregion index
string_array const & targetRegions() const
Returns the target region name.
void forWrappers(LAMBDA lambda)
Apply the given functor to wrappers.
localIndex faceIndex
face index
string_array & targetRegions()
Returns the target region name.
This class provides the base class/interface for the catalog value objects.
string_array m_targetRegions
names of target regions to build the stencil for
void forAllStencils(MeshLevel const &mesh, LAMBDA &&lambda) const
Call a user-provided function for each stencil.
real64 m_lengthScale
length scale of the mesh body
A structure containing a single cell (element) identifier triplet.
std::ptrdiff_t localIndex
Local index type (for indexing objects within an MPI partition).
This class provides a fixed dimensional resizeable array interface in addition to an interface simila...
A structure describing an arbitrary point participating in a stencil.
std::unordered_map< std::string, std::unique_ptr< CatalogInterface< BASETYPE, ARGS... > > > CatalogType
This is the type that will be used for the catalog. The catalog is actually instantiated in the BASET...
T & getGroupReference(string const &key)