chombo-discharge
Loading...
Searching...
No Matches
Namespaces | Functions
CD_PolyhedralEBUtilsImplem.H File Reference

Implementation of CD_PolyhedralEBUtils.H. More...

#include <cmath>
#include <CH_assert.H>
#include <CD_PolyhedralEBUtils.H>
#include <CD_NamespaceHeader.H>
#include <CD_NamespaceFooter.H>
Include dependency graph for CD_PolyhedralEBUtilsImplem.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  PolyhedralEB::detail
 Cell topology and polygon geometry the cut cell classes are assembled from.
 

Functions

bool PolyhedralEB::isFluid (const Real a_value) noexcept
 Which side of the interface a value lies on.
 
int PolyhedralEB::detail::edgeDirection (const int a_edge) noexcept
 Direction a cell edge runs along.
 
void PolyhedralEB::detail::edgeOrigin (const int a_edge, int a_offset[SpaceDim]) noexcept
 Corner offsets of a cell edge's low end.
 
void PolyhedralEB::detail::edgeCorners (const int a_edge, int &a_lo, int &a_hi) noexcept
 The corners a cell edge joins, low end first.
 
RealVect PolyhedralEB::detail::cornerPosition (const int a_corner) noexcept
 Position of a cell corner in the cell's own frame.
 
void PolyhedralEB::detail::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.
 
int PolyhedralEB::detail::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.
 
RealVect PolyhedralEB::detail::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.
 
void PolyhedralEB::detail::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.
 
void PolyhedralEB::detail::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.
 
int PolyhedralEB::detail::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.
 
int PolyhedralEB::detail::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.
 
bool PolyhedralEB::detail::sameVertex (const RealVect &a_a, const RealVect &a_b) noexcept
 Whether two positions are the same vertex.
 

Detailed Description

Implementation of CD_PolyhedralEBUtils.H.

Author
Robert Marskar

Function Documentation

◆ isFluid()

bool PolyhedralEB::isFluid ( const Real  a_value)
inlinenoexcept

Which side of the interface a value lies on.

One predicate for corners and crossings alike: negative is fluid, and anything else, an exact zero of either sign included, is solid. GeometryShop reads an exact zero by its sign bit, which a negated distance function turns over, and then rescues the regular cell that leaves beside a covered one by looking at its neighbour. A cell here is classified from its own corners alone, so the zero has to fall on one side by rule: on the solid side, so that a fluid cell whose face lies in the interface is cut with that face as its interface, and the cell on the other side is covered.

Parameters
[in]a_valueImplicit function value.
Returns
True on the fluid side.