Go to the documentation of this file.
51 "\n Usage: cellToFace <cellSet> all|both\n\n"
52 " Select -all : all faces of cells in the cellSet\n"
53 " -both: faces where both neighbours are in the cellSet\n\n"
60 Foam::cellToFace::cellActionNames_
62 { cellAction::ALL,
"all" },
63 { cellAction::BOTH,
"both" },
69 void Foam::cellToFace::combine
83 cellSet loadedSet(
mesh_, setName);
89 for (
const label celli : cellLabels)
96 else if (option_ ==
BOTH)
107 for (
label facei = 0; facei < nInt; ++facei)
109 if (cellLabels.found(own[facei]) && cellLabels.found(nei[facei]))
119 for (
const polyPatch& pp :
patches)
123 label facei = pp.start();
126 neiInSet[facei-nInt] = cellLabels.found(own[facei]);
135 for (
const polyPatch& pp :
patches)
139 label facei = pp.start();
142 if (cellLabels.found(own[facei]) && neiInSet[facei-nInt])
164 names_(
one(), setName),
177 option_(cellActionNames_.get(
"option",
dict))
195 names_(
one(),
word(checkIs(is))),
196 option_(cellActionNames_.read(checkIs(is)))
212 Info<<
" Adding faces according to cellSet "
216 for (
const word& setName : names_)
225 Info<<
" Removing faces according to cellSet "
229 for (
const word& setName : names_)
static fileName localPath(const polyMesh &mesh, const word &name)
Name of file set will use.
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
cellAction
Enumeration defining the valid options.
List< label > labelList
A List of labels.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
bool exists(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Does the name exist (as DIRECTORY or FILE) in the file system?
A class for handling words, derived from Foam::string.
label nInternalFaces() const
Number of internal faces.
label nFaces() const
Number of mesh faces.
Class with constructor to add usage string to table.
const Time & time() const
Return time.
const cellList & cells() const
A class representing the concept of 1 (one), which can be used to avoid manipulating objects that are...
List< bool > boolList
A List of bools.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
setAction
Enumeration defining the valid actions.
Base class of a topoSet source for selecting faces.
Create a new set and ADD elements to it.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
messageStream Info
Information stream (uses stdout - output is on the master only)
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
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 the set.
messageStream SeriousError
fileName path() const
Return path.
FlatOutput< Container > flatOutput(const Container &obj, label len=0)
Global flatOutput function.
cellToFace(const polyMesh &mesh, const word &setName, const cellAction option)
Construct from components.
const polyBoundaryMesh & patches
void addOrDelete(topoSet &set, const label id, const bool add) const
Add or delete id from set. Add when 'add' is true.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys and 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