Serac  0.1
Serac is an implicit thermal strucural mechanics simulation code.
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
serac::SolidMechanicsContact< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > > Class Template Reference

The nonlinear solid with contact solver class. More...

#include <solid_mechanics_contact.hpp>

Collaboration diagram for serac::SolidMechanicsContact< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > >:
Collaboration graph
[legend]

Public Member Functions

 SolidMechanicsContact (const NonlinearSolverOptions nonlinear_opts, const LinearSolverOptions lin_opts, const serac::TimesteppingOptions timestepping_opts, const GeometricNonlinearities geom_nonlin, const std::string &physics_name, std::string mesh_tag, std::vector< std::string > parameter_names={}, int cycle=0, double time=0.0)
 Construct a new SolidMechanicsContact object. More...
 
 SolidMechanicsContact (std::unique_ptr< serac::EquationSolver > solver, const serac::TimesteppingOptions timestepping_opts, const GeometricNonlinearities geom_nonlin, const std::string &physics_name, std::string mesh_tag, std::vector< std::string > parameter_names={}, int cycle=0, double time=0.0)
 Construct a new SolidMechanicsContact object. More...
 
 SolidMechanicsContact (const SolidMechanicsInputOptions &input_options, const std::string &physics_name, std::string mesh_tag, int cycle=0, double time=0.0)
 Construct a new Nonlinear SolidMechanicsContact Solver object. More...
 
std::unique_ptr< mfem_ext::StdFunctionOperatorbuildQuasistaticOperator () override
 Build the quasi-static operator corresponding to the total Lagrangian formulation.
 
void addContactInteraction (int interaction_id, const std::set< int > &bdry_attr_surf1, const std::set< int > &bdry_attr_surf2, ContactOptions contact_opts)
 Add a mortar contact boundary condition. More...
 
void completeSetup () override
 Complete the initialization and allocation of the data structures. More...
 
void quasiStaticSolve (double dt) override
 Solve the Quasi-static Newton system.
 
- Public Member Functions inherited from serac::SolidMechanics< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > >
 SolidMechanics (const NonlinearSolverOptions nonlinear_opts, const LinearSolverOptions lin_opts, const serac::TimesteppingOptions timestepping_opts, const GeometricNonlinearities geom_nonlin, const std::string &physics_name, std::string mesh_tag, std::vector< std::string > parameter_names={}, int cycle=0, double time=0.0, bool checkpoint_to_disk=false)
 Construct a new SolidMechanics object. More...
 
 SolidMechanics (std::unique_ptr< serac::EquationSolver > solver, const serac::TimesteppingOptions timestepping_opts, const GeometricNonlinearities geom_nonlin, const std::string &physics_name, std::string mesh_tag, std::vector< std::string > parameter_names={}, int cycle=0, double time=0.0, bool checkpoint_to_disk=false)
 Construct a new SolidMechanics object. More...
 
 SolidMechanics (const SolidMechanicsInputOptions &input_options, const std::string &physics_name, std::string mesh_tag, int cycle=0, double time=0.0)
 Construct a new Nonlinear SolidMechanics Solver object. More...
 
virtual ~SolidMechanics ()
 Destroy the SolidMechanics Functional object.
 
void initializeSolidMechanicsStates ()
 Non virtual method to reset thermal states to zero. This does not reset design parameters or shape. More...
 
void resetStates (int cycle=0, double time=0.0) override
 Method to reset physics states to zero. This does not reset design parameters or shape. More...
 
template<typename T >
qdata_type< T > createQuadratureDataBuffer (T initial_state)
 Create a shared ptr to a quadrature data buffer for the given material type. More...
 
void setDisplacementBCs (const std::set< int > &disp_bdr, std::function< void(const mfem::Vector &, mfem::Vector &)> disp)
 Set essential displacement boundary conditions (strongly enforced) More...
 
void setDisplacementBCs (const std::set< int > &disp_bdr, std::function< void(const mfem::Vector &, double, mfem::Vector &)> disp)
 Set essential displacement boundary conditions (strongly enforced) More...
 
