56 const dictionary&
dict
78 if (!isA<faceZoneSet>(set))
81 <<
"Operation only allowed on a faceZoneSet." <<
endl;
85 faceZoneSet& fSet = refCast<faceZoneSet>(set);
89 Info<<
" Adding all faces from faceZone " << setName_ <<
" ..."
93 faceZoneSet loadedSet(mesh_, setName_);
95 DynamicList<label> newAddressing(fSet.addressing());
96 DynamicList<bool> newFlipMap(fSet.flipMap());
98 forAll(loadedSet.addressing(), i)
100 if (!fSet.found(loadedSet.addressing()[i]))
102 newAddressing.append(loadedSet.addressing()[i]);
103 newFlipMap.append(loadedSet.flipMap()[i]);
106 fSet.addressing().transfer(newAddressing);
107 fSet.flipMap().transfer(newFlipMap);
112 Info<<
" Removing all faces from faceZone " << setName_ <<
" ..."
116 faceZoneSet loadedSet(mesh_, setName_);
118 DynamicList<label> newAddressing(fSet.addressing().size());
119 DynamicList<bool> newFlipMap(fSet.flipMap().size());
121 forAll(fSet.addressing(), i)
123 if (!loadedSet.found(fSet.addressing()[i]))
125 newAddressing.append(fSet.addressing()[i]);
126 newFlipMap.append(fSet.flipMap()[i]);
129 fSet.addressing().transfer(newAddressing);
130 fSet.flipMap().transfer(newFlipMap);
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
faceZoneToFaceZone(const polyMesh &mesh, const word &setName)
Construct from components.
virtual ~faceZoneToFaceZone()
Destructor.
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.
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
Ostream & endl(Ostream &os)
Add newline and flush stream.
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)