MFEM v4.8.0
Finite element discretization library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
mfem::ODEStateDataVector Class Reference

An implementation of ODEStateData that stores states in an std::vector<Vector> More...

#include <ode.hpp>

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

Public Member Functions

 ODEStateDataVector (int smax)
 
void SetSize (int vsize, MemoryType mem_type)
 Set the number of stages and the size of the vectors.
 
void ShiftStages ()
 Shift the stage counter for the next timestep.
 
void Increment ()
 Increment the stage counter.
 
void Reset ()
 Reset the stage counter.
 
Vectoroperator[] (int i)
 Reference access to the ith vector.
 
const Vectoroperator[] (int i) const
 Const reference access to the ith vector.
 
void Print (std::ostream &os=mfem::out) const
 Print state data.
 
int MaxSize () const override
 Get the maximum number of stored stages.
 
int Size () const override
 Get the current number of stored stages.
 
const VectorGet (int i) const override
 Get the ith state vector.
 
VectorGet (int i) override
 Get the ith state vector - non-const version.
 
void Get (int i, Vector &vec) const override
 Get the ith state vector - with a copy.
 
void Set (int i, Vector &state) override
 Set the ith state vector.
 
void Append (Vector &state) override
 Add state vector and increment state size.
 
- Public Member Functions inherited from mfem::ODEStateData
virtual ~ODEStateData ()=default
 Virtual destructor.
 

Detailed Description

An implementation of ODEStateData that stores states in an std::vector<Vector>

Definition at line 54 of file ode.hpp.

Constructor & Destructor Documentation

◆ ODEStateDataVector()

mfem::ODEStateDataVector::ODEStateDataVector ( int smax)
inline

Definition at line 63 of file ode.hpp.

Member Function Documentation

◆ Append()

void mfem::ODEStateDataVector::Append ( Vector & state)
overridevirtual

Add state vector and increment state size.

Implements mfem::ODEStateData.

Definition at line 146 of file ode.cpp.

◆ Get() [1/3]

const Vector & mfem::ODEStateDataVector::Get ( int i) const
overridevirtual

Get the ith state vector.

Implements mfem::ODEStateData.

Definition at line 122 of file ode.cpp.

◆ Get() [2/3]

Vector & mfem::ODEStateDataVector::Get ( int i)
overridevirtual

Get the ith state vector - non-const version.

Implements mfem::ODEStateData.

Definition at line 128 of file ode.cpp.

◆ Get() [3/3]

void mfem::ODEStateDataVector::Get ( int i,
Vector & vec ) const
overridevirtual

Get the ith state vector - with a copy.

Implements mfem::ODEStateData.

Definition at line 134 of file ode.cpp.

◆ Increment()

void mfem::ODEStateDataVector::Increment ( )
inline

Increment the stage counter.

Definition at line 80 of file ode.hpp.

◆ MaxSize()

int mfem::ODEStateDataVector::MaxSize ( ) const
inlineoverridevirtual

Get the maximum number of stored stages.

Implements mfem::ODEStateData.

Definition at line 94 of file ode.hpp.

◆ operator[]() [1/2]

Vector & mfem::ODEStateDataVector::operator[] ( int i)
inline

Reference access to the ith vector.

Definition at line 86 of file ode.hpp.

◆ operator[]() [2/2]

const Vector & mfem::ODEStateDataVector::operator[] ( int i) const
inline

Const reference access to the ith vector.

Definition at line 89 of file ode.hpp.

◆ Print()

void mfem::ODEStateDataVector::Print ( std::ostream & os = mfem::out) const

Print state data.

Definition at line 153 of file ode.cpp.

◆ Reset()

void mfem::ODEStateDataVector::Reset ( )
inline

Reset the stage counter.

Definition at line 83 of file ode.hpp.

◆ Set()

void mfem::ODEStateDataVector::Set ( int i,
Vector & state )
overridevirtual

Set the ith state vector.

Implements mfem::ODEStateData.

Definition at line 140 of file ode.cpp.

◆ SetSize()

void mfem::ODEStateDataVector::SetSize ( int vsize,
MemoryType mem_type )

Set the number of stages and the size of the vectors.

Definition at line 110 of file ode.cpp.

◆ ShiftStages()

void mfem::ODEStateDataVector::ShiftStages ( )
inline

Shift the stage counter for the next timestep.

Definition at line 74 of file ode.hpp.

◆ Size()

int mfem::ODEStateDataVector::Size ( ) const
inlineoverridevirtual

Get the current number of stored stages.

Implements mfem::ODEStateData.

Definition at line 96 of file ode.hpp.


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