void setDisplacementBCs (const std::set< int > &disp_bdr, std::function< double(const mfem::Vector &x)> disp, int component)
 Set the displacement essential boundary conditions on a single component. More...
 
void setDisplacementBCsByDofList (const mfem::Array< int > true_dofs, std::function< void(const mfem::Vector &, double, mfem::Vector &)> disp)
 Set the displacement essential boundary conditions on a set of true degrees of freedom. More...
 
void setDisplacementBCsByDofList (const mfem::Array< int > true_dofs, std::function< void(const mfem::Vector &, mfem::Vector &)> disp)
 Set the displacement essential boundary conditions on a set of true degrees of freedom. More...
 
void setDisplacementBCs (std::function< bool(const mfem::Vector &)> is_node_constrained, std::function< void(const mfem::Vector &, double, mfem::Vector &)> disp)
 Set the displacement boundary conditions on a set of nodes within a spatially-defined area. More...
 
void setDisplacementBCs (std::function< bool(const mfem::Vector &)> is_node_constrained, std::function< void(const mfem::Vector &, mfem::Vector &)> disp)
 Set the displacement boundary conditions on a set of nodes within a spatially-defined area. More...
 
void setDisplacementBCs (std::function< bool(const mfem::Vector &)> is_node_constrained, std::function< double(const mfem::Vector &, double)> disp, int component)
 Set the displacement boundary conditions on a set of nodes within a spatially-defined area for a single displacement vector component. More...
 
void setDisplacementBCs (std::function< bool(const mfem::Vector &x)> is_node_constrained, std::function< double(const mfem::Vector &x)> disp, int component)
 Set the displacement boundary conditions on a set of nodes within a spatially-defined area for a single displacement vector component. More...
 
const FiniteElementStatestate (const std::string &state_name) const override
 Accessor for getting named finite element state fields from the physics modules. More...
 
void setState (const std::string &state_name, const FiniteElementState &state) override
 Set the primal solution field (displacement, velocity) for the underlying solid mechanics solver. More...
 
std::vector< std::string > stateNames () const override
 Get a vector of the finite element state solution variable names. More...
 
template<int... active_parameters, typename callable >
void addCustomBoundaryIntegral (DependsOn< active_parameters... >, callable qfunction, const std::optional< Domain > &optional_domain=std::nullopt)
 register a custom boundary integral calculation as part of the residual More...
 
const FiniteElementStateadjoint (const std::string &state_name) const override
 Accessor for getting named finite element state adjoint solution from the physics modules. More...
 
std::vector< std::string > adjointNames () const override
 Get a vector of the finite element state solution variable names. More...
 
template<int... active_parameters, typename callable , typename StateType = Nothing>
void addCustomDomainIntegral (DependsOn< active_parameters... >, callable qfunction, qdata_type< StateType > qdata=NoQData)
 register a custom domain integral calculation as part of the residual More...
 
template<int... active_parameters, typename MaterialType , typename StateType = Empty>
void setMaterial (DependsOn< active_parameters... >, MaterialType material, qdata_type< StateType > qdata=EmptyQData)
 Set the material stress response and mass properties for the physics module. More...
 
template<typename MaterialType , typename StateType = Empty>
void setMaterial (MaterialType material, std::shared_ptr< QuadratureData< StateType >> qdata=EmptyQData)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setDisplacement (std::function< void(const mfem::Vector &x, mfem::Vector &disp)> disp)
 Set the underlying finite element state to a prescribed displacement. More...
 
void setDisplacement (const FiniteElementState &temp)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setVelocity (std::function< void(const mfem::Vector &x, mfem::Vector &vel)> vel)
 Set the underlying finite element state to a prescribed velocity. More...
 
void setVelocity (const FiniteElementState &temp)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<int... active_parameters, typename BodyForceType >
void addBodyForce (DependsOn< active_parameters... >, BodyForceType body_force, const std::optional< Domain > &optional_domain=std::nullopt)
 Set the body forcefunction. More...
 
