numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
num_collect::ode::rosenbrock::rosenbrock_formula_base< Derived, Problem, EquationSolver > Class Template Reference

Base class of formulas in Rosenbrock method. More...

#include <num_collect/ode/rosenbrock/rosenbrock_formula_base.h>

+ Inheritance diagram for num_collect::ode::rosenbrock::rosenbrock_formula_base< Derived, Problem, EquationSolver >:
+ Collaboration diagram for num_collect::ode::rosenbrock::rosenbrock_formula_base< Derived, Problem, EquationSolver >:

Public Types

using base_type = formula_base<Derived, Problem>
 Type of base class.
 
using equation_solver_type = EquationSolver
 Type of class to solve equations in Rosenbrock methods.
 
using problem_type
 Type of problem.
 
using scalar_type
 Type of scalars.
 
using variable_type
 Type of variables.
 
- Public Types inherited from num_collect::ode::formula_base< Derived, Problem >
using problem_type = Problem
 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

 rosenbrock_formula_base (const problem_type &problem, const scalar_type &inverted_jacobian_coeff)
 Constructor.
 
auto equation_solver () -> equation_solver_type &
 Access the solver of equations in Rosenbrock methods.
 
auto equation_solver () const -> const equation_solver_type &
 Access the solver of equations in Rosenbrock methods.
 
auto tolerances (const error_tolerances< variable_type > &val) -> Derived &
 Set the error tolerances.
 
