20 #ifndef GEOS_MESH_PARTICLEREGIONMANAGER_HPP 
   21 #define GEOS_MESH_PARTICLEREGIONMANAGER_HPP 
   23 #include "generators/ParticleBlock.hpp" 
   25 #include "constitutive/ConstitutiveManager.hpp" 
   27 #include "ParticleSubRegion.hpp" 
   35 class DomainPartition;
 
   59   template< 
typename VIEWTYPE >
 
   67   template< 
typename VIEWTYPE >
 
   75   template< 
typename VIEWTYPE >
 
   82   template< 
typename VIEWTYPE >
 
   90   template< 
typename VIEWTYPE >
 
   97   template< 
typename CONSTITUTIVE_TYPE >
 
  105   { 
return "ParticleManager"; }
 
  130   template< 
typename T = ParticleSubRegionBase >
 
  136       numParticle += particleSubRegion.
size();
 
  171                                     integer documentationType ) 
override;
 
  213   template< 
typename T=ParticleRegionBase, 
typename KEY_TYPE=
void >
 
  224   template< 
typename T=ParticleRegionBase, 
typename KEY_TYPE=
void >
 
  236   template< 
typename T=ParticleRegionBase >
 
  263   template< 
typename REGIONTYPE = 
ParticleRegionBase, 
typename ... REGIONTYPES, 
typename LAMBDA >
 
  275   template< 
typename REGIONTYPE = 
ParticleRegionBase, 
typename ... REGIONTYPES, 
typename LAMBDA >
 
  289   template< 
typename REGIONTYPE = 
ParticleRegionBase, 
typename ... REGIONTYPES, 
typename LOOKUP_CONTAINER, 
typename LAMBDA >
 
  303   template< 
typename REGIONTYPE = 
ParticleRegionBase, 
typename ... REGIONTYPES, 
typename LOOKUP_CONTAINER, 
typename LAMBDA >
 
  314   template< 
typename LAMBDA >
 
  317     forParticleRegionsComplete< ParticleRegion >( std::forward< LAMBDA >( lambda ) );
 
  325   template< 
typename LAMBDA >
 
  328     forParticleRegionsComplete< ParticleRegion >( std::forward< LAMBDA >( lambda ) );
 
  337   template< 
typename REGIONTYPE, 
typename ... REGIONTYPES, 
typename LAMBDA >
 
  346         lambda( er, castedRegion );
 
  357   template< 
typename REGIONTYPE, 
typename ... REGIONTYPES, 
typename LAMBDA >
 
  366         lambda( er, castedRegion );
 
  378   template< 
typename LOOKUP_CONTAINER, 
typename LAMBDA >
 
  381     forParticleRegionsComplete< ParticleRegion >( targetRegions, std::forward< LAMBDA >( lambda ) );
 
  391   template< 
typename LOOKUP_CONTAINER, 
typename LAMBDA >
 
  394     forParticleRegionsComplete< ParticleRegion >( targetRegions, std::forward< LAMBDA >( lambda ) );
 
  405   template< 
typename REGIONTYPE, 
typename ... REGIONTYPES, 
typename LOOKUP_CONTAINER, 
typename LAMBDA >
 
  409                                                                            auto & particleRegion )
 
  411       lambda( targetIndex, particleRegion.getIndexInParent(), particleRegion );
 
  423   template< 
typename REGIONTYPE, 
typename ... REGIONTYPES, 
typename LOOKUP_CONTAINER, 
typename LAMBDA >
 
  427                                                                            auto const & particleRegion )
 
  429       lambda( targetIndex, particleRegion.getIndexInParent(), particleRegion );
 
  438   template< 
typename LAMBDA >
 
  441     forParticleSubRegions< ParticleSubRegion >( std::forward< LAMBDA >( lambda ) );
 
  450   template< 
typename LAMBDA >
 
  453     forParticleSubRegions< ParticleSubRegion >( std::forward< LAMBDA >( lambda ) );
 
  463   template< 
