Orrery
A GPU-accelerated N-body gravitational simulator
Loading...
Searching...
No Matches
orrery::integrators::Integrator Class Referenceabstract

A method for advancing particle positions and velocities through time. More...

#include <orrery/integrators/integrator.hpp>

Inheritance diagram for orrery::integrators::Integrator:
orrery::integrators::RungeKutta4 orrery::integrators::VelocityVerlet orrery::integrators::Yoshida4

Public Member Functions

virtual void step (core::ParticleData &data, core::Real timestep, AccelerationField &field)=0
 Advance the configuration by one step of timestep.
virtual std::string_view name () const noexcept=0
 The method's name, for diagnostics output and test messages.
virtual int order () const noexcept=0
 The order of the method: the power of the timestep that the error after a fixed interval of simulated time falls with.
virtual bool is_symplectic () const noexcept=0
 Whether the method preserves the phase-space volume of the flow.
virtual core::Index force_evaluations_per_step () const noexcept=0
 How many times step calls the acceleration field.

Protected Member Functions

 Integrator (const Integrator &)=default
 Integrator (Integrator &&)=default
Integrator & operator= (const Integrator &)=default
Integrator & operator= (Integrator &&)=default

Detailed Description

A method for advancing particle positions and velocities through time.

Member Function Documentation

◆ step()

virtual void orrery::integrators::Integrator::step ( core::ParticleData & data,
core::Real timestep,
AccelerationField & field )
pure virtual

Advance the configuration by one step of timestep.

Requires the invariant above and restores it. A negative timestep is meaningful and is not an error: the symmetric methods here are exactly time-reversible, and stepping backwards is how a test asserts it.

Implemented in orrery::integrators::RungeKutta4, orrery::integrators::VelocityVerlet, and orrery::integrators::Yoshida4.

◆ name()

virtual std::string_view orrery::integrators::Integrator::name ( ) const
nodiscardpure virtualnoexcept

The method's name, for diagnostics output and test messages.

Implemented in orrery::integrators::RungeKutta4, orrery::integrators::VelocityVerlet, and orrery::integrators::Yoshida4.

◆ order()

virtual int orrery::integrators::Integrator::order ( ) const
nodiscardpure virtualnoexcept

The order of the method: the power of the timestep that the error after a fixed interval of simulated time falls with.

Implemented in orrery::integrators::RungeKutta4, orrery::integrators::VelocityVerlet, and orrery::integrators::Yoshida4.

◆ is_symplectic()

virtual bool orrery::integrators::Integrator::is_symplectic ( ) const
nodiscardpure virtualnoexcept

Whether the method preserves the phase-space volume of the flow.

The property that decides whether the energy error stays inside a bounded envelope for ever or grows without limit, which for a simulation run over millions of steps matters more than the order does. ADR-0011 sets out the argument and the validation suite demonstrates it.

Implemented in orrery::integrators::RungeKutta4, orrery::integrators::VelocityVerlet, and orrery::integrators::Yoshida4.

◆ force_evaluations_per_step()

virtual core::Index orrery::integrators::Integrator::force_evaluations_per_step ( ) const
nodiscardpure virtualnoexcept

How many times step calls the acceleration field.

The honest unit of cost for comparing methods. Two schemes compared at equal timestep are not compared at equal work, and this is the number that converts between them.

Implemented in orrery::integrators::RungeKutta4, orrery::integrators::VelocityVerlet, and orrery::integrators::Yoshida4.


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