MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::NewmarkSolver Class Reference

#include <ode.hpp>

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

Public Member Functions

 NewmarkSolver (real_t beta_=0.25, real_t gamma_=0.5)
 
void PrintProperties (std::ostream &out=mfem::out)
 
void Init (SecondOrderTimeDependentOperator &f_) override
 Associate a TimeDependentOperator with the ODE solver.
 
void Step (Vector &x, Vector &dxdt, 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].
 
- Public Member Functions inherited from mfem::SecondOrderODESolver
 SecondOrderODESolver ()
 
virtual void Run (Vector &x, Vector &dxdt, real_t &t, real_t &dt, real_t tf)
 Perform time integration from time t [in] to time tf [in].
 
virtual int GetMaxStateSize ()
 Function for getting and setting the state vectors.
 
virtual int GetStateSize ()
 
virtual const VectorGetStateVector (int i)
 
virtual void GetStateVector (int i, Vector &state)
 
virtual void SetStateVector (int i, Vector &state)
 
virtual ~SecondOrderODESolver ()
 

Additional Inherited Members

- Protected Attributes inherited from mfem::SecondOrderODESolver
SecondOrderTimeDependentOperatorf
 Pointer to the associated TimeDependentOperator.
 
MemoryType mem_type
 

Detailed Description

The classical newmark method. Newmark, N. M. (1959) A method of computation for structural dynamics. Journal of Engineering Mechanics, ASCE, 85 (EM3) 67-94.

Definition at line 731 of file ode.hpp.

Constructor & Destructor Documentation

◆ NewmarkSolver()

mfem::NewmarkSolver::NewmarkSolver ( real_t beta_ = 0.25,
real_t gamma_ = 0.5 )
inline

Definition at line 740 of file ode.hpp.

Member Function Documentation

◆ Init()

void mfem::NewmarkSolver::Init ( SecondOrderTimeDependentOperator & f)
overridevirtual

Associate a TimeDependentOperator with the ODE solver.

This method has to be called:

Reimplemented from mfem::SecondOrderODESolver.

Definition at line 1026 of file ode.cpp.

◆ PrintProperties()

void mfem::NewmarkSolver::PrintProperties ( std::ostream & out = mfem::out)

Definition at line 1034 of file ode.cpp.

◆ Step()

void mfem::NewmarkSolver::Step ( Vector & x,
Vector & dxdt,
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]dxdtApproximate rate.
[in,out]tTime associated with the approximate solution x and rate @ dxdt
[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 dxdt [in] is the approximate rate 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 dxdt [out] is the approximate rate 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::SecondOrderODESolver.

Definition at line 1063 of file ode.cpp.


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