|
peclet.voro 1.0.4
Device-native moving-particle Voronoi dynamics
|
Track B, rung B3: the internal polyhedral mesh (PolyMesh) of a resident tessellation — shared vertices, ordered face polygons, owner/neighbour, wall patches — assembled on the host from the topology store, plus a VTU (VTK_POLYHEDRON) writer for viewing. This is what track C consumes beyond the face mesh (vertices are needed for output and for the cell-vertex quantities of later rungs); the solver itself runs on fv::FaceMesh.
More...
#include <cmath>#include <cstdio>#include <functional>#include <Kokkos_Core.hpp>#include <string>#include <unordered_map>#include <vector>#include "peclet/core/common/view.hpp"#include "peclet/voro/convex_cell.hpp"#include "peclet/voro/sdf.hpp"#include "peclet/voro/topology_store.hpp"
Go to the source code of this file.
Classes | |
| struct | peclet::voro::fv::PolyMesh< Real > |
| struct | peclet::voro::fv::detail::VertexKey |
| struct | peclet::voro::fv::detail::VertexKeyHash |
Namespaces | |
| namespace | peclet |
| namespace | peclet::voro |
| Device-native Voronoi tessellation, geometry and finite-volume physics. | |
| namespace | peclet::voro::fv |
| namespace | peclet::voro::fv::detail |
Functions | |
| template<class Real > | |
| int | peclet::voro::fv::mergeWallVertices (PolyMesh< Real > &m, const Real L[3], Real tol) |
| template<class Real , int MAXP, int MAXT> | |
| PolyMesh< Real > | peclet::voro::fv::buildPolyMesh (const TopologyStore< MAXP, MAXT > &store, const Kokkos::View< Real *, peclet::core::MemSpace > &pos, int N, const Real L[3], WallStore< Real > wall={}, Kokkos::View< Real *, peclet::core::MemSpace > xRef={}, Real quantum=Real(1e-9)) |
Assemble the polyhedral mesh of a store at positions posHost (3N, world, in [0,L)). | |
| template<class Real > | |
| bool | peclet::voro::fv::writeVtu (const std::string &path, const PolyMesh< Real > &m, const std::vector< Real > *cellScalar=nullptr, const char *scalarName="scalar") |
Track B, rung B3: the internal polyhedral mesh (PolyMesh) of a resident tessellation — shared vertices, ordered face polygons, owner/neighbour, wall patches — assembled on the host from the topology store, plus a VTU (VTK_POLYHEDRON) writer for viewing. This is what track C consumes beyond the face mesh (vertices are needed for output and for the cell-vertex quantities of later rungs); the solver itself runs on fv::FaceMesh.
Assembly: every cell is reloaded from the store and re-evaluated at the current positions (ConvexCell::reevalGeometry — the same geometry the solver saw), each face polygon is walked CCW (faceOrdered), and vertices are shared by quantised world position (the four cells around a Voronoi vertex compute it from the same three planes to round-off, so a 1e-9·L bucket merges them; a genuinely degenerate configuration with two vertices closer than that would be merged too — recorded, not handled). Interior faces are emitted once (from the lower cell) with the outward orientation of the owner; wall faces (kBoundaryFacet) go to patch 1, box faces to patch 2 (a periodic box has none).