Nektar++
Public Member Functions | Protected Member Functions | Friends | List of all members
Nektar::LibUtilities::TimeIntegrationScheme Class Referenceabstract

Base class for time integration schemes. More...

#include <TimeIntegrationScheme.h>

Inheritance diagram for Nektar::LibUtilities::TimeIntegrationScheme:
[legend]

Public Member Functions

LUE std::string GetFullName () const
 
LUE std::string GetName () const
 
LUE std::string GetVariant () const
 
LUE size_t GetOrder () const
 
LUE std::vector< NekDoubleGetFreeParams ()
 
LUE TimeIntegrationSchemeType GetIntegrationSchemeType ()
 
LUE NekDouble GetTimeStability () const
 
LUE size_t GetNumIntegrationPhases ()
 
LUE const TripleArrayGetSolutionVector () const
 Gets the solution vector of the ODE. More...
 
LUE TripleArrayUpdateSolutionVector ()
 
LUE void SetSolutionVector (const size_t Offset, const DoubleArray &y)
 Sets the solution vector of the ODE. More...
 
LUE void InitializeScheme (const NekDouble deltaT, ConstDoubleArray &y_0, const NekDouble time, const TimeIntegrationSchemeOperators &op)
 Explicit integration of an ODE. More...
 
LUE ConstDoubleArrayTimeIntegrate (const size_t timestep, const NekDouble delta_t)
 
LUE void print (std::ostream &os) const
 
LUE void printFull (std::ostream &os) const
 

Protected Member Functions

virtual LUE std::string v_GetFullName () const
 
virtual LUE std::string v_GetName () const =0
 
virtual LUE std::string v_GetVariant () const =0
 
virtual LUE size_t v_GetOrder () const =0
 
virtual LUE std::vector< NekDoublev_GetFreeParams () const =0
 
virtual LUE TimeIntegrationSchemeType v_GetIntegrationSchemeType () const =0
 
virtual LUE NekDouble v_GetTimeStability () const =0
 
virtual LUE size_t v_GetNumIntegrationPhases () const =0
 
virtual LUE const TripleArrayv_GetSolutionVector () const =0
 
virtual LUE TripleArrayv_UpdateSolutionVector ()=0
 
virtual LUE void v_SetSolutionVector (const size_t Offset, const DoubleArray &y)=0
 
virtual LUE void v_InitializeScheme (const NekDouble deltaT, ConstDoubleArray &y_0, const NekDouble time, const TimeIntegrationSchemeOperators &op)=0
 
virtual LUE ConstDoubleArrayv_TimeIntegrate (const size_t timestep, const NekDouble delta_t)=0
 
virtual LUE void v_print (std::ostream &os) const =0
 
virtual LUE void v_printFull (std::ostream &os) const =0
 
LUE TimeIntegrationScheme (std::string variant, size_t order, std::vector< NekDouble > freeParams)
 
LUE TimeIntegrationScheme (const TimeIntegrationScheme &in)=delete
 
virtual ~TimeIntegrationScheme ()
 

Friends

LUE friend std::ostream & operator<< (std::ostream &os, const TimeIntegrationScheme &rhs)
 
LUE friend std::ostream & operator<< (std::ostream &os, const TimeIntegrationSchemeSharedPtr &rhs)
 

Detailed Description

Base class for time integration schemes.

Definition at line 77 of file TimeIntegrationScheme.h.

Constructor & Destructor Documentation

◆ TimeIntegrationScheme() [1/2]

LUE Nektar::LibUtilities::TimeIntegrationScheme::TimeIntegrationScheme ( std::string  variant,
size_t  order,
std::vector< NekDouble freeParams 
)
inlineprotected

Definition at line 211 of file TimeIntegrationScheme.h.

213 {
214 boost::ignore_unused(variant, order, freeParams);
215 }

◆ TimeIntegrationScheme() [2/2]

LUE Nektar::LibUtilities::TimeIntegrationScheme::TimeIntegrationScheme ( const TimeIntegrationScheme in)
protecteddelete

◆ ~TimeIntegrationScheme()

virtual Nektar::LibUtilities::TimeIntegrationScheme::~TimeIntegrationScheme ( )
inlineprotectedvirtual

Definition at line 219 of file TimeIntegrationScheme.h.

220 {
221 }

Member Function Documentation

◆ GetFreeParams()

LUE std::vector< NekDouble > Nektar::LibUtilities::TimeIntegrationScheme::GetFreeParams ( )
inline

Definition at line 97 of file TimeIntegrationScheme.h.

98 {
99 return v_GetFreeParams();
100 }
virtual LUE std::vector< NekDouble > v_GetFreeParams() const =0

References v_GetFreeParams().

◆ GetFullName()

LUE std::string Nektar::LibUtilities::TimeIntegrationScheme::GetFullName ( ) const
inline

