57 "\n Usage: faceToCell <faceSet> neighbour|owner|any|all\n\n" 58 " Select cells that are the owner|neighbour|any" 59 " of the faces in the faceSet or where all faces are in the faceSet\n\n" 63 Foam::faceToCell::faceActionNames_;
68 void Foam::faceToCell::combine(
topoSet&
set,
const bool add)
const 71 faceSet loadedSet(mesh_, setName_);
77 const label facei = iter.key();
79 if ((option_ == OWNER) || (option_ == ANY))
81 const label celli = mesh_.faceOwner()[facei];
83 addOrDelete(
set, celli, add);
86 if (mesh_.isInternalFace(facei))
88 if ((option_ == NEIGHBOUR) || (option_ == ANY))
90 const label celli = mesh_.faceNeighbour()[facei];
92 addOrDelete(
set, celli, add);
106 const label facei = iter.key();
107 const label own = mesh_.faceOwner()[facei];
111 if (fndOwn == facesPerCell.
end())
113 facesPerCell.insert(own, 1);
120 if (mesh_.isInternalFace(facei))
122 label nei = mesh_.faceNeighbour()[facei];
126 if (fndNei == facesPerCell.
end())
128 facesPerCell.insert(nei, 1);
141 const label celli = iter.key();
143 if (iter() == mesh_.cells()[celli].size())
145 addOrDelete(
set, celli, add);
174 setName_(dict.
lookup(
"set")),
175 option_(faceActionNames_.read(dict.
lookup(
"option")))
186 setName_(checkIs(is)),
187 option_(faceActionNames_.read(checkIs(is)))
207 Info<<
" Adding cells according to faceSet " << setName_
214 Info<<
" Removing cells according to faceSet " << setName_
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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...
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.
Initialise the NamedEnum HashTable from the static list of names.
AccessType combine(const List< T > &, AccessOp aop=accessOp< T >())
Combines sublists into one big list.
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.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
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.
Class with constructor to add usage string to table.
Mesh consisting of general polyhedral cells.
faceAction
Enumeration defining the valid options.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.