Template Class ElastodynamicsSolver

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

  • public dealii::EnableObserverPointer

Class Documentation

template<int dim, int spacedim = dim>
class ElastodynamicsSolver : public dealii::EnableObserverPointer

Standalone first-order-in-time linear elastodynamics solver.

The spatial domain may be embedded in a higher-dimensional ambient space, with 1 <= dim <= spacedim <= 3. The spatial finite-element space is one vector-valued FESystem<dim>(FE_Q<dim>, spacedim) on hypercube meshes, or FESystem<dim>(FE_SimplexP<dim>, spacedim) on simplex meshes, represented by one DoFHandler. Simplex meshes need the fullydistributed Domain triangulation. Displacement and velocity are separate algebraic vectors on that same space. The solver exposes separate mass, stiffness, and optional damping operators and advances the state with the configured standalone time-stepping strategy.

Coupling, particles, multipliers, moving geometry, nonlinear materials, and SUNDIALS policy belong outside this class.

Public Types

using VectorType = LA::MPI::Vector
using MatrixType = LA::MPI::SparseMatrix

Public Functions

explicit ElastodynamicsSolver(const ElastodynamicsParameters<dim, spacedim> &par)
void make_grid()

Build the distributed mesh from the configured grid generator.

void setup_fe()

Create the vector FE, quadratures, and mapping for the mesh cells.

void setup_system()

Distribute DoFs, constraints, sparsity patterns, matrices, and vectors.

void assemble_operators()

Assemble M, K, D once after setup_system().

Repeated calls reuse the operators until the next spatial setup.

void set_initial_conditions()

Interpolate and constrain the configured state at the initial time.

void refine_global()

Refine the mesh for the next spatial convergence cycle.

void initial_acceleration(VectorType &acceleration) const

Compute the physically consistent initial acceleration.

void advance_one_timestep()

Advance one configured time-integration step.

void solve()

Alias for one standalone time-integration solve step.

void output_results() const

Write displacement and velocity output for the current state.

void compute_error() const

Add the current displacement error to the configured error table.

void run()

Run setup, initialization, and the configured time loop.

void set_displacement(const VectorType &new_displacement)

Replace displacement while preserving its constraints and ghost state.

void set_velocity(const VectorType &new_velocity)

Replace velocity while preserving its constraints and ghost state.

void accept_state(const VectorType &new_displacement, const VectorType &new_velocity, double time, unsigned int step_number)

Atomically accept an externally solved state.

This seam is for application-level coupled drivers. It updates the problem time and accepted-step counter together with displacement and velocity, then reapplies the current homogeneous/inhomogeneous constraints and ghost values. It does not assemble or solve a standalone time-integration system.

dealii::types::global_dof_index n_dofs() const

Return the global number of spatial DoFs.

bool state_is_finite() const

Return whether both current state vectors have finite norms.

const dealii::parallel::TriangulationBase<dim, spacedim> &triangulation() const

Return the distributed mesh.

const dealii::FiniteElement<dim, spacedim> &fe() const

Return the vector-valued finite element.

const dealii::Mapping<dim, spacedim> &mapping() const

Return the mapping used by this problem.

const dealii::DoFHandler<dim, spacedim> &dof_handler() const

Return the spatial DoFHandler.

const dealii::AffineConstraints<double> &constraints() const

Return displacement constraints, including hanging-node constraints.

const dealii::AffineConstraints<double> &velocity_constraints() const

Return the current velocity constraints, including hanging nodes.

const dealii::IndexSet &locally_owned_dofs() const

Return locally owned spatial DoFs.

const dealii::IndexSet &locally_relevant_dofs() const

Return locally relevant spatial DoFs.

const MatrixType &mass_matrix() const

Return the consistent mass operator.

const MatrixType &stiffness_matrix() const

Return the linear isotropic elasticity stiffness operator.

const MatrixType &damping_matrix() const

Return the Rayleigh and Kelvin&#8212;Voigt damping operator, possibly identically zero.

const MatrixType &homogeneous_mass_matrix() const

Homogeneously condensed spatial operators.

The mass operator has identity rows on constrained DoFs; stiffness and damping have zero rows.

const MatrixType &homogeneous_stiffness_matrix() const
const MatrixType &homogeneous_damping_matrix() const
const VectorType &body_force_vector() const

Return the body-force vector assembled at the current time.

void body_force_at_time(double time, VectorType &destination) const

Return the load at an externally supplied time.

Time-independent body forces and tractions are reused until the next setup_system().

void update_constraints(double time) const

Update time-dependent essential constraints without changing state.

void update_boundary_operators(double time) const

Update boundary stiffness at a candidate time without accepting state.

const AssemblyStatistics &assembly_statistics() const

Return monotone counters; spatial setup invalidates caches, not counts.

const MatrixType &system_matrix() const

Return the internal time-integration matrix from the last step.

const VectorType &system_rhs() const

Return the right-hand side from the last time-integration step.

const VectorType &displacement() const

Return the current owned displacement vector.

const VectorType &velocity() const

Return the current owned velocity vector.

double current_time() const

Return the current physical time.

double time_step() const

Return the time step used by the most recent step.

unsigned int time_step_number() const

Return the number of accepted time-integration steps.

struct AssemblyStatistics

Counts of actual assembly/update work over this object’s lifetime.

Public Members

unsigned long spatial_operators = 0
unsigned long robin_operators = 0
unsigned long body_force = 0
unsigned long constraints = 0
unsigned long time_system_matrix = 0