typename LOOKUP_CONTAINER, 
typename LAMBDA >
 
  466     forParticleSubRegions< ParticleSubRegion >( targetRegions, std::forward< LAMBDA >( lambda ) );
 
  476   template< 
typename LOOKUP_CONTAINER, 
typename LAMBDA >
 
  479     forParticleSubRegions< ParticleSubRegion >( targetRegions, std::forward< LAMBDA >( lambda ) );
 
  488   template< 
typename SUBREGIONTYPE, 
typename ... SUBREGIONTYPES, 
typename LAMBDA >
 
  492       [lambda = std::forward< LAMBDA >( lambda )]( 
localIndex const,
 
  508   template< 
typename SUBREGIONTYPE, 
typename ... SUBREGIONTYPES, 
typename LAMBDA >
 
  512       [lambda = std::forward< LAMBDA >( lambda )]( 
localIndex const,
 
  515                                                    auto const & subRegion )
 
  529   template< 
typename SUBREGIONTYPE, 
typename ... SUBREGIONTYPES, 
typename LOOKUP_CONTAINER, 
typename LAMBDA >
 
  533                                                                        [lambda = std::forward< LAMBDA >( lambda )]( 
localIndex const targetIndex,
 
  539       lambda( targetIndex, subRegion );
 
  551   template< 
typename SUBREGIONTYPE, 
typename ... SUBREGIONTYPES, 
typename LOOKUP_CONTAINER, 
typename LAMBDA >
 
  555                                                                        [lambda = std::forward< LAMBDA >( lambda )]( 
localIndex const targetIndex,
 
  559                                                                                                                     auto const & subRegion )
 
  561       lambda( targetIndex, subRegion );
 
  570   template< 
typename LAMBDA >
 
  573     forParticleSubRegionsComplete< ParticleSubRegion >( std::forward< LAMBDA >( lambda ) );
 
  581   template< 
typename LAMBDA >
 
  584     forParticleSubRegionsComplete< ParticleSubRegion >( std::forward< LAMBDA >( lambda ) );
 
  594   template< 
typename LOOKUP_CONTAINER, 
typename LAMBDA >
 
  597     forParticleSubRegionsComplete< ParticleSubRegion >( targetRegions, std::forward< LAMBDA >( lambda ) );
 
  607   template< 
typename LOOKUP_CONTAINER, 
typename LAMBDA >
 
  610     forParticleSubRegionsComplete< ParticleSubRegion >( targetRegions, std::forward< LAMBDA >( lambda ) );
 
  619   template< 
typename SUBREGIONTYPE, 
typename ... SUBREGIONTYPES, 
typename LAMBDA >
 
  632           lambda( er, esr, particleRegion, castedSubRegion );
 
  644   template< 
typename SUBREGIONTYPE, 
typename ... SUBREGIONTYPES, 
typename LAMBDA >
 
  657           lambda( er, esr, particleRegion, castedSubRegion );
 
  671   template< 
typename SUBREGIONTYPE, 
typename ... SUBREGIONTYPES, 
typename LOOKUP_CONTAINER, 
typename LAMBDA >
 
  686             lambda( targetIndex, er, esr, particleRegion, castedSubRegion );
 
  701   template< 
typename SUBREGIONTYPE, 
typename ... SUBREGIONTYPES, 
typename LOOKUP_CONTAINER, 
typename LAMBDA >
 
  716             lambda( targetIndex, er, esr, particleRegion, castedSubRegion );
 
  730   template< 
typename FIELD_TRAIT >
 
  731   ParticleViewAccessor< traits::ViewTypeConst< typename FIELD_TRAIT::type > >
 
  741   template< 
typename VIEWTYPE, 
typename LHS=VIEWTYPE >
 
  742   ParticleViewAccessor< LHS >
 
  752   template< 
typename VIEWTYPE, 
typename LHS=VIEWTYPE >
 
  753   ParticleViewAccessor< LHS >
 
  765   template< 
typename T, 
int NDIM, 
typename PERM = defaultLayout< NDIM > >
 
  766   ParticleViewAccessor< ArrayView< T const, NDIM, getUSD< PERM > > >
 
  776   template< 
typename VIEWTYPE >
 
  777   ParticleViewAccessor< ReferenceWrapper< VIEWTYPE > >
 
  787   template< 
typename VIEWTYPE >
 
  788   ParticleViewAccessor< ReferenceWrapper< VIEWTYPE > >
 
  798   template< 
typename VIEWTYPE, 
typename LHS=VIEWTYPE >
 
  799   MaterialViewAccessor< LHS >
 
  801                                      constitutive::ConstitutiveManager 
const & cm ) 
const;
 
  810   template< 
typename VIEWTYPE, 
typename LHS=VIEWTYPE >
 
  811   MaterialViewAccessor< LHS >
 
  813                                      constitutive::ConstitutiveManager 
const & cm );
 
  825   template< 
