62 "\n Usage: boxToPoint ((minx miny minz) (maxx maxy maxz))\n\n" 63 " Select all points with coordinate within bounding box\n\n" 93 void Foam::boxToPoint::combine(topoSet&
set,
const bool add)
const 99 for (
const auto& bb : bbs_)
101 if (bb.contains(ctrs[elemi]))
115 const polyMesh&
mesh,
145 if (!
dict.readIfPresent(
"boxes", bbs_))
148 if (!
dict.readIfPresent(
"box", bbs_.
front()))
158 const polyMesh&
mesh,
162 topoSetPointSource(
mesh),
179 Info<<
" Adding points that are within boxes " 180 << bbs_ <<
" ..." <<
endl;
189 Info<<
" Removing points that are within boxes " 190 << bbs_ <<
" ..." <<
endl;
static void readBoxDim(const dictionary &dict, treeBoundBox &bb)
The topoSetPointSource is a intermediate class for handling topoSet sources for selecting points...
void resize(const label len)
Adjust allocated size of list.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Create a new set and ADD elements to it.
Add elements to current set.
T & front()
Access first element of the list, position [0].
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< treeBoundBox > treeBoundBoxList
A List of treeBoundBox.
const point & min() const noexcept
Minimum describing the bounding box.
void addOrDelete(topoSet &set, const label id, const bool add) const
Add or delete id from set. Add when 'add' is true.
Macros for easy insertion into run-time selection tables.
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
virtual const pointField & points() const
Return raw points.
#define forAll(list, i)
Loop across all elements in list.
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ) const
Find entry and assign to T val. FatalIOError if it is found and the number of tokens is incorrect...
const point & max() const noexcept
Maximum describing the bounding box.
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
vectorField pointField
pointField is a vectorField.
setAction
Enumeration defining various actions.
Reading is optional [identical to LAZY_READ].
const polyMesh & mesh_
Reference to the mesh.
boxToPoint(const polyMesh &mesh, const treeBoundBoxList &bbs)
Construct from components, copying bounding boxes.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens i...
defineTypeNameAndDebug(combustionModel, 0)
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Subtract elements from current set.
Class with constructor to add usage string to table.
Standard boundBox with extra functionality for use in octree.
messageStream Info
Information stream (stdout output on master, null elsewhere)
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
Mesh consisting of general polyhedral cells.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
readOption
Enumeration defining read preferences.