35 const word callerName,
45 <<
" : Bounds " << userBounds
46 <<
" do not overlap the mesh bounding box " << meshBounds
87 const auto& cellCentres =
static_cast<const fvMesh&
>(
mesh).
C();
89 if (userBounds.
empty())
98 for (
const label celli : cellsToSelect)
100 const point& cc = cellCentres[celli];
112 for (
const label celli : cellsToSelect)
114 const point& cc = cellCentres[celli];
120 cellsToSelect.unset(celli);
132 cellsToSelect.
resize(len);
134 for (label celli=0; celli < len; ++celli)
136 const point& cc = cellCentres[celli];
140 cellsToSelect.
set(celli);
145 return cellsToSelect;
154 const word callerName,
163 mesh, userBounds, zoneNames, meshBounds
168 checkOverlap(callerName, meshBounds, userBounds);
171 return cellsToSelect;
Graphite solid properties.
void resize(const label numElem, const unsigned int val=0u)
Reset addressable list size, does not shrink the allocated size.
bitSet selection(const labelUList &zoneIds) const
label findIndex(const wordRe &key) const
Zone index for the first match, return -1 if not found.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void set(const bitSet &bitset)
Set specified bits from another bitset.
A bounding box defined in terms of min/max extrema points.
bool valid() const
Bounding box is non-inverted.
bool overlaps(const boundBox &bb) const
Overlaps/touches boundingBox?
void reduce()
Parallel reduction of min/max values.
bool contains(const point &pt) const
Contains point? (inside or on edge)
bool empty() const
Bounding box is inverted, contains no points.
void add(const boundBox &bb)
Extend to include the second box.
void clear()
Clear bounding box and make it an inverted box.
static void checkOverlap(const word callerName, const boundBox &meshBounds, const boundBox &userBounds)
Check and warn if bounding boxes do not intersect.
Mesh data needed to do the Finite Volume discretisation.
Mesh consisting of general polyhedral cells.
const boundBox & bounds() const
Return mesh bounding box.
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
label nCells() const noexcept
Number of mesh cells.
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
#define WarningInFunction
Report a warning using Foam::Warning.
Ostream & endl(Ostream &os)
Add newline and flush stream.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce (copy) and return value.
constexpr char nl
The newline '\n' character (0x0a)