53 faceZoneToCell::typeName,
54 "\n Usage: faceZoneToCell zone master|slave\n\n" 55 " Select master or slave side of the faceZone." 56 " Note:accepts wildcards for zone.\n\n" 61 Foam::faceZoneToCell::faceActionNames_;
66 void Foam::faceZoneToCell::combine(
topoSet&
set,
const bool add)
const 68 bool hasMatched =
false;
70 forAll(mesh_.faceZones(), i)
74 if (zoneName_.match(zone.
name()))
83 Info<<
" Found matching zone " << zone.
name()
85 <<
" cells on selected side." <<
endl;
92 if (cellLabels[i] >= 0 && cellLabels[i] < mesh_.nCells())
94 addOrDelete(
set, cellLabels[i], add);
103 <<
"Cannot find any faceZone named " << zoneName_ <<
endl 104 <<
"Valid names are " << mesh_.faceZones().names() <<
endl;
114 const word& zoneName,
131 zoneName_(dict.
lookup(
"name")),
132 option_(faceActionNames_.read(dict.
lookup(
"option")))
143 zoneName_(checkIs(is)),
144 option_(faceActionNames_.read(checkIs(is)))
164 Info<<
" Adding all " << faceActionNames_[option_]
165 <<
" cells of faceZone " << zoneName_ <<
" ..." <<
endl;
171 Info<<
" Removing all " << faceActionNames_[option_]
172 <<
" cells of faceZone " << zoneName_ <<
" ..." <<
endl;
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
#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)...
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const labelList & masterCells() const
Return labels of master cells (cells next to the master face.
Initialise the NamedEnum HashTable from the static list of names.
AccessType combine(const List< T > &, AccessOp aop=accessOp< T >())
Combines sublists into one big list.
virtual ~faceZoneToCell()
Destructor.
Macros for easy insertion into run-time selection tables.
Base class of a source for a topoSet.
faceAction
Enumeration defining the valid options.
A class for handling words, derived from string.
setAction
Enumeration defining the valid actions.
const word & name() const
Return name.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
const labelList & slaveCells() const
Return labels of slave cells.
General set of labels of mesh quantity (points, cells, faces).
faceZoneToCell(const polyMesh &mesh, const word &zoneName, const faceAction option)
Construct from components.
#define WarningInFunction
Report a warning using Foam::Warning.
Class with constructor to add usage string to table.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Mesh consisting of general polyhedral cells.
A subset of mesh faces organised as a primitive patch.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.