typename FIELD_TRAIT >
 
  826   ParticleViewAccessor< traits::ViewTypeConst< typename FIELD_TRAIT::type > >
 
  829                                   bool const allowMissingViews = 
false ) 
const;
 
  840   template< 
typename MATERIAL_TYPE, 
typename FIELD_TRAIT >
 
  841   ParticleViewAccessor< traits::ViewTypeConst< typename FIELD_TRAIT::type > >
 
  855   template< 
typename VIEWTYPE, 
typename LHS=VIEWTYPE >
 
  856   ParticleViewAccessor< LHS >
 
  859                                  string const & materialKeyName,
 
  860                                  bool const allowMissingViews = 
false ) 
const;
 
  873   template< 
typename VIEWTYPE, 
typename LHS=VIEWTYPE >
 
  874   ParticleViewAccessor< LHS >
 
  877                                  string const & materialKeyName,
 
  878                                  bool const allowMissingViews = 
false );
 
  891   template< 
typename T, 
int NDIM, 
typename PERM = defaultLayout< NDIM > >
 
  892   ParticleViewAccessor< ArrayView< T const, NDIM, getUSD< PERM > > >
 
  895                                       string const & materialKeyName,
 
  896                                       bool const allowMissingViews = 
false ) 
const;
 
  906   template< 
typename MATERIALTYPE, 
typename VIEWTYPE, 
typename LHS=VIEWTYPE >
 
  907   ParticleViewAccessor< LHS >
 
  920   template< 
typename MATERIALTYPE, 
typename T, 
int NDIM, 
typename PERM = defaultLayout< NDIM > >
 
  921   ParticleViewAccessor< ArrayView< T const, NDIM, getUSD< PERM > > >
 
  930   template< 
typename CONSTITUTIVE_TYPE >
 
  931   ConstitutiveRelationAccessor< CONSTITUTIVE_TYPE >
 
  941   template< 
typename CONSTITUTIVE_TYPE >
 
  942   ConstitutiveRelationAccessor< CONSTITUTIVE_TYPE >
 
 1032   template< 
bool DOPACK >
 
 1043   template< 
bool DOPACK >
 
 1053   template< 
typename T >
 
 1071 template< 
typename VIEWTYPE, 
typename LHS >
 
 1080     viewAccessor[kReg].resize( particleRegion.
numSubRegions() );
 
 1086       if( !neighborName.empty() )
 
 1094         viewAccessor[kReg][kSubReg] = wrapper->
reference();
 
 1098   return viewAccessor;
 
 1102 template< 
typename VIEWTYPE, 
typename LHS >
 
 1111     viewAccessor[kReg].resize( particleRegion.
numSubRegions() );
 
 1117       if( !neighborName.empty() )
 
 1125         viewAccessor[kReg][kSubReg] = wrapper->
reference();
 
 1129   return viewAccessor;
 
 1132 template< 
typename FIELD_TRAIT >
 
 1137                                 traits::ViewTypeConst< typename FIELD_TRAIT::type > >( FIELD_TRAIT::key(), neighborName );
 
 1140 template< 
typename T, 
int NDIM, 
typename PERM >
 
 1144   return constructViewAccessor< Array< T, NDIM, PERM >,
 
 1146                                 >( name, neighborName );
 
 1149 template< 
