Orrery
A GPU-accelerated N-body gravitational simulator
Toggle main menu visibility
Loading...
Searching...
No Matches
reference_kernel.hpp
Go to the documentation of this file.
1
#pragma once
2
43
44
#include <span>
45
46
#include "
orrery/core/softening.hpp
"
47
#include "
orrery/core/types.hpp
"
48
#include "
orrery/core/vec3_span.hpp
"
49
50
namespace
orrery::solvers {
51
58
struct
ReferenceAcceleration
{
59
double
x{};
60
double
y{};
61
double
z{};
62
};
63
73
[[nodiscard]]
ReferenceAcceleration
74
reference_acceleration
(
core::Vec3Span<const core::Real>
positions,
75
std::span<const core::Real> masses,
core::Index
target,
76
core::Softening
softening);
77
78
}
// namespace orrery::solvers
orrery::core::Softening
The softening length of the Plummer kernel above.
Definition
softening.hpp:49
orrery::solvers::reference_acceleration
ReferenceAcceleration reference_acceleration(core::Vec3Span< const core::Real > positions, std::span< const core::Real > masses, core::Index target, core::Softening softening)
The acceleration on particle target, from every other particle.
softening.hpp
Plummer softening, defined once for everything that needs it.
orrery::core::Vec3Span
A view of three component arrays of equal length.
Definition
vec3_span.hpp:33
orrery::solvers::ReferenceAcceleration
An acceleration in double precision, whatever the build's scalar type is.
Definition
reference_kernel.hpp:58
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
vec3_span.hpp
Three parallel component arrays, viewed as one sequence of 3-vectors.
orrery
solvers
reference_kernel.hpp
Generated by
1.17.0