11#ifndef EBGEOMETRY_SUBDOMAINS_HPP
12#define EBGEOMETRY_SUBDOMAINS_HPP
56 static constexpr uint32_t
None = 0xFFFFFFFFU;
87 Subdomains(
Pool& a_pool, const std::vector<uint32_t>& a_subdomainOf, const uint32_t a_numSubdomains)
89 this->
attach(a_pool,
"Subdomains");
94 for (uint32_t r = 0; r < a_subdomainOf.size(); r++) {
96 "Subdomains: region %u is in subdomain %u of %u",
98 unsigned(a_subdomainOf[r]),
99 unsigned(a_numSubdomains));
172 const uint32_t minus =
174 const uint32_t plus =
177 if (minus ==
None && plus ==
None) {
180 if (minus ==
None || plus ==
None) {
210static_assert(std::is_trivially_copyable_v<Subdomains>,
211 "Subdomains must be trivially copyable, for a kernel to take it");
GPU portability layer: host/device decoration macros and backend detection.
#define EBGEOMETRY_HOST_DEVICE
Mark a function as callable from both host and device code (no-op on host compilers).
Definition EBGeometry_GPU.hpp:80
#define EBGEOMETRY_HOST
Mark a function as callable from host code only (no-op on host compilers).
Definition EBGeometry_GPU.hpp:83
Utility macros for EBGeometry.
#define EBGEOMETRY_REQUIRE(cond,...)
Always-on check of user input and one-time host setup.
Definition EBGeometry_Macros.hpp:200
Placement-independent POD array views for the GPU memory foundation.
Growable bump arena for the GPU memory foundation.
SurfaceRef: which surface of a shape decides its value at a point, and the container protocol that na...
Base of every pool-resident handle: the one PoolLocation its arrays resolve against.
Definition EBGeometry_Pool.hpp:563
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::rebasedOn...
Definition EBGeometry_Pool.hpp:680
PoolHandle() noexcept=default
An unset location; the first reservation attaches it.
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().
Definition EBGeometry_Pool.hpp:665
void * base() noexcept
The base address this handle's offsets resolve against; see PoolLocation::base().
Definition EBGeometry_Pool.hpp:639
Growable bump arena over a MemoryResource.
Definition EBGeometry_Pool.hpp:205
The subdomains of a domain (see Domain), read on the host or a device: the subdomain of each region o...
Definition EBGeometry_Subdomains.hpp:51
static constexpr uint32_t None
No subdomain, or a region in no subdomain.
Definition EBGeometry_Subdomains.hpp:56
Subdomains(const Layout &a_layout, const PoolLocation &a_location) noexcept
Rebuild a view from a stored layout and the location of the pool that holds it (as a Domain does).
Definition EBGeometry_Subdomains.hpp:111
const Layout & layout() const noexcept
The arrays, as offsets.
Definition EBGeometry_Subdomains.hpp:121
uint32_t subdomainOf(const uint32_t a_region) const noexcept
The subdomain a region is in.
Definition EBGeometry_Subdomains.hpp:155
uint32_t getNumRegions() const noexcept
How many regions the table has a row for: the tape's.
Definition EBGeometry_Subdomains.hpp:143
Subdomains rebasedView(const Pool &a_pool) const noexcept
A view resolving against another pool of the table's mirror chain (see PoolHandle).
Definition EBGeometry_Subdomains.hpp:194
Subdomains() noexcept=default
No subdomains: every region is in none.
uint32_t getNumSubdomains() const noexcept
How many subdomains there are.
Definition EBGeometry_Subdomains.hpp:132
SurfaceRole role(const SurfaceRef< T > &a_surface) const noexcept
What a surface is to the subdomains at a point: from the regions on its two sides there,...
Definition EBGeometry_Subdomains.hpp:170
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_Affine.hpp:26
@ Interface
The pair of regions on its two sides there (see RegionSettings::interfaceKey()).
SurfaceRole
What a surface is to a domain, at a point, from the regions on its two sides (see Subdomains::role())...
Definition EBGeometry_Subdomains.hpp:32
@ Interface
The two sides are in two different subdomains: one surface the solver couples across.
@ None
Neither side is in a subdomain: the solver does not cut it.
@ Internal
Both sides are in the same subdomain (two of its regions touching): the solver decides; usually not c...
@ Boundary
One side is in a subdomain: cut once, from that side; its surface group gives its meaning (a boundary...
@ None
As written: the tape evaluates every operand, however many there are.
Placement-independent descriptor of a POD array inside a Pool.
Definition EBGeometry_PODVector.hpp:131
void reserveSizedFrom(Pool &a_pool, uint32_t a_count)
Reserve a_count slots from a_pool and count them all as elements.
Definition EBGeometry_PODVector.hpp:181
uint64_t endByte() const noexcept
One past the last byte this array occupies, measured from the pool base.
Definition EBGeometry_PODVector.hpp:264
T & at(void *a_base, uint32_t a_i) const noexcept
Mutable element access against a_base.
Definition EBGeometry_PODVector.hpp:220
uint32_t size() const noexcept
Number of constructed elements.
Definition EBGeometry_PODVector.hpp:248
Where a pool-resident descriptor resolves its offsets, and the rules for moving it.
Definition EBGeometry_Pool.hpp:99
The arrays, as offsets: what a Domain stores.
Definition EBGeometry_Subdomains.hpp:62
PODVector< uint32_t > m_table
The subdomain of each region, or None.
Definition EBGeometry_Subdomains.hpp:66
uint32_t m_numSubdomains
How many subdomains there are.
Definition EBGeometry_Subdomains.hpp:71
The surface that decides a shape's value at a point, as closestSurface() reports it.
Definition EBGeometry_SurfaceRef.hpp:39