153#include <type_traits>
195 operator const Int3 &()
const noexcept {
return value; }
249 operator const Int3 &()
const noexcept {
return value; }
303 operator const Int3 &()
const noexcept {
return value; }
389 operator const Real3 &()
const noexcept {
return value; }
443 operator const Real3 &()
const noexcept {
return value; }
497 operator const Real3 &()
const noexcept {
return value; }
551static_assert(
sizeof(GridSize) ==
sizeof(Int3),
552 "GridSize must be same size as Int3 (zero-cost)");
553static_assert(
sizeof(LocalOffset) ==
sizeof(Int3),
554 "LocalOffset must be same size as Int3 (zero-cost)");
555static_assert(
sizeof(GlobalOffset) ==
sizeof(Int3),
556 "GlobalOffset must be same size as Int3 (zero-cost)");
557static_assert(
sizeof(GridSpacing) ==
sizeof(Real3),
558 "GridSpacing must be same size as Real3 (zero-cost)");
559static_assert(
sizeof(PhysicalOrigin) ==
sizeof(Real3),
560 "PhysicalOrigin must be same size as Real3 (zero-cost)");
561static_assert(
sizeof(PhysicalCoords) ==
sizeof(Real3),
562 "PhysicalCoords must be same size as Real3 (zero-cost)");
565static_assert(std::is_trivially_copyable_v<GridSize>,
566 "GridSize must be trivially copyable");
567static_assert(std::is_trivially_copyable_v<LocalOffset>,
568 "LocalOffset must be trivially copyable");
569static_assert(std::is_trivially_copyable_v<GlobalOffset>,
570 "GlobalOffset must be trivially copyable");
571static_assert(std::is_trivially_copyable_v<IndexBounds>,
572 "IndexBounds must be trivially copyable");
573static_assert(std::is_trivially_copyable_v<GridSpacing>,
574 "GridSpacing must be trivially copyable");
575static_assert(std::is_trivially_copyable_v<PhysicalOrigin>,
576 "PhysicalOrigin must be trivially copyable");
577static_assert(std::is_trivially_copyable_v<PhysicalCoords>,
578 "PhysicalCoords must be trivially copyable");
579static_assert(std::is_trivially_copyable_v<PhysicalBounds>,
580 "PhysicalBounds must be trivially copyable");
583static_assert(std::is_standard_layout_v<GridSize>,
584 "GridSize must have standard layout");
585static_assert(std::is_standard_layout_v<LocalOffset>,
586 "LocalOffset must have standard layout");
587static_assert(std::is_standard_layout_v<GlobalOffset>,
588 "GlobalOffset must have standard layout");
589static_assert(std::is_standard_layout_v<IndexBounds>,
590 "IndexBounds must have standard layout");
591static_assert(std::is_standard_layout_v<GridSpacing>,
592 "GridSpacing must have standard layout");
593static_assert(std::is_standard_layout_v<PhysicalOrigin>,
594 "PhysicalOrigin must have standard layout");
595static_assert(std::is_standard_layout_v<PhysicalCoords>,
596 "PhysicalCoords must have standard layout");
597static_assert(std::is_standard_layout_v<PhysicalBounds>,
598 "PhysicalBounds must have standard layout");
Core type definitions for World parameters.
Global subdomain offset in global coordinate system.
Definition strong_types.hpp:284
const Int3 & get() const noexcept
Get underlying value.
Definition strong_types.hpp:297
bool operator==(const GlobalOffset &other) const noexcept
Equality comparison.
Definition strong_types.hpp:310
Int3 value
Underlying array value.
Definition strong_types.hpp:285
GlobalOffset(const Int3 &v)
Construct from Int3 (implicit for backward compatibility)
Definition strong_types.hpp:291
bool operator!=(const GlobalOffset &other) const noexcept
Inequality comparison.
Definition strong_types.hpp:319
Grid dimensions (number of grid points per dimension)
Definition strong_types.hpp:176
bool operator!=(const GridSize &other) const noexcept
Inequality comparison.
Definition strong_types.hpp:211
const Int3 & get() const noexcept
Get underlying value.
Definition strong_types.hpp:189
GridSize(const Int3 &v)
Construct from Int3 (implicit for backward compatibility)
Definition strong_types.hpp:183
Int3 value
Underlying array value.
Definition strong_types.hpp:177
bool operator==(const GridSize &other) const noexcept
Equality comparison.
Definition strong_types.hpp:202
Physical spacing between grid points.
Definition strong_types.hpp:370
bool operator!=(const GridSpacing &other) const noexcept
Inequality comparison.
Definition strong_types.hpp:405
GridSpacing(const Real3 &v)
Construct from Real3 (implicit for backward compatibility)
Definition strong_types.hpp:377
bool operator==(const GridSpacing &other) const noexcept
Equality comparison.
Definition strong_types.hpp:396
const Real3 & get() const noexcept
Get underlying value.
Definition strong_types.hpp:383
Real3 value
Underlying array value.
Definition strong_types.hpp:371
Index space bounds (min and max indices)
Definition strong_types.hpp:340
IndexBounds(const Int3 &lo, const Int3 &hi)
Construct from lower and upper bounds.
Definition strong_types.hpp:349
Int3 lower
Lower bounds (inclusive)
Definition strong_types.hpp:341
Int3 upper
Upper bounds (inclusive)
Definition strong_types.hpp:342
Local subdomain offset in local coordinate system.
Definition strong_types.hpp:230
const Int3 & get() const noexcept
Get underlying value.
Definition strong_types.hpp:243
bool operator==(const LocalOffset &other) const noexcept
Equality comparison.
Definition strong_types.hpp:256
LocalOffset(const Int3 &v)
Construct from Int3 (implicit for backward compatibility)
Definition strong_types.hpp:237
Int3 value
Underlying array value.
Definition strong_types.hpp:231
bool operator!=(const LocalOffset &other) const noexcept
Inequality comparison.
Definition strong_types.hpp:265
Physical space bounds (min and max coordinates)
Definition strong_types.hpp:534
Real3 upper
Upper bounds.
Definition strong_types.hpp:536
Real3 lower
Lower bounds.
Definition strong_types.hpp:535
PhysicalBounds(const Real3 &lo, const Real3 &hi)
Construct from lower and upper bounds.
Definition strong_types.hpp:543
Physical coordinates in space.
Definition strong_types.hpp:478
bool operator!=(const PhysicalCoords &other) const noexcept
Inequality comparison.
Definition strong_types.hpp:513
Real3 value
Underlying array value.
Definition strong_types.hpp:479
PhysicalCoords(const Real3 &v)
Construct from Real3 (implicit for backward compatibility)
Definition strong_types.hpp:485
const Real3 & get() const noexcept
Get underlying value.
Definition strong_types.hpp:491
bool operator==(const PhysicalCoords &other) const noexcept
Equality comparison.
Definition strong_types.hpp:504
Physical origin of coordinate system.
Definition strong_types.hpp:424
const Real3 & get() const noexcept
Get underlying value.
Definition strong_types.hpp:437
PhysicalOrigin(const Real3 &v)
Construct from Real3 (implicit for backward compatibility)
Definition strong_types.hpp:431
Real3 value
Underlying array value.
Definition strong_types.hpp:425
bool operator==(const PhysicalOrigin &other) const noexcept
Equality comparison.
Definition strong_types.hpp:450
bool operator!=(const PhysicalOrigin &other) const noexcept
Inequality comparison.
Definition strong_types.hpp:459
Represents the global simulation domain (the "world").
Definition world.hpp:91