typename VIEWTYPE >
 
 1158     viewAccessor[kReg].resize( particleRegion.
numSubRegions() );
 
 1164       if( !neighborName.empty() )
 
 1171         viewAccessor[kReg][kSubReg].set( group->
getReference< VIEWTYPE >( viewName ) );
 
 1175   return viewAccessor;
 
 1178 template< 
typename VIEWTYPE >
 
 1187     viewAccessor[kReg].resize( particleRegion.
numSubRegions() );
 
 1193       if( !neighborName.empty() )
 
 1200         viewAccessor[kReg][kSubReg].set( group->
getReference< VIEWTYPE >( viewName ) );
 
 1204   return viewAccessor;
 
 1207 template< 
typename VIEWTYPE, 
typename LHS >
 
 1210                                                     constitutive::ConstitutiveManager 
const & cm )
 const 
 1224       accessor[kReg][kSubReg].
resize( cm.numSubGroups() );
 
 1226       for( 
localIndex matIndex=0; matIndex<cm.numSubGroups(); ++matIndex )
 
 1228         string const & constitutiveName = cm.getGroup( matIndex ).getName();
 
 1230         if( constitutiveRelation != 
nullptr )
 
 1235             accessor[kReg][kSubReg][matIndex] = wrapper->
reference();
 
 1244 template< 
typename VIEWTYPE, 
typename LHS >
 
 1247                                                     constitutive::ConstitutiveManager 
const & cm )
 
 1261       accessor[kReg][kSubReg].
resize( cm.numSubGroups() );
 
 1263       for( 
localIndex matIndex=0; matIndex<cm.numSubGroups(); ++matIndex )
 
 1265         string const & constitutiveName = cm.getGroup( matIndex ).getName();
 
 1267         if( constitutiveRelation != 
nullptr )
 
 1272             accessor[kReg][kSubReg][matIndex] = wrapper->
reference();
 
 1281 template< 
typename VIEWTYPE, 
typename LHS >
 
 1285                                                 string const & materialKeyName,
 
 1286                                                 bool const allowMissingViews )
 const 
 1294     accessor[kReg].resize( 
getRegion( kReg ).numSubRegions() );
 
 1300   for( 
size_t k = 0; k < regionNames.size(); ++k )
 
 1311         string const & materialName = subRegion.
getReference< 
string >( materialKeyName );
 
 1317           accessor[er][esr] = wrapper->
reference();
 
 1321           GEOS_ERROR_IF( !allowMissingViews, 
"Material " << materialKeyName[k] << 
" does not contain " << viewName );
 
 1329 template< 
typename VIEWTYPE, 
typename LHS >
 
 1333                                                 string const & materialKeyName,
 
 1334                                                 bool const allowMissingViews )
 
 1342     accessor[kReg].resize( 
getRegion( kReg ).numSubRegions() );
 
 1348   for( 
size_t k = 0; k < regionNames.size(); ++k )
 
 1358         string const & materialName = subRegion.
getReference< 
string >( materialKeyName );
 
 1364           accessor[er][esr] = wrapper->
reference();
 
 1368           GEOS_ERROR_IF( !allowMissingViews, 
"Material " << materialName << 
" does not contain " << viewName );
 
 1376 template< 
typename FIELD_TRAIT >
 
 1380                                                  bool const allowMissingViews )
 const 
 1383                                         traits::ViewTypeConst< typename FIELD_TRAIT::type > >( FIELD_TRAIT::key(),
 
 1386                                                                                                allowMissingViews );
 
 1389 template< 
typename MATERIAL_TYPE, 
typename FIELD_TRAIT >
 
 1395                                         traits::ViewTypeConst< typename FIELD_TRAIT::type > >( FIELD_TRAIT::key() );
 
 1398 template< 
typename T, 
int NDIM, 
typename PERM >
 
 1402                                                      string const & materialKeyName,
 
 1403                                                      bool const allowMissingViews )
 const 
 1408                                                                                                               allowMissingViews );
 
 1411 template< 
