20 #ifndef GEOS_MESH_PARTICLESUBREGIONBASE_HPP_
21 #define GEOS_MESH_PARTICLESUBREGIONBASE_HPP_
25 #include "mesh/mpiCommunications/CommunicationTools.hpp"
26 #include "mesh/mpiCommunications/MPI_iCommData.hpp"
27 #include "constitutive/solid/SolidBase.hpp"
33 class ParticleManager;
36 namespace constitutive
38 class ConstitutiveBase;
245 {
return m_constitutiveModels; }
251 {
return m_constitutiveModels; }
259 template<
typename T = constitutive::ConstitutiveBase >
261 {
return m_constitutiveModels.
getGroup< T >( name ); }
266 template<
typename T = constitutive::ConstitutiveBase >
268 {
return m_constitutiveModels.
getGroup< T >( name ); }
297 switch( particleType )
401 int const & startingIndex,
402 int const & numberOfIncomingParticles );
408 void erase( std::set< localIndex >
const & indicesToErase );
#define GEOS_ERROR(msg)
Raise a hard error and terminate the program.
The ObjectManagerBase is the base object of all object managers in the mesh data hierachy.
void setHasRVectors(bool hasRVectors)
Set whether particle has r-vectors.
arrayView1d< real64 const > getParticleVolume() const
Get the current volume of each particle in this subregion.
OrderedVariableToManyParticleRelation m_neighborList
Neighbor list.
arrayView1d< globalIndex const > getParticleID() const
Get the global ID of each particle in this subregion.
arrayView2d< real64 > getParticleCenter()
Get the center of each particle in this subregion.
arrayView1d< int > getParticleSurfaceFlag()
Get the contact group of each particle in this subregion.
arrayView2d< real64 const > getParticleMaterialDirection() const
Get the material direction of each particle in this subregion.
void particleUnpack(buffer_type &buffer, int const &startingIndex, int const &numberOfIncomingParticles)
Unpacks the data of particles on this subregion.
arrayView1d< real64 > getParticleVolume()
Get the current volume of each particle in this subregion.
OrderedVariableToManyParticleRelation const & neighborList() const
Provide an immutable accessor to the particle neighbor list.
arrayView3d< real64 > getParticleRVectors()
Get the r-vectors of each particle in this subregion.
arrayView1d< int const > getParticleSurfaceFlag() const
Get the contact group of each particle in this subregion.
int m_numVerticesPerParticle
The number of vertices each particle has.
arrayView2d< real64 const > getParticleVelocity() const
Get the velocity of each particle in this subregion.
array1d< globalIndex > m_particleID
Member level field for the particle global ID.
arrayView2d< real64 const > getParticleCenter() const
Get the center of each particle in this subregion.
arrayView1d< int const > getParticleGroup() const
Get the contact group of each particle in this subregion.
void setActiveParticleIndices()
Identifies the local indices of non-ghost particles.
array3d< real64 > m_particleRVectors
current half-R-vectors (center to face)
T const & getConstitutiveModel(string const &name) const
Get a pointer to the constitutive model.
void setParticleCenter(array2d< real64 > particleCenter)
Set the center of each particle in this subregion.
array2d< real64 > m_particleVelocity
Member level field for the particle velocity.
bool m_hasRVectors
Boolean indicating whether the particle subregion contains particles needing r-vectors defining their...
T & getConstitutiveModel(string const &name)
Get a pointer to the constitutive model.
arrayView2d< real64 > getParticleVelocity()
Get the velocity of each particle in this subregion.
void updateMaps()
Updates the globalToLocal and localToGlobal maps.
arrayView2d< real64 > getParticleMaterialDirection()
Get the material direction of each particle in this subregion.
virtual void setParticleType(ParticleType const particleType)
Set the type of particle in this subregion.
ParticleType getParticleType() const
Get the type of particle in this subregion.
arrayView1d< real64 const > getParticleStrengthScale() const
Get the strength scale of each particle in this subregion.
arrayView1d< int const > getParticleRank() const
Get the ghost rank of each particle in this subregion.
bool hasRVectors() const
Get whether particle has r-vectors.
array1d< real64 > m_particleDamage
Member level field for the particle damage.
SortedArrayView< localIndex const > const activeParticleIndices() const
Returns the local indices of all non-ghost particles.
arrayView1d< real64 const > getParticleDamage() const
Get the damage of each particle in this subregion.
~ParticleSubRegionBase()
Destructor.
ParticleType m_particleType
Type of particles in this subregion.
array1d< int > m_particleGroup
Member level field for the particle contact group.
array2d< real64 > m_particleCenter
Member level field for the particle center.
int numberOfVerticesPerParticle() const
Get the number of vertices for particles in this subregion.
arrayView1d< int > getParticleGroup()
Get the contact group of each particle in this subregion.
array1d< real64 > m_particleStrengthScale
Member level field for the particle strength scale.
OrderedVariableToManyParticleRelation & neighborList()
Get a mutable accessor to the particle neighbor list.
arrayView1d< real64 > getParticleStrengthScale()
Get the strength scale of each particle in this subregion.
array1d< int > m_particleRank
Member level field for particle ghost ranks.
void erase(std::set< localIndex > const &indicesToErase)
Erases particle field data at the provided local indices.
virtual void setNumberOfVerticesPerParticle(ParticleType const particleType)
Set the number of vertices for particles in this subregion.
array2d< real64 > m_particleMaterialDirection
Member level field for the particle material direction.
arrayView1d< int > getParticleRank()
Get the ghost rank of each particle in this subregion.
unsigned int particlePack(buffer_type &buffer, arrayView1d< localIndex > const &localIndices, bool doPack) const
Packs the data of particles on this subregion.
array1d< real64 > m_particleVolume
Member level field for the current particle volume.
SortedArray< localIndex > m_activeParticleIndices
Indices of particles that are not ghosts.
ParticleSubRegionBase(string const &name, dataRepository::Group *const parent)
Constructor for this class.
array1d< int > m_particleSurfaceFlag
Member level field for the particle surface flag.
arrayView3d< real64 const > getParticleRVectors() const
Get the r-vectors of each particle in this subregion.
arrayView1d< real64 > getParticleDamage()
Get the damage of each particle in this subregion.
arrayView1d< globalIndex > getParticleID()
Get the global ID of each particle in this subregion.
dataRepository::Group const & getConstitutiveModels() const
Get the group in which the constitutive models of this subregion are registered.
dataRepository::Group & getConstitutiveModels()
Get the group in which the constitutive models of this subregion are registered.
T & getGroup(KEY const &key)
Return a reference to a sub-group of the current Group.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Array< T, 2, PERMUTATION > array2d
Alias for 2D array.
Array< T, 3, PERMUTATION > array3d
Alias for 3D array.
ParticleType
Denotes type of particle shape/interpolation scheme.
@ SinglePoint
Single-point (delta dirac characteristic function)
@ CPDI
Convected particle domain interpolation, parallelepiped domain.
std::vector< buffer_unit_type > buffer_type
Type of storage for communication buffers.
LvArray::SortedArray< T, localIndex, LvArray::ChaiBuffer > SortedArray
A sorted array of local indices.
LvArray::SortedArrayView< T, localIndex, LvArray::ChaiBuffer > SortedArrayView
A sorted array view of local indices.
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
Array< T, 1 > array1d
Alias for 1D array.
ArrayView< T, 3, USD > arrayView3d
Alias for 3D array view.
struct to serve as a container for group strings and keys
struct to serve as a container for variable strings and keys
struct to serve as a container for group strings and keys
static constexpr auto constitutiveModelsString()
A struct to serve as a container for variable strings and keys.
static constexpr char const * particleCenterString()
static constexpr char const * particleStrengthScaleString()
static constexpr char const * particleRVectorsString()
static constexpr char const * particleVolumeString()
static constexpr char const * particleMaterialDirectionString()
static constexpr char const * particleDamageString()
static constexpr char const * particleSurfaceFlagString()
static constexpr char const * particleVelocityString()
static constexpr char const * particleGroupString()
static constexpr char const * particleIDString()
static constexpr char const * particleRankString()