15 #include "../config/config.hpp" 16 #include "operator.hpp" 17 #include "../general/communication.hpp" 72 virtual void Step(
Vector &x,
double &
t,
double &dt) = 0;
90 virtual void Run(
Vector &x,
double &
t,
double &dt,
double tf)
92 while (
t < tf) {
Step(x,
t, dt); }
125 void Step(
Vector &x,
double &
t,
double &dt)
override;
145 void Step(
Vector &x,
double &
t,
double &dt)
override;
158 void Step(
Vector &x,
double &
t,
double &dt)
override;
171 void Step(
Vector &x,
double &
t,
double &dt)
override;
188 const double *a, *b, *c;
197 void Step(
Vector &x,
double &
t,
double &dt)
override;
208 static MFEM_EXPORT
const double a[28], b[8], c[7];
220 static const double a[66], b[12], c[11];
252 void Step(
Vector &x,
double &
t,
double &dt)
override;
262 if (RKsolver) {
delete RKsolver; }
271 static MFEM_EXPORT
const double a[1];
281 static MFEM_EXPORT
const double a[2];
291 static MFEM_EXPORT
const double a[3];
301 static MFEM_EXPORT
const double a[4];
311 static MFEM_EXPORT
const double a[5];
343 void Step(
Vector &x,
double &
t,
double &dt)
override;
353 if (RKsolver) {
delete RKsolver; }
362 static MFEM_EXPORT
const double a[1];
373 static MFEM_EXPORT
const double a[2];
383 static MFEM_EXPORT
const double a[3];
393 static MFEM_EXPORT
const double a[4];
403 static MFEM_EXPORT
const double a[5];
419 void Step(
Vector &x,
double &
t,
double &dt)
override;
432 void Step(
Vector &x,
double &
t,
double &dt)
override;
453 void Step(
Vector &x,
double &
t,
double &dt)
override;
467 void Step(
Vector &x,
double &
t,
double &dt)
override;
481 void Step(
Vector &x,
double &
t,
double &dt)
override;
495 virtual void Step(
Vector &x,
double &
t,
double &dt);
509 virtual void Step(
Vector &x,
double &
t,
double &dt);
523 virtual void Step(
Vector &x,
double &
t,
double &dt);
545 void Step(
Vector &x,
double &
t,
double &dt)
override;
581 while (
t < tf) {
Step(q,
p,
t, dt); }
705 while (
t < tf) {
Step(x, dxdt,
t, dt); }
783 rho_inf = (rho_inf > 1.0) ? 1.0 : rho_inf;
784 rho_inf = (rho_inf < 0.0) ? 0.0 : rho_inf;
786 alpha_m = (2.0 - rho_inf)/(1.0 + rho_inf);
850 rho_inf = (rho_inf > 1.0) ? 1.0 : rho_inf;
851 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
static bool IsInitialized()
Return true if MPI has been initialized.
static bool Root()
Return true if the rank in MPI_COMM_WORLD is zero.
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.
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...
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
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.