Go to the documentation of this file.
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")),
80 flip_(
dict.lookupOrDefault(
"flip",
false))
92 faceSetName_(checkIs(is)),
93 cellSetName_(checkIs(is)),
112 if (!isA<faceZoneSet>(set))
115 <<
"Operation only allowed on a faceZoneSet." <<
endl;
123 Info<<
" Adding all faces from faceSet " << faceSetName_
127 faceSet fSet(mesh_, faceSetName_);
128 cellSet cSet(mesh_, cellSetName_);
136 label faceI = iter.key();
138 if (!fzSet.
found(faceI))
140 bool flipFace =
false;
142 label own = mesh_.faceOwner()[faceI];
143 bool ownFound = cSet.
found(own);
145 if (mesh_.isInternalFace(faceI))
147 label nei = mesh_.faceNeighbour()[faceI];
148 bool neiFound = cSet.
found(nei);
150 if (ownFound && !neiFound)
154 else if (!ownFound && neiFound)
161 <<
"One of owner or neighbour of internal face "
162 << faceI <<
" should be in cellSet "
164 <<
" to be able to determine orientation."
166 <<
"Face:" << faceI <<
" own:" << own
167 <<
" OwnInCellSet:" << ownFound
169 <<
" NeiInCellSet:" << neiFound
175 flipFace = !ownFound;
181 flipFace = !flipFace;
184 newAddressing.
append(faceI);
185 newFlipMap.
append(flipFace);
195 Info<<
" Removing all faces from faceSet " << faceSetName_
const labelList & addressing() const
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
A class for handling words, derived from string.
#define forAll(list, i)
Loop across all elements in list.
void updateSet()
Sort addressing and make faceSet part consistent with addressing.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
Class with constructor to add usage string to table.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
Ostream & endl(Ostream &os)
Add newline and flush stream.
setAction
Enumeration defining the valid actions.
const boolList & flipMap() const
Mesh consisting of general polyhedral cells.
virtual ~setsToFaceZone()
Destructor.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
setsToFaceZone(const polyMesh &mesh, const word &faceSetName, const word &cellSetName, const Switch &flip)
Construct from components.
Like faceSet but updates faceZone when writing.
const word & name() const
Return name.
General set of labels of mesh quantity (points, cells, faces).
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
bool found(const Key &) const
Return true if hashedEntry is found in table.
Base class of a source for a topoSet.
A collection of cell labels.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
static addToUsageTable usage_
Add usage string.
void size(const label)
Override size to be inconsistent with allocated storage.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.