core 1.5.0
Shared MPI block decomposition, asynchronous ghost-layer exchange, SDF geometry, load balancing (header-only C++20)
Loading...
Searching...
No Matches
peclet::core::Box< Dim > Struct Template Reference

A physical, axis-aligned box with per-axis periodicity. Continuous — no cells. More...

#include <domain.hpp>

Public Member Functions

Vec< Dim > upper () const
 Upper corner: origin + length.
 
Vec< Dim > centre () const
 
Real volume () const
 
bool contains (const Vec< Dim > &p) const
 Is the point inside [origin, origin+length) on every axis?
 
Vec< Dim > wrap (const Vec< Dim > &p) const
 Fold a point into the box along the periodic axes; non-periodic axes are left untouched.
 
Vec< Dim > minImage (const Vec< Dim > &a_, const Vec< Dim > &b) const
 Minimum-image separation b - a, shortened across the periodic axes.
 

Static Public Member Functions

static constexpr int dim ()
 

Public Attributes

Vec< Dim > origin {}
 lower corner
 
Vec< Dim > length {}
 extent per axis (> 0)
 
std::array< bool, Dim > periodic {}
 per-axis periodicity
 

Detailed Description

template<int Dim = 3>
struct peclet::core::Box< Dim >

A physical, axis-aligned box with per-axis periodicity. Continuous — no cells.

Definition at line 34 of file domain.hpp.

Member Function Documentation

◆ dim()

template<int Dim = 3>
static constexpr int peclet::core::Box< Dim >::dim ( )
inlinestaticconstexpr

Definition at line 39 of file domain.hpp.

◆ upper()

template<int Dim = 3>
Vec< Dim > peclet::core::Box< Dim >::upper ( ) const
inline

Upper corner: origin + length.

Definition at line 42 of file domain.hpp.

References peclet::core::Box< Dim >::length, and peclet::core::Box< Dim >::origin.

◆ centre()

template<int Dim = 3>
Vec< Dim > peclet::core::Box< Dim >::centre ( ) const
inline

◆ volume()

template<int Dim = 3>
Real peclet::core::Box< Dim >::volume ( ) const
inline

Definition at line 56 of file domain.hpp.

References peclet::core::Box< Dim >::length.

◆ contains()

template<int Dim = 3>
bool peclet::core::Box< Dim >::contains ( const Vec< Dim > &  p) const
inline

Is the point inside [origin, origin+length) on every axis?

Definition at line 64 of file domain.hpp.

References peclet::core::Box< Dim >::length, and peclet::core::Box< Dim >::origin.

◆ wrap()

template<int Dim = 3>
Vec< Dim > peclet::core::Box< Dim >::wrap ( const Vec< Dim > &  p) const
inline

Fold a point into the box along the periodic axes; non-periodic axes are left untouched.

Definition at line 73 of file domain.hpp.

References peclet::core::Box< Dim >::length, peclet::core::Box< Dim >::origin, and peclet::core::Box< Dim >::periodic.

◆ minImage()

template<int Dim = 3>
Vec< Dim > peclet::core::Box< Dim >::minImage ( const Vec< Dim > &  a_,
const Vec< Dim > &  b 
) const
inline

Minimum-image separation b - a, shortened across the periodic axes.

Definition at line 89 of file domain.hpp.

References peclet::core::Box< Dim >::length, and peclet::core::Box< Dim >::periodic.

Member Data Documentation

◆ origin

◆ length

◆ periodic

template<int Dim = 3>
std::array<bool, Dim> peclet::core::Box< Dim >::periodic {}

per-axis periodicity

Definition at line 37 of file domain.hpp.

Referenced by peclet::core::Box< Dim >::minImage(), and peclet::core::Box< Dim >::wrap().


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