template<typename BodyForceType >
void addBodyForce (BodyForceType body_force, const std::optional< Domain > &optional_domain=std::nullopt)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<int... active_parameters, typename TractionType >
void setTraction (DependsOn< active_parameters... >, TractionType traction_function, const std::optional< Domain > &optional_domain=std::nullopt)
 Set the traction boundary condition. More...
 
template<typename TractionType >
void setTraction (TractionType traction_function, const std::optional< Domain > &optional_domain=std::nullopt)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<int... active_parameters, typename PressureType >
void setPressure (DependsOn< active_parameters... >, PressureType pressure_function, const std::optional< Domain > &optional_domain=std::nullopt)
 Set the pressure boundary condition. More...
 
template<typename PressureType >
void setPressure (PressureType pressure_function, const std::optional< Domain > &optional_domain=std::nullopt)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
std::pair< const mfem::HypreParMatrix &, const mfem::HypreParMatrix & > stiffnessMatrix () const
 Return the assembled stiffness matrix. More...
 
void zeroEssentials (FiniteElementVector &field) const
 Set field to zero wherever their are essential boundary conditions applies.
 
void advanceTimestep (double dt) override
 Advance the solid mechanics physics module in time. More...
 
virtual void setAdjointLoad (std::unordered_map< std::string, const serac::FiniteElementDual & > loads) override
 Set the loads for the adjoint reverse timestep solve. More...
 
void reverseAdjointTimestep () override
 Solve the adjoint problem. More...
 
std::unordered_map< std::string, FiniteElementStategetCheckpointedStates (int cycle_to_load) const override
 Accessor for getting named finite element state primal solution from the physics modules at a given checkpointed cycle index. More...
 
FiniteElementDualcomputeTimestepSensitivity (size_t parameter_field) override
 Compute the implicit sensitivity of the quantity of interest used in defining the load for the adjoint problem with respect to the parameter field. More...
 
FiniteElementDualcomputeTimestepShapeSensitivity () override
 Compute the implicit sensitivity of the quantity of interest used in defining the load for the adjoint problem with respect to the shape displacement field. More...
 
const std::unordered_map< std::string, const serac::FiniteElementDual & > computeInitialConditionSensitivity () override
 Compute the implicit sensitivity of the quantity of interest with respect to the initial temperature. More...
 
const serac::FiniteElementStatedisplacement () const
 Get the displacement state. More...
 
const serac::FiniteElementStatevelocity () const
 Get the velocity state. More...
 
const serac::FiniteElementStateacceleration () const
 Get the acceleration state. More...
 
const serac::FiniteElementDualreactions ()
 getter for nodal forces (before zeroing-out essential dofs)
 
- Public Member Functions inherited from serac::BasePhysics
 BasePhysics (std::string physics_name, std::string mesh_tag, int cycle=0, double time=0.0, bool checkpoint_to_disk=false)
 Empty constructor. More...
 
 BasePhysics (BasePhysics &&other)=default
 Construct a new Base Physics object (copy constructor) More...
 
virtual double time () const
 Get the current forward-solution time. More...
 
virtual int cycle () const
 Get the current forward-solution cycle iteration number. More...
 
virtual double maxTime () const
 Get the maximum time reached by the forward solver. More...
 
virtual double minTime () const
 Get the initial time used by the forward solver. More...
 
virtual int maxCycle () const
 The maximum cycle (timestep iteration number) reached by the forward solver. More...
 
virtual int minCycle () const
 Get the initial cycle (timestep iteration number) used by the forward solver. More...
 
bool isQuasistatic () const
 Check if the physics is setup as quasistatic. More...
 
virtual std::vector< double > timesteps () const
 Get a vector of the timestep sizes (i.e. \(\Delta t\)s) taken by the forward solver. More...
 
const FiniteElementStateshapeDisplacement () const
 Accessor for getting the shape displacement field from the physics modules. More...
 
