20 #ifndef GEOS_PHYSICSSOLVERS_SOLIDMECHANICS_SOLIDMECHANICSLAGRANGIANFEM_HPP_
21 #define GEOS_PHYSICSSOLVERS_SOLIDMECHANICS_SOLIDMECHANICSLAGRANGIANFEM_HPP_
27 #include "mesh/mpiCommunications/CommunicationTools.hpp"
28 #include "mesh/mpiCommunications/MPI_iCommData.hpp"
67 Group *
const parent );
84 static string catalogName() {
return "SolidMechanicsLagrangianFEM"; }
127 bool const setSparsity =
false )
override;
140 real64 const scalingFactor,
173 template<
typename CONSTITUTIVE_BASE,
174 typename KERNEL_WRAPPER,
175 typename ... PARAMS >
179 string const & materialNamesString,
183 PARAMS && ... params );
186 template<
typename ... PARAMS >
189 string const & finiteElementName,
208 void applyTractionBC(
real64 const time,
213 void applyChomboPressure(
DofManager const & dofManager,
218 void applyContactConstraint(
DofManager const & dofManager,
228 void enableFixedStressPoromechanicsUpdate();
234 static constexpr
char const * newmarkGammaString() {
return "newmarkGamma"; }
235 static constexpr
char const * newmarkBetaString() {
return "newmarkBeta"; }
236 static constexpr
char const * massDampingString() {
return "massDamping"; }
237 static constexpr
char const * stiffnessDampingString() {
return "stiffnessDamping"; }
238 static constexpr
char const * timeIntegrationOptionString() {
return "timeIntegrationOption"; }
239 static constexpr
char const * maxNumResolvesString() {
return "maxNumResolves"; }
240 static constexpr
char const * strainTheoryString() {
return "strainTheory"; }
241 static constexpr
char const * solidMaterialNamesString() {
return "solidMaterialNames"; }
242 static constexpr
char const * contactRelationNameString() {
return "contactRelationName"; }
243 static constexpr
char const * noContactRelationNameString() {
return "NOCONTACT"; }
244 static constexpr
char const * maxForceString() {
return "maxForce"; }
245 static constexpr
char const * elemsAttachedToSendOrReceiveNodesString() {
return "elemsAttachedToSendOrReceiveNodes"; }
246 static constexpr
char const * elemsNotAttachedToSendOrReceiveNodesString() {
return "elemsNotAttachedToSendOrReceiveNodes"; }
247 static constexpr
char const * surfaceGeneratorNameString() {
return "surfaceGeneratorName"; }
249 static constexpr
char const * sendOrReceiveNodesString() {
return "sendOrReceiveNodes";}
250 static constexpr
char const * nonSendOrReceiveNodesString() {
return "nonSendOrReceiveNodes";}
251 static constexpr
char const * targetNodesString() {
return "targetNodes";}
252 static constexpr
char const * forceString() {
return "Force";}
254 static constexpr
char const * contactPenaltyStiffnessString() {
return "contactPenaltyStiffness"; }
268 real64 & getMaxForce() {
return m_maxForce; }
269 real64 const & getMaxForce()
const {
return m_maxForce; }
271 arrayView1d< ParallelVector >
const & getRigidBodyModes()
const
276 array1d< ParallelVector > & getRigidBodyModes()
291 real64 m_stiffnessDamping;
297 bool m_isFixedStressPoromechanicsUpdate;
302 real64 m_contactPenaltyStiffness;
306 string m_contactRelationName;
309 string m_surfaceGeneratorName;
322 template<
typename CONSTITUTIVE_BASE,
323 typename KERNEL_WRAPPER,
324 typename ... PARAMS >
328 string const & materialNamesString,
332 PARAMS && ... params )
338 string const dofKey = dofManager.
getKey( fields::solidMechanics::totalDisplacement::key() );
343 KERNEL_WRAPPER kernelWrapper( dofNumber,
349 std::forward< PARAMS >( params )... );
351 return finiteElement::
352 regionBasedKernelApplication< parallelDevicePolicy< >,
#define GEOS_UNUSED_VAR(...)
Mark an unused variable and silence compiler warnings.
#define GEOS_MARK_FUNCTION
Mark function with both Caliper and NVTX if enabled.
The DoFManager is responsible for allocating global dofs, constructing sparsity patterns,...
globalIndex rankOffset(string const &fieldName) const
string const & getKey(string const &fieldName) const
Return the key used to record the field in the DofManager.
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.
NodeManager const & getNodeManager() const
Get the node manager.
The NodeManager class provides an interface to ObjectManagerBase in order to manage node data.
Base class for all physics solvers.
string getDiscretizationName() const
return the name of the discretization object
R1Tensor const gravityVector() const
return the value of the gravity vector specified in PhysicsSolverManager
static string catalogName()
virtual void registerDataOnMesh(Group &meshBodies) override
Register wrappers that contain data on the mesh objects.
@ ImplicitDynamic
ImplicitDynamic.
@ ExplicitDynamic
ExplicitDynamic.
@ QuasiStatic
QuasiStatic.
virtual ~SolidMechanicsLagrangianFEM() override
virtual void initializePreSubGroups() override
Called by Initialize() prior to initializing sub-Groups.
virtual void saveSequentialIterationState(DomainPartition &domain) override
Save the state of the solver for sequential iteration.
string getCatalogName() const override
SolidMechanicsLagrangianFEM(const string &name, Group *const parent)
virtual void initializePostInitialConditionsPreSubGroups() override
Called by InitializePostInitialConditions() prior to initializing sub-Groups.
void applyDisplacementBCImplicit(real64 const time, DofManager const &dofManager, DomainPartition &domain, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs)
array1d< ParallelVector > m_rigidBodyModes
Rigid body modes.
virtual void setConstitutiveNamesCallSuper(ElementSubRegionBase &subRegion) const override
This function sets constitutive name fields on an ElementSubRegionBase, and calls the base function i...
virtual real64 scalingForSystemSolution(DomainPartition &domain, DofManager const &dofManager, arrayView1d< real64 const > const &localSolution) override
Function to determine if the solution vector should be scaled back in order to maintain a known const...
virtual void postInputInitialization() override
static string coupledSolverAttributePrefix()
String used to form the solverName used to register single-physics solvers in CoupledSolver.
GEOS_DECLTYPE_AUTO_RETURN getReference(LOOKUP_TYPE const &lookup) const
Look up a wrapper and get reference to wrapped object.
virtual void applySystemSolution(DofManager const &dofManager, arrayView1d< real64 const > const &localSolution, real64 const scalingFactor, real64 const dt, DomainPartition &domain) override
Function to apply the solution vector to the state.
virtual real64 calculateResidualNorm(real64 const &time_n, real64 const &dt, DomainPartition const &domain, DofManager const &dofManager, arrayView1d< real64 const > const &localRhs) override
calculate the norm of the global system residual
virtual void implicitStepComplete(real64 const &time, real64 const &dt, DomainPartition &domain) override
perform cleanup for implicit timestep
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 void setupSystem(DomainPartition &domain, DofManager &dofManager, CRSMatrix< real64, globalIndex > &localMatrix, ParallelVector &rhs, ParallelVector &solution, bool const setSparsity=false) override
Set up the linear system (DOF indices and sparsity patterns)
virtual void assembleSystem(real64 const time, real64 const dt, DomainPartition &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs) override
function to assemble the linear system matrix and rhs
virtual void applyBoundaryConditions(real64 const time, real64 const dt, DomainPartition &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs) override
apply boundary condition to system
virtual void resetStateToBeginningOfStep(DomainPartition &domain) override
reset state of physics back to the beginning of the step.
virtual void updateState(DomainPartition &domain) override
Recompute all dependent quantities from primary variables (including constitutive models)
virtual real64 solverStep(real64 const &time_n, real64 const &dt, integer const cycleNumber, DomainPartition &domain) override
entry function to perform a solver step
virtual void setupDofs(DomainPartition const &domain, DofManager &dofManager) const override
Populate degree-of-freedom manager with fields relevant to this solver.
virtual void implicitStepSetup(real64 const &time_n, real64 const &dt, DomainPartition &domain) override
function to perform setup for implicit timestep
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
LvArray::CRSMatrixView< T, COL_INDEX, localIndex const, LvArray::ChaiBuffer > CRSMatrixView
Alias for CRS Matrix View.
array1d< globalIndex > globalIndex_array
A 1-dimensional array of geos::globalIndex types.
ENUM_STRINGS(LinearSolverParameters::SolverType, "direct", "cg", "gmres", "fgmres", "bicgstab", "preconditioner")
Declare strings associated with enumeration values.
std::string string
String type.
double real64
64-bit floating point type.
std::int32_t integer
Signed integer type.
LvArray::CRSMatrix< T, COL_INDEX, localIndex, LvArray::ChaiBuffer > CRSMatrix
Alias for CRS Matrix class.
LvArray::SortedArray< T, localIndex, LvArray::ChaiBuffer > SortedArray
A sorted array of local indices.
std::vector< string > string_array
A 1-dimensional array of geos::string types.
Array< T, 1 > array1d
Alias for 1D array.
LAInterface::ParallelVector ParallelVector
Alias for ParallelVector.
Structure to hold scoped key names.