EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
EBGeometry::SurfaceSelector Struct Reference

Conditions on a point of a surface, all of which must hold; an unset one (Any) matches anything. More...

#include <EBGeometry_SurfaceGroups.hpp>

Public Member Functions

SurfaceSelector withPart (const uint32_t a_part) const noexcept
 The same selector restricted to one part (a cylinder's cap, a box's face).
 
template<class T >
bool matches (const SurfaceRef< T > &a_surface) const noexcept
 Whether a surface point matches every condition set.
 

Static Public Member Functions

template<class T >
static SurfaceSelector piece (const SurfaceRef< T > &a_surface) noexcept
 The piece a surface point belongs to: its surface between the two regions on its sides, whatever the part (withPart() narrows it to one).
 
static SurfaceSelector rest () noexcept
 The remaining surfaces: every surface no other selector of the surface groups holds, whatever the order the selectors were added in.
 
static SurfaceSelector surface (const uint32_t a_surface) noexcept
 Every point of a surface, whatever its part and sides.
 
static SurfaceSelector surfaces (const uint32_t a_first, const uint32_t a_count) noexcept
 Every point of a range of surfaces, whatever their parts, labels and sides: a node of an expression and all below it (ExprIndex::Node::m_firstSurface and m_numSurfaces), whatever labels the surfaces below it have.
 
static SurfaceSelector label (const SurfaceLabelId a_label) noexcept
 Every surface with a surface label.
 
static SurfaceSelector interface (const uint32_t a_first, const uint32_t a_second) noexcept
 Every surface between two regions, either way round: an interface.
 
static SurfaceSelector region (const uint32_t a_region) noexcept
 Every surface of a region: those with the region on either side.
 
static SurfaceSelector materials (const MaterialLabelId a_first, const MaterialLabelId a_second=MaterialLabelId::none()) noexcept
 Every surface between two materials, either way round (one material alone: on either side).
 

Public Attributes

uint32_t m_surface = Any
 The surface (SurfaceRef::m_surface), or the first of a range of them (see m_numSurfaces); or Any.
 
uint32_t m_part = Any
 The part (SurfaceRef::m_part), or Any.
 
uint32_t m_regionA = Any
 A region on one side, or Any.
 
uint32_t m_regionB = Any
 The region on the other side, or Any (with m_regionA set: m_regionA on either side, anything across).
 
uint32_t m_label = Any
 The surface label (SurfaceRef::m_surfaceLabel), or Any.
 
uint32_t m_materialA = Any
 A material on one side, or Any.
 
uint32_t m_materialB = Any
 The material on the other side, or Any (as m_regionB).
 
bool m_rest = false
 Whether the selector holds the remaining surfaces (rest()): surface groups try it after every other.
 
uint32_t m_numSurfaces = 1
 How many surfaces from m_surface it holds (1: one surface); unused when m_surface is Any.
 

Static Public Attributes

static constexpr uint32_t Any = 0xFFFFFFFFU
 An unset condition: matches anything.
 

Detailed Description

Conditions on a point of a surface, all of which must hold; an unset one (Any) matches anything.

A piece (piece()) is a shape's surface between two regions, what one clicks; a part of it (withPart(), a box's face, a mesh's face) is finer. Broader selectors leave conditions unset: a whole surface (whatever its part and sides), every surface with a label, every surface between two regions (an interface, either order), every surface of a region (either side), or between two materials. Patches with the same attributes are one piece: the conditions say what a surface is, not where. The remaining surfaces (rest()) are what no other selector of a domain's surface groups hold. Matched against a SurfaceRef with its sides set (a tape's region queries set them); a plain value, usable on a device.

Member Function Documentation

◆ interface()

static SurfaceSelector EBGeometry::SurfaceSelector::interface ( const uint32_t  a_first,
const uint32_t  a_second 
)
inlinestaticnoexcept

Every surface between two regions, either way round: an interface.

Parameters
[in]a_firstA region.
[in]a_secondThe other region.
Returns
The selector.

◆ label()

static SurfaceSelector EBGeometry::SurfaceSelector::label ( const SurfaceLabelId  a_label)
inlinestaticnoexcept

Every surface with a surface label.

Parameters
[in]a_labelThe label.
Returns
The selector.

◆ matches()

template<class T >
bool EBGeometry::SurfaceSelector::matches ( const SurfaceRef< T > &  a_surface) const
inlinenoexcept

Whether a surface point matches every condition set.

Template Parameters
TFloating-point precision.
Parameters
[in]a_surfaceThe surface, with its sides and their materials set.
Returns
True if it matches.

◆ materials()

static SurfaceSelector EBGeometry::SurfaceSelector::materials ( const MaterialLabelId  a_first,
const MaterialLabelId  a_second = MaterialLabelId::none() 
)
inlinestaticnoexcept

Every surface between two materials, either way round (one material alone: on either side).

Parameters
[in]a_firstA material.
[in]a_secondThe other material, or none for any.
Returns
The selector.

◆ piece()

template<class T >
static SurfaceSelector EBGeometry::SurfaceSelector::piece ( const SurfaceRef< T > &  a_surface)
inlinestaticnoexcept

The piece a surface point belongs to: its surface between the two regions on its sides, whatever the part (withPart() narrows it to one).

Template Parameters
TFloating-point precision.
Parameters
[in]a_surfaceA surface with its sides (from a tape's region queries).
Returns
The selector.

◆ region()

static SurfaceSelector EBGeometry::SurfaceSelector::region ( const uint32_t  a_region)
inlinestaticnoexcept

Every surface of a region: those with the region on either side.

Parameters
[in]a_regionThe region.
Returns
The selector.

◆ rest()

static SurfaceSelector EBGeometry::SurfaceSelector::rest ( )
inlinestaticnoexcept

The remaining surfaces: every surface no other selector of the surface groups holds, whatever the order the selectors were added in.

Returns
The selector.

◆ surface()

static SurfaceSelector EBGeometry::SurfaceSelector::surface ( const uint32_t  a_surface)
inlinestaticnoexcept

Every point of a surface, whatever its part and sides.

Parameters
[in]a_surfaceThe surface (SurfaceRef::m_surface).
Returns
The selector.

◆ surfaces()

static SurfaceSelector EBGeometry::SurfaceSelector::surfaces ( const uint32_t  a_first,
const uint32_t  a_count 
)
inlinestaticnoexcept

Every point of a range of surfaces, whatever their parts, labels and sides: a node of an expression and all below it (ExprIndex::Node::m_firstSurface and m_numSurfaces), whatever labels the surfaces below it have.

Parameters
[in]a_firstThe first surface.
[in]a_countHow many.
Returns
The selector.

◆ withPart()

SurfaceSelector EBGeometry::SurfaceSelector::withPart ( const uint32_t  a_part) const
inlinenoexcept

The same selector restricted to one part (a cylinder's cap, a box's face).

Parameters
[in]a_partThe part.
Returns
The selector.

The documentation for this struct was generated from the following file: