chombo-discharge
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
PolyhedralEB::CutCellSurface Class Reference

The values a cut cell's embedded boundary is reconstructed from. More...

#include <CD_CutCellSurface.H>

Public Member Functions

 CutCellSurface () noexcept
 Constructor. Leaves every edge without a crossing and every corner at zero.
 
 ~CutCellSurface () noexcept=default
 Destructor.
 
bool hasCrossing (const int a_edge) const noexcept
 Whether the edge carries a crossing.
 
int linearSize () const noexcept
 Number of bytes the surface occupies in a linear buffer, as Chombo's containers ask of their payload.
 
void linearOut (void *a_buffer) const noexcept
 Write the surface into a linear buffer, as Chombo's containers ask of their payload.
 
void linearIn (const void *a_buffer) noexcept
 Read the surface from a linear buffer written by linearOut.
 

Public Attributes

Real m_crossing [s_numEdges]
 Position along an edge where the implicit function changes sign.
 
Real m_corner [s_numCorners]
 Implicit function at the cell corners, ordered so that corner c has offset ((c >> d) & 1) in direction d.
 

Static Public Attributes

static constexpr int s_numEdges = 2 * SpaceDim * (SpaceDim - 1)
 Number of cell edges a crossing can sit on.
 
static constexpr int s_numCorners = 1 << SpaceDim
 Number of cell corners.
 
static constexpr Real s_noCrossing = -1.0
 Marks an edge whose endpoints lie on the same side of the interface.
 

Detailed Description

The values a cut cell's embedded boundary is reconstructed from.

Holds the implicit function at the cell's corners and the parameter along each cell edge where it changes sign, both in the cell's own [-1/2, 1/2]^SpaceDim frame. Neither value belongs to the cell alone: a corner is shared by the 2^SpaceDim cells meeting there and an edge by the four cells meeting along it, so two neighbouring cells reconstruct the same surface bit for bit rather than to within a tolerance. That is what makes a face aperture agree when it is computed from either side.

That agreement is between cells of one level. A cell's chords are straight at its own spacing, so on a face shared with cells of a finer level they are not what that level describes the face with, and the polyhedron this surface alone reconstructs is the level-local one. Which faces those are is not the surface's to know: it is recorded by the cut-cell connectivity of the level, and CutCellBody::restrictFace replaces such a face with the chords of the children covering it.

Member Function Documentation

◆ hasCrossing()

bool PolyhedralEB::CutCellSurface::hasCrossing ( const int  a_edge) const
inlinenoexcept

Whether the edge carries a crossing.

Parameters
[in]a_edgeEdge index in [0, s_numEdges).
Returns
True if the implicit function changes sign along the edge.

◆ linearIn()

void PolyhedralEB::CutCellSurface::linearIn ( const void *  a_buffer)
inlinenoexcept

Read the surface from a linear buffer written by linearOut.

Parameters
[in]a_bufferBuffer written by linearOut.

◆ linearOut()

void PolyhedralEB::CutCellSurface::linearOut ( void *  a_buffer) const
inlinenoexcept

Write the surface into a linear buffer, as Chombo's containers ask of their payload.

Parameters
[out]a_bufferBuffer of at least linearSize() bytes.

◆ linearSize()

int PolyhedralEB::CutCellSurface::linearSize ( ) const
inlinenoexcept

Number of bytes the surface occupies in a linear buffer, as Chombo's containers ask of their payload.

Returns
sizeof the crossings and the corners together.

Member Data Documentation

◆ m_crossing

Real PolyhedralEB::CutCellSurface::m_crossing[s_numEdges]

Position along an edge where the implicit function changes sign.

Parameterised from the edge's low corner, so that both cells sharing the edge read the same value. Only meaningful where hasCrossing is true.


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