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" 57 const word& faceSetName,
58 const word& cellSetName,
63 faceSetName_(faceSetName),
64 cellSetName_(cellSetName),
76 faceSetName_(dict.
lookup(
"faceSet")),
77 cellSetName_(dict.
lookup(
"cellSet")),
89 faceSetName_(checkIs(is)),
90 cellSetName_(checkIs(is)),
109 if (!isA<faceZoneSet>(
set))
112 <<
"Operation only allowed on a faceZoneSet." <<
endl;
120 Info<<
" Adding all faces from faceSet " << faceSetName_
124 faceSet fSet(mesh_, faceSetName_);
125 cellSet cSet(mesh_, cellSetName_);
133 label facei = iter.key();
135 if (!fzSet.
found(facei))
137 bool flipFace =
false;
139 label own = mesh_.faceOwner()[facei];
140 bool ownFound = cSet.
found(own);
142 if (mesh_.isInternalFace(facei))
144 label nei = mesh_.faceNeighbour()[facei];
145 bool neiFound = cSet.
found(nei);
147 if (ownFound && !neiFound)
151 else if (!ownFound && neiFound)
158 <<
"One of owner or neighbour of internal face " 159 << facei <<
" should be in cellSet " 161 <<
" to be able to determine orientation." 163 <<
"Face:" << facei <<
" own:" << own
164 <<
" OwnInCellSet:" << ownFound
166 <<
" NeiInCellSet:" << neiFound
172 flipFace = !ownFound;
178 flipFace = !flipFace;
181 newAddressing.append(facei);
182 newFlipMap.append(flipFace);
192 Info<<
" Removing all faces from faceSet " << faceSetName_
207 newFlipMap.append(fzSet.
flipMap()[i]);
const boolList & flipMap() const
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
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.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
Ostream & endl(Ostream &os)
Add newline and flush stream.
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/any.
setsToFaceZone(const polyMesh &mesh, const word &faceSetName, const word &cellSetName, const Switch &flip)
Construct from components.
Macros for easy insertion into run-time selection tables.
Base class of a source for a topoSet.
virtual ~setsToFaceZone()
Destructor.
bool found(const Key &) const
Return true if hashedEntry is found in table.
A class for handling words, derived from string.
setAction
Enumeration defining the valid actions.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
void updateSet()
Sort addressing and make faceSet part consistent with addressing.
Like faceSet but -reads data from faceZone -updates faceZone when writing.
General set of labels of mesh quantity (points, cells, faces).
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
#define WarningInFunction
Report a warning using Foam::Warning.
Class with constructor to add usage string to table.
A collection of cell labels.
Mesh consisting of general polyhedral cells.
const labelList & addressing() const
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.