MFEM v4.10.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::GeneralizedAlphaSolver Class Reference

#include <ode.hpp>

Inheritance diagram for mfem::GeneralizedAlphaSolver:
[legend]
Collaboration diagram for mfem::GeneralizedAlphaSolver:
[legend]

Public Member Functions

 GeneralizedAlphaSolver (real_t rho=1.0)
 
void Init (TimeDependentOperator &f_) override
 Associate a TimeDependentOperator with the ODE solver.
 
void Step (Vector &x, real_t &t, real_t &dt) override
 Perform a time step from time t [in] to time t [out] based on the requested step size dt [in].
 
ODEStateDataGetState () override
 Returns the StateData.
 
const ODEStateDataGetState () const override
 Returns the StateData.
 
bool SupportsImplicitVariableType (ImplicitVariableType var) const override
 Returns true if the ODESolver supports the given ImplicitVariableType, var, and returns false otherwise. Default implementation returns true if var is ImplicitVariableType::SLOPE and false otherwise.
 
- Public Member Functions inherited from mfem::ODESolverWithStates
virtual int GetStateSize ()
 Returns how many State vectors the ODE requires.
 
- Public Member Functions inherited from mfem::ODESolver
 ODESolver ()
 
virtual void Run (Vector &x, real_t &t, real_t &dt, real_t tf)
 Perform time integration from time t [in] to time tf [in].
 
void SetImplicitVariableType (const ImplicitVariableType variable_type)
 Sets the ImplicitVariableType for the TimeDependentOperator, if supported.
 
virtual void ComputeSlopeFromState (const real_t dt, const Vector &u, Vector &k)
 Compute the finite-difference slope, \(\frac{du}{dt} \approx \frac{u(t+dt)-u(t)}{dt}\), and store it in k.
 
virtual ~ODESolver ()
 

Protected Member Functions

void SetRhoInf (real_t rho_inf)
 
void PrintProperties (std::ostream &os=mfem::out)
 

Protected Attributes

Vector k
 
Vector y
 
real_t alpha_f
 
real_t alpha_m
 
real_t gamma
 
- Protected Attributes inherited from mfem::ODESolver
TimeDependentOperatorf
 Pointer to the associated TimeDependentOperator.
 
MemoryType mem_type
 

Additional Inherited Members

- Static Public Member Functions inherited from mfem::ODESolver
static MFEM_EXPORT std::unique_ptr< ODESolverSelect (const int ode_solver_type)
 
static MFEM_EXPORT std::unique_ptr< ODESolverSelectExplicit (const int ode_solver_type)
 
static MFEM_EXPORT std::unique_ptr< ODESolverSelectImplicit (const int ode_solver_type)
 
static MFEM_EXPORT std::unique_ptr< ODESolverSelectIMEX (const int ode_solver_type)
 
- Static Public Attributes inherited from mfem::ODESolver
static MFEM_EXPORT std::string ExplicitTypes
 
static MFEM_EXPORT std::string ImplicitTypes
 
static MFEM_EXPORT std::string IMEXTypes
 
static MFEM_EXPORT std::string Types
 
- Protected Types inherited from mfem::ODESolver
using ImplicitVariableType = TimeDependentOperator::ImplicitVariableType
 

Detailed Description

Generalized-alpha ODE solver from "A generalized-α method for integrating the filtered Navier-Stokes equations with a stabilized finite element method" by K.E. Jansen, C.H. Whiting and G.M. Hulbert.

Definition at line 558 of file ode.hpp.

Constructor & Destructor Documentation

◆ GeneralizedAlphaSolver()

mfem::GeneralizedAlphaSolver::GeneralizedAlphaSolver ( real_t rho = 1.0)
inline

Definition at line 571 of file ode.hpp.

Member Function Documentation

◆ GetState() [1/2]

const ODEStateData & mfem::GeneralizedAlphaSolver::GetState ( ) const
inlineoverridevirtual

