49 setToCellZone::typeName,
50 "\n Usage: setToCellZone <cellSet>\n\n" 51 " Select all cells in the cellSet.\n\n" 98 if (!isA<cellZoneSet>(
set))
101 <<
"Operation only allowed on a cellZoneSet." <<
endl;
106 cellZoneSet& zoneSet = refCast<cellZoneSet>(
set);
112 Info<<
" Adding all cells from cell set: " 113 << setName_ <<
" ..." <<
endl;
117 cellSet fSet(
mesh_, setName_);
120 DynamicList<label> newAddressing(zoneSet.addressing());
122 for (
const label celli : fSet)
124 if (!zoneSet.found(celli))
126 newAddressing.append(celli);
130 zoneSet.addressing().transfer(newAddressing);
137 Info<<
" Removing all cells from cell set: " 138 << setName_ <<
" ..." <<
endl;
142 cellSet loadedSet(
mesh_, setName_);
145 DynamicList<label> newAddressing(zoneSet.addressing().size());
147 forAll(zoneSet.addressing(), i)
149 if (!loadedSet.found(zoneSet.addressing()[i]))
151 newAddressing.append(zoneSet.addressing()[i]);
154 zoneSet.addressing().transfer(newAddressing);
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
bool verbose_
Output verbosity (default: true)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Create a new set and ADD elements to it.
Add elements to current set.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Ostream & endl(Ostream &os)
Add newline and flush stream.
Macros for easy insertion into run-time selection tables.
setToCellZone(const polyMesh &mesh, const word &setName)
Construct from components.
#define forAll(list, i)
Loop across all elements in list.
A class for handling words, derived from Foam::string.
setAction
Enumeration defining various actions.
const polyMesh & mesh_
Reference to the mesh.
defineTypeNameAndDebug(combustionModel, 0)
General set of labels of mesh quantity (points, cells, faces).
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Subtract elements from current set.
#define WarningInFunction
Report a warning using Foam::Warning.
Class with constructor to add usage string to table.
messageStream Info
Information stream (stdout output on master, null elsewhere)
The topoSetCellZoneSource is a intermediate class for handling topoSet sources for selecting cell zon...
Mesh consisting of general polyhedral cells.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.