Documentation


animal::integration::Solver_Traits_M< StateT, DerivativeT, CopyStateT, RealT, NumTraitsT, SizeTypeT > Struct Template Reference

#include <solver.h>

List of all members.


Detailed Description

template<class StateT, class DerivativeT, class CopyStateT = StateT, class RealT = double, class NumTraitsT = animal::Numerics<RealT>, class SizeTypeT = unsigned int>
struct animal::integration::Solver_Traits_M< StateT, DerivativeT, CopyStateT, RealT, NumTraitsT, SizeTypeT >

Traits class for integration algorithms.

This class extends Solver_Traits to STL-like containers of state variables.

See also:
Solver_Traits

Definition at line 341 of file solver.h.

Public Types

typedef RealT Real
 Time representation.

typedef StateT State
 Container of state variables.

typedef CopyStateT CopyState
 Internal container of state variables Some integration schemes need to store copies of state variables.

typedef DerivativeT Derivative
 Container of derivatives of state variables.

typedef NumTraitsT Numerics
 Numerical traits.

typedef SizeTypeT SizeType
 Size of containers.


Public Member Functions

template<class Container> void resize (Container &c, const unsigned int size) const
 Resize auxiliary containers.

void average (const State &s1, const State &s2, State &result) const
 Average of two states (for Modified_Midpoint only).

void rk4Step (const Derivative &d1, const Derivative &d2, const Derivative &d3, const Derivative &d4, Derivative &sum) const
 Linear combination of derivatives (for Runge_Kutta_4 only).

void copy (const State &s, CopyState &cs) const
 Copy a state to a temporary state.


Member Typedef Documentation

template<class StateT, class DerivativeT, class CopyStateT = StateT, class RealT = double, class NumTraitsT = animal::Numerics<RealT>, class SizeTypeT = unsigned int>
typedef CopyStateT animal::integration::Solver_Traits_M< StateT, DerivativeT, CopyStateT, RealT, NumTraitsT, SizeTypeT >::CopyState
 

Internal container of state variables Some integration schemes need to store copies of state variables.

A copy may be of a different type as long as operator = copies the relevant data.

Definition at line 366 of file solver.h.

template<class StateT, class DerivativeT, class CopyStateT = StateT, class RealT = double, class NumTraitsT = animal::Numerics<RealT>, class SizeTypeT = unsigned int>
typedef DerivativeT animal::integration::Solver_Traits_M< StateT, DerivativeT, CopyStateT, RealT, NumTraitsT, SizeTypeT >::Derivative
 

Container of derivatives of state variables.

Derivative must define State::value_type and State::size_type and have the following members:

  • a default constructor and a constructor specifying the size of the container ;
  • an iterator type and STL-like begin() and end() functions ;
  • a STL-like size() function.

Derivative::value_typ must have the following members:

  • a default constructor, a simple constructor and a copy constructor ;
  • the =, +, * operators.

Definition at line 382 of file solver.h.

template<class StateT, class DerivativeT, class CopyStateT = StateT, class RealT = double, class NumTraitsT = animal::Numerics<RealT>, class SizeTypeT = unsigned int>
typedef NumTraitsT animal::integration::Solver_Traits_M< StateT, DerivativeT, CopyStateT, RealT, NumTraitsT, SizeTypeT >::Numerics
 

Numerical traits.

Definition at line 385 of file solver.h.

template<class StateT, class DerivativeT, class CopyStateT = StateT, class RealT = double, class NumTraitsT = animal::Numerics<RealT>, class SizeTypeT = unsigned int>
typedef RealT animal::integration::Solver_Traits_M< StateT, DerivativeT, CopyStateT, RealT, NumTraitsT, SizeTypeT >::Real
 

Time representation.

Definition at line 344 of file solver.h.

template<class StateT, class DerivativeT, class CopyStateT = StateT, class RealT = double, class NumTraitsT = animal::Numerics<RealT>, class SizeTypeT = unsigned int>
typedef SizeTypeT animal::integration::Solver_Traits_M< StateT, DerivativeT, CopyStateT, RealT, NumTraitsT, SizeTypeT >::SizeType
 

Size of containers.

Definition at line 388 of file solver.h.

template<class StateT, class DerivativeT, class CopyStateT = StateT, class RealT = double, class NumTraitsT = animal::Numerics<RealT>, class SizeTypeT = unsigned int>
typedef StateT animal::integration::Solver_Traits_M< StateT, DerivativeT, CopyStateT, RealT, NumTraitsT, SizeTypeT >::State
 

Container of state variables.

State must define State::value_type and State::size_type and have the following members:

  • a default constructor and a constructor specifying the size of the container ;
  • an iterator type and STL-like begin() and end() functions ;
  • a STL-like size() function.

State::value_type must have the following members:

  • a default constructor, a simple constructor and a copy constructor ;
  • the =, +, * operators.

Definition at line 360 of file solver.h.


Member Function Documentation

template<class StateT, class DerivativeT, class CopyStateT = StateT, class RealT = double, class NumTraitsT = animal::Numerics<RealT>, class SizeTypeT = unsigned int>
void animal::integration::Solver_Traits_M< StateT, DerivativeT, CopyStateT, RealT, NumTraitsT, SizeTypeT >::average const State s1,
const State s2,
State result
const [inline]
 

Average of two states (for Modified_Midpoint only).

Definition at line 398 of file solver.h.

template<class StateT, class DerivativeT, class CopyStateT = StateT, class RealT = double, class NumTraitsT = animal::Numerics<RealT>, class SizeTypeT = unsigned int>
void animal::integration::Solver_Traits_M< StateT, DerivativeT, CopyStateT, RealT, NumTraitsT, SizeTypeT >::copy const State s,
CopyState cs
const [inline]
 

Copy a state to a temporary state.

Definition at line 427 of file solver.h.

template<class StateT, class DerivativeT, class CopyStateT = StateT, class RealT = double, class NumTraitsT = animal::Numerics<RealT>, class SizeTypeT = unsigned int>
template<class Container>
void animal::integration::Solver_Traits_M< StateT, DerivativeT, CopyStateT, RealT, NumTraitsT, SizeTypeT >::resize Container &  c,
const unsigned int  size
const [inline]
 

Resize auxiliary containers.

Definition at line 392 of file solver.h.

template<class StateT, class DerivativeT, class CopyStateT = StateT, class RealT = double, class NumTraitsT = animal::Numerics<RealT>, class SizeTypeT = unsigned int>
void animal::integration::Solver_Traits_M< StateT, DerivativeT, CopyStateT, RealT, NumTraitsT, SizeTypeT >::rk4Step const Derivative d1,
const Derivative d2,
const Derivative d3,
const Derivative d4,
Derivative sum
const [inline]
 

Linear combination of derivatives (for Runge_Kutta_4 only).

Definition at line 408 of file solver.h.


The documentation for this struct was generated from the following file:
Generated on Thu Dec 23 13:52:32 2004 by doxygen 1.3.6