56 const dictionary&
dict
60 setName_(
dict.lookupBackwardsCompatible<word>({
"set",
"cellSet"}))
78 if (!isA<cellZoneSet>(set))
81 <<
"Operation only allowed on a cellZoneSet." <<
endl;
85 cellZoneSet& fzSet = refCast<cellZoneSet>(set);
89 Info<<
" Adding all cells from cellSet " << setName_
93 cellSet fSet(mesh_, setName_);
96 DynamicList<label> newAddressing(fzSet.addressing());
100 label celli = iter.key();
102 if (!fzSet.found(celli))
104 newAddressing.append(celli);
108 fzSet.addressing().transfer(newAddressing);
113 Info<<
" Removing all cells from cellSet " << setName_
117 cellSet loadedSet(mesh_, setName_);
120 DynamicList<label> newAddressing(fzSet.addressing().size());
122 forAll(fzSet.addressing(), i)
124 if (!loadedSet.found(fzSet.addressing()[i]))
126 newAddressing.append(fzSet.addressing()[i]);
129 fzSet.addressing().transfer(newAddressing);
#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.
setToCellZone(const polyMesh &mesh, const word &setName)
Construct from components.
virtual ~setToCellZone()
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.
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)