codac 2.0.0
Loading...
Searching...
No Matches
codac2::DiffInclusion< XVar, UVar > Class Template Reference

#include <codac2_DiffInclusion.h>

Public Member Functions

template<bool forward = true, bool end_gate = false>
X approx_RK4 (const Interval &time_step, const X &init, const U &u)
 approximation of IVP on a step using RK4. Does not return a guaranteed result, used for approximate enclosing
IntervalVector f_eval (const EvalMode &m, const Interval &t, const IntervalVector &x, const IntervalVector &u) const override
 basic enclosing step

Detailed Description

template<typename XVar = VectorVar, typename UVar = VectorVar>
class codac2::DiffInclusion< XVar, UVar >

diffential inclusion x' = f(x,u) or f(t,x,u). x and u can be scalar, interval or matrix. For practical reasons (on the interface), we consider exactly one u. (TODO: lift this restriction ?)

Member Function Documentation

◆ approx_RK4()

template<typename XVar = VectorVar, typename UVar = VectorVar>
template<bool forward = true, bool end_gate = false>
X codac2::DiffInclusion< XVar, UVar >::approx_RK4 ( const Interval & time_step,
const X & init,
const U & u )
inline

approximation of IVP on a step using RK4. Does not return a guaranteed result, used for approximate enclosing

Parameters
time_steptime stem (backward or forward)
initinitial values
uuncertainties
138 {
139 return
140 to_X(approx_RK4_base(time_step,
141 from_X(init),from_U(u),forward,end_gate));
142 }
Definition codac2_DiffInclusion.h:98

◆ f_eval()

template<typename XVar = VectorVar, typename UVar = VectorVar>
IntervalVector codac2::DiffInclusion< XVar, UVar >::f_eval ( const EvalMode & m,
const Interval & t,
const IntervalVector & x,
const IntervalVector & u ) const
inlineoverride

basic enclosing step

Parameters
time_steptime stem (backward or forward)
init_domaininitial values
in_domaininside values (may be contracted)
out_gatefinal values (may be contracted)
uuncertainties
inflation_ratioinflation ratio (default 0.1)
inflation_baseinflation base (default 1e-2)
attemptsmax number of attempts (default 3)
Returns
false if no improvement was found
159 {
162 if (_time_dependant)
163 return _f.eval(m,t,x,u);
164 else
165 return _f.eval(m,x,u);
166 } else {
167 if (_time_dependant)
168 return from_X(_f.eval(m,t,to_X(x),to_U(u)));
169 else
170 return from_X(_f.eval(m,to_X(x),to_U(u)));
171 }
172 }

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