45 setsToFaceZone::typeName,
46 "\n Usage: setsToFaceZone <faceSet> <slaveCellSet>\n\n" 47 " Select all faces in the faceSet." 48 " Orientated so slave side is in cellSet.\n\n" 58 const word& faceSetName,
59 const word& cellSetName,
64 faceSetName_(faceSetName),
65 cellSetName_(cellSetName),
78 faceSetName_(dict.
lookup(
"faceSet")),
79 cellSetName_(dict.
lookup(
"cellSet")),
92 faceSetName_(checkIs(is)),
93 cellSetName_(checkIs(is)),
112 if (!isA<faceZoneSet>(
set))
116 "setsToFaceZone::applyToSet(const topoSetSource::setAction" 118 ) <<
"Operation only allowed on a faceZoneSet." <<
endl;
126 Info<<
" Adding all faces from faceSet " << faceSetName_
130 faceSet fSet(mesh_, faceSetName_);
131 cellSet cSet(mesh_, cellSetName_);
139 label faceI = iter.key();
141 if (!fzSet.
found(faceI))
143 bool flipFace =
false;
145 label own = mesh_.faceOwner()[faceI];
146 bool ownFound = cSet.
found(own);
148 if (mesh_.isInternalFace(faceI))
150 label nei = mesh_.faceNeighbour()[faceI];
151 bool neiFound = cSet.
found(nei);
153 if (ownFound && !neiFound)
157 else if (!ownFound && neiFound)
165 "setsToFaceZone::applyToSet" 166 "(const topoSetSource::setAction, topoSet)" 167 ) <<
"One of owner or neighbour of internal face " 168 << faceI <<
" should be in cellSet " 170 <<
" to be able to determine orientation." 172 <<
"Face:" << faceI <<
" own:" << own
173 <<
" OwnInCellSet:" << ownFound
175 <<
" NeiInCellSet:" << neiFound
181 flipFace = !ownFound;
187 flipFace = !flipFace;
190 newAddressing.append(faceI);
191 newFlipMap.append(flipFace);
201 Info<<
" Removing all faces from faceSet " << faceSetName_
216 newFlipMap.append(fzSet.
flipMap()[i]);
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
General set of labels of mesh quantity (points, cells, faces).
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
A collection of cell labels.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void size(const label)
Override size to be inconsistent with allocated storage.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
const labelList & addressing() const
A list of keyword definitions, which are a keyword followed by any number of values (e...
setsToFaceZone(const polyMesh &mesh, const word &faceSetName, const word &cellSetName, const Switch &flip)
Construct from components.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define WarningIn(functionName)
Report a warning using Foam::Warning.
virtual ~setsToFaceZone()
Destructor.
setAction
Enumeration defining the valid actions.
Macros for easy insertion into run-time selection tables.
const word & name() const
Return name.
Like faceSet but updates faceZone when writing.
Mesh consisting of general polyhedral cells.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
Base class of a source for a topoSet.
const boolList & flipMap() const
Class with constructor to add usage string to table.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
bool found(const Key &) const
Return true if hashedEntry is found in table.
defineTypeNameAndDebug(combustionModel, 0)
void updateSet()
Sort addressing and make faceSet part consistent with addressing.