Go to the documentation of this file.
49 "\n Usage: faceToCell <faceSet> neighbour|owner|any|all\n\n"
50 " Select cells that are the owner|neighbour|any"
51 " of the faces in the faceSet or where all faces are in the faceSet\n\n"
58 Foam::faceToCell::faceActionNames_
60 { faceAction::ANY,
"any" },
61 { faceAction::ALL,
"all" },
62 { faceAction::OWNER,
"owner" },
63 { faceAction::NEIGHBOUR,
"neighbour" },
69 void Foam::faceToCell::combine
77 faceSet loadedSet(
mesh_, setName);
82 for (
const label facei : faceLabels)
84 if ((option_ ==
OWNER) || (option_ ==
ANY))
107 Map<label> facesPerCell(loadedSet.size());
109 for (
const label facei : faceLabels)
125 const label celli = iter.key();
126 const label
count = iter.val();
147 names_(
one{}, setName),
160 option_(faceActionNames_.get(
"option",
dict))
178 names_(
one{},
word(checkIs(is))),
179 option_(faceActionNames_.read(checkIs(is)))
195 Info<<
" Adding cells according to faceSet "
199 for (
const word& setName : names_)
208 Info<<
" Removing cells according to faceSet "
212 for (
const word& setName : names_)
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Add elements to current set.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
void set(List< bool > &bools, const labelRange &range)
Set the specified range 'on' in a boolList.
faceAction
Enumeration defining the valid options.
A class for handling words, derived from Foam::string.
Class with constructor to add usage string to table.
const cellList & cells() const
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
setAction
Enumeration defining the valid actions.
Create a new set and ADD elements to it.
Mesh consisting of general polyhedral cells.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
messageStream Info
Information stream (stdout output on master, null elsewhere)
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
virtual const labelList & faceOwner() const
Return face owner.
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
General set of labels of mesh quantity (points, cells, faces).
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Macros for easy insertion into run-time selection tables.
Subtract elements from current set.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
faceToCell(const polyMesh &mesh, const word &setName, const faceAction option)
Construct from components.
bool isInternalFace(const label faceIndex) const noexcept
Return true if given face label is internal to the mesh.
forAllConstIters(mixture.phases(), phase)
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
The topoSetCellSource is a intermediate class for handling topoSet sources for selecting cells.
void addOrDelete(topoSet &set, const label id, const bool add) const
Add or delete id from set. Add when 'add' is true.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
const polyMesh & mesh_
Reference to the mesh.
defineTypeNameAndDebug(combustionModel, 0)
virtual const labelList & faceNeighbour() const
Return face neighbour.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const