Orrery
A GPU-accelerated N-body gravitational simulator
Loading...
Searching...
No Matches
yoshida4.hpp
Go to the documentation of this file.
1#pragma once
2
33
34#include <string_view>
35
37#include "orrery/core/types.hpp"
40
41namespace orrery::integrators {
42
44class Yoshida4 final : public Integrator {
45public:
46 void step(core::ParticleData& data, core::Real timestep, AccelerationField& field) override;
47
48 [[nodiscard]] std::string_view name() const noexcept override { return "Yoshida 4"; }
49
50 [[nodiscard]] int order() const noexcept override { return 4; }
51
52 [[nodiscard]] bool is_symplectic() const noexcept override { return true; }
53
54 [[nodiscard]] core::Index force_evaluations_per_step() const noexcept override { return 3; }
55};
56
57} // namespace orrery::integrators
What an integrator is allowed to know about gravity.
Storage for a set of point masses in structure-of-arrays layout.
Definition particle_data.hpp:43
The acceleration produced by a set of masses at a set of positions.
Definition acceleration_field.hpp:37
The fourth-order symplectic composition described above.
Definition yoshida4.hpp:44
bool is_symplectic() const noexcept override
Whether the method preserves the phase-space volume of the flow.
Definition yoshida4.hpp:52
core::Index force_evaluations_per_step() const noexcept override
How many times step calls the acceleration field.
Definition yoshida4.hpp:54
std::string_view name() const noexcept override
The method's name, for diagnostics output and test messages.
Definition yoshida4.hpp:48
void step(core::ParticleData &data, core::Real timestep, AccelerationField &field) override
Advance the configuration by one step of timestep.
int order() const noexcept override
The order of the method: the power of the timestep that the error after a fixed interval of simulated...
Definition yoshida4.hpp:50
The interface every time integrator presents, and the contract about accelerations that makes the che...
The particle store: one contiguous array per component.
The scalar and index types that every layer of the project agrees on.
std::size_t Index
The type of a particle index and of any count of particles.
Definition types.hpp:45