15 #include "../config/config.hpp"
16 #include "operator.hpp"
71 virtual void Step(
Vector &x,
double &
t,
double &dt) = 0;
89 virtual void Run(
Vector &x,
double &
t,
double &dt,
double tf)
91 while (t < tf) {
Step(x, t, dt); }
124 void Step(
Vector &x,
double &
t,
double &dt)
override;
144 void Step(
Vector &x,
double &
t,
double &dt)
override;
157 void Step(
Vector &x,
double &
t,
double &dt)
override;
170 void Step(
Vector &x,
double &
t,
double &dt)
override;
187 const double *a, *b, *c;
196 void Step(
Vector &x,
double &
t,
double &dt)
override;
207 static const double a[28], b[8], c[7];
219 static const double a[66], b[12], c[11];
241 void Step(
Vector &x,
double &
t,
double &dt)
override;
251 if (RKsolver) {
delete RKsolver; }
261 static const double a[1];
271 static const double a[2];
281 static const double a[3];
291 static const double a[4];
301 static const double a[5];
323 void Step(
Vector &x,
double &
t,
double &dt)
override;
333 if (RKsolver) {
delete RKsolver; }
342 static const double a[1];
353 static const double a[2];
363 static const double a[3];
373 static const double a[4];
383 static const double a[5];
399 void Step(
Vector &x,
double &
t,
double &dt)
override;
412 void Step(
Vector &x,
double &
t,
double &dt)
override;
433 void Step(
Vector &x,
double &
t,
double &dt)
override;
447 void Step(
Vector &x,
double &
t,
double &dt)
override;
461 void Step(
Vector &x,
double &
t,
double &dt)
override;
475 virtual void Step(
Vector &x,
double &
t,
double &dt);
489 virtual void Step(
Vector &x,
double &
t,
double &dt);
503 virtual void Step(
Vector &x,
double &
t,
double &dt);
525 void Step(
Vector &x,
double &
t,
double &dt)
override;
561 while (t < tf) {
Step(q, p, t, dt); }
685 while (t < tf) {
Step(x, dxdt, t, dt); }
720 NewmarkSolver(
double beta_ = 0.25,
double gamma_ = 0.5) { beta = beta_; gamma = gamma_; };
763 rho_inf = (rho_inf > 1.0) ? 1.0 : rho_inf;
764 rho_inf = (rho_inf < 0.0) ? 0.0 : rho_inf;
766 alpha_m = (2.0 - rho_inf)/(1.0 + rho_inf);
830 rho_inf = (rho_inf > 1.0) ? 1.0 : rho_inf;
831 rho_inf = (rho_inf < 0.0) ? 0.0 : rho_inf;
void Step(Vector &x, double &t, double &dt) override
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
void Init(SecondOrderTimeDependentOperator &f_) override
Associate a TimeDependentOperator with the ODE solver.
virtual ~SecondOrderODESolver()
virtual void Step(Vector &x, double &t, double &dt)
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
void Step(Vector &x, double &t, double &dt) override
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
void PrintProperties(std::ostream &out=mfem::out)
virtual void Init(Operator &P, TimeDependentOperator &F)
void Step(Vector &x, double &t, double &dt) override
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
void Step(Vector &x, double &t, double &dt) override
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
int GetMaxStateSize() override
Function for getting and setting the state vectors.
AverageAccelerationSolver()
virtual void Init(TimeDependentOperator &f_)
Associate a TimeDependentOperator with the ODE solver.
int GetStateSize() override
void SetRhoInf(double rho_inf)
virtual void SetStateVector(int i, Vector &state)
void Init(TimeDependentOperator &f_) override
Associate a TimeDependentOperator with the ODE solver.
Base abstract class for first order time dependent operators.
virtual int GetMaxStateSize()
Function for getting and setting the state vectors.
virtual void Step(Vector &x, double &t, double &dt)
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
virtual void Step(Vector &x, double &t, double &dt)=0
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
virtual int GetStateSize()
void Step(Vector &x, Vector &dxdt, double &t, double &dt) override
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
void Step(Vector &q, Vector &p, double &t, double &dt) override
int GetStateSize() override
RK2Solver(const double a_=2./3.)
void Init(TimeDependentOperator &f_) override
Associate a TimeDependentOperator with the ODE solver.
Abstract class for solving systems of ODEs: dx/dt = f(x,t)
ExplicitRKSolver(int s_, const double *a_, const double *b_, const double *c_)
const Vector & GetStateVector(int i) override
Abstract class for solving systems of ODEs: d2x/dt2 = f(x,dx/dt,t)
void Init(TimeDependentOperator &f_) override
Associate a TimeDependentOperator with the ODE solver.
Backward Euler ODE solver. L-stable.
virtual void Init(TimeDependentOperator &f_)
Associate a TimeDependentOperator with the ODE solver.
CentralDifferenceSolver()
Second Order Symplectic Integration Algorithm.
LinearAccelerationSolver()
void Step(Vector &q, Vector &p, double &t, double &dt) override
virtual const Vector & GetStateVector(int i)
void Step(Vector &x, Vector &dxdt, double &t, double &dt) override
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
void Init(TimeDependentOperator &f_) override
Associate a TimeDependentOperator with the ODE solver.
int GetMaxStateSize() override
Function for getting and setting the state vectors.
void PrintProperties(std::ostream &out=mfem::out)
virtual void Step(Vector &x, Vector &dxdt, double &t, double &dt)=0
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
void SetStateVector(int i, Vector &state) override
GeneralizedAlpha2Solver(double rho_inf=1.0)
void Init(TimeDependentOperator &f_) override
Associate a TimeDependentOperator with the ODE solver.
virtual ~ExplicitRKSolver()
The classical midpoint method.
void mfem_error(const char *msg)
Function called when an error is encountered. Used by the macros MFEM_ABORT, MFEM_ASSERT, MFEM_VERIFY.
virtual const Vector & GetStateVector(int i)
void Init(TimeDependentOperator &f_) override
Associate a TimeDependentOperator with the ODE solver.
virtual void Init(SecondOrderTimeDependentOperator &f)
Associate a TimeDependentOperator with the ODE solver.
void SetStateVector(int i, Vector &state) override
void Step(Vector &x, double &t, double &dt) override
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
void Step(Vector &x, double &t, double &dt) override
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
First Order Symplectic Integration Algorithm.
virtual void Step(Vector &x, double &t, double &dt)
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
WBZAlphaSolver(double rho_inf=1.0)
void Step(Vector &x, double &t, double &dt) override
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
const Vector & GetStateVector(int i) override
void Step(Vector &x, double &t, double &dt) override
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
virtual void Init(TimeDependentOperator &f_)
Associate a TimeDependentOperator with the ODE solver.
virtual int GetMaxStateSize()
Function for getting and setting the state vectors.
The classical explicit forth-order Runge-Kutta method, RK4.
double p(const Vector &x, double t)
static MemoryType GetHostMemoryType()
Get the current Host MemoryType. This is the MemoryType used by most MFEM classes when allocating mem...
TimeDependentOperator * F_
void Init(TimeDependentOperator &f_) override
Associate a TimeDependentOperator with the ODE solver.
MemoryType
Memory types supported by MFEM.
Third-order, strong stability preserving (SSP) Runge-Kutta method.
Base abstract class for second order time dependent operators.
NewmarkSolver(double beta_=0.25, double gamma_=0.5)
void PrintProperties(std::ostream &out=mfem::out)
void Init(TimeDependentOperator &f_) override
Associate a TimeDependentOperator with the ODE solver.
void Init(TimeDependentOperator &f_) override
Associate a TimeDependentOperator with the ODE solver.
void Init(SecondOrderTimeDependentOperator &f_) override
Associate a TimeDependentOperator with the ODE solver.
AdamsBashforthSolver(int s_, const double *a_)
void SetStateVector(int i, Vector &state) override
void Init(TimeDependentOperator &f_) override
Associate a TimeDependentOperator with the ODE solver.
Implicit midpoint method. A-stable, not L-stable.
Host memory; using new[] and delete[].
void Init(TimeDependentOperator &f_) override
Associate a TimeDependentOperator with the ODE solver.
void Init(TimeDependentOperator &f_) override
Associate a TimeDependentOperator with the ODE solver.
const Vector & GetStateVector(int i) override
virtual void Run(Vector &x, Vector &dxdt, double &t, double &dt, double tf)
Perform time integration from time t [in] to time tf [in].
virtual int GetStateSize()
void Step(Vector &x, double &t, double &dt) override
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
const Vector & GetStateVector(int i) override
virtual void Step(Vector &q, Vector &p, double &t, double &dt)=0
void Step(Vector &x, double &t, double &dt) override
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
int GetStateSize() override
void Step(Vector &x, double &t, double &dt) override
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
GeneralizedAlphaSolver(double rho=1.0)
virtual void Run(Vector &q, Vector &p, double &t, double &dt, double tf)
virtual void GetStateVector(int i, Vector &state)
int GetMaxStateSize() override
Function for getting and setting the state vectors.
void Init(TimeDependentOperator &f_) override
Associate a TimeDependentOperator with the ODE solver.
virtual void GetStateVector(int i, Vector &state)
void Step(Vector &x, double &t, double &dt) override
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
virtual void SetStateVector(int i, Vector &state)
virtual void Run(Vector &x, double &t, double &dt, double tf)
Perform time integration from time t [in] to time tf [in].
TimeDependentOperator * f
Pointer to the associated TimeDependentOperator.
void SetStateVector(int i, Vector &state) override
void Step(Vector &q, Vector &p, double &t, double &dt) override
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...
The classical forward Euler method.
SDIRK23Solver(int gamma_opt=1)
void Step(Vector &x, double &t, double &dt) override
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]...
HHTAlphaSolver(double alpha=1.0)
virtual void Init(TimeDependentOperator &f_)
Associate a TimeDependentOperator with the ODE solver.
int GetStateSize() override
AdamsMoultonSolver(int s_, const double *a_)
int GetMaxStateSize() override
Function for getting and setting the state vectors.
Variable order Symplectic Integration Algorithm (orders 1-4)
SecondOrderTimeDependentOperator * f
Pointer to the associated TimeDependentOperator.