◆ GetIntegrationSchemeType()

LUE TimeIntegrationSchemeType Nektar::LibUtilities::TimeIntegrationScheme::GetIntegrationSchemeType ( )
inline

Definition at line 101 of file TimeIntegrationScheme.h.

102 {
104 }
virtual LUE TimeIntegrationSchemeType v_GetIntegrationSchemeType() const =0

References v_GetIntegrationSchemeType().

◆ GetName()

LUE std::string Nektar::LibUtilities::TimeIntegrationScheme::GetName ( ) const
inline

Definition at line 85 of file TimeIntegrationScheme.h.

86 {
87 return v_GetName();
88 }
virtual LUE std::string v_GetName() const =0

References v_GetName().

Referenced by v_GetFullName(), and Nektar::LibUtilities::EulerExponentialTimeIntegrationScheme::v_GetFullName().

◆ GetNumIntegrationPhases()

LUE size_t Nektar::LibUtilities::TimeIntegrationScheme::GetNumIntegrationPhases ( )
inline

Definition at line 109 of file TimeIntegrationScheme.h.

110 {
112 }
virtual LUE size_t v_GetNumIntegrationPhases() const =0

References v_GetNumIntegrationPhases().

◆ GetOrder()

LUE size_t Nektar::LibUtilities::TimeIntegrationScheme::GetOrder ( ) const
inline

◆ GetSolutionVector()

LUE const TripleArray & Nektar::LibUtilities::TimeIntegrationScheme::GetSolutionVector ( ) const
inline

Gets the solution vector of the ODE.

Definition at line 117 of file TimeIntegrationScheme.h.

118 {
119 return v_GetSolutionVector();
120 }
virtual LUE const TripleArray & v_GetSolutionVector() const =0

References v_GetSolutionVector().

◆ GetTimeStability()

LUE NekDouble Nektar::LibUtilities::TimeIntegrationScheme::GetTimeStability ( ) const
inline

Definition at line 105 of file TimeIntegrationScheme.h.

106 {
107 return v_GetTimeStability();
108 }
virtual LUE NekDouble v_GetTimeStability() const =0

References v_GetTimeStability().

◆ GetVariant()

LUE std::string Nektar::LibUtilities::TimeIntegrationScheme::GetVariant ( ) const
inline

◆ InitializeScheme()

LUE void Nektar::LibUtilities::TimeIntegrationScheme::InitializeScheme ( const NekDouble  deltaT,
ConstDoubleArray y_0,
const NekDouble  time,
const TimeIntegrationSchemeOperators op 
)
inline

Explicit integration of an ODE.

This function explicitely perfroms a single integration step of the ODE system:

\[ \frac{d\boldsymbol{y}}{dt}=\boldsymbol{f}(t,\boldsymbol{y}) \]

Parameters
timestepThe size of the timestep, i.e. \(\Delta t\).
fan object of the class FuncType, where FuncType should have a method FuncType::ODEforcing to evaluate the right hand side \(f(t,\boldsymbol{y})\) of the ODE.
yon input: the vectors \(\boldsymbol{y}^{[n-1]}\) and \(t^{[n-1]}\) (which corresponds to the solution at the old time level)
yon output: the vectors \(\boldsymbol{y}^{[n]}\) and \(t^{[n]}\) (which corresponds to the solution at the old new level)
Returns
The actual solution \(\boldsymbol{y}^{n}\) at the new time level (which in fact is also embedded in the argument y).

Definition at line 160 of file TimeIntegrationScheme.h.

163 {
164 v_InitializeScheme(deltaT, y_0, time, op);
165 }
virtual LUE void v_InitializeScheme(const NekDouble deltaT, ConstDoubleArray &y_0, const NekDouble time, const TimeIntegrationSchemeOperators &op)=0

References v_InitializeScheme().

◆ print()

LUE void Nektar::LibUtilities::TimeIntegrationScheme::print ( std::ostream &  os) const
inline

Definition at line 173 of file TimeIntegrationScheme.h.

174 {
175 v_print(os);
176 }
virtual LUE void v_print(std::ostream &os) const =0

References v_print().

Referenced by Nektar::LibUtilities::operator<<().

◆ printFull()

LUE void Nektar::LibUtilities::TimeIntegrationScheme::printFull ( std::ostream &  os) const
inline

Definition at line 177 of file TimeIntegrationScheme.h.

178 {
179 v_printFull(os);
180 }
virtual LUE void v_printFull(std::ostream &os) const =0

References v_printFull().

◆ SetSolutionVector()

LUE void Nektar::LibUtilities::TimeIntegrationScheme::SetSolutionVector ( const size_t  Offset,
const DoubleArray y 
)
inline

Sets the solution vector of the ODE.