const FiniteElementStateparameter (const std::string &parameter_name) const
 Accessor for getting named finite element state parameter fields from the physics modules. More...
 
const FiniteElementStateparameter (std::size_t parameter_index) const
 Accessor for getting indexed finite element state parameter fields from the physics modules. More...
 
std::vector< std::string > parameterNames ()
 Get a vector of the finite element state parameter names. More...
 
void setParameter (const size_t parameter_index, const FiniteElementState &parameter_state)
 Deep copy a parameter field into the internally-owned parameter used for simulations. More...
 
void setShapeDisplacement (const FiniteElementState &shape_displacement)
 Set the current shape displacement for the underlying mesh. More...
 
virtual void outputStateToDisk (std::optional< std::string > paraview_output_dir={}) const
 Output the current state of the PDE fields in Sidre format and optionally in Paraview format if paraview_output_dir is given. More...
 
FiniteElementState loadCheckpointedState (const std::string &state_name, int cycle) const
 Accessor for getting a single named finite element state primal solution from the physics modules at a given checkpointed cycle index. More...
 
virtual double getCheckpointedTimestep (int cycle) const
 Get a timestep increment which has been previously checkpointed at the give cycle. More...
 
virtual void initializeSummary (axom::sidre::DataStore &datastore, const double t_final, const double dt) const
 Initializes the Sidre structure for simulation summary data. More...
 
virtual void saveSummary (axom::sidre::DataStore &datastore, const double t) const
 Saves the summary data to the Sidre Datastore. More...
 
virtual ~BasePhysics ()=default
 Destroy the Base Solver object.
 
const mfem::ParMesh & mesh () const
 Returns a reference to the mesh object.
 
mfem::ParMesh & mesh ()
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Protected Member Functions

void warmStartDisplacement ()
 Sets the Dirichlet BCs for the current time and computes an initial guess for parameters and displacement.
 
- Protected Member Functions inherited from serac::SolidMechanics< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > >
mfem::Array< int > calculateConstrainedDofs (std::function< bool(const mfem::Vector &)> is_node_constrained, std::optional< int > component={})
 Calculate a list of constrained dofs in the true displacement vector from a function that returns true if a physical coordinate is in the constrained set. More...
 
void warmStartDisplacement ()
 Sets the Dirichlet BCs for the current time and computes an initial guess for parameters and displacement.
 
- Protected Member Functions inherited from serac::BasePhysics
void CreateParaviewDataCollection () const
 Create a paraview data collection for the physics package if requested.
 
void UpdateParaviewDataCollection (const std::string &paraview_output_dir) const
 Update the paraview states, duals, parameters, and metadata (cycle, time) in preparation for output. More...
 
void initializeBasePhysicsStates (int cycle, double time)
 Protected, non-virtual method to reset physics states to zero. This does not reset design parameters or shape. More...
 

Protected Attributes

mfem::Operator * J_operator_
 Pointer to the Jacobian operator (J_ if no Lagrange multiplier contact, J_constraint_ otherwise)
 
std::unique_ptr< mfem::HypreParMatrix > J_21_
 21 Jacobian block if using Lagrange multiplier contact (dg/dx)
 
std::unique_ptr< mfem::HypreParMatrix > J_12_
 12 Jacobian block if using Lagrange multiplier contact (df/dp)
 
std::unique_ptr< mfem::HypreParMatrix > J_22_
 22 Jacobian block if using Lagrange multiplier contact (ones on diagonal for inactive t-dofs)
 
mfem::Array< int > J_offsets_
 Block offsets for the J_constraint_ BlockOperator (must be owned outside J_constraint_)
 
std::unique_ptr< mfem::BlockOperator > J_constraint_
 Assembled sparse matrix for the Jacobian with constraint blocks.
 
std::unique_ptr< mfem::HypreParMatrix > J_e_21_
 Columns of J_21_ that have been separated out because they are associated with essential boundary conditions.
 
std::unique_ptr< mfem::BlockOperator > J_constraint_e_
 
ContactData contact_
 Class holding contact constraint data.
 
