peclet.voro 1.0.0
Device-native moving-particle Voronoi dynamics
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
peclet::voro::mpi::VoronoiHalo< Real > Class Template Reference

#include <voronoi_halo.hpp>

Classes

struct  Gathered
 Combined owned+ghost seeds (owned first), with global ids and weights. More...
 

Public Types

using Vec3 = std::array< Real, 3 >
 

Public Member Functions

void init (std::array< Real, 3 > origin, std::array< Real, 3 > size, std::array< long, 3 > gsize, std::array< bool, 3 > periodic, MPI_Comm comm=MPI_COMM_WORLD)
 
int rank () const
 
int size () const
 
int ownerOf (const Vec3 &x) const
 Rank that owns position x.
 
Gathered gather (const std::vector< Vec3 > &ownedPos, const std::vector< long > &ownedGid, const std::vector< Real > &ownedWeight, double rcut)
 
int numGhost () const
 Number of ghosts in the last gather() (the established topology).
 
void refreshPositions (const std::vector< Vec3 > &ownedPos, std::vector< Vec3 > &out)
 

Member Typedef Documentation

◆ Vec3

template<class Real >
using peclet::voro::mpi::VoronoiHalo< Real >::Vec3 = std::array<Real, 3>

Member Function Documentation

◆ gather()

template<class Real >
Gathered peclet::voro::mpi::VoronoiHalo< Real >::gather ( const std::vector< Vec3 > &  ownedPos,
const std::vector< long > &  ownedGid,
const std::vector< Real > &  ownedWeight,
double  rcut 
)
inline

Build the owner<->ghost topology over this rank's owned seeds and gather the ghost seeds within rcut, forwarding their global ids and weights.

◆ init()

template<class Real >
void peclet::voro::mpi::VoronoiHalo< Real >::init ( std::array< Real, 3 >  origin,
std::array< Real, 3 >  size,
std::array< long, 3 >  gsize,
std::array< bool, 3 >  periodic,
MPI_Comm  comm = MPI_COMM_WORLD 
)
inline
Parameters
origin,sizephysical box (origin + extent L); seeds live in [origin, origin+size).
gsizeORB cell grid (decomposition granularity).
periodicper-axis periodicity.

◆ numGhost()

template<class Real >
int peclet::voro::mpi::VoronoiHalo< Real >::numGhost ( ) const
inline

Number of ghosts in the last gather() (the established topology).

◆ ownerOf()

template<class Real >
int peclet::voro::mpi::VoronoiHalo< Real >::ownerOf ( const Vec3 x) const
inline

Rank that owns position x.

◆ rank()

template<class Real >
int peclet::voro::mpi::VoronoiHalo< Real >::rank ( ) const
inline

◆ refreshPositions()

template<class Real >
void peclet::voro::mpi::VoronoiHalo< Real >::refreshPositions ( const std::vector< Vec3 > &  ownedPos,
std::vector< Vec3 > &  out 
)
inline

Position-only halo refresh: re-forward the CURRENT owned positions onto the EXISTING ghost topology (the one built by the last gather()), WITHOUT re-decomposing or re-selecting ghosts. Returns the combined owned+ghost positions in the SAME order as that gather() — so a resident per-cell topology (whose neighbour ids are combined-local indices) stays valid across the step. The periodic-native (minimal-image) tessellator recovers the right relative vectors from these raw in-[0,L) positions, so no periodic shift is applied here. This is the moving-point fast path: while no owned seed has moved beyond the Verlet skin (so no neighbour crossed the gathered shell undetected) the driver refreshes positions + repairs locally; on a skin trip it calls gather() again to re-establish the topology. out is resized to nOwned + numGhost().

◆ size()

template<class Real >
int peclet::voro::mpi::VoronoiHalo< Real >::size ( ) const
inline

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