43 "\n Usage: zoneToCell zone\n\n" 44 " Select all cells in the cellZone." 45 " Note:accepts wildcards for zone.\n\n" 51 void Foam::zoneToCell::combine(topoSet&
set,
const bool add)
const 53 bool hasMatched =
false;
55 forAll(mesh_.cellZones(), i)
57 const cellZone& zone = mesh_.cellZones()[i];
59 if (zoneName_.match(zone.name()))
61 const labelList& cellLabels = mesh_.cellZones()[i];
63 Info<<
" Found matching zone " << zone.name()
64 <<
" with " <<
returnReduce(cellLabels.size(), sumOp<label>())
72 if (cellLabels[i] < mesh_.nCells())
74 addOrDelete(
set, cellLabels[i], add);
83 <<
"Cannot find any cellZone named " << zoneName_ <<
endl 84 <<
"Valid names are " << mesh_.cellZones().names() <<
endl;
109 zoneName_(dict.
lookup(
"name"))
120 zoneName_(checkIs(is))
140 Info<<
" Adding all cells of cellZone " << zoneName_ <<
" ..." 147 Info<<
" Removing all cells of cellZone " << zoneName_ <<
" ..."
#define forAll(list, i)
Loop across all elements in list.
A list of keyword definitions, which are a keyword followed by any number of values (e...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Ostream & endl(Ostream &os)
Add newline and flush stream.
AccessType combine(const List< T > &, AccessOp aop=accessOp< T >())
Combines sublists into one big list.
virtual ~zoneToCell()
Destructor.
Macros for easy insertion into run-time selection tables.
Base class of a source for a topoSet.
A class for handling words, derived from string.
setAction
Enumeration defining the valid actions.
List< label > labelList
A List of labels.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
General set of labels of mesh quantity (points, cells, faces).
#define WarningInFunction
Report a warning using Foam::Warning.
Class with constructor to add usage string to table.
zoneToCell(const polyMesh &mesh, const word &zoneName)
Construct from components.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Mesh consisting of general polyhedral cells.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.