BoundaryConditionManager bcs_
 Boundary condition manager instance.
 
int cycle_
 Current cycle (forward pass time iteration count)
 
bool is_quasistatic_
 Whether the simulation is time-independent.
 
mfem::ParMesh & mesh_
 The primary mesh.
 
std::vector< ParameterInfoparameters_
 A vector of the parameters associated with this physics module.
 
FiniteElementStateshape_displacement_
 The parameter info associated with the shape displacement field. More...
 
double time_
 Current time for the forward pass.
 
FiniteElementState acceleration_
 The acceleration finite element state.
 
std::array< std::function< decltype((*residual_)(DifferentiateWRT< 1 >{}, 0.0, shape_displacement_, displacement_, acceleration_, *parameters_[parameter_indices].state...))(double)>, sizeof...(parameter_indices)> d_residual_d_
 Array functions computing the derivative of the residual with respect to each given parameter. More...
 
FiniteElementState displacement_
 The displacement finite element state.
 
mfem::Vector dr_
 vector used to store forces arising from du_ when applying time-dependent bcs
 
mfem::Vector du_
 vector used to store the change in essential bcs between timesteps
 
std::unique_ptr< mfem::HypreParMatrix > J_
 Assembled sparse matrix for the Jacobian df/du (11 block if using Lagrange multiplier contact)
 
std::unique_ptr< mfem::HypreParMatrix > J_e_
 
std::unique_ptr< EquationSolvernonlin_solver_
 the specific methods and tolerances specified to solve the nonlinear residual equations
 
std::unique_ptr< ShapeAwareFunctional< shape_trial, test(trial, trial, parameter_space...)> > residual_
 serac::Functional that is used to calculate the residual and its derivatives
 
std::unique_ptr< mfem_ext::StdFunctionOperatorresidual_with_bcs_
 mfem::Operator that calculates the residual after applying essential boundary conditions
 
- Protected Attributes inherited from serac::SolidMechanics< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > >
FiniteElementState displacement_
 The displacement finite element state.
 
FiniteElementState velocity_
 The velocity finite element state.
 
FiniteElementState acceleration_
 The acceleration finite element state.
 
FiniteElementState adjoint_displacement_
 The displacement finite element adjoint state.
 
FiniteElementDual displacement_adjoint_load_
 The adjoint load (RHS) for the displacement adjoint system solve (downstream -dQOI/d displacement)
 
FiniteElementDual velocity_adjoint_load_
 The adjoint load (RHS) for the velocity adjoint system solve (downstream -dQOI/d velocity)
 
FiniteElementDual acceleration_adjoint_load_
 The adjoint load (RHS) for the adjoint system solve (downstream -dQOI/d acceleration)
 
FiniteElementDual implicit_sensitivity_displacement_start_of_step_
 The total/implicit sensitivity of the qoi with respect to the start of the previous timestep's displacement.
 
FiniteElementDual implicit_sensitivity_velocity_start_of_step_
 The total/implicit sensitivity of the qoi with respect to the start of the previous timestep's velocity.
 
FiniteElementDual reactions_
 nodal forces
 
std::unique_ptr< ShapeAwareFunctional< shape_trial, test(trial, trial, parameter_space...)> > residual_
 serac::Functional that is used to calculate the residual and its derivatives
 
std::unique_ptr< mfem_ext::StdFunctionOperatorresidual_with_bcs_
 mfem::Operator that calculates the residual after applying essential boundary conditions
 
std::unique_ptr< EquationSolvernonlin_solver_
 the specific methods and tolerances specified to solve the nonlinear residual equations
 
mfem_ext::SecondOrderODE ode2_
 the ordinary differential equation that describes how to solve for the second time derivative of displacement, given the current displacement, velocity, and source terms
 
std::unique_ptr< mfem::HypreParMatrix > J_
 Assembled sparse matrix for the Jacobian df/du (11 block if using Lagrange multiplier contact)
 
std::unique_ptr< mfem::HypreParMatrix > J_e_
 
