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