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"
64 template<
typename VIEWTYPE >
72 template<
typename VIEWTYPE >
80 template<
typename VIEWTYPE >
87 template<
typename VIEWTYPE >
95 template<
typename VIEWTYPE >
102 template<
typename CONSTITUTIVE_TYPE >
110 {
return "ZoneManager"; }
135 template<
typename T = ElementSubRegionBase >
141 numElem += elementSubRegion.
size();
188 integer documentationType )
override;
231 template<
typename T=ElementRegionBase,
typename KEY_TYPE=
void >
243 template<
typename T=ElementRegionBase,
typename KEY_TYPE=
void >
255 template<
typename T=ElementRegionBase >
284 template<
typename REGIONTYPE =
ElementRegionBase,
typename ... REGIONTYPES,
typename LAMBDA >
296 template<
typename REGIONTYPE =
ElementRegionBase,
typename ... REGIONTYPES,
typename LAMBDA >
310 template<
typename REGIONTYPE =
ElementRegionBase,
typename ... REGIONTYPES,
typename LOOKUP_CONTAINER,
typename LAMBDA >
324 template<
typename REGIONTYPE =
ElementRegionBase,
typename ... REGIONTYPES,
typename LOOKUP_CONTAINER,
typename LAMBDA >
335 template<
typename LAMBDA >
347 template<
typename LAMBDA >
360 template<
typename REGIONTYPE,
typename ... REGIONTYPES,
typename LAMBDA >
369 lambda( er, castedRegion );
380 template<
typename REGIONTYPE,
typename ... REGIONTYPES,
typename LAMBDA >
389 lambda( er, castedRegion );
401 template<
typename LOOKUP_CONTAINER,
typename LAMBDA >
415 template<
typename LOOKUP_CONTAINER,
typename LAMBDA >
430 template<
typename REGIONTYPE,
typename ... REGIONTYPES,
typename LOOKUP_CONTAINER,
typename LAMBDA >
434 auto & elementRegion )
436 lambda( targetIndex, elementRegion.getIndexInParent(), elementRegion );
448 template<
typename REGIONTYPE,
typename ... REGIONTYPES,
typename LOOKUP_CONTAINER,
typename LAMBDA >
452 auto const & elementRegion )
454 lambda( targetIndex, elementRegion.getIndexInParent(), elementRegion );
463 template<
typename LAMBDA >
476 template<
typename LAMBDA >
490 template<
typename LOOKUP_CONTAINER,
typename LAMBDA >
504 template<
typename LOOKUP_CONTAINER,
typename LAMBDA >
517 template<
typename SUBREGIONTYPE,
typename ... SUBREGIONTYPES,
typename LAMBDA >
521 [lambda = std::forward< LAMBDA >( lambda )](
localIndex const,
537 template<
typename SUBREGIONTYPE,
typename ... SUBREGIONTYPES,
typename LAMBDA >
541 [lambda = std::forward< LAMBDA >( lambda )](
localIndex const,
544 auto const & subRegion )
558 template<
typename SUBREGIONTYPE,
typename ... SUBREGIONTYPES,
typename LOOKUP_CONTAINER,
typename LAMBDA >
562 [lambda = std::forward< LAMBDA >( lambda )](
localIndex const targetIndex,
568 lambda( targetIndex, subRegion );
580 template<
typename SUBREGIONTYPE,
typename ... SUBREGIONTYPES,
typename LOOKUP_CONTAINER,
typename LAMBDA >
584 [lambda = std::forward< LAMBDA >( lambda )](
localIndex const targetIndex,
588 auto const & subRegion )
590 lambda( targetIndex, subRegion );
599 template<
typename LAMBDA >
611 template<
typename LAMBDA >
625 template<
typename LOOKUP_CONTAINER,
typename LAMBDA >
628 forElementSubRegionsComplete< CellElementSubRegion, FaceElementSubRegion, EmbeddedSurfaceSubRegion, WellElementSubRegion >( targetRegions,
629 std::forward< LAMBDA >( lambda ) );
639 template<
typename LOOKUP_CONTAINER,
typename LAMBDA >
642 forElementSubRegionsComplete< CellElementSubRegion, FaceElementSubRegion, EmbeddedSurfaceSubRegion, WellElementSubRegion >( targetRegions,
643 std::forward< LAMBDA >( lambda ) );
652 template<
typename SUBREGIONTYPE,
typename ... SUBREGIONTYPES,
typename LAMBDA >
665 lambda( er, esr, elementRegion, castedSubRegion );
677 template<
typename SUBREGIONTYPE,
typename ... SUBREGIONTYPES,
typename LAMBDA >
690 lambda( er, esr, elementRegion, castedSubRegion );
704 template<
typename SUBREGIONTYPE,
typename ... SUBREGIONTYPES,
typename LOOKUP_CONTAINER,
typename LAMBDA >
719 lambda( targetIndex, er, esr, elementRegion, castedSubRegion );
734 template<
typename SUBREGIONTYPE,
typename ... SUBREGIONTYPES,
typename LOOKUP_CONTAINER,
typename LAMBDA >
749 lambda( targetIndex, er, esr, elementRegion, castedSubRegion );
763 template<
typename FIELD_TRAIT >
764 ElementViewAccessor< traits::ViewTypeConst< typename FIELD_TRAIT::type > >
774 template<
typename VIEWTYPE,
typename LHS=VIEWTYPE >
775 ElementViewAccessor< LHS >
785 template<
typename VIEWTYPE,
typename LHS=VIEWTYPE >
786 ElementViewAccessor< LHS >
798 template<
typename T,
int NDIM,
typename PERM = defaultLayout< NDIM > >
799 ElementViewAccessor< ArrayView< T const, NDIM, getUSD< PERM > > >
809 template<
typename VIEWTYPE >
810 ElementViewAccessor< ReferenceWrapper< VIEWTYPE > >
820 template<
typename VIEWTYPE >
821 ElementViewAccessor< ReferenceWrapper< VIEWTYPE > >
831 template<
typename VIEWTYPE,
typename LHS=VIEWTYPE >
832 MaterialViewAccessor< LHS >
834 constitutive::ConstitutiveManager
const & cm )
const;
843 template<
typename VIEWTYPE,
typename LHS=VIEWTYPE >
844 MaterialViewAccessor< LHS >
846 constitutive::ConstitutiveManager
const & cm );
858 template<
typename FIELD_TRAIT >
859 ElementViewAccessor< traits::ViewTypeConst< typename FIELD_TRAIT::type > >
862 bool const allowMissingViews =
false )
const;
873 template<
typename MATERIAL_TYPE,
typename FIELD_TRAIT >
874 ElementViewAccessor< traits::ViewTypeConst< typename FIELD_TRAIT::type > >
889 template<
typename VIEWTYPE,
typename LHS=VIEWTYPE >
890 ElementViewAccessor< LHS >
893 string const & materialKeyName,
894 bool const allowMissingViews =
false )
const;
907 template<
typename VIEWTYPE,
typename LHS=VIEWTYPE >
908 ElementViewAccessor< LHS >
911 string const & materialKeyName,
912 bool const allowMissingViews =
false );
925 template<
typename T,
int NDIM,
typename PERM = defaultLayout< NDIM > >
926 ElementViewAccessor< ArrayView< T const, NDIM, getUSD< PERM > > >
929 string const & materialKeyName,
930 bool const allowMissingViews =
false )
const;
940 template<
typename MATERIALTYPE,
typename VIEWTYPE,
typename LHS=VIEWTYPE >
941 ElementViewAccessor< LHS >
954 template<
typename MATERIALTYPE,
typename T,
int NDIM,
typename PERM = defaultLayout< NDIM > >
955 ElementViewAccessor< ArrayView< T const, NDIM, getUSD< PERM > > >
964 template<
typename CONSTITUTIVE_TYPE >
965 ConstitutiveRelationAccessor< CONSTITUTIVE_TYPE >
975 template<
typename CONSTITUTIVE_TYPE >
976 ConstitutiveRelationAccessor< CONSTITUTIVE_TYPE >
1091 bool const overwriteMap );
1100 string const fractureRegionName )
const;
1111 string const fractureRegionName )
const;
1122 string const fractureRegionName );
1133 template<
bool DO_PACKING >
1143 template<
bool DO_PACKING >
1153 template<
bool DO_PACKING,
typename T >
1156 T
const & packList )
const;
1163 template<
typename T >
1174 template<
bool DO_PACKING >
1177 string const fractureRegionName )
const;
1192 template<
typename VIEWTYPE,
typename LHS >
1207 if( !neighborName.empty() )
1215 viewAccessor[kReg][kSubReg] = wrapper->
reference();
1219 return viewAccessor;
1223 template<
typename VIEWTYPE,
typename LHS >
1239 if( !neighborName.empty() )
1247 viewAccessor[kReg][kSubReg] = wrapper->
reference();
1251 return viewAccessor;
1254 template<
typename FIELD_TRAIT >
1259 traits::ViewTypeConst< typename FIELD_TRAIT::type > >( FIELD_TRAIT::key(), neighborName );
1263 template<
typename T,
int NDIM,
typename PERM >
1268 return constructViewAccessor< Array< T, NDIM, PERM >,
1270 >( name, neighborName );
1273 template<
typename VIEWTYPE >
1289 if( !neighborName.empty() )
1296 viewAccessor[kReg][kSubReg].set( group->
getReference< VIEWTYPE >( viewName ) );
1300 return viewAccessor;
1303 template<
typename VIEWTYPE >
1306 string const & neighborName )
1319 if( !neighborName.empty() )
1326 viewAccessor[kReg][kSubReg].set( group->
getReference< VIEWTYPE >( viewName ) );
1330 return viewAccessor;
1333 template<
typename VIEWTYPE,
typename LHS >
1337 constitutive::ConstitutiveManager
const & cm )
const
1351 accessor[kReg][kSubReg].
resize( cm.numSubGroups() );
1353 for(
localIndex matIndex=0; matIndex<cm.numSubGroups(); ++matIndex )
1355 string const & constitutiveName = cm.getGroup( matIndex ).getName();
1357 if( constitutiveRelation !=
nullptr )
1362 accessor[kReg][kSubReg][matIndex] = wrapper->
reference();
1371 template<
typename VIEWTYPE,
typename LHS >
1375 constitutive::ConstitutiveManager
const & cm )
1389 accessor[kReg][kSubReg].
resize( cm.numSubGroups() );
1391 for(
localIndex matIndex=0; matIndex<cm.numSubGroups(); ++matIndex )
1393 string const & constitutiveName = cm.getGroup( matIndex ).getName();
1395 if( constitutiveRelation !=
nullptr )
1400 accessor[kReg][kSubReg][matIndex] = wrapper->
reference();
1409 template<
typename VIEWTYPE,
typename LHS >
1413 string const & materialKeyName,
1414 bool const allowMissingViews )
const
1422 accessor[kReg].resize(
getRegion( kReg ).numSubRegions() );
1428 for(
localIndex k = 0; k < regionNames.size(); ++k )
1439 string const & materialName = subRegion.
getReference<
string >( materialKeyName );
1445 accessor[er][esr] = wrapper->
reference();
1451 ": Material " << constitutiveRelation.getDataContext() <<
1452 " does not contain " << viewName );
1460 template<
typename VIEWTYPE,
typename LHS >
1464 string const & materialKeyName,
1465 bool const allowMissingViews )
1473 accessor[kReg].resize(
getRegion( kReg ).numSubRegions() );
1479 for(
localIndex k = 0; k < regionNames.size(); ++k )
1489 string const & materialName = subRegion.
getReference<
string >( materialKeyName );
1495 accessor[er][esr] = wrapper->
reference();
1500 <<
" does not contain " << viewName );
1508 template<
typename FIELD_TRAIT >
1512 bool const allowMissingViews )
const
1515 traits::ViewTypeConst< typename FIELD_TRAIT::type > >( FIELD_TRAIT::key(),
1518 allowMissingViews );
1521 template<
typename MATERIAL_TYPE,
typename FIELD_TRAIT >
1527 traits::ViewTypeConst< typename FIELD_TRAIT::type > >( FIELD_TRAIT::key() );
1531 template<
typename T,
int NDIM,
typename PERM >
1536 string const & materialKeyName,
1537 bool const allowMissingViews )
const
1542 allowMissingViews );
1545 template<
typename MATERIALTYPE,
typename VIEWTYPE,
typename LHS >
1554 accessor[er].resize(
getRegion( er ).numSubRegions() );
1567 string materialName;
1568 constitutiveGroup.
forSubGroups< MATERIALTYPE >( [&]( MATERIALTYPE
const & constitutiveRelation )
1570 materialName = constitutiveRelation.getName();
1571 if( constitutiveRelation.template
hasWrapper( viewName ) )
1574 accessor[er][esr] = constitutiveRelation.template getReference< VIEWTYPE >( viewName );
1582 template<
typename MATERIALTYPE,
typename T,
int NDIM,
typename PERM >
1589 template<
typename CONSTITUTIVE_TYPE >
1604 accessor[kReg][kSubReg].
resize( cm.numSubGroups() );
1606 for(
localIndex matIndex=0; matIndex<cm.numSubGroups(); ++matIndex )
1608 string const & constitutiveName = cm.getGroup( matIndex ).getName();
1610 CONSTITUTIVE_TYPE *
const
1611 constitutiveRelation = constitutiveGroup.
getGroupPointer< CONSTITUTIVE_TYPE >( constitutiveName );
1612 if( constitutiveRelation !=
nullptr )
1614 accessor[kReg][kSubReg][matIndex] = constitutiveRelation;
1622 template<
typename CONSTITUTIVE_TYPE >
1637 accessor[kReg][kSubReg].
resize( cm.numSubGroups() );
1639 for(
localIndex matIndex=0; matIndex<cm.numSubGroups(); ++matIndex )
1641 string const & constitutiveName = cm.getGroup( matIndex ).getName();
1643 CONSTITUTIVE_TYPE *
const
1644 constitutiveRelation = constitutiveGroup.
getGroupPointer< CONSTITUTIVE_TYPE >( constitutiveName );
1645 if( constitutiveRelation !=
nullptr )
1647 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 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.
ElementViewAccessor< ArrayView< T const, NDIM, getUSD< PERM > > > constructMaterialArrayViewAccessor(string const &viewName, arrayView1d< string const > const ®ionNames, string const &materialKeyName, bool const allowMissingViews=false) const
Construct a view accessor for material data, assuming array as storage type.
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.
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...
ElementViewAccessor< LHS > constructMaterialViewAccessor(string const &viewName, arrayView1d< string const > 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 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.
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...
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.
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 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.
ElementViewAccessor< traits::ViewTypeConst< typename FIELD_TRAIT::type > > constructMaterialFieldAccessor(arrayView1d< string const > const ®ionNames, arrayView1d< string const > const &materialNames, bool const allowMissingViews=false) const
This is a const function to construct a MaterialViewAccessor to access the material data for specifie...
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.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Array< T, 2, PERMUTATION > array2d
Alias for 2D array.
array1d< string > string_array
A 1-dimensional array of geos::string types.
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()