mfem::Vector predicted_displacement_
 an intermediate variable used to store the predicted end-step displacement
 
mfem::Vector du_
 vector used to store the change in essential bcs between timesteps
 
mfem::Vector dr_
 vector used to store forces arising from du_ when applying time-dependent bcs
 
mfem::Vector u_
 used to communicate the ODE solver's predicted displacement to the residual operator
 
mfem::Vector v_
 used to communicate the ODE solver's predicted velocity to the residual operator
 
double c0_
 coefficient used to calculate predicted displacement: u_p := u + c0 * d2u_dt2
 
double c1_
 coefficient used to calculate predicted velocity: dudt_p := dudt + c1 * d2u_dt2
 
GeometricNonlinearities geom_nonlin_
 A flag denoting whether to compute geometric nonlinearities in the residual.
 
std::shared_ptr< mfem::VectorCoefficient > disp_bdr_coef_
 Coefficient containing the essential boundary values.
 
std::shared_ptr< mfem::Coefficient > component_disp_bdr_coef_
 Coefficient containing the essential boundary values.
 
std::array< std::function< decltype((*residual_)(DifferentiateWRT< 1 >{}, 0.0, shape_displacement_, displacement_, acceleration_, *parameters_[parameter_indices].state...))(double)>, sizeof...(parameter_indices)> d_residual_d_
 Array functions computing the derivative of the residual with respect to each given parameter. More...
 
- Protected Attributes inherited from serac::BasePhysics
std::string name_ = {}
 Name of the physics module.
 
std::string mesh_tag_ = {}
 ID of the corresponding MFEMSidreDataCollection (denoting a mesh)
 
mfem::ParMesh & mesh_
 The primary mesh.
 
MPI_Comm comm_
 The MPI communicator.
 
std::vector< const serac::FiniteElementState * > states_
 List of finite element primal states associated with this physics module.
 
std::vector< const serac::FiniteElementState * > adjoints_
 List of finite element adjoint states associated with this physics module.
 
std::vector< const serac::FiniteElementDual * > duals_
 List of finite element duals associated with this physics module.
 
std::vector< ParameterInfoparameters_
 A vector of the parameters associated with this physics module.
 
FiniteElementStateshape_displacement_
 The parameter info associated with the shape displacement field. More...
 
std::unique_ptr< FiniteElementDualshape_displacement_sensitivity_
 Sensitivity with respect to the shape displacement field. More...
 
std::unordered_map< std::string, std::vector< serac::FiniteElementState > > checkpoint_states_
 A map containing optionally in-memory checkpointed primal states for transient adjoint solvers.
 
std::unordered_map< std::string, serac::FiniteElementStatecached_checkpoint_states_
 A container relating a checkpointed cycle and the associated finite element state fields. More...
 
std::optional< int > cached_checkpoint_cycle_
 An optional int for disk-based checkpointing containing the cycle number of the last retrieved checkpoint.
 
bool is_quasistatic_ = true
 Whether the simulation is time-independent.
 
double time_
 Current time for the forward pass.
 
double max_time_
 The maximum time reached for the forward solver.
 
double min_time_
 The time the forward solver was initialized to.
 
std::vector< double > timesteps_
 A vector of the timestep sizes (i.e. \(\Delta t\)) taken by the forward solver.
 
int cycle_
 Current cycle (forward pass time iteration count)
 
int max_cycle_
 The maximum cycle (forward pass iteration count) reached by the forward solver.
 
int min_cycle_
 The cycle the forward solver was initialized to.
 
double ode_time_point_
 The value of time at which the ODE solver wants to evaluate the residual.
 
int mpi_rank_
 MPI rank.
 
int mpi_size_
 MPI size.
 
std::unique_ptr< mfem::ParaViewDataCollection > paraview_dc_
 DataCollection pointer for optional paraview output.
 
std::unordered_map< std::string, std::unique_ptr< mfem::ParGridFunction > > paraview_dual_grid_functions_
 A optional map of the dual names and duals in grid function form for paraview output.
 
