20 #ifndef GEOS_MESH_ELEMENTREGIONMANAGER_HPP
21 #define GEOS_MESH_ELEMENTREGIONMANAGER_HPP
23 #include "constitutive/ConstitutiveManager.hpp"
25 #include "CellElementSubRegion.hpp"
26 #include "mesh/generators/CellBlockManagerABC.hpp"
66 template<
typename VIEWTYPE >
74 template<
typename VIEWTYPE >
82 template<
typename VIEWTYPE >
89 template<
typename VIEWTYPE >
97 template<
typename VIEWTYPE >
104 template<
typename CONSTITUTIVE_TYPE >
112 {
return "ZoneManager"; }
137 template<
typename T = ElementSubRegionBase >
143 numElem += elementSubRegion.
size();
190 integer documentationType )
override;
233 template<
typename T=ElementRegionBase,
typename KEY_TYPE=
void >
245 template<
typename T=ElementRegionBase,
typename KEY_TYPE=
void >
257 template<
typename T=ElementRegionBase >
286 template<
typename REGIONTYPE =
ElementRegionBase,
typename ... REGIONTYPES,
typename LAMBDA >
298 template<
typename REGIONTYPE =
ElementRegionBase,
typename ... REGIONTYPES,
typename LAMBDA >
312 template<
typename REGIONTYPE =
ElementRegionBase,
typename ... REGIONTYPES,
typename LOOKUP_CONTAINER,
typename LAMBDA >
326 template<
typename REGIONTYPE =
ElementRegionBase,
typename ... REGIONTYPES,
typename LOOKUP_CONTAINER,
typename LAMBDA >
337 template<
typename LAMBDA >
349 template<
typename LAMBDA >
362 template<
typename REGIONTYPE,
typename ... REGIONTYPES,
typename LAMBDA >
371 lambda( er, castedRegion );
382 template<
typename REGIONTYPE,
typename ... REGIONTYPES,
typename LAMBDA >
391 lambda( er, castedRegion );
403 template<
typename LOOKUP_CONTAINER,
typename LAMBDA >
417 template<
typename LOOKUP_CONTAINER,
typename LAMBDA >
432 template<
typename REGIONTYPE,
typename ... REGIONTYPES,
typename LOOKUP_CONTAINER,
typename LAMBDA >
436 auto & elementRegion )
438 lambda( targetIndex, elementRegion.getIndexInParent(), elementRegion );
450 template<
typename REGIONTYPE,
typename ... REGIONTYPES,
typename LOOKUP_CONTAINER,
typename LAMBDA >
454 auto const & elementRegion )
456 lambda( targetIndex, elementRegion.getIndexInParent(), elementRegion );
465 template<
typename LAMBDA >
478 template<
typename LAMBDA >
492 template<
typename LOOKUP_CONTAINER,
typename LAMBDA >
506 template<
typename LOOKUP_CONTAINER,
typename LAMBDA >
519 template<
typename SUBREGIONTYPE,
typename ... SUBREGIONTYPES,
typename LAMBDA >
523 [lambda = std::forward< LAMBDA >( lambda )](
localIndex const,
539 template<
typename SUBREGIONTYPE,
typename ... SUBREGIONTYPES,
typename LAMBDA >
543 [lambda = std::forward< LAMBDA >( lambda )](
localIndex const,
546 auto const & subRegion )
560 template<
typename SUBREGIONTYPE,
typename ... SUBREGIONTYPES,
typename LOOKUP_CONTAINER,
typename LAMBDA >
564 [lambda = std::forward< LAMBDA >( lambda )](
localIndex const targetIndex,
570 lambda( targetIndex, subRegion );
582 template<
typename ... SUBREGIONTYPES,
typename LOOKUP_CONTAINER,
typename LAMBDA >
586 [lambda = std::forward< LAMBDA >( lambda )](
localIndex const targetIndex,
592 lambda( targetIndex, subRegion );
604 template<
typename SUBREGIONTYPE,
typename ... SUBREGIONTYPES,
typename LOOKUP_CONTAINER,
typename LAMBDA >
608 [lambda = std::forward< LAMBDA >( lambda )](
localIndex const targetIndex,
612 auto const & subRegion )
614 lambda( targetIndex, subRegion );
623 template<
typename LAMBDA >
635 template<
typename LAMBDA >
649 template<
typename LOOKUP_CONTAINER,
typename LAMBDA >
652 forElementSubRegionsComplete< CellElementSubRegion, FaceElementSubRegion, EmbeddedSurfaceSubRegion, WellElementSubRegion >( targetRegions,
653 std::forward< LAMBDA >( lambda ) );
663 template<
typename LOOKUP_CONTAINER,
typename LAMBDA >
666 forElementSubRegionsComplete< CellElementSubRegion, FaceElementSubRegion, EmbeddedSurfaceSubRegion, WellElementSubRegion >( targetRegions,
667 std::forward< LAMBDA >( lambda ) );
676 template<
typename SUBREGIONTYPE,
typename ... SUBREGIONTYPES,
typename LAMBDA >
689 lambda( er, esr, elementRegion, castedSubRegion );
701 template<
typename SUBREGIONTYPE,
typename ... SUBREGIONTYPES,
typename LAMBDA >
714 lambda( er, esr, elementRegion, castedSubRegion );
728 template<
typename SUBREGIONTYPE,
typename ... SUBREGIONTYPES,
typename LOOKUP_CONTAINER,
typename LAMBDA >
743 lambda( targetIndex, er, esr, elementRegion, castedSubRegion );
758 template<
typename SUBREGIONTYPE,
typename ... SUBREGIONTYPES,
typename LOOKUP_CONTAINER,
typename LAMBDA >
773 lambda( targetIndex, er, esr, elementRegion, castedSubRegion );
787 template<
typename FIELD_TRAIT >
788 ElementViewAccessor< traits::ViewTypeConst< typename FIELD_TRAIT::type > >
798 template<
typename VIEWTYPE,
typename LHS=VIEWTYPE >
799 ElementViewAccessor< LHS >
809 template<
typename VIEWTYPE,
typename LHS=VIEWTYPE >
810 ElementViewAccessor< LHS >
822 template<
typename T,
int NDIM,
typename PERM = defaultLayout< NDIM > >
823 ElementViewAccessor< ArrayView< T const, NDIM, getUSD< PERM > > >
833 template<
typename VIEWTYPE >
834 ElementViewAccessor< ReferenceWrapper< VIEWTYPE > >
844 template<
typename VIEWTYPE >
845 ElementViewAccessor< ReferenceWrapper< VIEWTYPE > >
855 template<
typename VIEWTYPE,
typename LHS=VIEWTYPE >
856 MaterialViewAccessor< LHS >
858 constitutive::ConstitutiveManager
const & cm )
const;
867 template<
typename VIEWTYPE,
typename LHS=VIEWTYPE >
868 MaterialViewAccessor< LHS >
870 constitutive::ConstitutiveManager
const & cm );
882 template<
typename FIELD_TRAIT >
883 ElementViewAccessor< traits::ViewTypeConst< typename FIELD_TRAIT::type > >
886 bool const allowMissingViews =
false )
const;
897 template<
typename MATERIAL_TYPE,
typename FIELD_TRAIT >
898 ElementViewAccessor< traits::ViewTypeConst< typename FIELD_TRAIT::type > >
913 template<
typename VIEWTYPE,
typename LHS=VIEWTYPE >
914 ElementViewAccessor< LHS >
917 string const & materialKeyName,
918 bool const allowMissingViews =
false )
const;
931 template<
typename VIEWTYPE,
typename LHS=VIEWTYPE >
932 ElementViewAccessor< LHS >
935 string const & materialKeyName,
936 bool const allowMissingViews =
false );
949 template<
typename T,
int NDIM,
typename PERM = defaultLayout< NDIM > >
950 ElementViewAccessor< ArrayView< T const, NDIM, getUSD< PERM > > >
953 string const & materialKeyName,
954 bool const allowMissingViews =
false )
const;
964 template<
typename MATERIALTYPE,
typename VIEWTYPE,
typename LHS=VIEWTYPE >
965 ElementViewAccessor< LHS >
978 template<
typename MATERIALTYPE,
typename T,
int NDIM,
typename PERM = defaultLayout< NDIM > >
979 ElementViewAccessor< ArrayView< T const, NDIM, getUSD< PERM > > >
988 template<
typename CONSTITUTIVE_TYPE >
989 ConstitutiveRelationAccessor< CONSTITUTIVE_TYPE >
999 template<
typename CONSTITUTIVE_TYPE >
1000 ConstitutiveRelationAccessor< CONSTITUTIVE_TYPE >
1115 bool const overwriteMap );
1143 bool const overwriteMap );
1152 string const fractureRegionName )
const;
1163 string const fractureRegionName )
const;
1174 string const fractureRegionName );
1191 template<
bool DO_PACKING >
1201 template<
bool DO_PACKING >
1211 template<
bool DO_PACKING, typename T >
1214 T const & packList ) const;
1216 template<
bool DO_PACKING, typename T >
1219 T const & packList ) const;
1227 template< typename T >
1238 template<
bool DO_PACKING >
1241 string const fractureRegionName ) const;
1256 template< typename VIEWTYPE, typename LHS >
1271 if( !neighborName.empty() )
1279 viewAccessor[kReg][kSubReg] = wrapper->
reference();
1283 return viewAccessor;
1287 template<
typename VIEWTYPE,
typename LHS >
1303 if( !neighborName.empty() )
1311 viewAccessor[kReg][kSubReg] = wrapper->
reference();
1315 return viewAccessor;
1318 template<
typename FIELD_TRAIT >
1323 traits::ViewTypeConst< typename FIELD_TRAIT::type > >( FIELD_TRAIT::key(), neighborName );
1327 template<
typename T,
int NDIM,
typename PERM >
1332 return constructViewAccessor< Array< T, NDIM, PERM >,
1334 >( name, neighborName );
1337 template<
typename VIEWTYPE >
1353 if( !neighborName.empty() )
1360 viewAccessor[kReg][kSubReg].set( group->
getReference< VIEWTYPE >( viewName ) );
1364 return viewAccessor;
1367 template<
typename VIEWTYPE >
1370 string const & neighborName )
1383 if( !neighborName.empty() )
1390 viewAccessor[kReg][kSubReg].set( group->
getReference< VIEWTYPE >( viewName ) );
1394 return viewAccessor;
1397 template<
typename VIEWTYPE,
typename LHS >
1401 constitutive::ConstitutiveManager
const & cm )
const
1415 accessor[kReg][kSubReg].
resize( cm.numSubGroups() );
1417 for(
localIndex matIndex=0; matIndex<cm.numSubGroups(); ++matIndex )
1419 string const & constitutiveName = cm.getGroup( matIndex ).getName();
1421 if( constitutiveRelation !=
nullptr )
1426 accessor[kReg][kSubReg][matIndex] = wrapper->
reference();
1435 template<
typename VIEWTYPE,
typename LHS >
1439 constitutive::ConstitutiveManager
const & cm )
1453 accessor[kReg][kSubReg].
resize( cm.numSubGroups() );
1455 for(
localIndex matIndex=0; matIndex<cm.numSubGroups(); ++matIndex )
1457 string const & constitutiveName = cm.getGroup( matIndex ).getName();
1459 if( constitutiveRelation !=
nullptr )
1464 accessor[kReg][kSubReg][matIndex] = wrapper->
reference();
1473 template<
typename VIEWTYPE,
typename LHS >
1477 string const & materialKeyName,
1478 bool const allowMissingViews )
const
1486 accessor[kReg].resize(
getRegion( kReg ).numSubRegions() );
1492 for(
size_t k = 0; k < regionNames.size(); ++k )
1503 string const & materialName = subRegion.
getReference<
string >( materialKeyName );
1509 accessor[er][esr] = wrapper->
reference();
1515 ": Material " << constitutiveRelation.getDataContext() <<
1516 " does not contain " << viewName );
1524 template<
typename VIEWTYPE,
typename LHS >
1528 string const & materialKeyName,
1529 bool const allowMissingViews )
1537 accessor[kReg].resize(
getRegion( kReg ).numSubRegions() );
1543 for(
size_t k = 0; k < regionNames.size(); ++k )
1553 string const & materialName = subRegion.
getReference<
string >( materialKeyName );
1559 accessor[er][esr] = wrapper->
reference();
1564 <<
" does not contain " << viewName );
1572 template<
typename FIELD_TRAIT >
1576 bool const allowMissingViews )
const
1579 traits::ViewTypeConst< typename FIELD_TRAIT::type > >( FIELD_TRAIT::key(),
1582 allowMissingViews );
1585 template<
typename MATERIAL_TYPE,
typename FIELD_TRAIT >
1591 traits::ViewTypeConst< typename FIELD_TRAIT::type > >( FIELD_TRAIT::key() );
1595 template<
typename T,
int NDIM,
typename PERM >
1600 string const & materialKeyName,
1601 bool const allowMissingViews )
const
1606 allowMissingViews );
1609 template<
typename MATERIALTYPE,
typename VIEWTYPE,
typename LHS >
1618 accessor[er].resize(
getRegion( er ).numSubRegions() );
1631 string materialName;
1632 constitutiveGroup.
forSubGroups< MATERIALTYPE >( [&]( MATERIALTYPE
const & constitutiveRelation )
1634 materialName = constitutiveRelation.getName();
1635 if( constitutiveRelation.template hasWrapper<>( viewName ) )
1639 accessor[er][esr] = constitutiveRelation.template getReference< VIEWTYPE >( viewName );
1647 template<
typename MATERIALTYPE,
typename T,
int NDIM,
typename PERM >
1654 template<
typename CONSTITUTIVE_TYPE >
1669 accessor[kReg][kSubReg].
resize( cm.numSubGroups() );
1671 for(
localIndex matIndex=0; matIndex<cm.numSubGroups(); ++matIndex )
1673 string const & constitutiveName = cm.getGroup( matIndex ).getName();
1675 CONSTITUTIVE_TYPE *
const
1676 constitutiveRelation = constitutiveGroup.
getGroupPointer< CONSTITUTIVE_TYPE >( constitutiveName );
1677 if( constitutiveRelation !=
nullptr )
1679 accessor[kReg][kSubReg][matIndex] = constitutiveRelation;
1687 template<
typename CONSTITUTIVE_TYPE >
1702 accessor[kReg][kSubReg].
resize( cm.numSubGroups() );
1704 for(
localIndex matIndex=0; matIndex<cm.numSubGroups(); ++matIndex )
1706 string const & constitutiveName = cm.getGroup( matIndex ).getName();
1708 CONSTITUTIVE_TYPE *
const
1709 constitutiveRelation = constitutiveGroup.
getGroupPointer< CONSTITUTIVE_TYPE >( constitutiveName );
1710 if( constitutiveRelation !=
nullptr )
1712 accessor[kReg][kSubReg][matIndex] = constitutiveRelation;
#define GEOS_UNUSED_VAR(...)
Mark an unused variable and silence compiler warnings.
#define GEOS_ERROR_IF_EQ_MSG(lhs, rhs, msg)
Raise a hard error if two values are equal.
#define GEOS_ERROR_IF(EXP, msg)
Conditionally raise a hard error and terminate the program.
constexpr static INDEX_TYPE invalid_index
the value of an invalid index
Abstract base class for CellBlockManager.
The ElementRegionBase is the base class to manage the data stored at the element level.
void forElementSubRegionsIndex(LAMBDA &&lambda) const
Apply LAMBDA to the subregions, loop using subregion indices.
localIndex numSubRegions() const
Get the number of subregions in the region.
SUBREGIONTYPE const & getSubRegion(KEY_TYPE const &key) const
Get a reference to a subregion.
The ElementRegionManager class provides an interface to ObjectManagerBase in order to manage ElementR...
array1d< array1d< ReferenceWrapper< VIEWTYPE > > > ElementReferenceAccessor
The ElementViewAccessor at the ElementRegionManager level is a 2D array of ReferenceWrapper around VI...
void forElementSubRegionsComplete(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda)
This function is used to launch kernel function over the specified target element subregions that can...
void forElementSubRegionsComplete(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda)
This function is used to launch kernel function over the specified target element subregions.
void forElementRegionsComplete(LAMBDA lambda)
This function is used to launch kernel function over all the types of element regions.
void forElementSubRegionsComplete(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda) const
This const function is used to launch kernel function over the specified target element subregions.
int unpackUpDownMaps(buffer_unit_type const *&buffer, ElementReferenceAccessor< localIndex_array > &packList, bool const overwriteMap)
Unpack element-to-node and element-to-face maps.
T & getRegion(KEY_TYPE const &key)
Get a element region.
MaterialViewAccessor< LHS > constructFullMaterialViewAccessor(string const &viewName, constitutive::ConstitutiveManager const &cm) const
This is a const function to construct a MaterialViewAccessor to access the material data.
int packGlobalMaps(buffer_unit_type *&buffer, ElementViewAccessor< arrayView1d< localIndex > > const &packList) const
Pack a buffer.
int unpack(buffer_unit_type const *&buffer, ElementReferenceAccessor< array1d< localIndex > > &packList)
Unpack a buffer.
int unpackFaceElementToFace(buffer_unit_type const *&buffer, ElementReferenceAccessor< localIndex_array > &packList, bool const overwriteMap)
Unpack element-to-node and element-to-face maps.
int packFracturedElementsSize(ElementViewAccessor< arrayView1d< localIndex > > const &packList, string const fractureRegionName) const
Get the buffer size needed to pack the set of fractured elements and the map toEmbSurfaces.
virtual void setSchemaDeviations(xmlWrapper::xmlNode schemaRoot, xmlWrapper::xmlNode schemaParent, integer documentationType) override
Inform the schema generator of any deviations between the xml and GEOS data structures.
ElementRegionManager(string const &name, Group *const parent)
Constructor.
virtual ~ElementRegionManager() override
Destructor.
virtual void setMaxGlobalIndex() override final
Set the maximum local and global index.
int unpack(buffer_unit_type const *&buffer, ElementViewAccessor< arrayView1d< localIndex > > &packList)
Unpack a buffer.
void forElementSubRegions(LAMBDA &&lambda) const
This const function is used to launch kernel function over the element subregions of the specified su...
int packUpDownMaps(buffer_unit_type *&buffer, ElementReferenceAccessor< array1d< localIndex > > const &packList) const
Pack element-to-node and element-to-face maps.
ElementViewAccessor< LHS > constructMaterialViewAccessor(string const &viewName, string_array const ®ionNames, string const &materialKeyName, bool const allowMissingViews=false) const
This is a const function to construct a MaterialViewAccessor to access the material data for specifie...
void forElementRegions(LAMBDA &&lambda)
This function is used to launch kernel function over all the element regions with region type = Eleme...
int pack(buffer_unit_type *&buffer, ElementViewAccessor< arrayView1d< localIndex > > const &packList) const
Pack all the wrappers of all the sub regions of all the regions.
array2d< localIndex > getCellBlockToSubRegionMap(CellBlockManagerABC const &cellBlockManager) const
Produce a map from cell block indices to element region and subregion indices.
void forElementRegionsComplete(LAMBDA lambda)
This function is used to launch kernel function over all the element regions that can be casted to on...
subGroupMap const & getRegions() const
Get a collection of element regions.
ConstitutiveRelationAccessor< CONSTITUTIVE_TYPE > constructFullConstitutiveAccessor(constitutive::ConstitutiveManager const &cm) const
Construct a ConstitutiveRelationAccessor.
void forElementSubRegionsComplete(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda) const
This const function is used to launch kernel function over the specified target element subregions th...
void forElementRegionsComplete(LOOKUP_CONTAINER const &targetRegions, LAMBDA lambda)
This function is used to launch kernel function over the specified target element regions.
localIndex numRegions() const
Get number of the regions.
void forElementSubRegions(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda) const
This const function is used to launch kernel function over the specified target element subregions.
int packFaceElementToFaceSize(ElementViewAccessor< arrayView1d< localIndex > > const &packList) const
Get the buffer size needed to pack element-to-node and element-to-face maps.
ElementViewAccessor< traits::ViewTypeConst< typename FIELD_TRAIT::type > > constructFieldAccessor(string const &neighborName=string()) const
This is a const function to construct a ElementViewAccessor to access the data registered on the mesh...
ElementViewAccessor< ArrayView< T const, NDIM, getUSD< PERM > > > constructMaterialArrayViewAccessor(string const &viewName, string_array const ®ionNames, string const &materialKeyName, bool const allowMissingViews=false) const
Construct a view accessor for material data, assuming array as storage type.
int packFaceElementToFace(buffer_unit_type *&buffer, ElementViewAccessor< arrayView1d< localIndex > > const &packList) const
Pack element-to-node and element-to-face maps.
virtual void outputObjectConnectivity() const override final
Function to output connectivity in order to assist debugging issues with object connectivity.
virtual Group * createChild(string const &childKey, string const &childName) override
Create a new ElementRegion object as a child of this group.
void forElementSubRegionsComplete(LAMBDA &&lambda) const
This const function is used to launch kernel function over all the element subregions that can be cas...
void forElementRegions(LAMBDA &&lambda) const
This const function is used to launch kernel function over all the element regions with region type =...
subGroupMap & getRegions()
Get a collection of element regions.
int unpackFracturedElements(buffer_unit_type const *&buffer, ElementReferenceAccessor< localIndex_array > &packList, string const fractureRegionName)
Unpack set of fractured elements and map toEmbSurfaces to a buffer or get the buffer size.
array1d< array1d< array1d< CONSTITUTIVE_TYPE * > > > ConstitutiveRelationAccessor
The ConstitutiveRelationAccessor at the ElementRegionManager level is a 3D array of CONSTITUTIVE_TYPE...
void forElementRegions(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda) const
This const function is used to launch kernel function over the target element regions with region typ...
int packFracturedElements(buffer_unit_type *&buffer, ElementViewAccessor< arrayView1d< localIndex > > const &packList, string const fractureRegionName) const
Pack set of fractured elements and map toEmbSurfaces to a buffer or get the buffer size.
int unpackGlobalMaps(buffer_unit_type const *&buffer, ElementViewAccessor< ReferenceWrapper< localIndex_array > > &packList)
Unpack a buffer.
ElementViewAccessor< traits::ViewTypeConst< typename FIELD_TRAIT::type > > constructMaterialFieldAccessor(string_array const ®ionNames, string_array const &materialNames, bool const allowMissingViews=false) const
This is a const function to construct a MaterialViewAccessor to access the material data for specifie...
void forElementRegions(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda)
This function is used to launch kernel function over the target element regions with region type = El...
void forElementSubRegions(types::TypeList< SUBREGIONTYPES... >, LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda)
This function is used to launch kernel function over the specified target element subregions with the...
void forElementRegionsComplete(LOOKUP_CONTAINER const &targetRegions, LAMBDA lambda)
This function is used to launch kernel function over the specified target element regions with region...
typename ElementViewAccessor< VIEWTYPE >::NestedViewType ElementView
The ElementViewAccessor at the ElementRegionManager level is the type resulting from ElementViewAcces...
int packUpDownMaps(buffer_unit_type *&buffer, ElementViewAccessor< arrayView1d< localIndex > > const &packList) const
Pack element-to-node and element-to-face maps.
virtual void expandObjectCatalogs() override
Expand any catalogs in the data structure.
void forElementRegionsComplete(LAMBDA lambda) const
This const function is used to launch kernel function over all the types of element regions.
localIndex getNumberOfElements() const
Get the number of elements in all ElementSubRegions of type T.
ElementViewAccessor< ArrayView< T const, NDIM, getUSD< PERM > > > constructArrayViewAccessor(string const &name, string const &neighborName=string()) const
This is a function to construct a ElementViewAccessor to access array data registered on the mesh.
int packUpDownMapsSize(ElementReferenceAccessor< array1d< localIndex > > const &packList) const
Get the buffer size needed to pack element-to-node and element-to-face maps.
void forElementSubRegionsComplete(LAMBDA &&lambda) const
This const function is used to launch kernel function over the element subregions of all subregion ty...
void forElementSubRegionsComplete(LAMBDA &&lambda)
This function is used to launch kernel function over the element subregions of all subregion types.
void forElementSubRegions(LAMBDA &&lambda) const
This const function is used to launch kernel function over the element subregions of all the subregio...
void forElementSubRegionsComplete(LAMBDA &&lambda)
This function is used to launch kernel function over all the element subregions that can be casted to...
void forElementSubRegions(LAMBDA &&lambda)
This function is used to launch kernel function over the element subregions of all the subregion type...
virtual string getCatalogName() const override final
Virtual access to catalogName()
void forElementSubRegions(LAMBDA &&lambda)
This function is used to launch kernel function over the element subregions of the specified subregio...
void generateMesh(CellBlockManagerABC const &cellBlockManager)
Generate the mesh. Produce an error if a required cellBlock doesn't exist in the source mesh.
void forElementRegionsComplete(LAMBDA lambda) const
This const function is used to launch kernel function over all the element regions that can be casted...
void forElementSubRegions(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda) const
This const function is used to launch kernel function over the specified target element subregions wi...
void forElementSubRegions(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda)
This function is used to launch kernel function over the specified target element subregions.
array1d< array1d< array1d< VIEWTYPE > > > MaterialViewAccessor
The MaterialViewAccessor at the ElementRegionManager level is a 3D array of VIEWTYPE.
int packGlobalMapsSize(ElementViewAccessor< arrayView1d< localIndex > > const &packList) const
Get the size of the buffer to be packed.
int packSize(ElementViewAccessor< arrayView1d< localIndex > > const &packList) const
Get the buffer size needed to pack all the wrappers of all the sub regions of all the regions.
void buildSets(NodeManager const &nodeManager)
Build sets from the node sets.
array1d< array1d< VIEWTYPE > > ElementViewAccessor
The ElementViewAccessor at the ElementRegionManager level is an array of array of VIEWTYPE.
bool hasRegion(string const &name) const
Determines if an ElementRegion with the input name exists.
void forElementRegionsComplete(LOOKUP_CONTAINER const &targetRegions, LAMBDA lambda) const
This const function is used to launch kernel function over the specified target element regions.
void resize(integer_array const &numElements, string_array const ®ionNames, string_array const &elementTypes)
Set the number of elements for a set of element regions.
constexpr static int maxNumNodesPerElem
int packUpDownMapsSize(ElementViewAccessor< arrayView1d< localIndex > > const &packList) const
Get the buffer size needed to pack element-to-node and element-to-face maps.
static string catalogName()
The function is to return the name of the ElementRegionManager in the object catalog.
ElementViewAccessor< ReferenceWrapper< VIEWTYPE > > constructReferenceAccessor(string const &viewName, string const &neighborName=string()) const
This is a const function to construct a ElementViewAccessor to access the data registered on the mesh...
typename ElementViewAccessor< VIEWTYPE >::NestedViewTypeConst ElementViewConst
The ElementViewAccessor at the ElementRegionManager level is the type resulting from ElementViewAcces...
void generateWells(CellBlockManagerABC const &cellBlockManager, MeshLevel &meshLevel)
Generate the wells.
T const & getRegion(KEY_TYPE const &key) const
Get a element region.
ElementViewAccessor< LHS > constructViewAccessor(string const &name, string const &neighborName=string()) const
This is a const function to construct a ElementViewAccessor to access the data registered on the mesh...
void forElementRegionsComplete(LOOKUP_CONTAINER const &targetRegions, LAMBDA lambda) const
This const function is used to launch kernel function over the specified target element regions with ...
void forElementSubRegions(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda)
This function is used to launch kernel function over the specified target element subregions with the...
T const & getConstitutiveModel(string const &name) const
Get a pointer to the constitutive model.
dataRepository::Group const & getConstitutiveModels() const
Get the group in which the constitutive models of this subregion are registered.
INDEX_TYPE size() const
function to return the number of entries stored
INDEX_TYPE getIndex(KEY_TYPE const &key) const
Class facilitating the representation of a multi-level discretization of a MeshBody.
The NodeManager class provides an interface to ObjectManagerBase in order to manage node data.
The ObjectManagerBase is the base object of all object managers in the mesh data hierachy.
virtual localIndex packUpDownMaps(buffer_unit_type *&buffer, arrayView1d< localIndex const > const &packList) const
Packs the specific elements in the @ packList.
virtual localIndex packGlobalMapsSize(arrayView1d< localIndex const > const &packList, integer const recursive) const
Computes the pack size of the global maps elements in the @ packList.
virtual localIndex unpack(buffer_unit_type const *&buffer, arrayView1d< localIndex > &packList, integer const recursive, bool onDevice, parallelDeviceEvents &events, MPI_Op op=MPI_REPLACE) override
Unpack a buffer.
virtual localIndex packGlobalMaps(buffer_unit_type *&buffer, arrayView1d< localIndex const > const &packList, integer const recursive) const
Packs the global maps elements in the @ packList.
virtual localIndex unpackGlobalMaps(buffer_unit_type const *&buffer, localIndex_array &packList, integer const recursive)
Unpacks the global maps from buffer.
virtual localIndex packUpDownMapsSize(arrayView1d< localIndex const > const &packList) const
Computes the pack size of the specific elements in the @ packList.
virtual localIndex unpackUpDownMaps(buffer_unit_type const *&buffer, array1d< localIndex > &packList, bool const overwriteUpMaps, bool const overwriteDownMaps)
Unpacks the specific elements in the @ packList.
This class specializes the element region for the case of a well. This class is also in charge of sta...
This class describes a collection of local well elements and perforations.
T * getGroupPointer(KEY const &key)
Return a pointer to a sub-group of the current Group.
DataContext const & getDataContext() const
bool hasWrapper(LOOKUP_TYPE const &lookup) const
Check if a wrapper exists.
localIndex getIndexInParent() const
Get the group's index within its parent group.
GEOS_DECLTYPE_AUTO_RETURN getReference(LOOKUP_TYPE const &lookup) const
Look up a wrapper and get reference to wrapped object.
T & getGroup(KEY const &key)
Return a reference to a sub-group of the current Group.
static bool applyLambdaToContainer(CONTAINERTYPE &container, LAMBDA &&lambda)
Apply a given functor to a container if the container can be cast to one of the specified types.
localIndex size() const
Get the "size" of the group, which determines the number of elements in resizable wrappers.
virtual localIndex packSize(string_array const &wrapperNames, integer const recursive, bool onDevice, parallelDeviceEvents &events) const
Get the size required to pack a list of wrappers.
void forSubGroups(LAMBDA &&lambda)
Apply the given functor to subgroups that can be casted to one of specified types.
virtual localIndex pack(buffer_unit_type *&buffer, string_array const &wrapperNames, integer const recursive, bool onDevice, parallelDeviceEvents &events) const
Pack a list of wrappers to a buffer.
Wrapper< T > const * getWrapperPointer(LOOKUP_TYPE const &index) const
Retrieve a Wrapper stored in this group.
virtual void resize(localIndex const newSize)
Resize the group and all contained wrappers that resize with parent.
T & reference()
Accessor for m_data.
localIndex indexType
The default index type for entries the hierarchy.
camp::list< Ts... > TypeList
Construct a list of types.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
stdVector< string > string_array
A 1-dimensional array of geos::string types.
Array< T, 2, PERMUTATION > array2d
Alias for 2D array.
array1d< integer > integer_array
A 1-dimensional array of geos::integer types.
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
std::int32_t integer
Signed integer type.
signed char buffer_unit_type
Type stored in communication buffers.
Array< T, 1 > array1d
Alias for 1D array.
LvArray::ArrayView< T, NDIM, USD, localIndex, LvArray::ChaiBuffer > ArrayView
Multidimensional array view type. See LvArray:ArrayView for details.
Group key associated with elementRegionsGroup.
static constexpr auto elementRegionsGroup()
struct to serve as a container for group strings and keys
static constexpr char const * neighborDataString()