45using Int3 = std::array<int, 3>;
46using Real3 = std::array<double, 3>;
47using Bool3 = std::array<bool, 3>;
86 const std::array<int, 3> value;
88 explicit Size3(
const std::array<int, 3> &
v) : value(
v) {
91 throw std::invalid_argument(
"Size values must be positive.");
102 const std::array<bool, 3> value;
104 explicit Periodic3(
const std::array<bool, 3> &
v) : value(
v) {}
112 const std::array<double, 3> value;
114 explicit LowerBounds3(
const std::array<double, 3> &
v) : value(
v) {}
122 const std::array<double, 3> value;
124 explicit UpperBounds3(
const std::array<double, 3> &
v) : value(
v) {}
133 :
UpperBounds3(utils::compute_upper_bounds(size, lower, spacing, periodic)) {}
141 const std::array<double, 3> value;
143 explicit Spacing3(
const std::array<double, 3> &
v) : value(
v) {
144 for (
double dim :
v) {
146 throw std::invalid_argument(
"Spacing values must be positive.");
162 :
Spacing3(utils::compute_spacing(size, lower, upper, periodic)) {}
167using Int3 = types::Int3;
168using Real3 = types::Real3;
169using Bool3 = types::Bool3;
const Real3 compute_upper_bounds(const Size3 &size, const LowerBounds3 &lower, const Spacing3 &spacing, const Periodic3 &periodic)
Computes the upper bounds based on size, lower bounds, and spacing.
std::array< int, 3 > Int3
Type aliases for clarity.
Definition types.hpp:45
Real3 compute_spacing(const Size3 &size, const LowerBounds3 &lower, const UpperBounds3 &upper, const Periodic3 &periodic)
Computes the spacing based on size, lower bounds, and upper bounds.
Represents the lower bounds of the 3d simulation domain.
Definition types.hpp:110
Represents the periodicity of the 3d simulation domain.
Definition types.hpp:100
Represents the size of the 3d simulation domain.
Definition types.hpp:84
Represents the spacing of the 3d simulation grid.
Definition types.hpp:139
Spacing3(const Size3 &size, const LowerBounds3 &lower, const UpperBounds3 &upper, const Periodic3 &periodic)
Constructs a Spacing3 object from a Size3, LowerBounds3, UpperBounds3, and Periodic3.
Definition types.hpp:160
Represents the upper bounds of the 3d simulation domain.
Definition types.hpp:120
UpperBounds3(const Size3 &size, const LowerBounds3 &lower, const Spacing3 &spacing, const Periodic3 &periodic)
Constructs an UpperBounds3 object from a Size3 and LowerBounds3.
Definition types.hpp:131
Represents the global simulation domain (the "world").
Definition world.hpp:91