std::unique_ptr< mfem::ParGridFunction > shape_sensitivity_grid_function_
 A optional view of the shape sensitivity in grid function form for paraview output.
 
BoundaryConditionManager bcs_
 Boundary condition manager instance.
 
bool checkpoint_to_disk_
 A flag denoting whether to save the state to disk or memory as needed for dynamic adjoint solves.
 

Additional Inherited Members

- Public Types inherited from serac::SolidMechanics< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > >
template<typename T >
using qdata_type = std::shared_ptr< QuadratureData< T > >
 a container holding quadrature point data of the specified type More...
 
- Static Public Attributes inherited from serac::SolidMechanics< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > >
static constexpr auto NUM_STATE_VARS = 2
 The total number of non-parameter state variables (displacement, acceleration) passed to the FEM integrators.
 
- Protected Types inherited from serac::SolidMechanics< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > >
using trial = H1< order, dim >
 The compile-time finite element trial space for displacement and velocity (H1 of order p)
 
using test = H1< order, dim >
 The compile-time finite element test space for displacement and velocity (H1 of order p)
 
using shape_trial = H1< SHAPE_ORDER, dim >
 
- Static Protected Attributes inherited from serac::BasePhysics
static constexpr int FLOAT_PRECISION_ = 8
 Number of significant figures to output for floating-point.
 

Detailed Description

template<int order, int dim, typename... parameter_space, int... parameter_indices>
class serac::SolidMechanicsContact< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > >

The nonlinear solid with contact solver class.

The nonlinear total Lagrangian quasi-static with contact solver object. This uses Functional to compute the tangent stiffness matrices.

Template Parameters
orderThe order of the discretization of the displacement field
dimThe spatial dimension of the mesh

Definition at line 34 of file solid_mechanics_contact.hpp.

Constructor & Destructor Documentation

◆ SolidMechanicsContact() [1/3]

template<int order, int dim, typename... parameter_space, int... parameter_indices>
serac::SolidMechanicsContact< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > >::SolidMechanicsContact ( const NonlinearSolverOptions  nonlinear_opts,
const LinearSolverOptions  lin_opts,
const serac::TimesteppingOptions  timestepping_opts,
const GeometricNonlinearities  geom_nonlin,
const std::string &  physics_name,
std::string  mesh_tag,
std::vector< std::string >  parameter_names = {},
int  cycle = 0,
double  time = 0.0 
)
inline

Construct a new SolidMechanicsContact object.

Parameters
nonlinear_optsThe nonlinear solver options for solving the nonlinear residual equations
lin_optsThe linear solver options for solving the linearized Jacobian equations
timestepping_optsThe timestepping options for the solid mechanics time evolution operator
geom_nonlinFlag to include geometric nonlinearities
physics_nameA name for the physics module instance
mesh_tagThe tag for the mesh in the StateManager to construct the physics module on
parameter_namesA vector of the names of the requested parameter fields
cycleThe simulation cycle (i.e. timestep iteration) to intialize the physics module to
timeThe simulation time to initialize the physics module to

Definition at line 55 of file solid_mechanics_contact.hpp.

◆ SolidMechanicsContact() [2/3]

template<int order, int dim, typename... parameter_space, int... parameter_indices>
serac::SolidMechanicsContact< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > >::SolidMechanicsContact ( std::unique_ptr< serac::EquationSolver solver,
const serac::TimesteppingOptions  timestepping_opts,
const GeometricNonlinearities  geom_nonlin,
const std::string &  physics_name,
std::string  mesh_tag,
std::vector< std::string >  parameter_names = {},
int  cycle = 0,
double  time = 0.0 
)
inline

Construct a new SolidMechanicsContact object.

Parameters
solverThe nonlinear equation solver for the implicit solid mechanics equations
timestepping_optsThe timestepping options for the solid mechanics time evolution operator
geom_nonlinFlag to include geometric nonlinearities
physics_nameA name for the physics module instance
mesh_tagThe tag for the mesh in the StateManager to construct the physics module on
parameter_namesA vector of the names of the requested parameter fields
cycleThe simulation cycle (i.e. timestep iteration) to intialize the physics module to
timeThe simulation time to initialize the physics module to

