MFEM  v4.6.0
Finite element discretization library
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mfem::GeneralizedAlphaSolver Class Reference

#include <ode.hpp>

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

Public Member Functions

 GeneralizedAlphaSolver (double rho=1.0)
 
void Init (TimeDependentOperator &f_) override
 Associate a TimeDependentOperator with the ODE solver. More...
 
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]. More...
 
int GetMaxStateSize () override
 Function for getting and setting the state vectors. More...
 
int GetStateSize () override
 
const VectorGetStateVector (int i) override
 
void GetStateVector (int i, Vector &state) override
 
void SetStateVector (int i, Vector &state) override
 
- Public Member Functions inherited from mfem::ODESolver
 ODESolver ()
 
virtual void Run (Vector &x, double &t, double &dt, double tf)
 Perform time integration from time t [in] to time tf [in]. More...
 
virtual ~ODESolver ()
 

Protected Member Functions

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

Protected Attributes

Vector xdot
 
Vector k
 
Vector y
 
double alpha_f
 
double alpha_m
 
double gamma
 
int nstate
 
- Protected Attributes inherited from mfem::ODESolver
TimeDependentOperatorf
 Pointer to the associated TimeDependentOperator. More...
 
MemoryType mem_type
 

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 530 of file ode.hpp.

Constructor & Destructor Documentation

◆ GeneralizedAlphaSolver()

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

Definition at line 541 of file ode.hpp.

Member Function Documentation

◆ GetMaxStateSize()

int mfem::GeneralizedAlphaSolver::GetMaxStateSize ( )
inlineoverridevirtual

Function for getting and setting the state vectors.

Reimplemented from mfem::ODESolver.

Definition at line 547 of file ode.hpp.

◆ GetStateSize()

int mfem::GeneralizedAlphaSolver::GetStateSize ( )
inlineoverridevirtual

Reimplemented from mfem::ODESolver.

Definition at line 548 of file ode.hpp.

◆ GetStateVector() [1/2]

const Vector & mfem::GeneralizedAlphaSolver::GetStateVector ( int  i)
overridevirtual

Reimplemented from mfem::ODESolver.

Definition at line 825 of file ode.cpp.

◆ GetStateVector() [2/2]

void mfem::GeneralizedAlphaSolver::GetStateVector ( int  i,
Vector state 
)
overridevirtual

Reimplemented from mfem::ODESolver.

Definition at line 833 of file ode.cpp.

◆ 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 815 of file ode.cpp.

◆ PrintProperties()

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

Definition at line 861 of file ode.cpp.

◆ SetRhoInf()

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

Definition at line 850 of file ode.cpp.

◆ SetStateVector()

void mfem::GeneralizedAlphaSolver::SetStateVector ( int  i,
Vector state 
)
overridevirtual

Reimplemented from mfem::ODESolver.

Definition at line 841 of file ode.cpp.

◆ Step()

void mfem::GeneralizedAlphaSolver::Step ( Vector x,
double &  t,
double &  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 888 of file ode.cpp.

Member Data Documentation

◆ alpha_f

double mfem::GeneralizedAlphaSolver::alpha_f
protected

Definition at line 534 of file ode.hpp.

◆ alpha_m

double mfem::GeneralizedAlphaSolver::alpha_m
protected

Definition at line 534 of file ode.hpp.

◆ gamma

double mfem::GeneralizedAlphaSolver::gamma
protected

Definition at line 534 of file ode.hpp.

◆ k

Vector mfem::GeneralizedAlphaSolver::k
mutableprotected

Definition at line 533 of file ode.hpp.

◆ nstate

int mfem::GeneralizedAlphaSolver::nstate
protected

Definition at line 535 of file ode.hpp.

◆ xdot

Vector mfem::GeneralizedAlphaSolver::xdot
mutableprotected

Definition at line 533 of file ode.hpp.

◆ y

Vector mfem::GeneralizedAlphaSolver::y
mutableprotected

Definition at line 533 of file ode.hpp.


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