- Public Member Functions inherited from num_collect::ode::formula_base< Derived, Problem >
 formula_base (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.
 

Protected Member Functions

auto derived () const noexcept -> const Derived &
 Access derived object.
 
auto derived () noexcept -> Derived &
 Access derived object.
 
- Protected Member Functions inherited from num_collect::ode::formula_base< Derived, Problem >
auto derived () const noexcept -> const Derived &
 Access derived object.
 
auto derived () noexcept -> Derived &
 Access derived object.
 

Static Protected Member Functions

template<typename T >
static constexpr auto coeff (T val) -> scalar_type
 Convert coefficients.
 
template<typename T1 , typename T2 >
static constexpr auto coeff (T1 num, T2 den) -> scalar_type
 Create coefficients.
 
- Static Protected Member Functions inherited from num_collect::ode::formula_base< Derived, Problem >
template<typename T >
static constexpr auto coeff (T val) -> scalar_type
 Convert coefficients.
 
template<typename T1 , typename T2 >
static constexpr auto coeff (T1 num, T2 den) -> scalar_type
 Create coefficients.
 

Private Attributes

equation_solver_type solver_
 Solver of equations in Rosenbrock methods.
 

Detailed Description

template<typename Derived, concepts::problem Problem, concepts::rosenbrock_equation_solver EquationSolver>
class num_collect::ode::rosenbrock::rosenbrock_formula_base< Derived, Problem, EquationSolver >

Base class of formulas in Rosenbrock method.

Template Parameters
DerivedType of the derived class.
ProblemType of the problem.
EquationSolverType of class to solve equations in Rosenbrock methods.

Definition at line 39 of file rosenbrock_formula_base.h.

Member Typedef Documentation

◆ base_type

template<typename Derived , concepts::problem Problem, concepts::rosenbrock_equation_solver EquationSolver>
using num_collect::ode::rosenbrock::rosenbrock_formula_base< Derived, Problem, EquationSolver >::base_type = formula_base<Derived, Problem>

Type of base class.

Definition at line 42 of file rosenbrock_formula_base.h.

◆ equation_solver_type

template<typename Derived , concepts::problem Problem, concepts::rosenbrock_equation_solver EquationSolver>
using num_collect::ode::rosenbrock::rosenbrock_formula_base< Derived, Problem, EquationSolver >::equation_solver_type = EquationSolver

Type of class to solve equations in Rosenbrock methods.

Definition at line 49 of file rosenbrock_formula_base.h.

◆ problem_type

template<typename Derived , concepts::problem Problem, concepts::rosenbrock_equation_solver EquationSolver>
using num_collect::ode::formula_base< Derived, Problem >::problem_type

Type of problem.

Definition at line 36 of file formula_base.h.

◆ scalar_type

template<typename Derived , concepts::problem Problem, concepts::rosenbrock_equation_solver EquationSolver>
using num_collect::ode::formula_base< Derived, Problem >::scalar_type

Type of scalars.

Definition at line 42 of file formula_base.h.

◆ variable_type

template<typename Derived , concepts::problem Problem, concepts::rosenbrock_equation_solver EquationSolver>
using num_collect::ode::formula_base< Derived, Problem >::variable_type

Type of variables.

Definition at line 39 of file formula_base.h.

Constructor & Destructor Documentation

◆ rosenbrock_formula_base()

template<typename Derived , concepts::problem Problem, concepts::rosenbrock_equation_solver EquationSolver>
num_collect::ode::rosenbrock::rosenbrock_formula_base< Derived, Problem, EquationSolver >::rosenbrock_formula_base ( const problem_type & problem,
const scalar_type & inverted_jacobian_coeff )
inline

Constructor.

Parameters
[in]problemProblem.
[in]inverted_jacobian_coeffCoefficient multiplied to Jacobian matrices in inverted matrices.

Definition at line 63 of file rosenbrock_formula_base.h.

Member Function Documentation

◆ coeff() [1/2]

template<typename Derived , concepts::problem Problem, concepts::rosenbrock_equation_solver EquationSolver>
template<typename T >
static constexpr auto num_collect::ode::formula_base< Derived, Problem >::coeff ( T val) -> scalar_type
inlinestaticconstexprprotected

Convert coefficients.

Template Parameters
TInput type.
Parameters
[in]valInput value.
Returns
Converted value.

Definition at line 108 of file formula_base.h.

◆ coeff() [2/2]

template<typename Derived , concepts::problem Problem, concepts::rosenbrock_equation_solver EquationSolver>
template<typename T1 , typename T2 >
static constexpr auto num_collect::ode::formula_base< Derived, Problem >::coeff ( T1 num,
T2 den ) -> scalar_type
inlinestaticconstexprprotected

Create coefficients.

Template Parameters
T1Input type.
T2Input type.
Parameters
[in]numNumerator.
[in]denDenominator.
Returns
Coefficient.

Definition at line 122 of file formula_base.h.

◆ derived() [1/2]

template<typename Derived , concepts::problem Problem, concepts::rosenbrock_equation_solver EquationSolver>
auto num_collect::ode::formula_base< Derived, Problem >::derived ( ) const -> const Derived&
inlinenodiscardprotectednoexcept

Access derived object.

Returns
Reference to the derived object.

Definition at line 96 of file formula_base.h.

◆ derived() [2/2]

template<typename Derived , concepts::problem Problem, concepts::rosenbrock_equation_solver EquationSolver>
auto num_collect::ode::formula_base< Derived, Problem >::derived ( ) -> Derived&
inlinenodiscardprotectednoexcept

Access derived object.

Returns
Reference to the derived object.

Definition at line 87 of file formula_base.h.

◆ equation_solver() [1/2]

template<typename Derived , concepts::problem Problem, concepts::rosenbrock_equation_solver EquationSolver>
auto num_collect::ode::rosenbrock::rosenbrock_formula_base< Derived, Problem, EquationSolver >::equation_solver ( ) -> equation_solver_type&
inlinenodiscard

Access the solver of equations in Rosenbrock methods.

Returns
Solver.

Definition at line 97 of file rosenbrock_formula_base.h.

◆ equation_solver() [2/2]

template<typename Derived , concepts::problem Problem, concepts::rosenbrock_equation_solver EquationSolver>
auto num_collect::ode::rosenbrock::rosenbrock_formula_base< Derived, Problem, EquationSolver >::equation_solver ( ) const -> const equation_solver_type&
inlinenodiscard

Access the solver of equations in Rosenbrock methods.

Returns
Solver.

Definition at line 88 of file rosenbrock_formula_base.h.

◆ tolerances()

template<typename Derived , concepts::problem Problem, concepts::rosenbrock_equation_solver EquationSolver>
auto num_collect::ode::rosenbrock::rosenbrock_formula_base< Derived, Problem, EquationSolver >::tolerances ( const error_tolerances< variable_type > & val) -> Derived&
inline

Set the error tolerances.

Parameters
[in]valValue.
Returns
This.

Definition at line 73 of file rosenbrock_formula_base.h.

Member Data Documentation

◆ solver_

template<typename Derived , concepts::problem Problem, concepts::rosenbrock_equation_solver EquationSolver>
equation_solver_type num_collect::ode::rosenbrock::rosenbrock_formula_base< Derived, Problem, EquationSolver >::solver_
private

Solver of equations in Rosenbrock methods.

Definition at line 103 of file rosenbrock_formula_base.h.


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