A domain's surface groups, read on the host or a device: each group a set of surfaces, given by its selectors (SurfaceSelector), that the caller gives one meaning (a boundary condition, an exchange with another code), and the group of a surface, so that a surface found at a point (Domain::closestSurface()) gives its group, and the group its meaning.
More...
#include <EBGeometry_SurfaceGroups.hpp>
|
|
static constexpr uint32_t | None = 0xFFFFFFFFU |
| | No surface group: a surface no selector matches.
|
| |
|
Protected Member Functions inherited from EBGeometry::PoolHandle |
|
| PoolHandle () noexcept=default |
| | An unset location; the first reservation attaches it.
|
| |
| | PoolHandle (const PoolLocation &a_location) noexcept |
| | Adopt a location, as a handle rebuilt from a stored layout does.
|
| |
| | PoolHandle (const PoolHandle &) noexcept=default |
| | Copy a handle, as a derived handle's copy does.
|
| |
|
| PoolHandle (PoolHandle &&) noexcept=default |
| | Move a handle; the same as a copy.
|
| |
| PoolHandle & | operator= (const PoolHandle &) noexcept=default |
| | Copy-assign a handle, as a derived handle's assignment does.
|
| |
| PoolHandle & | operator= (PoolHandle &&) noexcept=default |
| | Move-assign a handle; the same as a copy.
|
| |
|
| ~PoolHandle () noexcept=default |
| | Destructor; protected, since a PoolHandle exists only as the base of a handle.
|
| |
| void * | base () noexcept |
| | The base address this handle's offsets resolve against; see PoolLocation::base().
|
| |
| const void * | base () const noexcept |
| | The base address this handle's offsets resolve against, for read-only access.
|
| |
| void | attach (const Pool &a_pool, const char *a_who, const bool a_deviceWritten=false) noexcept |
| | Follow a_pool, as the first reservation does; see PoolLocation::attach().
|
| |
| PoolLocation | rebasedLocation (const Pool &a_pool, uint64_t a_endByte, const char *a_who) const noexcept |
| | The location of this handle's arrays in another pool of its mirror chain; see PoolLocation::rebasedOnto().
|
| |
| void | setLocation (const PoolLocation &a_location) noexcept |
| | Replace the location, for a view or a copy made by a derived handle.
|
| |
A domain's surface groups, read on the host or a device: each group a set of surfaces, given by its selectors (SurfaceSelector), that the caller gives one meaning (a boundary condition, an exchange with another code), and the group of a surface, so that a surface found at a point (Domain::closestSurface()) gives its group, and the group its meaning.
A view of the selectors in a pool: trivially copyable, a pool handle (see PoolHandle). A Domain builds it from a DomainSetup and returns it (Domain::surfaceGroups()); a renderer showing surface groups takes one built on its own (DomainSetup::buildSurfaceGroups()). The pool must outlive it. A default-constructed one has no surface groups. A surface is in the group of the first selector it matches, in the order they were added, the remaining surfaces' (SurfaceSelector::rest()) tried last. The groups' names and meanings are the caller's: the class holds numbers only.
◆ SurfaceGroups() [1/2]
| EBGeometry::SurfaceGroups::SurfaceGroups |
( |
Pool & |
a_pool, |
|
|
const std::vector< SurfaceSelector > & |
a_selectors, |
|
|
const std::vector< uint32_t > & |
a_surfaceGroups, |
|
|
const uint32_t |
a_numSurfaceGroups |
|
) |
| |
|
inline |
Build the selectors in a pool.
Aborts with a message, in every build, when the two lists differ in length or a selector's surface group is not below a_numSurfaceGroups.
- Parameters
-
| [in,out] | a_pool | Pool to reserve the arrays from (not frozen). |
| [in] | a_selectors | The selectors, in order. |
| [in] | a_surfaceGroups | Each selector's surface group. |
| [in] | a_numSurfaceGroups | How many surface groups there are. |
◆ SurfaceGroups() [2/2]
| EBGeometry::SurfaceGroups::SurfaceGroups |
( |
const Layout & |
a_layout, |
|
|
const PoolLocation & |
a_location |
|
) |
| |
|
inlinenoexcept |
Rebuild a view from a stored layout and the location of the pool that holds it (as a Domain does).
- Parameters
-
| [in] | a_layout | The arrays. |
| [in] | a_location | Where they live. |
◆ getNumSelectors()
| uint32_t EBGeometry::SurfaceGroups::getNumSelectors |
( |
| ) |
const |
|
inlinenoexcept |
How many selectors there are, over all surface groups.
- Returns
- The count.
◆ getNumSurfaceGroups()
| uint32_t EBGeometry::SurfaceGroups::getNumSurfaceGroups |
( |
| ) |
const |
|
inlinenoexcept |
How many surface groups there are.
- Returns
- The count.
◆ getSelector()
| const SurfaceSelector & EBGeometry::SurfaceGroups::getSelector |
( |
const uint32_t |
a_selector | ) |
const |
|
inlinenoexcept |
A selector.
- Parameters
-
- Returns
- The selector.
◆ getSurfaceGroupOfSelector()
| uint32_t EBGeometry::SurfaceGroups::getSurfaceGroupOfSelector |
( |
const uint32_t |
a_selector | ) |
const |
|
inlinenoexcept |
The surface group of a selector.
- Parameters
-
- Returns
- The surface group.
◆ layout()
| const Layout & EBGeometry::SurfaceGroups::layout |
( |
| ) |
const |
|
inlinenoexcept |
The arrays, as offsets.
- Returns
- The layout.
◆ rebasedView()
A view resolving against another pool of the selectors' mirror chain (see PoolHandle).
- Parameters
-
| [in] | a_pool | The pool, or a mirror of it. |
- Returns
- The view.
◆ surfaceGroupOf()
template<class T >
| uint32_t EBGeometry::SurfaceGroups::surfaceGroupOf |
( |
const SurfaceRef< T > & |
a_surface | ) |
const |
|
inlinenoexcept |
The surface group a surface point is in: that of the first selector it matches, those of the remaining surfaces (SurfaceSelector::rest()) tried last.
- Template Parameters
-
| T | Floating-point precision. |
- Parameters
-
| [in] | a_surface | The surface, with its sides and their materials (Tape::closestSurface(p, subdomains, subdomain), firstRegionChange()). |
- Returns
- The surface group, or None.
The documentation for this class was generated from the following file: