59template <concepts::multi_variate_problem Problem>
61 :
public formula_base<leap_frog_formula<Problem>, Problem> {
70 using base_type::base_type;
73 static_assert(!problem_type::allowed_evaluations.mass,
74 "Mass matrix is not supported.");
88 "num_collect::ode::symplectic::leap_frog_formula");
96 "This formula requires vectors with even dimensions.");
102 problem().evaluate_on(time, estimate, evaluations);
106 problem().evaluate_on(time, estimate, evaluations);
107 estimate.tail(half_dim) +=
108 step_size *
problem().diff_coeff().tail(half_dim);
110 problem().evaluate_on(time, estimate, evaluations);
112 problem().diff_coeff().head(half_dim);
139template <concepts::problem Problem>
Class of tags of logs without memory management.
Class of simple solver of ODEs.
Definition of evaluation_type enumeration.
Definition of exceptions.
Definition of index_type type.
Definition of log_tag_view class.
Definition of macros for logging.
Definition of multi_variate_problem concept.
std::ptrdiff_t index_type
Type of indices in this library.
constexpr T half
Value 0.5.
Namespace of symplectic integration.
Definition of NUM_COLLECT_PRECONDITION macro.
#define NUM_COLLECT_PRECONDITION(CONDITION,...)
Check whether a precondition is satisfied and throw an exception if not.
Definition of problem concept.
Definition of simple_solver class.
Struct to specify types of evaluations.
bool diff_coeff
Differential coefficient.