13#ifndef CD_POLYHEDRALEBUTILS_H
14#define CD_POLYHEDRALEBUTILS_H
21#include <CD_NamespaceHeader.H>
23namespace PolyhedralEB {
38isFluid(
const Real a_value)
noexcept;
76edgeOrigin(
const int a_edge,
int a_offset[SpaceDim])
noexcept;
85edgeCorners(
const int a_edge,
int& a_lo,
int& a_hi)
noexcept;
105faceCorners(
const int a_dir,
const int a_side,
int a_corner[1 << (SpaceDim - 1)]) noexcept;
116edgeIndex(const
int a_dir, const
int a_offset[SpaceDim]) noexcept;
142faceEdges(
const int a_dir,
const int a_side,
int a_edge[4])
noexcept;
164 RealVect& a_centroid)
noexcept;
219sameVertex(
const RealVect& a_a,
const RealVect& a_b)
noexcept;
224#include <CD_NamespaceFooter.H>
Declaration of the data a cut cell's embedded boundary is reconstructed from.
Implementation of CD_PolyhedralEBUtils.H.
bool isFluid(const Real a_value) noexcept
Which side of the interface a value lies on.
Definition CD_PolyhedralEBUtilsImplem.H:29
The values a cut cell's embedded boundary is reconstructed from.
Definition CD_CutCellSurface.H:41
static constexpr int s_numEdges
Number of cell edges a crossing can sit on.
Definition CD_CutCellSurface.H:46
void edgeOrigin(const int a_edge, int a_offset[SpaceDim]) noexcept
Corner offsets of a cell edge's low end.
Definition CD_PolyhedralEBUtilsImplem.H:45
void polygonMoments(const RealVect *a_vertex, const int a_num, Real &a_area, RealVect &a_vector, RealVect &a_centroid) noexcept
Area vector, area and centroid of a planar polygon given in circuit order.
Definition CD_PolyhedralEBUtilsImplem.H:206
constexpr int s_transverse[3][2]
The two directions transverse to each coordinate direction, in increasing order.
Definition CD_PolyhedralEBUtils.H:59
void faceEdges(const int a_dir, const int a_side, int a_edge[4]) noexcept
The edges of a cell face, edge i joining face corners i and i+1.
Definition CD_PolyhedralEBUtilsImplem.H:175
int facePairs(const int a_dir, const int a_side, const CutCellSurface &a_surface, int a_pair[2][2]) noexcept
The chords on a cell face, each an unordered pair of edge indices.
Definition CD_PolyhedralEBUtilsImplem.H:253
bool sameVertex(const RealVect &a_a, const RealVect &a_b) noexcept
Whether two positions are the same vertex.
Definition CD_PolyhedralEBUtilsImplem.H:411
RealVect cornerPosition(const int a_corner) noexcept
Position of a cell corner in the cell's own frame.
Definition CD_PolyhedralEBUtilsImplem.H:86
constexpr Real s_weldTolerance
Distance within which two vertices are taken to be the same one.
Definition CD_PolyhedralEBUtils.H:210
int edgeDirection(const int a_edge) noexcept
Direction a cell edge runs along.
Definition CD_PolyhedralEBUtilsImplem.H:37
void edgeCorners(const int a_edge, int &a_lo, int &a_hi) noexcept
The corners a cell edge joins, low end first.
Definition CD_PolyhedralEBUtilsImplem.H:67
void faceCorners(const int a_dir, const int a_side, int a_corner[1<<(SpaceDim - 1)]) noexcept
The corners of a cell face, in circuit order around the face.
Definition CD_PolyhedralEBUtilsImplem.H:100
int edgeIndex(const int a_dir, const int a_offset[SpaceDim]) noexcept
Index of the edge running along a_dir whose low corner has the given offsets.
Definition CD_PolyhedralEBUtilsImplem.H:124
RealVect crossingPosition(const CutCellSurface &a_surface, const int a_edge, const Real a_tolerance) noexcept
Position of an edge crossing in the cell's own frame.
Definition CD_PolyhedralEBUtilsImplem.H:140
int crossingLoops(const CutCellSurface &a_surface, int a_loop[CutCellSurface::s_numEdges], int a_start[CutCellSurface::s_numEdges+1]) noexcept
Order the crossings into closed loops, or fail if they do not form clean cycles.
Definition CD_PolyhedralEBUtilsImplem.H:313