numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
num_collect::ode::symplectic::leap_frog_formula< Problem > Class Template Reference

Class of leap-frog formula. More...

#include <num_collect/ode/symplectic/leap_frog_formula.h>

+ Inheritance diagram for num_collect::ode::symplectic::leap_frog_formula< Problem >:
+ Collaboration diagram for num_collect::ode::symplectic::leap_frog_formula< Problem >:

Public Types

using base_type = formula_base<leap_frog_formula<Problem>, Problem>
 Type of base class.
 
- Public Types inherited from num_collect::ode::formula_base< leap_frog_formula< Problem >, Problem >
using problem_type
 Type of problem.
 
using scalar_type
 Type of scalars.
 
using variable_type
 Type of variables.
 

Public Member Functions

void step (scalar_type time, scalar_type step_size, const variable_type &current, variable_type &estimate)
 Compute the next variable.
 
- Public Member Functions inherited from num_collect::ode::formula_base< leap_frog_formula< Problem >, Problem >
 formula_base (const problem_type &problem=problem_type())
 Constructor.
 
auto problem () -> problem_type &
 Get the problem.
 
auto problem () const -> const problem_type &
 Get the problem.
 
void step (scalar_type time, scalar_type step_size, const variable_type &current, variable_type &estimate)
 Compute the next variable.
 

Static Public Attributes

static constexpr auto log_tag
 Log tag.
 
static constexpr index_type order = 2
 Order of this formula.
 
static constexpr index_type stages = 3
 Number of stages of this formula.
 

Additional Inherited Members

- Protected Member Functions inherited from num_collect::ode::formula_base< leap_frog_formula< Problem >, Problem >
auto derived () const noexcept -> const leap_frog_formula< Problem > &
 Access derived object.
 
auto derived () noexcept -> leap_frog_formula< Problem > &
 Access derived object.
 
- Static Protected Member Functions inherited from num_collect::ode::formula_base< leap_frog_formula< Problem >, Problem >
static constexpr auto coeff (T val) -> scalar_type
 Convert coefficients.
 
static constexpr auto coeff (T1 num, T2 den) -> scalar_type
 Create coefficients.
 

Detailed Description

template<concepts::multi_variate_problem Problem>
class num_collect::ode::symplectic::leap_frog_formula< Problem >

Class of leap-frog formula.

This formula solves initial value problems of ODEs with following structure:

\[ \frac{d}{dt} \begin{pmatrix} \boldsymbol{p} \\ \boldsymbol{q} \end{pmatrix} = \begin{pmatrix} -\frac{\partial V}{\partial \boldsymbol{q}} \\ \frac{\partial T}{\partial \boldsymbol{p}} \end{pmatrix} \]

This formula assumes that the lower half of the solution vector is position \(\boldsymbol{q}\), and the upper half is moment \(\boldsymbol{p}\).

Note
For theoretical discussion, see [5].
Template Parameters
ProblemType of problem.

Definition at line 60 of file leap_frog_formula.h.

Member Typedef Documentation

◆ base_type

template<concepts::multi_variate_problem Problem>
using num_collect::ode::symplectic::leap_frog_formula< Problem >::base_type = formula_base<leap_frog_formula<Problem>, Problem>

Type of base class.

Definition at line 64 of file leap_frog_formula.h.

Member Function Documentation

◆ step()

template<concepts::multi_variate_problem Problem>
void num_collect::ode::symplectic::leap_frog_formula< Problem >::step ( scalar_type time,
scalar_type step_size,
const variable_type & current,
variable_type & estimate )
inline

Compute the next variable.

Parameters
[in]timeCurrent time.
[in]step_sizeStep size.
[in]currentCurrent variable.
[out]estimateEstimate of the next variable.

Definition at line 91 of file leap_frog_formula.h.

Member Data Documentation

◆ log_tag

template<concepts::multi_variate_problem Problem>
auto num_collect::ode::symplectic::leap_frog_formula< Problem >::log_tag
staticconstexpr
Initial value:
= logging::log_tag_view(
"num_collect::ode::symplectic::leap_frog_formula")

Log tag.

Definition at line 87 of file leap_frog_formula.h.

◆ order

template<concepts::multi_variate_problem Problem>
index_type num_collect::ode::symplectic::leap_frog_formula< Problem >::order = 2
staticconstexpr

Order of this formula.

Definition at line 84 of file leap_frog_formula.h.

◆ stages

template<concepts::multi_variate_problem Problem>
index_type num_collect::ode::symplectic::leap_frog_formula< Problem >::stages = 3
staticconstexpr

Number of stages of this formula.

Definition at line 81 of file leap_frog_formula.h.


The documentation for this class was generated from the following file: