48 void Foam::faceZoneToCell::combine(topoSet& set,
const bool add)
const
50 bool hasMatched =
false;
56 if (zoneName_.
match(zone.name()))
65 Info<<
" Found matching zone " << zone.name()
66 <<
" with " <<
returnReduce(cellLabels.size(), sumOp<label>())
67 <<
" cells on selected side." <<
endl;
74 if (cellLabels[i] >= 0 && cellLabels[i] <
mesh_.
nCells())
85 <<
"Cannot find any faceZone named " << zoneName_ <<
endl
113 zoneName_(
dict.lookupBackwardsCompatible({
"zone",
"name"})),
114 option_(faceActionNames_.read(
dict.
lookup(
"option")))
134 Info<<
" Adding all " << faceActionNames_[option_]
135 <<
" cells of faceZone " << zoneName_ <<
" ..." <<
endl;
141 Info<<
" Removing all " << faceActionNames_[option_]
142 <<
" cells of faceZone " << zoneName_ <<
" ..." <<
endl;
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
wordList toc() const
Return the table of contents.
Initialise the NamedEnum HashTable from the static list of names.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
A topoSetSource to select cells based on side of faceZone.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
virtual ~faceZoneToCell()
Destructor.
faceZoneToCell(const polyMesh &mesh, const word &zoneName, const faceAction option)
Construct from components.
static const NamedEnum< faceAction, 2 > faceActionNames_
Names of the valid options.
faceAction
Enumeration defining the valid options.
Mesh consisting of general polyhedral cells.
const faceZoneList & faceZones() const
Return face zones.
Base class of a source for a topoSet.
void addOrDelete(topoSet &set, const label celli, const bool) const
Add (if bool) celli to set or delete celli from set.
setAction
Enumeration defining the valid actions.
General set of labels of mesh quantity (points, cells, faces).
bool match(const std::string &, bool literalMatch=false) const
Smart match as regular expression or as a string.
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define WarningInFunction
Report a warning using Foam::Warning.
List< label > labelList
A List of labels.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
Ostream & endl(Ostream &os)
Add newline and flush stream.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
defineTypeNameAndDebug(combustionModel, 0)
void add(LagrangianPatchField< typename typeOfSum< Type1, Type2 >::type > &f, const LagrangianPatchField< Type1 > &f1, const LagrangianPatchField< Type2 > &f2)
treeBoundBox combine(const treeBoundBox &a, const treeBoundBox &b)