tfel
Loading...
Searching...
No Matches
tfel::math::TinyRungeKuttaSolverBase< N, ScalarType > Struct Template Reference

a base class for a system of ordinary differential equations based on explicit methods of the Runge-Kutta family where the size of the solution is known at compile-time. More...

#include </home/runner/work/tfel/tfel/include/TFEL/Math/RungeKutta/TinyRungeKuttaSolverBase.hxx>

Public Types

using SolutionType
 the type of solution determined by the ordinary differential equation.

Public Member Functions

void setInitialValue (const SolutionType &y0)
 set the initial values of the solution
void setInitialTime (const ScalarType t0)
 set the initial time
void setFinalTime (const ScalarType t1)
 set the final time
void setInitialTimeIncrement (const ScalarType time_increment)
 set the initial time increment
void setCriterionValue (const ScalarType criterion_value)
 set the value of the stopping criterion
const SolutionType & getValue () const
const ScalarType & getTimeIncrement () const

Protected Attributes

SolutionType y
 current estimate of the solution
ScalarType ti
 initial time
ScalarType tf
 final time
ScalarType dt
 current time increment
ScalarType epsilon
 criterion value

Detailed Description

template<unsigned short N, typename ScalarType = double>
struct tfel::math::TinyRungeKuttaSolverBase< N, ScalarType >

a base class for a system of ordinary differential equations based on explicit methods of the Runge-Kutta family where the size of the solution is known at compile-time.

Template Parameters
Nsize of the system of ordinary differential equations
ScalarTypescalar type

Member Typedef Documentation

◆ SolutionType

template<unsigned short N, typename ScalarType = double>
using tfel::math::TinyRungeKuttaSolverBase< N, ScalarType >::SolutionType
Initial value:
std::conditional_t<N == 1, ScalarType, tvector<N, ScalarType>>

the type of solution determined by the ordinary differential equation.

Member Function Documentation

◆ getTimeIncrement()

template<unsigned short N, typename ScalarType = double>
const ScalarType & tfel::math::TinyRungeKuttaSolverBase< N, ScalarType >::getTimeIncrement ( ) const
inline
Returns
the last time increment used by the solver.

◆ getValue()

template<unsigned short N, typename ScalarType = double>
const SolutionType & tfel::math::TinyRungeKuttaSolverBase< N, ScalarType >::getValue ( ) const
inline
Returns
the solution at the end of the time step after the resolution.

◆ setCriterionValue()

template<unsigned short N, typename ScalarType = double>
void tfel::math::TinyRungeKuttaSolverBase< N, ScalarType >::setCriterionValue ( const ScalarType criterion_value)
inline

set the value of the stopping criterion

Parameters
[in]criterion_valuenew criterion value

◆ setFinalTime()

template<unsigned short N, typename ScalarType = double>
void tfel::math::TinyRungeKuttaSolverBase< N, ScalarType >::setFinalTime ( const ScalarType t1)
inline

set the final time

Parameters
[in]t1final time

◆ setInitialTime()

template<unsigned short N, typename ScalarType = double>
void tfel::math::TinyRungeKuttaSolverBase< N, ScalarType >::setInitialTime ( const ScalarType t0)
inline

set the initial time

Parameters
[in]t0initial time

◆ setInitialTimeIncrement()

template<unsigned short N, typename ScalarType = double>
void tfel::math::TinyRungeKuttaSolverBase< N, ScalarType >::setInitialTimeIncrement ( const ScalarType time_increment)
inline

set the initial time increment

Parameters
[in]time_increment

◆ setInitialValue()

template<unsigned short N, typename ScalarType = double>
void tfel::math::TinyRungeKuttaSolverBase< N, ScalarType >::setInitialValue ( const SolutionType & y0)
inline

set the initial values of the solution

Parameters
[in]y0initial values

The documentation for this struct was generated from the following file: