|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
How a domain is made: its subdomains (the regions each computes in) and its surface groups (the selectors of each), as a plain value on the host, to build, copy, compare and edit. More...
#include <EBGeometry_DomainSetup.hpp>
Public Member Functions | |
| uint32_t | addSubdomain (std::vector< uint32_t > a_regions) |
| Add a subdomain. | |
| uint32_t | getNumSubdomains () const noexcept |
| How many subdomains there are. | |
| uint32_t | subdomainOf (const uint32_t a_region) const noexcept |
| The subdomain a region is in. | |
| bool | computesIn (const uint32_t a_region) const noexcept |
| Whether the domain computes in a region. | |
| bool | touches (const uint32_t a_first, const uint32_t a_second) const noexcept |
| Whether a surface between two regions is one the domain must give a condition: one side or both in its regions. | |
| std::vector< uint32_t > | getRegions (const uint32_t a_subdomain) const |
| The regions of a subdomain. | |
| uint32_t | getRegionsNeeded () const noexcept |
| One past the largest region in a subdomain: the fewest regions a tape must have for the setup. | |
| template<class T > | |
| SurfaceRole | role (const SurfaceRef< T > &a_surface) const noexcept |
| What a surface is to the subdomains (as Subdomains::role()). | |
| uint32_t | addSurfaceGroup () noexcept |
| Add a surface group. | |
| void | add (const uint32_t a_group, const SurfaceSelector &a_selector) |
| Add a selector to a surface group. | |
| void | removeSurfaceGroup (const uint32_t a_group) |
| Remove a surface group and its selectors; the surface groups after it move down by one. | |
| void | remove (const uint32_t a_group, const SurfaceSelector &a_selector) |
| Remove the selectors of a surface group that equal one (to undo a click). | |
| uint32_t | getNumSurfaceGroups () const noexcept |
| How many surface groups there are. | |
| uint32_t | getNumSelectors () const noexcept |
| How many selectors there are, over all surface groups. | |
| const SurfaceSelector & | getSelector (const uint32_t a_selector) const |
| A selector. | |
| uint32_t | getSurfaceGroupOfSelector (const uint32_t a_selector) const |
| The surface group of a selector. | |
| template<class T > | |
| uint32_t | surfaceGroupOf (const SurfaceRef< T > &a_surface) const noexcept |
| The surface group a surface point is in (as SurfaceGroups::surfaceGroupOf()). | |
| Subdomains | buildSubdomains (Pool &a_pool, const uint32_t a_numRegions) const |
| Build the subdomains for a tape of a number of regions. | |
| SurfaceGroups | buildSurfaceGroups (Pool &a_pool) const |
| Build the surface groups. | |
| bool | operator== (const DomainSetup &a_other) const noexcept |
| Whether two setups make the same domain: the same subdomains, and the same selectors in the same groups and order. | |
| bool | operator!= (const DomainSetup &a_other) const noexcept |
| Whether two setups make different domains. | |
How a domain is made: its subdomains (the regions each computes in) and its surface groups (the selectors of each), as a plain value on the host, to build, copy, compare and edit.
A description, not the domain itself: a Domain is built from it for one tape (Domain(pool, tape, setup)), as a snapshot, and editing the setup afterwards changes no domain already built. There is no limit on subdomains, surface groups or selectors. The queries here (subdomainOf(), role(), surfaceGroupOf()) answer on the host what the built domain answers on the host or a device, for tools that edit a setup (a viewer's panel, a coverage check). Host only.
|
inline |
Add a selector to a surface group.
Aborts with a message, in every build, for a surface group not added.
| [in] | a_group | The surface group. |
| [in] | a_selector | The selector. |
|
inline |
Add a subdomain.
A region can be in one subdomain only; aborts with a message otherwise, or for an empty list, in every build. A region listed twice counts once. Whether the regions are the tape's is checked when a Domain is built; the setup keeps a row per region up to the largest it is given, so the numbers should be the tape's (Tape::region(), ExprIndex), not arbitrary ones.
| [in] | a_regions | Its regions, in any order. |
|
inlinenoexcept |
Add a surface group.
|
inline |
Build the subdomains for a tape of a number of regions.
Aborts with a message, in every build, when a subdomain holds a region the tape does not have.
| [in,out] | a_pool | Pool to build the table in (not frozen). |
| [in] | a_numRegions | The tape's regions (Tape::getNumRegions()). |
|
inline |
Build the surface groups.
| [in,out] | a_pool | Pool to build the selectors in (not frozen). |
|
inlinenoexcept |
Whether the domain computes in a region.
| [in] | a_region | The region. |
|
inlinenoexcept |
How many selectors there are, over all surface groups.
|
inlinenoexcept |
How many subdomains there are.
|
inlinenoexcept |
How many surface groups there are.
|
inline |
The regions of a subdomain.
| [in] | a_subdomain | The subdomain (below getNumSubdomains()). |
|
inlinenoexcept |
One past the largest region in a subdomain: the fewest regions a tape must have for the setup.
|
inline |
|
inline |
The surface group of a selector.
| [in] | a_selector | Its number (below getNumSelectors()). |
|
inlinenoexcept |
Whether two setups make different domains.
| [in] | a_other | The other setup. |
|
inlinenoexcept |
Whether two setups make the same domain: the same subdomains, and the same selectors in the same groups and order.
| [in] | a_other | The other setup. |
|
inline |
Remove the selectors of a surface group that equal one (to undo a click).
| [in] | a_group | The surface group. |
| [in] | a_selector | The selector. |
|
inline |
Remove a surface group and its selectors; the surface groups after it move down by one.
Aborts with a message, in every build, for a surface group not added.
| [in] | a_group | The surface group. |
|
inlinenoexcept |
What a surface is to the subdomains (as Subdomains::role()).
| T | Floating-point precision. |
| [in] | a_surface | The surface, with its sides. |
|
inlinenoexcept |
The subdomain a region is in.
| [in] | a_region | The region. |
|
inlinenoexcept |
The surface group a surface point is in (as SurfaceGroups::surfaceGroupOf()).
| T | Floating-point precision. |
| [in] | a_surface | The surface, with its sides and their materials. |
|
inlinenoexcept |
Whether a surface between two regions is one the domain must give a condition: one side or both in its regions.
| [in] | a_first | A region on one side. |
| [in] | a_second | The region on the other. |