Returns the StateData.

Implements mfem::ODESolverWithStates.

Definition at line 576 of file ode.hpp.

◆ GetState() [2/2]

ODEStateData & mfem::GeneralizedAlphaSolver::GetState ( )
inlineoverridevirtual

Returns the StateData.

Implements mfem::ODESolverWithStates.

Definition at line 575 of file ode.hpp.

◆ Init()

void mfem::GeneralizedAlphaSolver::Init ( TimeDependentOperator & f_)
overridevirtual

Associate a TimeDependentOperator with the ODE solver.

This method has to be called:

Reimplemented from mfem::ODESolver.

Definition at line 994 of file ode.cpp.

◆ PrintProperties()

void mfem::GeneralizedAlphaSolver::PrintProperties ( std::ostream & os = mfem::out)
protected

Definition at line 1013 of file ode.cpp.

◆ SetRhoInf()

void mfem::GeneralizedAlphaSolver::SetRhoInf ( real_t rho_inf)
protected

Definition at line 1002 of file ode.cpp.

◆ Step()

void mfem::GeneralizedAlphaSolver::Step ( Vector & x,
real_t & t,
real_t & dt )
overridevirtual

Perform a time step from time t [in] to time t [out] based on the requested step size dt [in].

Parameters
[in,out]xApproximate solution.
[in,out]tTime associated with the approximate solution x.
[in,out]dtTime step size.

The following rules describe the common behavior of the method:

  • The input x [in] is the approximate solution for the input time t [in].
  • The input dt [in] is the desired time step size, defining the desired target time: t [target] = t [in] + dt [in].
  • The output x [out] is the approximate solution for the output time t [out].
  • The output dt [out] is the last time step taken by the method which may be smaller or larger than the input dt [in] value, e.g. because of time step control.
  • The method may perform more than one time step internally; in this case dt [out] is the last internal time step size.
  • The output value of t [out] may be smaller or larger than t [target], however, it is not smaller than t [in] + dt [out], if at least one internal time step was performed.
  • The value x [out] may be obtained by interpolation using internally stored data.
  • In some cases, the contents of x [in] may not be used, e.g. when x [out] from a previous Step() call was obtained by interpolation.
  • In consecutive calls to this method, the output t [out] of one Step() call has to be the same as the input t [in] to the next Step() call.
  • If the previous rule has to be broken, e.g. to restart a time stepping sequence, then the ODE solver must be re-initialized by calling Init() between the two Step() calls.

Implements mfem::ODESolver.

Definition at line 1040 of file ode.cpp.

◆ SupportsImplicitVariableType()

bool mfem::GeneralizedAlphaSolver::SupportsImplicitVariableType ( ImplicitVariableType var) const
inlineoverridevirtual

Returns true if the ODESolver supports the given ImplicitVariableType, var, and returns false otherwise. Default implementation returns true if var is ImplicitVariableType::SLOPE and false otherwise.

Warning
Should be overridden in ODESolver that calls TimeDependentOperator::ImplicitSolve().

Reimplemented from mfem::ODESolver.

Definition at line 578 of file ode.hpp.

Member Data Documentation

◆ alpha_f

real_t mfem::GeneralizedAlphaSolver::alpha_f
protected

Definition at line 565 of file ode.hpp.

◆ alpha_m

real_t mfem::GeneralizedAlphaSolver::alpha_m
protected

Definition at line 565 of file ode.hpp.

◆ gamma

real_t mfem::GeneralizedAlphaSolver::gamma
protected

Definition at line 565 of file ode.hpp.

◆ k

Vector mfem::GeneralizedAlphaSolver::k
mutableprotected

Definition at line 564 of file ode.hpp.

◆ y

Vector mfem::GeneralizedAlphaSolver::y
protected

Definition at line 564 of file ode.hpp.


The documentation for this class was generated from the following files: