58template <concepts::multi_variate_problem Problem>
60 :
public formula_base<symplectic_forest4_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::symplectic_forest4_formula");
121 "This formula requires vectors with even dimensions.");
127 problem().evaluate_on(time, estimate, evaluations);
128 estimate.head(half_dim) +=
131 problem().evaluate_on(time, estimate, evaluations);
132 estimate.tail(half_dim) +=
133 step_size *
bq1 *
problem().diff_coeff().tail(half_dim);
135 problem().evaluate_on(time, estimate, evaluations);
136 estimate.head(half_dim) +=
137 step_size *
bp2 *
problem().diff_coeff().head(half_dim);
139 problem().evaluate_on(time, estimate, evaluations);
140 estimate.tail(half_dim) +=
141 step_size *
bq2 *
problem().diff_coeff().tail(half_dim);
143 problem().evaluate_on(time, estimate, evaluations);
144 estimate.head(half_dim) +=
145 step_size *
bp3 *
problem().diff_coeff().head(half_dim);
147 problem().evaluate_on(time, estimate, evaluations);
148 estimate.tail(half_dim) +=
149 step_size *
bq3 *
problem().diff_coeff().tail(half_dim);
151 problem().evaluate_on(time, estimate, evaluations);
152 estimate.head(half_dim) +=
153 step_size *
bp4 *
problem().diff_coeff().head(half_dim);
179template <concepts::problem Problem>
Definition of cbrt function.
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 auto cbrt(T x)
Calculate cubic root .
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.