peclet.voro 1.0.4
Device-native moving-particle Voronoi dynamics
Loading...
Searching...
No Matches
peclet::voro::fv::detail Namespace Reference

Classes

struct  PeriodicVertexIds
 
struct  PolyFaceList
 The faces of a PolyMesh as they are emitted cell by cell, before the interior-first order. More...
 
struct  VertexKey
 
struct  VertexKeyHash
 

Functions

int unionFindRoot (std::vector< int > &parent, int a)
 Root of a in a union–find forest, halving the path on the way (mergeWallVertices).
 
template<class Real >
std::vector< int > wallVertexIds (const PolyMesh< Real > &m)
 The vertices of the wall faces (patch 1), ascending.
 
template<class Real >
void unionWithinTolerance (const PolyMesh< Real > &m, const Real L[3], Real tol2, int p, const std::vector< int > &candidates, std::vector< int > &parent)
 Join vertex p with every candidate q > p within the min-image distance sqrt(tol2).
 
template<class Real >
void unionNearWallVertices (const PolyMesh< Real > &m, const Real L[3], Real tol, const std::vector< int > &ids, std::vector< int > &parent)
 
template<class Real >
int moveRootsToGroupMean (PolyMesh< Real > &m, const Real L[3], const std::vector< int > &ids, std::vector< int > &parent)
 
template<class Real >
void rewriteMergedFaces (PolyMesh< Real > &m, std::vector< int > &parent)
 
template<class Real , class Cell , class PosM , class RefM , class RecM , class CntM >
void restoreWallPlanesHost (Cell &c, int i, const PosM &ph, const RefM &xrM, const RecM &wrecM, const CntM &wcntM, const Real L[3])
 
template<class Real , class Cell >
Real emitCellFaces (const Cell &c, int i, Real sx, Real sy, Real sz, PeriodicVertexIds< Real > &vertexId, PolyMesh< Real > &m, PolyFaceList &faces)
 
template<class Real >
void storeInteriorFirst (PolyMesh< Real > &m, const PolyFaceList &faces, int N)
 Copy the emitted faces into m, interior faces first, and the cell face lists renumbered.
 

Function Documentation

◆ emitCellFaces()

template<class Real , class Cell >
Real peclet::voro::fv::detail::emitCellFaces ( const Cell &  c,
int  i,
Real  sx,
Real  sy,
Real  sz,
PeriodicVertexIds< Real > &  vertexId,
PolyMesh< Real > &  m,
PolyFaceList &  faces 
)

Emit the faces of re-evaluated cell i (seed at sx, sy, sz): interior faces once, from the lower cell, with the owner's outward orientation. Returns the cell volume from its pyramids.

◆ moveRootsToGroupMean()

template<class Real >
int peclet::voro::fv::detail::moveRootsToGroupMean ( PolyMesh< Real > &  m,
const Real  L[3],
const std::vector< int > &  ids,
std::vector< int > &  parent 
)

Move every group root to the mean of its group (min-image about the root); returns the number of vertices merged away.

◆ restoreWallPlanesHost()

template<class Real , class Cell , class PosM , class RefM , class RecM , class CntM >
void peclet::voro::fv::detail::restoreWallPlanesHost ( Cell &  c,
int  i,
const PosM &  ph,
const RefM &  xrM,
const RecM &  wrecM,
const CntM &  wcntM,
const Real  L[3] 
)

Restore cell i's wall planes from the host mirrors of the WallStore (same arithmetic as WallStore::load), at the seed's displacement from its reference position.

◆ rewriteMergedFaces()

template<class Real >
void peclet::voro::fv::detail::rewriteMergedFaces ( PolyMesh< Real > &  m,
std::vector< int > &  parent 
)

Rewrite the face polygons on the group roots: repeated vertices dropped, degenerate (< 3-vertex) faces removed, the cell face lists renumbered.

◆ storeInteriorFirst()

template<class Real >
void peclet::voro::fv::detail::storeInteriorFirst ( PolyMesh< Real > &  m,
const PolyFaceList &  faces,
int  N 
)

Copy the emitted faces into m, interior faces first, and the cell face lists renumbered.

◆ unionFindRoot()

int peclet::voro::fv::detail::unionFindRoot ( std::vector< int > &  parent,
int  a 
)
inline

Root of a in a union–find forest, halving the path on the way (mergeWallVertices).

◆ unionNearWallVertices()

template<class Real >
void peclet::voro::fv::detail::unionNearWallVertices ( const PolyMesh< Real > &  m,
const Real  L[3],
Real  tol,
const std::vector< int > &  ids,
std::vector< int > &  parent 
)

Union the wall vertices ids closer than tol, on a hash grid of cell size tol over the periodic box (each vertex against the 27 grid cells around its own).

◆ unionWithinTolerance()

template<class Real >
void peclet::voro::fv::detail::unionWithinTolerance ( const PolyMesh< Real > &  m,
const Real  L[3],
Real  tol2,
int  p,
const std::vector< int > &  candidates,
std::vector< int > &  parent 
)

Join vertex p with every candidate q > p within the min-image distance sqrt(tol2).

◆ wallVertexIds()

template<class Real >
std::vector< int > peclet::voro::fv::detail::wallVertexIds ( const PolyMesh< Real > &  m)

The vertices of the wall faces (patch 1), ascending.