62 "\n Usage: boxToPoint ((minx miny minz) (maxx maxy maxz))\n\n"
63 " Select all points with coordinate within bounding box\n\n"
93void Foam::boxToPoint::combine(topoSet& set,
const bool add)
const
100 for (
const auto& bb : bbs_)
102 if (bb.contains(ctrs[elemi]))
146 if (!
dict.readIfPresent(
"boxes", bbs_))
149 if (!dict.readIfPresent(
"box", bbs_.front()))
151 readBoxDim(dict, bbs_.front());
159 const polyMesh&
mesh,
180 Info<<
" Adding points that are within boxes "
181 << bbs_ <<
" ..." <<
endl;
190 Info<<
" Removing points that are within boxes "
191 << bbs_ <<
" ..." <<
endl;
Macros for easy insertion into run-time selection tables.
#define addNamedToRunTimeSelectionTable(baseType, thisType, argNames, lookupName)
Add to construction table with 'lookupName' as the key.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
readOption
Enumeration defining read preferences.
@ READ_IF_PRESENT
Reading is optional [identical to LAZY_READ].
@ MUST_READ
Reading required.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
const point & max() const noexcept
Maximum describing the bounding box.
const point & min() const noexcept
Minimum describing the bounding box.
A topoSetPointSource to select all points based on whether they are inside given bounding box(es).
boxToPoint(const polyMesh &mesh, const treeBoundBoxList &bbs)
Construct from components, copying bounding boxes.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
Mesh consisting of general polyhedral cells.
virtual const pointField & points() const
Return raw points.
The topoSetPointSource is a intermediate class for handling topoSet sources for selecting points.
topoSetPointSource(const polyMesh &mesh)
Construct from mesh.
Class with constructor to add usage string to table.
Base class of a source for a topoSet.
void addOrDelete(topoSet &set, const label id, const bool add) const
Add or delete id from set. Add when 'add' is true.
setAction
Enumeration defining various actions.
@ SUBTRACT
Subtract elements from current set.
@ ADD
Add elements to current set.
@ NEW
Create a new set and ADD elements to it.
bool verbose_
Output verbosity (default: true).
const polyMesh & mesh() const noexcept
Reference to the mesh.
const polyMesh & mesh_
Reference to the mesh.
static Istream & checkIs(Istream &is)
Check state of stream.
General set of labels of mesh quantity (points, cells, faces).
Standard boundBox with extra functionality for use in octree.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
List< treeBoundBox > treeBoundBoxList
A List of treeBoundBox.
refinementData transform(const tensor &, const refinementData val)
No-op rotational transform for base types.
messageStream Info
Information stream (stdout output on master, null elsewhere).
static void readBoxDim(const dictionary &dict, treeBoundBox &bb)
Ostream & endl(Ostream &os)
Add newline and flush stream.
void add(DimensionedField< scalar, GeoMesh > &result, const dimensioned< scalar > &dt1, const DimensionedField< scalar, GeoMesh > &f2)
vectorField pointField
pointField is a vectorField.
dict add("bounds", meshBb)
#define forAll(list, i)
Loop across all elements in list.