Problems#
Simple problem#
-
template<typename Callable_t>
class simple_problem# define a problem with a unique function
This class represent a problem of the form
\[ \dot{u}=f(t,u) \]- Template Parameters:
Callable_t – type of callable object (or function) stored in problem
Subclassed by ponio::implicit_problem< Callable_t, Jacobian_t >
Public Functions
-
inline simple_problem(Callable_t &&f_)#
constructor of simple_problem from a callable and hints
- Parameters:
f_ – callable object
-
template<typename Callable_t>
simple_problem<Callable_t> ponio::make_simple_problem(Callable_t &&c)# factory of simple_problem
- Parameters:
c – callable object (function or functor) which represent the function of the problem
Lawson problem#
-
template<typename Linear_t, typename Nonlinear_t>
class lawson_problem# define a problem with a linear part and non-linear part
This class represent a problem of the form
\[ \dot{u}=Lu + N(t,u) \]- Template Parameters:
Linear_t – type of the linear part (a matrix)
Nonlinear_t – type of callable of the non-lineart part (function or functor)
Public Functions
-
lawson_problem(Linear_t &&l_, Nonlinear_t &&n_)#
constructor of lawson_problem
- Parameters:
l_ – linerar part \(L\) of Lawson problem
n_ – nonlinerar part \(N(t,u)\) of Lawson problem
-
template<typename Linear_t, typename Nonlinear_t>
lawson_problem<Linear_t, Nonlinear_t> ponio::make_lawson_problem(Linear_t &&l, Nonlinear_t &&n)# factory of lawson_problem
- Parameters:
l – linerar part \(L\) of Lawson problem
n – nonlinerar part \(N(t,u)\) of Lawson problem
Implicit problem#
This kind of problems are defined by a function and its Jacobian.
-
template<typename Callable_t, typename Jacobian_t>
class implicit_problem : public ponio::simple_problem<Callable_t># define a problem with its jacobian to use implicit Runge-Kutta method
- Template Parameters:
Callable_t – type of callable object (or function) stored in problem
Jacobian_t – type of callable object (or function) that represents the jacobian
Public Functions
-
inline implicit_problem(Callable_t &&f_, Jacobian_t &&df_)#
constructor of implicit_problem from a callable and hints
- Parameters:
f_ – callable object that represents problem
df_ – callable object that represents Jacobian of problem
-
template<typename Callable_t, typename Jacobian_t>
implicit_problem<Callable_t, Jacobian_t> ponio::make_implicit_problem(Callable_t &&f, Jacobian_t &&df)# factory of implicit_problem
- Parameters:
f – callable object (function or functor) which represent the function of the problem
df – jacobian of \(f\) function
Implicit problem with operator#
This kind of problems are defined by a function and an operator, for example to solve :
the function is \(f\) ;
the operator is \(t \mapsto f(t, \cdot)\) which is a function.
-
template<typename Callable1_t, typename Callable2_t>
class implicit_operator_problem : public ponio::simple_problem<Callable1_t># define a problem with its operator to use implicit Runge-Kutta method with Samurai
- Template Parameters:
Callable1_t – type of callable object (or function) stored in problem
Callable2_t – type of callable object (or function) that represents the \(f:\mapsto f(t,\cdot)\)
Public Functions
-
inline implicit_operator_problem(Callable1_t &&f_, Callable2_t &&f_t_)#
constructor of implicit_operator_problem from a callable and hints
- Parameters:
f_ – callable object
-
template<typename Callable1_t, typename Callable2_t>
implicit_operator_problem<Callable1_t, Callable2_t> ponio::make_implicit_operator_problem(Callable1_t &&f, Callable2_t &&f_t)# factory of implicit_operator_problem
- Parameters:
f – callable object (function or functor) which represent the function of the problem
f_t – callable of \(f:t\mapsto f(t,\cdot)\) function
Problem#
A problem is a collection of sub-problems defined by previous problems.
-
template<typename ...Callables_t>
class problem# main problem that could contains multiple sub-problem
Main goal of this class is to represent a problem of the form
\[ \dot{u} = \sum_i f_i(t,u) \]Public Functions
-
inline problem(Callables_t... args)#
constructor of problem from variadic number of sub-problem
- Parameters:
args – list of sub-problems
-
template<typename value_t, typename state_t, std::size_t... Is>
inline state_t _sum_components_impl(value_t t, state_t &&u, std::index_sequence<Is...>)# sum all call of each sub-problem
- Template Parameters:
Is – index sequence to iterate over tuple of sub-problems
- Parameters:
t – time \(t\)
u – time \(u(t)\)
- Returns:
returns \(\sum_i f_i(t,u)\)
-
inline problem(Callables_t... args)#