CAPD DynSys Library
5.2.0
|
#include <capd/dynsys/OdeSolver.h>
Public Types | |
typedef MapT | VectorFieldType |
typedef StepControlPolicyT | StepControlPolicy |
typedef MapT::FunctionType | FunctionType |
typedef VectorFieldType::MatrixType | MatrixType |
typedef MatrixType::RowVectorType | VectorType |
typedef MatrixType::ScalarType | ScalarType |
typedef BasicOdeSolver< MapT, StepControlPolicy, CurveT > | BaseTaylor |
typedef MatrixType::size_type | size_type |
typedef diffAlgebra::C1TimeJet< MatrixType > | C1TimeJetType |
typedef capd::vectalg::Norm< VectorType, MatrixType > | NormType |
typedef capd::dynsys::ILastTermsStepControl | StepControlType |
typedef capd::diffAlgebra::Curve< capd::diffAlgebra::BasicCurve< typename MapT::MatrixType > > | SolutionCurve |
typedef VectorFieldType::JetType | JetType |
typedef JetType::Multipointer | Multipointer |
typedef JetType::Multiindex | Multiindex |
typedef TypeTraits< ScalarType >::Real | Real |
typedef Hessian< ScalarType, VectorType::csDim, VectorType::csDim > | HessianType |
typedef __difference_type | difference_type |
typedef VectorType::iterator | iterator |
typedef VectorType::const_iterator | const_iterator |
Public Member Functions | |
OdeSolver (VectorFieldType &vField, size_type order, const StepControlPolicy &stepControl=StepControlPolicy()) | |
void | setOrder (size_type order) |
Sets the order of the Taylor method. More... | |
VectorType | Phi (const ScalarType &t, const VectorType &iv) |
Computes value of function (usually numerical scheme for an ODE) at time t and point iv. More... | |
MatrixType | JacPhi (const ScalarType &t, const VectorType &iv) |
Computes derivative of function (usually numerical scheme for an ODE) at time t and point iv. More... | |
VectorType | enclosure (const ScalarType &t, const VectorType &x) |
Used for ODEs. It verifies the existence of solutions to IVP at time t and set of initial conditions x over the time step. If the function succeeds, a rigorous bound for the trajectories is returned. Otherwise, an exception is thrown. More... | |
VectorType | Remainder (const ScalarType &t, const VectorType &iv, VectorType &o_enc) |
Computes and returns bound for local error of a function (for instance if Phi is finite Taylor series of a map then this method computes bound for Lagrange remainder). If DynSys is an ODE, then out_enc contains enclosure of trajectories over the time step. If the function cannot validate existence of solutions to ODE over the time step, out_enc might be in an inconsistent state. More... | |
void | encloseC0Map (const ScalarType &t, const VectorType &x0, const VectorType &x, VectorType &o_phi, VectorType &o_rem, VectorType &o_enc, MatrixType &o_jacPhi) |
void | encloseC1Map (const ScalarType &t, const VectorType &x0, const VectorType &x, VectorType &o_phi, VectorType &o_rem, VectorType &o_enc, MatrixType &o_jacPhi, MatrixType &o_jacRem, MatrixType &o_jacEnc) |
template<typename SetType > | |
void | operator() (SetType &set) |
This operator computes image of the set (in given representation) using set.move function, see capd/dynsys/Move.h for details This template together with SetTraits prevent usage of various types of jets with incompatible solvers. The user will get an exception at runtime with clear message instead of unreadable compiler error. In this case a specialization C1SetMove is used meaning that this solver can integrate C^0 and C^1 sets only. Moreover, it cannot integrate nonrigorous jets (for user safety). More... | |
template<typename SetType > | |
void | operator() (SetType &set, SetType &result) |
Computes image of the set (in set's representation) and stores it in the result set. More... | |
void | computeRemainderCoefficients (const VectorType &x) |
void | computeRemainderCoefficients (const VectorType &x, const MatrixType &M) |
void | computeRemainderCoefficients (ScalarType t, const VectorType &x) |
void | computeRemainderCoefficients (ScalarType t, const VectorType &x, const MatrixType &M) |
void | initRemainderCoefficients (ScalarType t, const VectorType &x, unsigned degree) |
virtual void | computeRemainder (ScalarType t, const VectorType &xx, VectorType &o_enc, VectorType &o_rem) |
virtual void | computeRemainder (ScalarType t, const VectorType &xx, C1TimeJetType &o_enc, C1TimeJetType &o_rem) |
void | computeTaylorCoefficients (ScalarType t, const VectorType &x, const VectorType &xx) |
void | computeImplicitCoefficients (ScalarType t, const VectorType &x, const VectorType &xx, size_type order) |
ScalarType | getCoeffNorm (size_type, size_type degree) const |
ScalarType | getStep () const |
const CurveT & | getImplicitCurve () const |
void | computeTimeStep (const ScalarType &t, const VectorType &x) |
virtual void | encloseC1Map (const ScalarType &t, const VectorType &x, const VectorType &xx, VectorType &o_phi, VectorType &o_rem, VectorType &o_enc, MapT::MatrixType &o_jacPhi, MapT::MatrixType &o_jacRem, MapT::MatrixType &o_jacEnc)=0 |
virtual ScalarType | Lipschitz (const ScalarType &t, const VectorType &iv, NormType &n) |
this function returns Lipschitz contants for maps. It should be overriden in classes implementing flows. More... | |
virtual void | encloseC0Map (const ScalarType &t, const VectorType &x, const VectorType &xx, VectorType &o_phi, VectorType &o_rem, VectorType &o_enc, MatrixType &o_jacPhi)=0 |
For given set xx, time t and a point x from the set xx It simultaneously computes and returns enclosures for: More... | |
virtual ScalarType | getStep () const |
Returns time step of the dynamical system. By default it returns one - time step for discrete DS (maps). Shall be overridden in classes that implement numerical schemes for ODEs. More... | |
VectorType | operator() (VectorType) |
Computes image of vector v after one time step. More... | |
VectorType | operator() (ScalarType &t, const VectorType &u) |
Computes image of vector v after one time step. The argument t is updated in this procedure. More... | |
VectorType | operator() (VectorType, MatrixType &o_resultDerivative) |
Computes image of vector v and derivatives of the flow with respect to init condition (v,identity). Version for autonomous systems. More... | |
VectorType | operator() (ScalarType &t, const VectorType &, MatrixType &o_resultDerivative) |
Computes image of vector v and derivatives of the flow with respect to init condition (v,identity). Version for nonautonomous systems. The argument t is updated in this procedure. More... | |
VectorType | operator() (VectorType, const MatrixType &derivative, MatrixType &o_resultDerivative) |
Computes image of vector v and derivatives of a flow with respect to init condition (v, derivative) More... | |
VectorType | operator() (ScalarType &t, const VectorType &v, const MatrixType &derivative, MatrixType &o_resultDerivative) |
Computes image of vector v and derivatives of a flow with respect to init condition (v, derivative). The argument t is updated in this procedure. More... | |
void | operator() (JetT &jet) |
This operator computes image of the set (in given representation) using set.move function, see capd/dynsys/Move.h for details This template together with SetTraits prevent usage of various types of jets with incompatible solvers. The user will get an exception at runtime with clear message instead of unreadable compiler error. In this case a specialization C1JetMove is used meaning that this solver can integrate C^0 and C^1 jets only. More... | |
VectorType | operator() (const ScalarType &h) const |
const VectorFieldType & | getVectorField () const |
Returns vector field. More... | |
VectorFieldType & | getVectorField () |
void | setOrder (size_type order) |
Sets the order of the Taylor method. More... | |
ScalarType | getStep () const |
Returns the time step made in the last call to this solver. More... | |
void | setStep (const ScalarType &newStep) |
Sets fixed time step and turns off step control. More... | |
void | computeCoefficientsAtCenter (const VectorType &x, size_type order) |
void | computeCoefficientsAtCenter (ScalarType t, const VectorType &x, size_type order) |
void | computeCoefficients (const VectorType &x, size_type order) |
void | computeCoefficients (ScalarType t, const VectorType &x, size_type order) |
void | computeCoefficients (const VectorType &x, const MatrixType &M, size_type order) |
void | computeCoefficients (ScalarType t, const VectorType &x, const MatrixType &M, size_type order) |
const SolutionCurve & | getCurve () |
virtual ScalarType | getCoeffNorm (size_type i, size_type degree) const |
size_type | dimension () const |
void | adjustTimeStep (const ScalarType &newStep) |
sets time step but does not change step control settings (compare setStep) More... | |
void | setMask (Iterator b, Iterator e) |
The iterator range [b,e) should contain a range of Multiinideces the user requires to compute. More... | |
void | addMultiindexToMask (const Multiindex &mi) |
Adds new multiindex (along with dependencies) to the existing mask. More... | |
void | resetMask () |
Resets the mask of derivatives. More... | |
void | turnOnStepControl () |
void | turnOffStepControl () |
void | onOffStepControl (bool _onOffStepControl) |
const StepControlType & | getStepControl () const |
void | setStepControl (const StepControlType &stepControl) |
bool | isStepChangeAllowed () const |
void | setAbsoluteTolerance (TolScalarType tol) |
void | setRelativeTolerance (TolScalarType tol) |
TolScalarType | getAbsoluteTolerance () const |
TolScalarType | getRelativeTolerance () const |
MapT::ScalarType | getMaxStep () const |
void | setMaxStep (MapT::ScalarType maxStep) |
VectorType | timeDerivative (const ScalarType &h) const |
MatrixType | derivative (const ScalarType &h) const |
MatrixType | operator[] (const ScalarType &h) const |
size_type | getOrder () const |
Returns the order of Taylor interpolation. More... | |
size_type | getAllocatedOrder () const |
Returns maximal allocated order - used to avoid memory reallocation. More... | |
void | clearCoefficients () |
sets all coefficients to zero More... | |
const ScalarType & | centerCoefficient (size_type i, size_type j) const |
ScalarType & | centerCoefficient (size_type i, size_type j) |
const ScalarType & | coefficient (size_type i, size_type j) const |
const ScalarType & | coefficient (size_type i, size_type j, size_type k) const |
ScalarType & | coefficient (size_type i, size_type j) |
ScalarType & | coefficient (size_type i, size_type j, size_type k) |
const ScalarType & | remainderCoefficient (size_type i, size_type j) const |
const ScalarType & | remainderCoefficient (size_type i, size_type j, size_type k) const |
ScalarType & | remainderCoefficient (size_type i, size_type j) |
ScalarType & | remainderCoefficient (size_type i, size_type j, size_type k) |
const VectorType * | getCoefficientsAtCenter () const |
VectorType * | getCoefficientsAtCenter () |
const VectorType * | getCoefficients () const |
VectorType * | getCoefficients () |
const VectorType * | getRemainderCoefficients () const |
VectorType * | getRemainderCoefficients () |
const MatrixType * | getMatrixCoefficients () const |
MatrixType * | getMatrixCoefficients () |
const MatrixType * | getMatrixRemainderCoefficients () const |
MatrixType * | getMatrixRemainderCoefficients () |
iterator | beginCenterCoefficients (size_type j) |
const_iterator | beginCenterCoefficients (size_type j) const |
iterator | beginCoefficients (size_type j) |
const_iterator | beginCoefficients (size_type j) const |
iterator | beginRemainderCoefficients (size_type j) |
const_iterator | beginRemainderCoefficients (size_type j) const |
iterator | beginMatrixCoefficients (size_type j) |
const_iterator | beginMatrixCoefficients (size_type j) const |
iterator | beginMatrixRemainderCoefficients (size_type j) |
const_iterator | beginMatrixRemainderCoefficients (size_type j) const |
iterator | endCenterCoefficients (size_type j) |
const_iterator | endCenterCoefficients (size_type j) const |
iterator | endCoefficients (size_type j) |
const_iterator | endCoefficients (size_type j) const |
iterator | endRemainderCoefficients (size_type j) |
const_iterator | endRemainderCoefficients (size_type j) const |
iterator | endMatrixCoefficients (size_type j) |
const_iterator | endMatrixCoefficients (size_type j) const |
iterator | endMatrixRemainderCoefficients (size_type j) |
const_iterator | endMatrixRemainderCoefficients (size_type j) const |
void | setInitMatrix (const MatrixType &) |
void | setInitHessian (const HessianType &) |
void | setInitJet (const JetType &) |
std::runtime_error | domainErrorMessage (std::string msg, ScalarType h, Real left, Real right) const |
virtual HessianType | hessian (const ScalarType &) const |
virtual JetType | jet (const ScalarType &) const |
virtual void | eval (ScalarType, JetType &) const |
virtual void | setDomain (Real left, Real right) |
virtual Real | getLeftDomain () const |
virtual Real | getRightDomain () const |
Static Public Member Functions | |
static TolScalarType | getEffectiveTolerance (Solver &solver, const SetType &s) |
Protected Member Functions | |
void | saveCurrentSet (const capd::diffAlgebra::TimeRange< ScalarType > &) |
void | saveCurrentSet (const capd::dynset::C1Set< MatrixType > &set) |
void | operator= (const OdeSolver &) |
OdeSolver (const OdeSolver &t) | |
void | setCurrentTime (const ScalarType &a_time) const |
const ScalarType & | getCurrentTime () const |
const bool * | getMask () const |
bool | getMask (size_type j) const |
void | computeTimeStep (VectorType &v) |
void | sumTaylorSeries (VectorType &v, VectorType *coeff, size_type order) |
void | sumTaylorSeries (VectorType &v, MatrixType &der, VectorType *coeff, MatrixType *matrixCoeff, size_type order) |
void | allocate () |
void | deallocate () |
void | copyData (const BasicCurve &c) |
Protected Attributes | |
CurveT | implicitCurve |
an extra storage for Taylor coefficients used in implicit HO-method More... | |
VectorFieldType * | m_vField |
we do not allow copying of objects More... | |
ScalarType | m_fixedTimeStep |
ScalarType | m_step |
StepControlType | m_stepControl |
bool | m_onOffStepControl |
TolScalarType | m_absoluteTolerance |
TolScalarType | m_relativeTolerance |
MapT::ScalarType | m_maxStep |
VectorType * | m_coefficientsAtCenter |
VectorType * | m_coefficients |
VectorType * | m_remainderCoefficients |
MatrixType * | m_matrixCoefficients |
MatrixType * | m_matrixRemainderCoefficients |
size_type | m_order |
size_type | m_allocatedOrder |
size_type | m_dimension |
Real | m_left |
Real | m_right |
domain More... | |
typedef BasicOdeSolver<MapT,StepControlPolicy,CurveT> capd::dynsys::OdeSolver< MapT, StepControlPolicyT, EnclosurePolicy, CurveT >::BaseTaylor |
typedef diffAlgebra::C1TimeJet<MatrixType> capd::dynsys::OdeSolver< MapT, StepControlPolicyT, EnclosurePolicy, CurveT >::C1TimeJetType |
|
inherited |
|
inherited |
typedef MapT::FunctionType capd::dynsys::OdeSolver< MapT, StepControlPolicyT, EnclosurePolicy, CurveT >::FunctionType |
|
inherited |
|
inherited |
|
inherited |
typedef VectorFieldType::MatrixType capd::dynsys::OdeSolver< MapT, StepControlPolicyT, EnclosurePolicy, CurveT >::MatrixType |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
typedef MatrixType::ScalarType capd::dynsys::OdeSolver< MapT, StepControlPolicyT, EnclosurePolicy, CurveT >::ScalarType |
typedef MatrixType::size_type capd::dynsys::OdeSolver< MapT, StepControlPolicyT, EnclosurePolicy, CurveT >::size_type |
|
inherited |
typedef StepControlPolicyT capd::dynsys::OdeSolver< MapT, StepControlPolicyT, EnclosurePolicy, CurveT >::StepControlPolicy |
|
inherited |
typedef MapT capd::dynsys::OdeSolver< MapT, StepControlPolicyT, EnclosurePolicy, CurveT >::VectorFieldType |
typedef MatrixType::RowVectorType capd::dynsys::OdeSolver< MapT, StepControlPolicyT, EnclosurePolicy, CurveT >::VectorType |
capd::dynsys::OdeSolver< MapType, StepControlPolicy, EnclosurePolicy, CurveType >::OdeSolver | ( | VectorFieldType & | vField, |
size_type | order, | ||
const StepControlPolicy & | stepControl = StepControlPolicy() |
||
) |
|
inlineprotected |
|
inlineinherited |
Adds new multiindex (along with dependencies) to the existing mask.
mi | multiindex to be added to the mask |
|
inlineinherited |
sets time step but does not change step control settings (compare setStep)
|
protectedinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
sets all coefficients to zero
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotectedinherited |
|
protectedinherited |
|
protectedinherited |
|
virtualinherited |
|
inlineinherited |
|
inlineinherited |
|
pure virtualinherited |
For given set xx, time t and a point x from the set xx It simultaneously computes and returns enclosures for:
void capd::dynsys::OdeSolver< MapType, StepControlPolicy, EnclosurePolicy, CurveType >::encloseC0Map | ( | const ScalarType & | t, |
const VectorType & | x0, | ||
const VectorType & | x, | ||
VectorType & | o_phi, | ||
VectorType & | o_rem, | ||
VectorType & | o_enc, | ||
MatrixType & | o_jacPhi | ||
) |
|
pure virtualinherited |
void capd::dynsys::OdeSolver< MapType, StepControlPolicy, EnclosurePolicy, CurveType >::encloseC1Map | ( | const ScalarType & | t, |
const VectorType & | x0, | ||
const VectorType & | x, | ||
VectorType & | o_phi, | ||
VectorType & | o_rem, | ||
VectorType & | o_enc, | ||
MatrixType & | o_jacPhi, | ||
MatrixType & | o_jacRem, | ||
MatrixType & | o_jacEnc | ||
) |
|
virtual |
Used for ODEs. It verifies the existence of solutions to IVP at time t and set of initial conditions x over the time step. If the function succeeds, a rigorous bound for the trajectories is returned. Otherwise, an exception is thrown.
Implements capd::dynsys::DynSys< MapT::MatrixType >.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinevirtualinherited |
|
inlineinherited |
|
inlineinherited |
Returns maximal allocated order - used to avoid memory reallocation.
|
inherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
virtualinherited |
OdeSolver< MapType, StepControlPolicy, EnclosurePolicy, CurveType >::ScalarType capd::dynsys::OdeSolver< MapType, StepControlPolicy, EnclosurePolicy, CurveType >::getCoeffNorm | ( | size_type | r, |
size_type | degree | ||
) | const |
|
inlineprotectedinherited |
|
inherited |
|
inlinestaticinherited |
|
inline |
|
inlinevirtualinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Returns the order of Taylor interpolation.
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inlinevirtualinherited |
|
inlineinherited |
Returns the time step made in the last call to this solver.
|
inlinevirtualinherited |
Returns time step of the dynamical system. By default it returns one - time step for discrete DS (maps). Shall be overridden in classes that implement numerical schemes for ODEs.
|
inline |
|
inlineinherited |
|
inherited |
|
inlineinherited |
Returns vector field.
|
inlinevirtualinherited |
|
inline |
|
inlineinherited |
|
virtual |
Computes derivative of function (usually numerical scheme for an ODE) at time t and point iv.
Implements capd::dynsys::DynSys< MapT::MatrixType >.
|
inlinevirtualinherited |
|
virtualinherited |
this function returns Lipschitz contants for maps. It should be overriden in classes implementing flows.
|
inlineinherited |
|
virtualinherited |
|
inlineinherited |
This operator computes image of the set (in given representation) using set.move function, see capd/dynsys/Move.h for details This template together with SetTraits prevent usage of various types of jets with incompatible solvers. The user will get an exception at runtime with clear message instead of unreadable compiler error. In this case a specialization C1JetMove is used meaning that this solver can integrate C^0 and C^1 jets only.
|
inlineinherited |
Computes image of vector v and derivatives of the flow with respect to init condition (v,identity). Version for nonautonomous systems. The argument t is updated in this procedure.
|
inlineinherited |
Computes image of vector v after one time step. The argument t is updated in this procedure.
|
inlineinherited |
Computes image of vector v and derivatives of a flow with respect to init condition (v, derivative). The argument t is updated in this procedure.
|
inline |
This operator computes image of the set (in given representation) using set.move function, see capd/dynsys/Move.h for details This template together with SetTraits prevent usage of various types of jets with incompatible solvers. The user will get an exception at runtime with clear message instead of unreadable compiler error. In this case a specialization C1SetMove is used meaning that this solver can integrate C^0 and C^1 sets only. Moreover, it cannot integrate nonrigorous jets (for user safety).
|
inline |
Computes image of the set (in set's representation) and stores it in the result set.
[in] | set | C^0 or C^1 set representing initial conditions |
[out] | result | on return contains image of the set |
|
inherited |
Computes image of vector v after one time step.
|
inherited |
Computes image of vector v and derivatives of a flow with respect to init condition (v, derivative)
|
inherited |
Computes image of vector v and derivatives of the flow with respect to init condition (v,identity). Version for autonomous systems.
|
inlineprotected |
|
inlinevirtualinherited |
|
virtual |
Computes value of function (usually numerical scheme for an ODE) at time t and point iv.
Implements capd::dynsys::DynSys< MapT::MatrixType >.
|
virtual |
Computes and returns bound for local error of a function (for instance if Phi is finite Taylor series of a map then this method computes bound for Lagrange remainder). If DynSys is an ODE, then out_enc contains enclosure of trajectories over the time step. If the function cannot validate existence of solutions to ODE over the time step, out_enc might be in an inconsistent state.
Implements capd::dynsys::DynSys< MapT::MatrixType >.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Resets the mask of derivatives.
In consequence, full jet of derivatives will be computed after call to any method that computes derivative, hessian or jet.
|
inlineprotected |
|
inlineprotected |
|
inlineinherited |
|
inlineprotectedinherited |
|
inlinevirtualinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
The iterator range [b,e) should contain a range of Multiinideces the user requires to compute.
The method automatically adds all the depending partial derivatives to this collection and defines a mask for computation of partial derivtives.
[b,e) | iterator range which contains collection of multiindices |
|
inlineinherited |
void capd::dynsys::OdeSolver< MapType, StepControlPolicy, EnclosurePolicy, CurveT >::setOrder | ( | size_type | order | ) |
Sets the order of the Taylor method.
|
virtualinherited |
Sets the order of the Taylor method.
Reimplemented from capd::diffAlgebra::BasicCurve< typename MapT::MatrixType >.
|
inlineinherited |
|
inlineinherited |
Sets fixed time step and turns off step control.
|
inlineinherited |
|
protectedinherited |
|
inlineprotectedinherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
|
protected |
an extra storage for Taylor coefficients used in implicit HO-method
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
domain
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
we do not allow copying of objects