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 ()=default
 

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 73 of file TimeIntegrationScheme.h.

Constructor & Destructor Documentation

◆ TimeIntegrationScheme() [1/2]

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

Definition at line 53 of file TimeIntegration/TimeIntegrationScheme.cpp.

55{
56 boost::ignore_unused(variant, order, freeParams);
57}

◆ TimeIntegrationScheme() [2/2]

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

◆ ~TimeIntegrationScheme()

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

Member Function Documentation

◆ GetFreeParams()

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

Definition at line 93 of file TimeIntegrationScheme.h.

94 {
95 return v_GetFreeParams();
96 }
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 97 of file TimeIntegrationScheme.h.

98 {
100 }
virtual LUE TimeIntegrationSchemeType v_GetIntegrationSchemeType() const =0

References v_GetIntegrationSchemeType().

◆ GetName()

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

Definition at line 81 of file TimeIntegrationScheme.h.

82 {
83 return v_GetName();
84 }
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 105 of file TimeIntegrationScheme.h.

106 {
108 }
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 113 of file TimeIntegrationScheme.h.

114 {
115 return v_GetSolutionVector();
116 }
virtual LUE const TripleArray & v_GetSolutionVector() const =0

References v_GetSolutionVector().

◆ GetTimeStability()

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

Definition at line 101 of file TimeIntegrationScheme.h.

102 {
103 return v_GetTimeStability();
104 }
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 156 of file TimeIntegrationScheme.h.

159 {
160 v_InitializeScheme(deltaT, y_0, time, op);
161 }
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 169 of file TimeIntegrationScheme.h.

170 {
171 v_print(os);
172 }
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 173 of file TimeIntegrationScheme.h.

174 {
175 v_printFull(os);
176 }
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 126 of file TimeIntegrationScheme.h.

127 {
128 v_SetSolutionVector(Offset, y);
129 }
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 163 of file TimeIntegrationScheme.h.

165 {
166 return v_TimeIntegrate(timestep, delta_t);
167 }
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 118 of file TimeIntegrationScheme.h.

119 {
120 return v_UpdateSolutionVector();
121 }
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 66 of file TimeIntegration/TimeIntegrationScheme.cpp.

67{
68 rhs.print(os);
69
70 return os;
71}

◆ operator<< [2/2]

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

Definition at line 73 of file TimeIntegration/TimeIntegrationScheme.cpp.

75{
76 os << *rhs.get();
77
78 return os;
79}