20 #ifndef GEOS_PHYSICSSOLVERS_SOLIDMECHANICS_MPM_HPP_
21 #define GEOS_PHYSICSSOLVERS_SOLIDMECHANICS_MPM_HPP_
28 #include "mesh/mpiCommunications/CommunicationTools.hpp"
29 #include "mesh/mpiCommunications/MPI_iCommData.hpp"
32 #include "MPMSolverFields.hpp"
37 class SpatialPartition;
78 Group *
const parent );
138 real64 const eventProgress,
142 template<
typename CONSTITUTIVE_BASE,
143 typename KERNEL_WRAPPER,
144 typename ... PARAMS >
149 PARAMS && ... params );
152 template<
typename ... PARAMS >
155 string const & finiteElementName,
171 static constexpr
char const * cflFactorString() {
return "cflFactor"; }
172 static constexpr
char const * timeIntegrationOptionString() {
return "timeIntegrationOption"; }
173 static constexpr
char const * solidMaterialNamesString() {
return "solidMaterialNames"; }
174 static constexpr
char const * forceExternalString() {
return "externalForce"; }
175 static constexpr
char const * forceInternalString() {
return "internalForce"; }
176 static constexpr
char const * massString() {
return "mass"; }
177 static constexpr
char const * velocityString() {
return "velocity"; }
178 static constexpr
char const * momentumString() {
return "momentum"; }
179 static constexpr
char const * accelerationString() {
return "acceleration"; }
180 static constexpr
char const * forceContactString() {
return "contactForce"; }
181 static constexpr
char const * damageString() {
return "damage"; }
182 static constexpr
char const * damageGradientString() {
return "damageGradient"; }
183 static constexpr
char const * maxDamageString() {
return "maxDamage"; }
184 static constexpr
char const * surfaceNormalString() {
return "surfaceNormal"; }
185 static constexpr
char const * materialPositionString() {
return "materialPosition"; }
187 static constexpr
char const * boundaryNodesString() {
return "boundaryNodes"; }
188 static constexpr
char const * bufferNodesString() {
return "bufferNodes"; }
191 } solidMechanicsViewKeys;
195 SpatialPartition & partition );
197 void resizeGrid( SpatialPartition & partition,
201 void syncGridFields( std::vector< std::string >
const & fieldNames,
207 void singleFaceVectorFieldSymmetryBC(
const int face,
216 void applyEssentialBCs(
const real64 dt,
226 void computeContactForces(
real64 const dt,
236 void computePairwiseNodalContactForce(
int const & separable,
251 void computeOrthonormalBasis(
const real64 * e1,
255 void setGridFieldLabels(
NodeManager & nodeManager );
259 void solverProfilingIf(
std::string label,
bool condition );
268 std::vector< real64 > & xp,
278 std::vector< std::vector< real64 > > & xp,
279 std::vector< real64 > & Vp,
280 std::vector< real64 > & fp,
284 std::vector< std::vector< real64 > > & xp,
285 std::vector< real64 > & Vp,
286 std::vector< std::vector< real64 > > & fp,
293 void projectDamageFieldGradientToGrid(
ParticleManager & particleManager,
296 void updateDeformationGradient(
real64 dt,
299 void updateConstitutiveModelDependencies(
ParticleManager & particleManager );
301 void updateStress(
real64 dt,
306 void computeAndWriteBoxAverage(
const real64 dt,
310 void initializeGridFields(
NodeManager & nodeManager );
312 void boundaryConditionUpdate(
real64 dt,
real64 time_n );
317 void gridTrialUpdate(
real64 dt,
320 void enforceContact(
real64 dt,
328 void gridToParticle(
real64 dt,
338 void printProfilingResults();
346 int evaluateSeparabilityCriterion(
localIndex const & A,
350 real64 const & maxDamageA,
351 real64 const & maxDamageB );
371 std::vector<
array3d<
real64 > > m_shapeFunctionGradientValues;
375 int m_solverProfiling;
376 std::vector<
real64 > m_profilingTimes;
377 std::vector< std::
string > m_profilingLabels;
381 int m_prescribedBcTable;
382 array1d<
int > m_boundaryConditionTypes;
385 int m_prescribedBoundaryFTable;
387 int m_fTableInterpType;
392 int m_boxAverageHistory;
393 int m_reactionHistory;
395 int m_needsNeighborList;
397 int m_binSizeMultiplier;
399 int m_useDamageAsSurfaceFlag;
401 int m_cpdiDomainScaling;
405 int m_numContactGroups, m_numContactFlags, m_numVelocityFields;
406 real64 m_separabilityMinDamage;
407 int m_treatFullyDamagedAsSingleField;
408 int m_surfaceDetection;
409 int m_damageFieldPartitioning;
410 int m_contactGapCorrection;
412 real64 m_frictionCoefficient;
438 return (regionIndex == other.regionIndex && subRegionIndex == other.subRegionIndex && binIndex == other.binIndex);
452 return ((std::hash< localIndex >()( k.regionIndex )
453 ^ (std::hash< localIndex >()( k.subRegionIndex ) << 1)) >> 1)
454 ^ (std::hash< localIndex >()( k.binIndex ) << 1);
458 void setParticlesConstitutiveNames( ParticleSubRegionBase & subRegion )
const;
#define GEOS_UNUSED_VAR(...)
Mark an unused variable and silence compiler warnings.
#define GEOS_UNUSED_PARAM(X)
Mark an unused argument and silence compiler warnings.
The DoFManager is responsible for allocating global dofs, constructing sparsity patterns,...
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
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 ParticleManager class provides an interface to ObjectManagerBase in order to manage ParticleRegio...
Class describing a file Path.
Base class for all physics solvers.
virtual void postInputInitialization() override final
SolidMechanicsMPM(const string &name, Group *const parent)
string getCatalogName() const override
static string catalogName()
@ ImplicitDynamic
ImplicitDynamic.
@ ExplicitDynamic
ExplicitDynamic.
@ QuasiStatic
QuasiStatic.
virtual ~SolidMechanicsMPM() override
virtual void registerDataOnMesh(Group &meshBodies) override final
Register wrappers that contain data on the mesh objects.
virtual void initializePreSubGroups() override
Called by Initialize() prior to initializing sub-Groups.
virtual bool execute(real64 const time_n, real64 const dt, integer const cycleNumber, integer const eventCounter, real64 const eventProgress, DomainPartition &domain) override
void initialize()
Run initialization functions on this and all subgroups.
virtual void updateState(DomainPartition &domain) override final
Recompute all dependent quantities from primary variables (including constitutive models)
virtual real64 explicitStep(real64 const &time_n, real64 const &dt, integer const cycleNumber, DomainPartition &domain) override
Entry function for an explicit time integration step.
virtual real64 solverStep(real64 const &time_n, real64 const &dt, integer const cycleNumber, DomainPartition &domain) override
entry function to perform a solver step
Group::wrapperMap::KeyIndex ViewKey
Type alias for KeyIndexT type used for wrapper lookups.
bool operator==(InputFlags const left, InputFlags const right)
Comparison operator for InputFlags enumeration.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Array< T, 2, PERMUTATION > array2d
Alias for 2D array.
LvArray::CRSMatrixView< T, COL_INDEX, localIndex const, LvArray::ChaiBuffer > CRSMatrixView
Alias for CRS Matrix View.
Array< T, 3, PERMUTATION > array3d
Alias for 3D array.
ENUM_STRINGS(LinearSolverParameters::SolverType, "direct", "cg", "gmres", "fgmres", "bicgstab", "preconditioner")
Declare strings associated with enumeration values.
std::string string
String type.
ArraySlice< T, 2, USD > arraySlice2d
Alias for 2D array slice.
double real64
64-bit floating point type.
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
ArraySlice< T, 1, USD > arraySlice1d
Alias for 1D array slice.
std::int32_t integer
Signed integer type.
std::size_t size_t
Unsigned size type.
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.
Structure to hold scoped key names.