numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
num_collect::ode::non_embedded_formula_wrapper< BaseFormula > Class Template Reference

Wrapper class to use a non-embedded formula as an embedded formula. More...

#include <num_collect/ode/non_embedded_formula_wrapper.h>

+ Collaboration diagram for num_collect::ode::non_embedded_formula_wrapper< BaseFormula >:

Public Types

using base_formula_type = BaseFormula
 Type of formula to use in this class.
 
using problem_type = typename base_formula_type::problem_type
 Type of problem.
 
using scalar_type = typename problem_type::scalar_type
 Type of scalars.
 
using variable_type = typename problem_type::variable_type
 Type of variables.
 

Public Member Functions

 non_embedded_formula_wrapper (const problem_type &problem=problem_type())
 Constructor.
 
auto problem () -> problem_type &
 Get the problem.
 
auto problem () const -> const problem_type &
 Get the problem.
 
void step (scalar_type time, scalar_type step_size, const variable_type &current, variable_type &estimate)
 Compute the next variable.
 
void step_embedded (scalar_type time, scalar_type step_size, const variable_type &current, variable_type &estimate, variable_type &error)
 Compute the next variable and weak estimate of it with embedded formula.
 

Static Public Attributes

static constexpr index_type lesser_order = base_formula_type::order
 Order of lesser coefficients of this formula.
 
static constexpr logging::log_tag_view log_tag = base_formula_type::log_tag
 Log tag.
 
static constexpr index_type order = base_formula_type::order
 Order of this formula.
 
static constexpr index_type stages = base_formula_type::stages
 Number of stages of this formula.
 

Private Attributes

base_formula_type formula_
 Formula.
 

Detailed Description

template<concepts::formula BaseFormula>
class num_collect::ode::non_embedded_formula_wrapper< BaseFormula >

Wrapper class to use a non-embedded formula as an embedded formula.

Template Parameters
BaseFormulaType of formula to use.

Definition at line 36 of file non_embedded_formula_wrapper.h.

Member Typedef Documentation

◆ base_formula_type

template<concepts::formula BaseFormula>
using num_collect::ode::non_embedded_formula_wrapper< BaseFormula >::base_formula_type = BaseFormula

Type of formula to use in this class.

Definition at line 39 of file non_embedded_formula_wrapper.h.

◆ problem_type

template<concepts::formula BaseFormula>
using num_collect::ode::non_embedded_formula_wrapper< BaseFormula >::problem_type = typename base_formula_type::problem_type

Type of problem.

Definition at line 42 of file non_embedded_formula_wrapper.h.

◆ scalar_type

template<concepts::formula BaseFormula>
using num_collect::ode::non_embedded_formula_wrapper< BaseFormula >::scalar_type = typename problem_type::scalar_type

Type of scalars.

Definition at line 48 of file non_embedded_formula_wrapper.h.

◆ variable_type

template<concepts::formula BaseFormula>
using num_collect::ode::non_embedded_formula_wrapper< BaseFormula >::variable_type = typename problem_type::variable_type

Type of variables.

Definition at line 45 of file non_embedded_formula_wrapper.h.

Constructor & Destructor Documentation

◆ non_embedded_formula_wrapper()

template<concepts::formula BaseFormula>
num_collect::ode::non_embedded_formula_wrapper< BaseFormula >::non_embedded_formula_wrapper ( const problem_type & problem = problem_type())
inlineexplicit

Constructor.

Parameters
[in]problemProblem.

Definition at line 67 of file non_embedded_formula_wrapper.h.

Member Function Documentation

◆ problem() [1/2]

template<concepts::formula BaseFormula>
auto num_collect::ode::non_embedded_formula_wrapper< BaseFormula >::problem ( ) -> problem_type&
inlinenodiscard

Get the problem.

Returns
Problem.

Definition at line 112 of file non_embedded_formula_wrapper.h.

◆ problem() [2/2]

template<concepts::formula BaseFormula>
auto num_collect::ode::non_embedded_formula_wrapper< BaseFormula >::problem ( ) const -> const problem_type&
inlinenodiscard

Get the problem.

Returns
Problem.

Definition at line 119 of file non_embedded_formula_wrapper.h.

◆ step()

template<concepts::formula BaseFormula>
void num_collect::ode::non_embedded_formula_wrapper< BaseFormula >::step ( scalar_type time,
scalar_type step_size,
const variable_type & current,
variable_type & estimate )
inline

Compute the next variable.

Parameters
[in]timeCurrent time.
[in]step_sizeStep size.
[in]currentCurrent variable.
[out]estimateEstimate of the next variable.

Definition at line 79 of file non_embedded_formula_wrapper.h.

◆ step_embedded()

template<concepts::formula BaseFormula>
void num_collect::ode::non_embedded_formula_wrapper< BaseFormula >::step_embedded ( scalar_type time,
scalar_type step_size,
const variable_type & current,
variable_type & estimate,
variable_type & error )
inline

Compute the next variable and weak estimate of it with embedded formula.

Parameters
[in]timeCurrent time.
[in]step_sizeStep size.
[in]currentCurrent variable.
[out]estimateEstimate of the next variable.
[out]errorEstimate of error.

Definition at line 94 of file non_embedded_formula_wrapper.h.

Member Data Documentation

◆ formula_

template<concepts::formula BaseFormula>
base_formula_type num_collect::ode::non_embedded_formula_wrapper< BaseFormula >::formula_
private

Formula.

Definition at line 125 of file non_embedded_formula_wrapper.h.

◆ lesser_order

template<concepts::formula BaseFormula>
index_type num_collect::ode::non_embedded_formula_wrapper< BaseFormula >::lesser_order = base_formula_type::order
staticconstexpr

Order of lesser coefficients of this formula.

Definition at line 57 of file non_embedded_formula_wrapper.h.

◆ log_tag

template<concepts::formula BaseFormula>
logging::log_tag_view num_collect::ode::non_embedded_formula_wrapper< BaseFormula >::log_tag = base_formula_type::log_tag
staticconstexpr

Log tag.

Definition at line 60 of file non_embedded_formula_wrapper.h.

◆ order

template<concepts::formula BaseFormula>
index_type num_collect::ode::non_embedded_formula_wrapper< BaseFormula >::order = base_formula_type::order
staticconstexpr

Order of this formula.

Definition at line 54 of file non_embedded_formula_wrapper.h.

◆ stages

template<concepts::formula BaseFormula>
index_type num_collect::ode::non_embedded_formula_wrapper< BaseFormula >::stages = base_formula_type::stages
staticconstexpr

Number of stages of this formula.

Definition at line 51 of file non_embedded_formula_wrapper.h.


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