CAPD DynSys Library  5.2.0
capd::dynsys::LorenzFadMap< Scalar, D > Class Template Reference

Sample implementation of FadMap. This class implements the vector field for the Lorenz system. Template parameters are: Scalar: double, interval, MpFloat, MpInterval, etc. D: in this case either 3 or 0. If D=3 then vectors and matrices are allocated on stack and the computations are much faster but we must know they dimension at compile time. This forces separate compilation of all the classes like vectors and matrices for this particular dimension. D=0 means that vectors and matrices are allocated on the storage and they can be of arbitrary dimension specified at runtime. More...

#include <capd/dynsys/FadMap.h>

Public Types

typedef capd::dynsys::FadMap< Scalar, D >::HessianType HessianType
 
typedef capd::dynsys::FadMap< Scalar, D >::MatrixType MatrixType
 
typedef capd::dynsys::FadMap< Scalar, D >::VectorType VectorType
 
typedef FadFunction< VectorTypeFunctionType
 
typedef Scalar ScalarType
 

Public Member Functions

 LorenzFadMap ()
 
 LorenzFadMap (Scalar _s, Scalar _r, Scalar _q)
 
template<typename AVector >
AVector operator() (const AVector &in) const
 This operator computes vector field of the Lorenz system. More...
 
template<typename TimeT , typename AVector >
AVector operator() (const TimeT &, const AVector &in) const
 This operator computes vector field of the Lorenz system. The system is autonomous, but the operator must have two arguments in order to fit requested signature. More...
 
MatrixType derivative (const Scalar &t, const VectorType &u) const
 This operator should compute derivative of the vector field. One can specify own implementation or use in the implementation a template function computeDerivative from file differentiate.h (as in the example of the Lorenz system below) which performs FAD to compute derivative of a map. More...
 
VectorType operator() (Scalar t, const VectorType &x, MatrixType &o_der) const
 computes simultaneously value and derivative of the map for a given vector and time More...
 
MatrixType operator[] (const VectorType &u) const
 For backward compatibility. It computes derivative of the vector field for an autonomous vector field. More...
 
void setParameter (int i, Scalar value)
 
unsigned dimension () const
 
template<typename Description >
void setParameter (Description, Scalar)
 This function should set parameter value of the vector field as a Description we may use integers or strings, etc. More...
 
unsigned dimension ()
 You must implement this method. It must return the dimension of the phase space. More...
 
unsigned degree ()
 Maximal order of spacial derivatives that this map can compute. More...
 

Public Attributes

std::vector< Scalarparameters
 

Detailed Description

template<class Scalar, unsigned D>
class capd::dynsys::LorenzFadMap< Scalar, D >

Sample implementation of FadMap. This class implements the vector field for the Lorenz system. Template parameters are: Scalar: double, interval, MpFloat, MpInterval, etc. D: in this case either 3 or 0. If D=3 then vectors and matrices are allocated on stack and the computations are much faster but we must know they dimension at compile time. This forces separate compilation of all the classes like vectors and matrices for this particular dimension. D=0 means that vectors and matrices are allocated on the storage and they can be of arbitrary dimension specified at runtime.

Member Typedef Documentation

◆ FunctionType

template<class Scalar , unsigned D>
typedef FadFunction<VectorType> capd::dynsys::LorenzFadMap< Scalar, D >::FunctionType

◆ HessianType

template<class Scalar , unsigned D>
typedef capd::dynsys::FadMap<Scalar,D>::HessianType capd::dynsys::LorenzFadMap< Scalar, D >::HessianType

◆ MatrixType

template<class Scalar , unsigned D>
typedef capd::dynsys::FadMap<Scalar,D>::MatrixType capd::dynsys::LorenzFadMap< Scalar, D >::MatrixType

◆ ScalarType

template<typename Scalar , unsigned D>
typedef Scalar capd::dynsys::FadMap< Scalar, D >::ScalarType
inherited

◆ VectorType

template<class Scalar , unsigned D>
typedef capd::dynsys::FadMap<Scalar,D>::VectorType capd::dynsys::LorenzFadMap< Scalar, D >::VectorType

Constructor & Destructor Documentation

◆ LorenzFadMap() [1/2]

template<class Scalar , unsigned D>
capd::dynsys::LorenzFadMap< Scalar, D >::LorenzFadMap ( )
inline

◆ LorenzFadMap() [2/2]

template<class Scalar , unsigned D>
capd::dynsys::LorenzFadMap< Scalar, D >::LorenzFadMap ( Scalar  _s,
Scalar  _r,
Scalar  _q 
)
inline

Member Function Documentation

◆ degree()

template<typename Scalar , unsigned D>
unsigned capd::dynsys::FadMap< Scalar, D >::degree ( )
inlineinherited

Maximal order of spacial derivatives that this map can compute.

◆ derivative()

template<class Scalar , unsigned D>
MatrixType capd::dynsys::LorenzFadMap< Scalar, D >::derivative ( const Scalar ,
const VectorType  
) const
inlinevirtual

This operator should compute derivative of the vector field. One can specify own implementation or use in the implementation a template function computeDerivative from file differentiate.h (as in the example of the Lorenz system below) which performs FAD to compute derivative of a map.

Implements capd::dynsys::FadMap< Scalar, D >.

◆ dimension() [1/2]

template<typename Scalar , unsigned D>
unsigned capd::dynsys::FadMap< Scalar, D >::dimension ( )
inlineinherited

You must implement this method. It must return the dimension of the phase space.

◆ dimension() [2/2]

template<class Scalar , unsigned D>
unsigned capd::dynsys::LorenzFadMap< Scalar, D >::dimension ( ) const
inline

◆ operator()() [1/3]

template<class Scalar , unsigned D>
template<typename AVector >
AVector capd::dynsys::LorenzFadMap< Scalar, D >::operator() ( const AVector &  in) const
inline

This operator computes vector field of the Lorenz system.

◆ operator()() [2/3]

template<class Scalar , unsigned D>
template<typename TimeT , typename AVector >
AVector capd::dynsys::LorenzFadMap< Scalar, D >::operator() ( const TimeT &  ,
const AVector &  in 
) const
inline

This operator computes vector field of the Lorenz system. The system is autonomous, but the operator must have two arguments in order to fit requested signature.

◆ operator()() [3/3]

template<class Scalar , unsigned D>
VectorType capd::dynsys::LorenzFadMap< Scalar, D >::operator() ( Scalar  t,
const VectorType x,
MatrixType o_der 
) const
inlinevirtual

computes simultaneously value and derivative of the map for a given vector and time

Implements capd::dynsys::FadMap< Scalar, D >.

◆ operator[]()

template<class Scalar , unsigned D>
MatrixType capd::dynsys::LorenzFadMap< Scalar, D >::operator[] ( const VectorType ) const
inlinevirtual

For backward compatibility. It computes derivative of the vector field for an autonomous vector field.

Implements capd::dynsys::FadMap< Scalar, D >.

◆ setParameter() [1/2]

template<typename Scalar , unsigned D>
template<typename Description >
void capd::dynsys::FadMap< Scalar, D >::setParameter ( Description  ,
Scalar   
)
inlineinherited

This function should set parameter value of the vector field as a Description we may use integers or strings, etc.

◆ setParameter() [2/2]

template<class Scalar , unsigned D>
void capd::dynsys::LorenzFadMap< Scalar, D >::setParameter ( int  i,
Scalar  value 
)
inline

Member Data Documentation

◆ parameters

template<class Scalar , unsigned D>
std::vector<Scalar> capd::dynsys::LorenzFadMap< Scalar, D >::parameters