Template Class ElastodynamicsSolver¶
Defined in File elastodynamics.h
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-valuedFESystem<dim>(FE_Q<dim>, spacedim), represented by one DoFHandler. 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 a standalone backward-Euler driver.Coupling, particles, multipliers, moving geometry, nonlinear materials, and SUNDIALS policy belong outside this class.
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 and quadrature.
-
void setup_system()¶
Distribute DoFs, constraints, sparsity patterns, matrices, and vectors.
-
void assemble_operators()¶
Assemble the continuous spatial operators
M,K,D.
-
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 backward-Euler step using the configured time step.
-
void solve()¶
Alias for one standalone backward-Euler 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 backward-Euler 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 backward-Euler 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::AffineConstraints<double> &constraints() const¶
Return displacement constraints, including hanging-node constraints.
-
const dealii::AffineConstraints<double> &velocity_constraints() const¶
Return velocity constraints, including its explicit velocity boundary.
The displacement and velocity boundary functions are independent parsed functions. The solver does not numerically differentiate displacement data: callers prescribing a moving boundary should provide consistent values in both subsections.
-
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 Kelvin—Voigt damping operator, possibly identically zero.
-
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¶
Assemble the body-force row at an externally supplied time.
-
void update_constraints(double time) const¶
Update time-dependent essential constraints without changing state.
-
const MatrixType &system_matrix() const¶
Return the internal backward-Euler matrix from the last step.
-
const VectorType &system_rhs() const¶
Return the right-hand side from the last backward-Euler 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 backward-Euler steps.
-
explicit ElastodynamicsSolver(const ElastodynamicsParameters<dim, spacedim> &par)¶