20 #ifndef GEOS_MESH_MESHBODY_HPP_
21 #define GEOS_MESH_MESHBODY_HPP_
45 Group *
const parent );
69 string const & newLevelName,
80 string const & newLevelName );
99 template< typename T, std::enable_if_t< std::is_same< T, string >::value ||
100 std::is_same< T, const char * >::value,
bool > =
false >
111 template< typename T, std::enable_if_t< std::is_same< T, string >::value ||
112 std::is_same< T, const char * >::value,
bool > =
false >
140 template<
typename FUNCTION >
149 template<
typename FUNCTION >
167 return m_globalLengthScale;
176 return m_hasParticles;
191 return this->getGroup< CellBlockManagerABC >( dataRepository::keys::cellManager );
223 Group & m_meshLevels;
227 real64 m_globalLengthScale { 0. };
232 static string intToMeshLevelString(
localIndex const meshLevel );
Abstract base class for CellBlockManager.
The class is used to manage mesh body.
MeshLevel & createMeshLevel(string const &sourceLevelName, string const &newLevelName, int const order)
Create a new mesh level from a source MeshLevel.
MeshLevel const & getBaseDiscretization() const
Convenience function to access the baseDiscretization.
void setHasParticles(bool hasParticles)
Set whether meshbody has particles.
bool hasParticles() const
Get whether meshbody has particles.
struct geos::MeshBody::viewKeysStruct viewKeys
viewKeys
MeshLevel & createShallowMeshLevel(string const &sourceLevelName, string const &newLevelName)
Creates a mesh level in which the member pointers are set to the allocations from another MeshLevel.
MeshLevel & createMeshLevel(localIndex const newLevel)
Create a new mesh level.
void forMeshLevels(FUNCTION &&function) const
Apply the given functor to all meshLevels on this meshBody.
MeshLevel & getMeshLevel(T const &level) const
Get a reference to a MeshLevel.
void deregisterCellBlockManager()
De register the CellBlockManager from this meshBody.
void setGlobalLengthScale(real64 scale)
Set mesh length scale used to define an absolute length tolerance.
MeshLevel & getBaseDiscretization()
Convenience function to access the baseDiscretization.
CellBlockManagerABC const & getCellBlockManager() const
Get the Abstract representation of the CellBlockManager attached to the MeshBody.
real64 getGlobalLengthScale() const
Get mesh length scale.
void forMeshLevels(FUNCTION &&function)
Apply the given functor to all meshLevels on this meshBody.
Group & getMeshLevels()
Get the meshLevels group.
MeshBody(string const &name, Group *const parent)
Constructor for MeshBody object.
MeshLevel & createMeshLevel(string const &name)
Create a new mesh level.
Group const & getMeshLevels() const
Get the meshLevels group.
struct geos::MeshBody::groupStructKeys groupKeys
groupKeys
MeshLevel & getMeshLevel(T const &level)
Get a reference to a MeshLevel.
Class facilitating the representation of a multi-level discretization of a MeshBody.
void deregisterGroup(string const &name)
Removes a child group from this group.
T & getGroup(KEY const &key)
Return a reference to a sub-group of the current Group.
void forSubGroups(LAMBDA &&lambda)
Apply the given functor to subgroups that can be casted to one of specified types.
double real64
64-bit floating point type.
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
static constexpr char const * meshLevelsString()
static constexpr char const * baseDiscretizationString()