typename MATERIALTYPE, 
typename VIEWTYPE, 
typename LHS >
 
 1420     accessor[er].resize( 
getRegion( er ).numSubRegions() );
 
 1433       string materialName;
 
 1434       constitutiveGroup.
forSubGroups< MATERIALTYPE >( [&]( MATERIALTYPE 
const & constitutiveRelation )
 
 1436         materialName = constitutiveRelation.getName();
 
 1437         if( constitutiveRelation.template hasWrapper<>( viewName ) )  
 
 1441           accessor[er][esr] = constitutiveRelation.template getReference< VIEWTYPE >( viewName );
 
 1449 template< 
typename MATERIALTYPE, 
typename T, 
int NDIM, 
typename PERM >
 
 1456 template< 
typename CONSTITUTIVE_TYPE >
 
 1471       accessor[kReg][kSubReg].
resize( cm.numSubGroups() );
 
 1473       for( 
localIndex matIndex=0; matIndex<cm.numSubGroups(); ++matIndex )
 
 1475         string const & constitutiveName = cm.getGroup( matIndex ).getName();
 
 1477         CONSTITUTIVE_TYPE * 
const 
 1478         constitutiveRelation = constitutiveGroup.
getGroupPointer< CONSTITUTIVE_TYPE >( constitutiveName );
 
 1479         if( constitutiveRelation != 
nullptr )
 
 1481           accessor[kReg][kSubReg][matIndex] = constitutiveRelation;
 
 1489 template< 
typename CONSTITUTIVE_TYPE >
 
 1504       accessor[kReg][kSubReg].
resize( cm.numSubGroups() );
 
 1506       for( 
localIndex matIndex=0; matIndex<cm.numSubGroups(); ++matIndex )
 
 1508         string const & constitutiveName = cm.getGroup( matIndex ).getName();
 
 1510         CONSTITUTIVE_TYPE * 
const 
 1511         constitutiveRelation = constitutiveGroup.
getGroupPointer< CONSTITUTIVE_TYPE >( constitutiveName );
 
 1512         if( constitutiveRelation != 
nullptr )
 
 1514           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
 
INDEX_TYPE size() const
function to return the number of entries stored
 
INDEX_TYPE getIndex(KEY_TYPE const &key) const
 
The ObjectManagerBase is the base object of all object managers in the mesh data hierachy.
 
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.
 
Abstract base class for ParticleBlockManager.
 
The ParticleManager class provides an interface to ObjectManagerBase in order to manage ParticleRegio...
 
void forParticleSubRegionsComplete(LAMBDA &&lambda) const
This const function is used to launch kernel function over the particle subregions of all subregion t...
 
ConstitutiveRelationAccessor< CONSTITUTIVE_TYPE > constructFullConstitutiveAccessor(constitutive::ConstitutiveManager const &cm) const
Construct a ConstitutiveRelationAccessor.
 
void resize(integer_array const &numParticles, string_array const ®ionNames, string_array const &particleTypes)
Set the number of particles for a set of particle regions.
 
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.
 
virtual void expandObjectCatalogs() override
Expand any catalogs in the data structure.
 
void forParticleRegions(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda) const
This const function is used to launch kernel function over the target particle regions with region ty...
 
void forParticleSubRegions(LAMBDA &&lambda) const
This const function is used to launch kernel function over the particle subregions of all the subregi...
 
void updateMaps()
Updates the globalToLocal and localToGlobal maps.
 
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.
 
void forParticleSubRegions(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda)
This function is used to launch kernel function over the specified target particle subregions.
 
array1d< array1d< array1d< VIEWTYPE > > > MaterialViewAccessor
The MaterialViewAccessor at the ParticleManager level is a 3D array of VIEWTYPE.
 
bool hasRegion(string const &name) const
Determines if a ParticleRegion with the input name exists.
 
void forParticleSubRegions(LAMBDA &&lambda)
This function is used to launch kernel function over the particle subregions of all the subregion typ...
 
virtual void setMaxGlobalIndex() override final
Set the maximum local and global index.
 
ParticleViewAccessor< traits::ViewTypeConst< typename FIELD_TRAIT::type > > constructFieldAccessor(string const &neighborName=string()) const
This is a const function to construct a ParticleViewAccessor to access the data registered on the mes...
 
void forParticleSubRegions(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda) const
This const function is used to launch kernel function over the specified target particle subregions w...
 
void forParticleRegionsComplete(LAMBDA lambda)
This function is used to launch kernel function over all the particle regions that can be casted to o...
 
int PackGlobalMaps(buffer_unit_type *&buffer, ParticleViewAccessor< arrayView1d< localIndex > > const &packList) const
Pack a buffer.
 
int Unpack(buffer_unit_type const *&buffer, ParticleViewAccessor< arrayView1d< localIndex > > &packList)
Unpack a buffer.
 
void forParticleSubRegionsComplete(LAMBDA &&lambda)
This function is used to launch kernel function over all the particle subregions that can be casted t...
 
void generateMesh(ParticleBlockManagerABC &particleBlockManager)
Generate the mesh.
 
array1d< array1d< VIEWTYPE > > ParticleViewAccessor
The ParticleViewAccessor at the ParticleManager level is an array of array of VIEWTYPE.
 
void forParticleRegions(LAMBDA &&lambda) const
This const function is used to launch kernel function over all the particle regions with region type ...
 
static string catalogName()
The function is to return the name of the ParticleManager in the object catalog.
 
subGroupMap const  & getRegions() const
Get a collection of particle regions.
 
ParticleViewAccessor< 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.
 
void forParticleRegionsComplete(LOOKUP_CONTAINER const &targetRegions, LAMBDA lambda) const
This const function is used to launch kernel function over the specified target particle regions.
 
localIndex numParticleBlocks() const
Get the number of particle blocks.
 
void forParticleSubRegions(LAMBDA &&lambda) const
This const function is used to launch kernel function over the particle subregions of the specified s...
 
void forParticleSubRegionsComplete(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda)
This function is used to launch kernel function over the specified target particle subregions that ca...
 
void forParticleSubRegions(LAMBDA &&lambda)
This function is used to launch kernel function over the particle subregions of the specified subregi...
 
void forParticleRegionsComplete(LOOKUP_CONTAINER const &targetRegions, LAMBDA lambda)
This function is used to launch kernel function over the specified target particle regions.
 
localIndex numRegions() const
Get the number of regions.
 
ParticleViewAccessor< 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...
 
ParticleViewAccessor< ArrayView< T const, NDIM, getUSD< PERM > > > constructArrayViewAccessor(string const &name, string const &neighborName=string()) const
This is a function to construct a ParticleViewAccessor to access array data registered on the mesh.
 
T & getRegion(KEY_TYPE const &key)
Get a particle region.
 
void forParticleSubRegionsComplete(LAMBDA &&lambda)
This function is used to launch kernel function over the particle subregions of all subregion types.
 
T const  & getRegion(KEY_TYPE const &key) const
Get a particle region.
 
void forParticleSubRegionsComplete(LAMBDA &&lambda) const
This const function is used to launch kernel function over all the particle subregions that can be ca...
 
int UnpackGlobalMaps(buffer_unit_type const *&buffer, ParticleViewAccessor< ReferenceWrapper< localIndex_array > > &packList)
Unpack a buffer.
 
virtual string getCatalogName() const override final
Virtual access to catalogName()
 
void forParticleSubRegionsComplete(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda) const
This const function is used to launch kernel function over the specified target particle subregions.
 
ParticleViewAccessor< LHS > constructViewAccessor(string const &name, string const &neighborName=string()) const
This is a const function to construct a ParticleViewAccessor to access the data registered on the mes...
 
virtual Group * createChild(string const &childKey, string const &childName) override
Create a new ParticleRegion object as a child of this group.
 
void forParticleRegionsComplete(LAMBDA lambda)
This function is used to launch kernel function over all the types of particle regions.
 
int PackSize(string_array const &wrapperNames, ParticleViewAccessor< arrayView1d< localIndex > > const &packList) const
Get the buffer size needed to pack a list of wrappers.
 
void forParticleRegionsComplete(LAMBDA lambda) const
This const function is used to launch kernel function over all the particle regions that can be caste...
 
void forParticleSubRegions(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda)
This function is used to launch kernel function over the specified target particle subregions with th...
 
ParticleManager(string const &name, Group *const parent)
Constructor.
 
subGroupMap & getRegions()
Get a collection of particle regions.
 
void forParticleRegionsComplete(LAMBDA lambda) const
This const function is used to launch kernel function over all the types of particle regions.
 
void forParticleSubRegionsComplete(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda) const
This const function is used to launch kernel function over the specified target particle subregions t...
 
void forParticleSubRegionsComplete(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda)
This function is used to launch kernel function over the specified target particle subregions.
 
int Unpack(buffer_unit_type const *&buffer, ParticleReferenceAccessor< array1d< localIndex > > &packList)
Unpack a buffer.
 
ParticleViewAccessor< 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...
 
typename ParticleViewAccessor< VIEWTYPE >::NestedViewTypeConst ParticleViewConst
The ParticleViewAccessor at the ParticleManager level is the type resulting from ParticleViewAccessor...
 
void forParticleRegions(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda)
This function is used to launch kernel function over the target particle regions with region type = P...
 
void forParticleRegionsComplete(LOOKUP_CONTAINER const &targetRegions, LAMBDA lambda) const
This const function is used to launch kernel function over the specified target particle regions with...
 
ParticleViewAccessor< ReferenceWrapper< VIEWTYPE > > constructReferenceAccessor(string const &viewName, string const &neighborName=string()) const
This is a const function to construct a ParticleViewAccessor to access the data registered on the mes...
 
void forParticleRegions(LAMBDA &&lambda)
This function is used to launch kernel function over all the particle regions with region type = Part...
 
int Pack(buffer_unit_type *&buffer, string_array const &wrapperNames, ParticleViewAccessor< arrayView1d< localIndex > > const &packList) const
Pack a list of wrappers to a buffer.
 
array1d< array1d< ReferenceWrapper< VIEWTYPE > > > ParticleReferenceAccessor
The ParticleViewAccessor at the ParticleManager level is a 2D array of ReferenceWrapper around VIEWTY...
 
typename ParticleViewAccessor< VIEWTYPE >::NestedViewType ParticleView
The ParticleViewAccessor at the ParticleManager level is the type resulting from ParticleViewAccessor...
 
void forParticleSubRegions(LOOKUP_CONTAINER const &targetRegions, LAMBDA &&lambda) const
This const function is used to launch kernel function over the specified target particle subregions.
 
void forParticleRegionsComplete(LOOKUP_CONTAINER const &targetRegions, LAMBDA lambda)
This function is used to launch kernel function over the specified target particle regions with regio...
 
localIndex getNumberOfParticles() const
Get the number of particles in all ParticleSubRegions of type T.
 
int PackGlobalMapsSize(ParticleViewAccessor< arrayView1d< localIndex > > const &packList) const
Get the size of the buffer to be packed.
 
virtual ~ParticleManager() override
Destructor.
 
array1d< array1d< array1d< CONSTITUTIVE_TYPE * > > > ConstitutiveRelationAccessor
The ConstitutiveRelationAccessor at the ParticleManager level is a 3D array of CONSTITUTIVE_TYPE.
 
The ParticleRegionBase is the base class to manage the data stored at the particle level.
 
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.
 
void forParticleSubRegionsIndex(LAMBDA &&lambda) const
Apply LAMBDA to the subregions, loop using subregion indices.
 
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.
 
T * getGroupPointer(KEY const &key)
Return a pointer to a sub-group of the current Group.
 
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.
 
stdVector< 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).
 
signed char buffer_unit_type
Type stored in communication buffers.
 
int integer
Signed integer type.
 
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.
 
struct to serve as a container for group strings and keys
 
static constexpr char const  * neighborDataString()
 
Group key associated with particleRegionsGroup.
 
static constexpr auto particleRegionsGroup()