51 void Foam::faceToCell::combine(topoSet& set,
const bool add)
const
54 faceSet loadedSet(
mesh_, setName_);
60 const label facei = iter.key();
62 if ((option_ ==
OWNER) || (option_ ==
ANY))
85 Map<label> facesPerCell(loadedSet.size());
89 const label facei = iter.key();
94 if (fndOwn == facesPerCell.end())
96 facesPerCell.insert(own, 1);
109 if (fndNei == facesPerCell.end())
111 facesPerCell.insert(nei, 1);
124 const label celli = iter.key();
157 setName_(
dict.lookup(
"set")),
158 option_(faceActionNames_.
read(
dict.lookup(
"option")))
178 Info<<
" Adding cells according to faceSet " << setName_
185 Info<<
" Removing cells according to faceSet " << setName_
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Macros for easy insertion into run-time selection tables.
friend class iterator
Declare friendship with the iterator.
void size(const label)
Override size to be inconsistent with allocated storage.
Initialise the NamedEnum HashTable from the static list of names.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
A topoSetSource to select cells based on usage in faces.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
faceToCell(const polyMesh &mesh, const word &setName, const faceAction option)
Construct from components.
virtual ~faceToCell()
Destructor.
static const NamedEnum< faceAction, 4 > faceActionNames_
Names of the valid options.
faceAction
Enumeration defining the valid options.
Mesh consisting of general polyhedral cells.
virtual const labelList & faceOwner() const
Return face owner.
virtual const labelList & faceNeighbour() const
Return face neighbour.
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
const cellList & cells() const
Base class of a source for a topoSet.
void addOrDelete(topoSet &set, const label celli, const bool) const
Add (if bool) celli to set or delete celli from set.
setAction
Enumeration defining the valid actions.
General set of labels of mesh quantity (points, cells, faces).
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
bool read(const char *, int32_t &)
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(combustionModel, 0)
void add(LagrangianPatchField< typename typeOfSum< Type1, Type2 >::type > &f, const LagrangianPatchField< Type1 > &f1, const LagrangianPatchField< Type2 > &f2)
treeBoundBox combine(const treeBoundBox &a, const treeBoundBox &b)