62 zoneToPoint::typeName,
63 "\n Usage: zoneToPoint zone\n\n" 64 " Select all points in the pointZone." 65 " Note:accepts wildcards for zone.\n\n" 71 void Foam::zoneToPoint::combine
86 for (
const label zonei :
zoneIDs)
88 if (zonei < 0 || zonei >= nZones)
97 Info<<
" Using zone " << zone.name() <<
" with " 98 <<
returnReduce(zone.size(), sumOp<label>()) <<
" points" 102 for (
const label pointi : zone)
114 void Foam::zoneToPoint::combine(topoSet&
set,
const bool add)
const 116 if (!zoneIDs_.empty())
122 if (zoneMatcher_.empty())
127 const labelList matched(mesh_.pointZones().indices(zoneMatcher_));
132 <<
"Cannot find any pointZone matching " 134 <<
"Valid names: " <<
flatOutput(mesh_.pointZones().names())
153 zoneMatcher_(zoneSelector)
164 zoneMatcher_(
one{}, zoneName)
170 const polyMesh&
mesh,
190 if (!
dict.readIfPresent(
"zones", zoneMatcher_))
193 zoneMatcher_.
front() =
dict.getCompat<
wordRe>(
"zone", {{
"name", 1806}});
200 const polyMesh&
mesh,
218 zoneMatcher_ = zonesSelector;
226 zoneMatcher_.front() = zoneName;
233 zoneMatcher_.
clear();
242 zoneIDs_.front() = zoneID;
254 if (verbose_ && !zoneMatcher_.empty())
256 Info<<
" Adding all points of point zones: " 264 if (verbose_ && !zoneMatcher_.empty())
266 Info<<
" Removing all points of point zones: "
The topoSetPointSource is a intermediate class for handling topoSet sources for selecting points...
const labelIOList & zoneIDs
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
void resize(const label len)
Adjust allocated size of list.
label nPoints() const noexcept
Number of mesh points.
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.
constexpr char nl
The newline '\n' character (0x0a)
T & front()
Access first element of the list, position [0].
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)
Perform reduction on a copy, using specified binary operation.
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.
UList< label > labelUList
A UList of labels.
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
A topoSetPointSource to convert pointZone(s) to a pointSet.
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
void clear()
Clear the list, i.e. set size to zero.
label size() const noexcept
The number of entries in the list.
setAction
Enumeration defining various actions.
A List of wordRe with additional matching capabilities.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings...
void clear()
Clear string and regular expression.
const polyMesh & mesh_
Reference to the mesh.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
defineTypeNameAndDebug(combustionModel, 0)
General set of labels of mesh quantity (points, cells, faces).
const wordRes & zones() const noexcept
Return the current zones selector.
const pointZoneMesh & pointZones() const noexcept
Return point zone mesh.
Subtract elements from current set.
#define WarningInFunction
Report a warning using Foam::Warning.
Class with constructor to add usage string to table.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Mesh consisting of general polyhedral cells.
List< label > labelList
A List of labels.
zoneToPoint(const polyMesh &mesh, const wordRes &zoneSelector)
Construct from mesh and zones selector.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.