Orrery
A GPU-accelerated N-body gravitational simulator
Loading...
Searching...
No Matches
orrery::sim::SolverSettings Struct Reference

Which solver, and the parameters that decide what it computes. More...

#include <orrery/sim/configuration.hpp>

Public Attributes

SolverKind kind = SolverKind::kBarnesHut
core::Real softening = 0
 The Plummer softening length, in the units of the configuration.
core::Real opening_angle = static_cast<core::Real>(0.5)
 The Barnes-Hut opening angle, ignored by the direct solvers.
core::Index leaf_capacity = 32
bool quadrupole = false
ExecutorKind executor = ExecutorKind::kWorkStealing
unsigned threads = 0
 How many workers the executor runs with. Zero means one per core.
bool allow_cpu_fallback = true
 Whether a run may fall back to the CPU when the GPU it asked for is absent.

Friends

bool operator== (const SolverSettings &, const SolverSettings &)=default

Detailed Description

Which solver, and the parameters that decide what it computes.

Member Data Documentation

◆ softening

core::Real orrery::sim::SolverSettings::softening = 0

The Plummer softening length, in the units of the configuration.

Zero, meaning exact point masses, is the default for the reason solvers/direct_solver.hpp sets out at length: the right length is a property of the configuration rather than of the kernel, published rules of thumb for it differ by an order of magnitude, and a default that quietly softened would make the analytic comparisons approximate without saying so.

◆ allow_cpu_fallback

bool orrery::sim::SolverSettings::allow_cpu_fallback = true

Whether a run may fall back to the CPU when the GPU it asked for is absent.

True by default, which is what a person running a configuration file on a laptop without a usable device wants: the same physics, computed more slowly, with a line on the terminal saying so. A measurement that must not be taken on the wrong processor sets it false and gets a run that refuses to start rather than a figure attributed to hardware that did not produce it.


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