Orrery
A GPU-accelerated N-body gravitational simulator
Loading...
Searching...
No Matches
assembly.hpp
Go to the documentation of this file.
1#pragma once
2
28
29#include <iosfwd>
30#include <memory>
31
39
40namespace orrery::sim {
41
47[[nodiscard]] core::ParticleData make_initial_conditions(const Configuration& configuration);
48
60[[nodiscard]] core::Index primary_galaxy_count(const Configuration& configuration);
61
62[[nodiscard]] std::unique_ptr<integrators::Integrator>
63make_integrator(const Configuration& configuration);
64
70[[nodiscard]] std::unique_ptr<backend::Executor> make_executor(const Configuration& configuration);
71
80[[nodiscard]] std::unique_ptr<solvers::ForceSolver>
81make_solver(const Configuration& configuration, backend::Executor* executor, std::ostream& report);
82
88[[nodiscard]] Simulation assemble(const Configuration& configuration,
89 std::unique_ptr<RunOutput> output, std::ostream& report);
90
91} // namespace orrery::sim
core::ParticleData make_initial_conditions(const Configuration &configuration)
Sample or construct the configuration the run starts from.
std::unique_ptr< backend::Executor > make_executor(const Configuration &configuration)
The scheduler the CPU solvers divide their work with.
Simulation assemble(const Configuration &configuration, std::unique_ptr< RunOutput > output, std::ostream &report)
Everything above, assembled into a run that has not yet taken a step.
core::Index primary_galaxy_count(const Configuration &configuration)
How many of the particles belong to the first of a collision's two galaxies.
std::unique_ptr< solvers::ForceSolver > make_solver(const Configuration &configuration, backend::Executor *executor, std::ostream &report)
The solver, given the executor it will refer to.
Something that can run a loop body over a range, possibly in parallel.
Definition executor.hpp:52
Storage for a set of point masses in structure-of-arrays layout.
Definition particle_data.hpp:43
A gravitational simulation in progress.
Definition simulation.hpp:56
Everything a run is, as data.
How a kernel asks for a loop to be run in parallel.
What every gravitational force solver in this project provides.
The interface every time integrator presents, and the contract about accelerations that makes the che...
The particle store: one contiguous array per component.
Where a run's results go, behind one interface so that the simulation does not know.
The object that owns a run.
A whole run, as data.
Definition configuration.hpp:332
std::size_t Index
The type of a particle index and of any count of particles.
Definition types.hpp:45