Definition at line 130 of file TimeIntegrationScheme.h.

131 {
132 v_SetSolutionVector(Offset, y);
133 }
virtual LUE void v_SetSolutionVector(const size_t Offset, const DoubleArray &y)=0

References v_SetSolutionVector().

◆ TimeIntegrate()

LUE ConstDoubleArray & Nektar::LibUtilities::TimeIntegrationScheme::TimeIntegrate ( const size_t  timestep,
const NekDouble  delta_t 
)
inline

Definition at line 167 of file TimeIntegrationScheme.h.

169 {
170 return v_TimeIntegrate(timestep, delta_t);
171 }
virtual LUE ConstDoubleArray & v_TimeIntegrate(const size_t timestep, const NekDouble delta_t)=0

References v_TimeIntegrate().

◆ UpdateSolutionVector()

LUE TripleArray & Nektar::LibUtilities::TimeIntegrationScheme::UpdateSolutionVector ( )
inline

Definition at line 122 of file TimeIntegrationScheme.h.

123 {
124 return v_UpdateSolutionVector();
125 }
virtual LUE TripleArray & v_UpdateSolutionVector()=0

References v_UpdateSolutionVector().

◆ v_GetFreeParams()

virtual LUE std::vector< NekDouble > Nektar::LibUtilities::TimeIntegrationScheme::v_GetFreeParams ( ) const
protectedpure virtual

◆ v_GetFullName()

std::string Nektar::LibUtilities::TimeIntegrationScheme::v_GetFullName ( ) const
protectedvirtual

◆ v_GetIntegrationSchemeType()

virtual LUE TimeIntegrationSchemeType Nektar::LibUtilities::TimeIntegrationScheme::v_GetIntegrationSchemeType ( ) const
protectedpure virtual

◆ v_GetName()

virtual LUE std::string Nektar::LibUtilities::TimeIntegrationScheme::v_GetName ( ) const
protectedpure virtual

◆ v_GetNumIntegrationPhases()

virtual LUE size_t Nektar::LibUtilities::TimeIntegrationScheme::v_GetNumIntegrationPhases ( ) const
protectedpure virtual

◆ v_GetOrder()

virtual LUE size_t Nektar::LibUtilities::TimeIntegrationScheme::v_GetOrder ( ) const
protectedpure virtual

◆ v_GetSolutionVector()

virtual LUE const TripleArray & Nektar::LibUtilities::TimeIntegrationScheme::v_GetSolutionVector ( ) const
protectedpure virtual

◆ v_GetTimeStability()

virtual LUE NekDouble Nektar::LibUtilities::TimeIntegrationScheme::v_GetTimeStability ( ) const
protectedpure virtual

◆ v_GetVariant()

virtual LUE std::string Nektar::LibUtilities::TimeIntegrationScheme::v_GetVariant ( ) const
protectedpure virtual

◆ v_InitializeScheme()

virtual LUE void Nektar::LibUtilities::TimeIntegrationScheme::v_InitializeScheme ( const NekDouble  deltaT,
ConstDoubleArray y_0,
const NekDouble  time,
const TimeIntegrationSchemeOperators op 
)
protectedpure virtual

◆ v_print()

virtual LUE void Nektar::LibUtilities::TimeIntegrationScheme::v_print ( std::ostream &  os) const
protectedpure virtual

◆ v_printFull()

virtual LUE void Nektar::LibUtilities::TimeIntegrationScheme::v_printFull ( std::ostream &  os) const
protectedpure virtual

◆ v_SetSolutionVector()

virtual LUE void Nektar::LibUtilities::TimeIntegrationScheme::v_SetSolutionVector ( const size_t  Offset,
const DoubleArray y 
)
protectedpure virtual

◆ v_TimeIntegrate()

virtual LUE ConstDoubleArray & Nektar::LibUtilities::TimeIntegrationScheme::v_TimeIntegrate ( const size_t  timestep,
const NekDouble  delta_t 
)
protectedpure virtual

◆ v_UpdateSolutionVector()

virtual LUE TripleArray & Nektar::LibUtilities::TimeIntegrationScheme::v_UpdateSolutionVector ( )
protectedpure virtual

Friends And Related Function Documentation

◆ operator<< [1/2]

LUE friend std::ostream & operator<< ( std::ostream &  os,
const TimeIntegrationScheme rhs 
)
friend

Definition at line 60 of file TimeIntegrationScheme.cpp.

61{
62 rhs.print(os);
63
64 return os;
65}

◆ operator<< [2/2]

LUE friend std::ostream & operator<< ( std::ostream &  os,
const TimeIntegrationSchemeSharedPtr rhs 
)
friend

Definition at line 67 of file TimeIntegrationScheme.cpp.

69{
70 os << *rhs.get();
71
72 return os;
73}