Definition at line 77 of file solid_mechanics_contact.hpp.

◆ SolidMechanicsContact() [3/3]

template<int order, int dim, typename... parameter_space, int... parameter_indices>
serac::SolidMechanicsContact< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > >::SolidMechanicsContact ( const SolidMechanicsInputOptions input_options,
const std::string &  physics_name,
std::string  mesh_tag,
int  cycle = 0,
double  time = 0.0 
)
inline

Construct a new Nonlinear SolidMechanicsContact Solver object.

Parameters
[in]input_optionsThe solver information parsed from the input file
[in]physics_nameA name for the physics module instance
[in]mesh_tagThe tag for the mesh in the StateManager to construct the physics module on
[in]cycleThe simulation cycle (i.e. timestep iteration) to intialize the physics module to
[in]timeThe simulation time to initialize the physics module to

Definition at line 96 of file solid_mechanics_contact.hpp.

Member Function Documentation

◆ addContactInteraction()

template<int order, int dim, typename... parameter_space, int... parameter_indices>
void serac::SolidMechanicsContact< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > >::addContactInteraction ( int  interaction_id,
const std::set< int > &  bdry_attr_surf1,
const std::set< int > &  bdry_attr_surf2,
ContactOptions  contact_opts 
)
inline

Add a mortar contact boundary condition.

Parameters
interaction_idUnique identifier for the ContactInteraction
bdry_attr_surf1MFEM boundary attributes for the first surface
bdry_attr_surf2MFEM boundary attributes for the second surface
contact_optsDefines contact method, enforcement, type, and penalty

Definition at line 190 of file solid_mechanics_contact.hpp.

◆ completeSetup()

template<int order, int dim, typename... parameter_space, int... parameter_indices>
void serac::SolidMechanicsContact< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > >::completeSetup ( )
inlineoverridevirtual

Complete the initialization and allocation of the data structures.

Note
This must be called before AdvanceTimestep().

Reimplemented from serac::SolidMechanics< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > >.

Definition at line 203 of file solid_mechanics_contact.hpp.

Member Data Documentation

◆ d_residual_d_

template<int order, int dim, typename... parameter_space, int... parameter_indices>
std::array<std::function<decltype((*residual_)(DifferentiateWRT<1>{}, 0.0, shape_displacement_, displacement_, acceleration_, *parameters_[parameter_indices].state...))(double)>, sizeof...(parameter_indices)> serac::SolidMechanics< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > >::d_residual_d_
protected

Array functions computing the derivative of the residual with respect to each given parameter.

Note
This is needed so the user can ask for a specific sensitivity at runtime as opposed to it being a template parameter.

Definition at line 1567 of file solid_mechanics.hpp.

◆ J_constraint_e_

template<int order, int dim, typename... parameter_space, int... parameter_indices>
std::unique_ptr<mfem::BlockOperator> serac::SolidMechanicsContact< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > >::J_constraint_e_
protected

rows and columns of J_constraint_ that have been separated out because are associated with essential boundary conditions

Definition at line 288 of file solid_mechanics_contact.hpp.

◆ J_e_

template<int order, int dim, typename... parameter_space, int... parameter_indices>
std::unique_ptr<mfem::HypreParMatrix> serac::SolidMechanics< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > >::J_e_
protected

rows and columns of J_ that have been separated out because are associated with essential boundary conditions

Definition at line 1529 of file solid_mechanics.hpp.

◆ shape_displacement_

template<int order, int dim, typename... parameter_space, int... parameter_indices>
FiniteElementState& serac::BasePhysics::shape_displacement_
protected

The parameter info associated with the shape displacement field.

Note
This is owned by the State Manager since it is associated with the mesh

Definition at line 488 of file base_physics.hpp.


The documentation for this class was generated from the following file: