56 const dictionary&
dict
60 setName_(
dict.lookupBackwardsCompatible<word>({
"set",
"faceSet"}))
78 if (!isA<faceZoneSet>(set))
81 <<
"Operation only allowed on a faceZoneSet." <<
endl;
85 faceZoneSet& fzSet = refCast<faceZoneSet>(set);
89 Info<<
" Adding all faces from faceSet " << setName_
93 faceSet fSet(mesh_, setName_);
96 DynamicList<label> newAddressing(fzSet.addressing());
97 DynamicList<bool> newFlipMap(fzSet.flipMap());
101 label facei = iter.key();
103 if (!fzSet.found(facei))
105 newAddressing.append(facei);
106 newFlipMap.append(
false);
110 fzSet.addressing().transfer(newAddressing);
111 fzSet.flipMap().transfer(newFlipMap);
116 Info<<
" Removing all faces from faceSet " << setName_
120 faceSet loadedSet(mesh_, setName_);
123 DynamicList<label> newAddressing(fzSet.addressing().size());
124 DynamicList<bool> newFlipMap(fzSet.flipMap().size());
126 forAll(fzSet.addressing(), i)
128 if (!loadedSet.found(fzSet.addressing()[i]))
130 newAddressing.append(fzSet.addressing()[i]);
131 newFlipMap.append(fzSet.flipMap()[i]);
134 fzSet.addressing().transfer(newAddressing);
135 fzSet.flipMap().transfer(newFlipMap);
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Macros for easy insertion into run-time selection tables.
virtual ~setToFaceZone()
Destructor.
setToFaceZone(const polyMesh &mesh, const word &setName)
Construct from components.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
setAction
Enumeration defining the valid actions.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define WarningInFunction
Report a warning using Foam::Warning.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
Ostream & endl(Ostream &os)
Add newline and flush stream.
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)