|
order_type | order (void) const |
|
| velocity_verlet (const algebra_type &algebra=algebra_type()) |
| Constructs the velocity_verlet class. More...
|
|
template<class System , class StateInOut > |
void | do_step (System system, StateInOut &x, time_type t, time_type dt) |
| This method performs one step. More...
|
|
template<class System , class StateInOut > |
void | do_step (System system, const StateInOut &x, time_type t, time_type dt) |
| This method performs one step. More...
|
|
template<class System , class CoorIn , class VelocityIn , class AccelerationIn , class CoorOut , class VelocityOut , class AccelerationOut > |
void | do_step (System system, CoorIn const &qin, VelocityIn const &pin, AccelerationIn const &ain, CoorOut &qout, VelocityOut &pout, AccelerationOut &aout, time_type t, time_type dt) |
| This method performs one step. More...
|
|
template<class StateIn > |
void | adjust_size (const StateIn &x) |
| Adjust the size of all temporaries in the stepper manually. More...
|
|
void | reset (void) |
| Resets the internal state of this stepper. More...
|
|
template<class AccelerationIn > |
void | initialize (const AccelerationIn &ain) |
| Initializes the internal state of the stepper. More...
|
|
template<class System , class CoorIn , class VelocityIn > |
void | initialize (System system, const CoorIn &qin, const VelocityIn &pin, time_type t) |
| Initializes the internal state of the stepper. More...
|
|
bool | is_initialized (void) const |
|
algebra_type & | algebra () |
|
const algebra_type & | algebra () const |
|
template<class Coor, class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
class boost::numeric::odeint::velocity_verlet< Coor, Velocity, Value, Acceleration, Time, TimeSq, Algebra, Operations, Resizer >
The Velocity-Verlet algorithm.
The Velocity-Verlet algorithm is a method for simulation of molecular dynamics systems. It solves the ODE a=f(r,v',t) where r are the coordinates, v are the velocities and a are the accelerations, hence v = dr/dt, a=dv/dt.
- Template Parameters
-
Coor | The type representing the coordinates. |
Velocity | The type representing the velocities. |
Value | The type value type. |
Acceleration | The type representing the acceleration. |
Time | The time representing the independent variable - the time. |
TimeSq | The time representing the square of the time. |
Algebra | The algebra. |
Operations | The operations type. |
Resizer | The resizer policy type. |
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
Constructs the velocity_verlet class.
This constructor can be used as a default constructor if the algebra has a default constructor.
- Parameters
-
algebra | A copy of algebra is made and stored. |
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
template<class StateIn >
Adjust the size of all temporaries in the stepper manually.
- Parameters
-
x | A state from which the size of the temporaries to be resized is deduced. |
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
template<class System , class StateInOut >
boost::numeric::odeint::velocity_verlet< Coor, Velocity, Value, Acceleration, Time, TimeSq, Algebra, Operations, Resizer >::do_step |
( |
System |
system, |
|
|
StateInOut & |
x, |
|
|
time_type |
t, |
|
|
time_type |
dt |
|
) |
| |
|
inline |
This method performs one step.
It transforms the result in-place.
It can be used like
pair< coordinates , velocities >
state;
stepper.do_step( sys ,
x , t , dt );
- Parameters
-
system | The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fulfill the Second Order System concept. |
x | The state of the ODE which should be solved. The state is pair of Coor and Velocity. |
t | The value of the time, at which the step should be performed. |
dt | The step size. |
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
template<class System , class StateInOut >
boost::numeric::odeint::velocity_verlet< Coor, Velocity, Value, Acceleration, Time, TimeSq, Algebra, Operations, Resizer >::do_step |
( |
System |
system, |
|
|
const StateInOut & |
x, |
|
|
time_type |
t, |
|
|
time_type |
dt |
|
) |
| |
|
inline |
This method performs one step.
It transforms the result in-place.
It can be used like
pair< coordinates , velocities >
state;
stepper.do_step( sys ,
x , t , dt );
- Parameters
-
system | The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fulfill the Second Order System concept. |
x | The state of the ODE which should be solved. The state is pair of Coor and Velocity. |
t | The value of the time, at which the step should be performed. |
dt | The step size. |
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
template<class System , class CoorIn , class VelocityIn , class AccelerationIn , class CoorOut , class VelocityOut , class AccelerationOut >
boost::numeric::odeint::velocity_verlet< Coor, Velocity, Value, Acceleration, Time, TimeSq, Algebra, Operations, Resizer >::do_step |
( |
System |
system, |
|
|
CoorIn const & |
qin, |
|
|
VelocityIn const & |
pin, |
|
|
AccelerationIn const & |
ain, |
|
|
CoorOut & |
qout, |
|
|
VelocityOut & |
pout, |
|
|
AccelerationOut & |
aout, |
|
|
time_type |
t, |
|
|
time_type |
dt |
|
) |
| |
|
inline |
This method performs one step.
It transforms the result in-place. Additionally to the other methods the coordinates, velocities and accelerations are passed directly to do_step and they are transformed out-of-place.
It can be used like
coordinates qin , qout;
velocities pin , pout;
accelerations ain, aout;
stepper.do_step( sys , qin , pin , ain , qout , pout , aout , t , dt );
- Parameters
-
system | The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fulfill the Second Order System concept. |
x | The state of the ODE which should be solved. The state is pair of Coor and Velocity. |
t | The value of the time, at which the step should be performed. |
dt | The step size. |
References boost::numeric::odeint::algebra_stepper_base< Algebra, Operations >::m_algebra, template, and boost::detail::type.
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
template<class AccelerationIn >
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
template<class System , class CoorIn , class VelocityIn >
boost::numeric::odeint::velocity_verlet< Coor, Velocity, Value, Acceleration, Time, TimeSq, Algebra, Operations, Resizer >::initialize |
( |
System |
system, |
|
|
const CoorIn & |
qin, |
|
|
const VelocityIn & |
pin, |
|
|
time_type |
t |
|
) |
| |
|
inline |
Initializes the internal state of the stepper.
This method is equivalent to
- Parameters
-
system | The system function for the next calls of do_step . |
qin | The current coordinates of the ODE. |
pin | The current velocities of the ODE. |
t | The current time of the ODE. |
References boost::numeric::odeint::detail::_1, boost::bind(), boost::ref(), and template.
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
- Returns
- Returns if the stepper is initialized.
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
Resets the internal state of this stepper.
After calling this method it is safe to use all do_step
method without explicitly initializing the stepper.
template<class Coor , class Velocity = Coor, class Value = double, class Acceleration = Coor, class Time = Value, class TimeSq = Time, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>