54 Foam::faceToCell::faceActionNames_;
59 void Foam::faceToCell::combine(
topoSet&
set,
const bool add)
const 62 faceSet loadedSet(mesh_, setName_);
68 const label facei = iter.key();
70 if ((option_ == OWNER) || (option_ == ANY))
72 const label celli = mesh_.faceOwner()[facei];
74 addOrDelete(
set, celli, add);
77 if (mesh_.isInternalFace(facei))
79 if ((option_ == NEIGHBOUR) || (option_ == ANY))
81 const label celli = mesh_.faceNeighbour()[facei];
83 addOrDelete(
set, celli, add);
97 const label facei = iter.key();
98 const label own = mesh_.faceOwner()[facei];
102 if (fndOwn == facesPerCell.
end())
104 facesPerCell.insert(own, 1);
111 if (mesh_.isInternalFace(facei))
113 label nei = mesh_.faceNeighbour()[facei];
117 if (fndNei == facesPerCell.
end())
119 facesPerCell.insert(nei, 1);
132 const label celli = iter.key();
134 if (iter() == mesh_.cells()[celli].size())
136 addOrDelete(
set, celli, add);
165 setName_(dict.
lookup(
"set")),
166 option_(faceActionNames_.read(dict.
lookup(
"option")))
186 Info<<
" Adding cells according to faceSet " << setName_
193 Info<<
" Removing cells according to faceSet " << setName_
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Initialise the NamedEnum HashTable from the static list of names.
label size() const
Return number of elements in table.
Macros for easy insertion into run-time selection tables.
Base class of a source for a topoSet.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
A class for handling words, derived from string.
virtual ~faceToCell()
Destructor.
setAction
Enumeration defining the valid actions.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
General set of labels of mesh quantity (points, cells, faces).
faceToCell(const polyMesh &mesh, const word &setName, const faceAction option)
Construct from components.
Mesh consisting of general polyhedral cells.
faceAction
Enumeration defining the valid options.
treeBoundBox combine(const treeBoundBox &a, const treeBoundBox &b)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.