12 #include <boost/numeric/odeint.hpp> 14 #include "eigenIntegration.h" 33 template <
size_t POS_DIM,
size_t VEL_DIM,
size_t CONTROL_DIM,
class Stepper,
typename SCALAR =
double>
37 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
38 typedef typename std::pair<Eigen::Matrix<SCALAR, POS_DIM, 1>, Eigen::Matrix<SCALAR, VEL_DIM, 1>>
pair_t;
60 const EventHandlerPtr& eventHandler);
107 std::function<void(const Eigen::Matrix<SCALAR, POS_DIM, 1>&, Eigen::Matrix<SCALAR, POS_DIM, 1>&)>
108 systemFunctionPosition_;
109 std::function<void(const Eigen::Matrix<SCALAR, VEL_DIM, 1>&, Eigen::Matrix<SCALAR, VEL_DIM, 1>&)>
110 systemFunctionVelocity_;
112 std::shared_ptr<SymplecticSystem<POS_DIM, VEL_DIM, CONTROL_DIM, SCALAR>> systemSymplectic_;
124 template <
size_t POS_DIM,
size_t VEL_DIM,
size_t CONTROL_DIM,
typename SCALAR =
double>
128 template <
size_t POS_DIM,
size_t VEL_DIM,
size_t CONTROL_DIM,
typename SCALAR =
double>
std::vector< EventHandlerPtr, Eigen::aligned_allocator< EventHandlerPtr > > EventHandlerPtrVector
Definition: IntegratorSymplectic.h:41
An discrete array (vector) of a particular data type.
Definition: DiscreteArray.h:22
void reset()
Definition: IntegratorSymplectic-impl.h:83
std::shared_ptr< EventHandler< POS_DIM+VEL_DIM, SCALAR > > EventHandlerPtr
Definition: IntegratorSymplectic.h:40
void integrate_n_steps(StateVector< POS_DIM+VEL_DIM, SCALAR > &state, const SCALAR &startTime, size_t numSteps, SCALAR dt, StateVectorArray< POS_DIM+VEL_DIM, SCALAR > &stateTrajectory, tpl::TimeArray< SCALAR > &timeTrajectory)
Equidistant integration based on number of time steps and step length.
Definition: IntegratorSymplectic-impl.h:32
CppAD::AD< CppAD::cg::CG< double > > SCALAR
An array in time.
Definition: TimeArray.h:22
This class wraps the symplectic integrators from boost to this toolbox.
Definition: IntegratorSymplectic.h:34
IntegratorSymplectic(const std::shared_ptr< SymplecticSystem< POS_DIM, VEL_DIM, CONTROL_DIM, SCALAR >> system, const EventHandlerPtrVector &eventHandlers=EventHandlerPtrVector(0))
The constructor. This integrator can only treat symplectic systems.
Definition: IntegratorSymplectic-impl.h:13
The base class for the implementation of a symplectic system. In a symplectic system, the position and the velocity update can be separated. During integration, the velocity gets update first and the position update uses the updated velocity.
Definition: SymplecticSystem.h:25
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef std::pair< Eigen::Matrix< SCALAR, POS_DIM, 1 >, Eigen::Matrix< SCALAR, VEL_DIM, 1 > > pair_t
Definition: IntegratorSymplectic.h:38