22 namespace serac::mfem_ext {
111 void Mult(
const mfem::Vector& u,
const mfem::Vector& du_dt, mfem::Vector& d2u_dt2)
const override
113 Solve(t, 0.0, 0.0, u, du_dt, d2u_dt2);
125 void ImplicitSolve(
const double c0,
const double c1,
const mfem::Vector& u,
const mfem::Vector& du_dt,
126 mfem::Vector& d2u_dt2)
override
128 Solve(t, c0, c1, u, du_dt, d2u_dt2);
134 void ImplicitSolve(
const double dt,
const mfem::Vector& u, mfem::Vector& du_dt)
override;
159 void Step(mfem::Vector& x, mfem::Vector& dxdt,
double& time,
double& dt);
185 void Solve(
const double time,
const double c0,
const double c1,
const mfem::Vector& u,
const mfem::Vector& du_dt,
186 mfem::Vector& d2u_dt2)
const;
203 std::unique_ptr<mfem::SecondOrderODESolver> second_order_ode_solver_;
208 std::unique_ptr<mfem::ODESolver> first_order_system_ode_solver_;
219 mutable mfem::Vector U_minus_;
220 mutable mfem::Vector U_;
221 mutable mfem::Vector U_plus_;
222 mutable mfem::Vector dU_dt_;
223 mutable mfem::Vector d2U_dt2_;
308 void Mult(
const mfem::Vector& u, mfem::Vector& du_dt)
const { Solve(t, 0.0, u, du_dt); }
317 void ImplicitSolve(
const double dt,
const mfem::Vector& u, mfem::Vector& du_dt) { Solve(t, dt, u, du_dt); }
341 void Step(mfem::Vector& x,
double& time,
double& dt)
344 ode_solver_->Step(x, time, dt);
346 SLIC_ERROR(
"ode_solver_ unspecified");
365 virtual void Solve(
const double time,
const double dt,
const mfem::Vector& u, mfem::Vector& du_dt)
const;
383 std::unique_ptr<mfem::ODESolver> ode_solver_;
393 mutable mfem::Vector U_minus_;
394 mutable mfem::Vector U_;
395 mutable mfem::Vector U_plus_;
396 mutable mfem::Vector dU_dt_;
This file contains the declaration of the boundary condition manager class.
A container for the boundary condition information relating to a specific physics module.
This class manages the objects typically required to solve a nonlinear set of equations arising from ...
FirstOrderODE is a class wrapping mfem::TimeDependentOperator so that the user can use std::function ...
void ImplicitSolve(const double dt, const mfem::Vector &u, mfem::Vector &du_dt)
Solves the equation du_dt = f(u + dt * du_dt, t)
TimestepMethod GetTimestepper()
Query the timestep method for the ode solver.
void SetTimestepper(const serac::TimestepMethod timestepper)
Set the time integration method.
FirstOrderODE(int n, FirstOrderODE::State &&state, const EquationSolver &solver, const BoundaryConditionManager &bcs)
Constructor defining the size and specific system of ordinary differential equations to be solved.
void Mult(const mfem::Vector &u, mfem::Vector &du_dt) const
Solves the equation du_dt = f(u, t)
static constexpr double epsilon
a small number used to compute finite difference approximations to time derivatives of boundary condi...
void SetEnforcementMethod(const DirichletEnforcementMethod method)
Configures the Dirichlet enforcement method to use.
void Step(mfem::Vector &x, double &time, double &dt)
Performs a time step.
SecondOrderODE is a class wrapping mfem::SecondOrderTimeDependentOperator so that the user can use st...
void Step(mfem::Vector &x, mfem::Vector &dxdt, double &time, double &dt)
Performs a time step.
const State & GetState()
Get a reference to the current state.
void ImplicitSolve(const double c0, const double c1, const mfem::Vector &u, const mfem::Vector &du_dt, mfem::Vector &d2u_dt2) override
Solves the equation d2u_dt2 = f(u + c0 * d2u_dt2, du_dt + c1 * d2u_dt2, t)
void Mult(const mfem::Vector &u, const mfem::Vector &du_dt, mfem::Vector &d2u_dt2) const override
Solves the equation d2u_dt2 = f(u, du_dt, t)
static constexpr double epsilon
a small number used to compute finite difference approximations to time derivatives of boundary condi...
void SetEnforcementMethod(const DirichletEnforcementMethod method)
Configures the Dirichlet enforcement method to use.
void SetTimestepper(const serac::TimestepMethod timestepper)
Set the time integration method.
SecondOrderODE(int n, State &&state, const EquationSolver &solver, const BoundaryConditionManager &bcs)
Constructor defining the size and specific system of ordinary differential equations to be solved.
TimestepMethod GetTimestepper()
Query the timestep method for the ode solver.
This file contains the declaration of an equation solver wrapper.
DirichletEnforcementMethod
this enum describes which way to enforce the time-varying constraint u(t) == U(t)
TimestepMethod
Timestep method of a solver.
A set of references to physics-module-owned variables used by the residual operator.
double & dt
Current time step.
mfem::Vector & u
Predicted true DOFs.
double & time
Time value at which the ODE solver wants to compute a residual.
mfem::Vector & du_dt
Previous value of du_dt.
double & previous_dt
Previous value of dt.
A set of references to physics-module-owned variables used by the residual operator.
double & time
Time value at which the ODE solver wants to compute a residual.
double & c0
coefficient used to calculate updated displacement: u_{n + 1} := u + c0 * d2u_dt2
mfem::Vector & du_dt
Predicted du_dt.
double & c1
coefficient used to calculate updated velocity: du_dt_{n+1} := du_dt + c1 * d2u_dt2
mfem::Vector & u
Predicted true DOFs.
mfem::Vector & d2u_dt2
Previous value of d^2u_dt^2.