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"
60Foam::cellToFace::cellActionNames_
62 { cellAction::ALL,
"all" },
63 { cellAction::BOTH,
"both" },
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_)
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
virtual fileName localPath() const
Output directory.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void resize(const label len)
Adjust allocated size of list.
fileName path() const
Return path.
T & first()
Return the first element of the list.
A topoSetFaceSource to select all the faces from given cellSet(s).
cellAction
Enumeration defining the valid options.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
const Time & time() const noexcept
Return time registry.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
Mesh consisting of general polyhedral cells.
virtual const labelList & faceOwner() const
Return face owner.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
virtual const labelList & faceNeighbour() const
Return face neighbour.
label nBoundaryFaces() const noexcept
Number of boundary faces (== nFaces - nInternalFaces)
label nInternalFaces() const noexcept
Number of internal faces.
const cellList & cells() const
The topoSetFaceSource is a intermediate class for handling topoSet sources for selecting faces.
Class with constructor to add usage string to table.
Base class of a source for a topoSet.
void addOrDelete(topoSet &set, const label id, const bool add) const
Add or delete id from set. Add when 'add' is true.
setAction
Enumeration defining various actions.
@ SUBTRACT
Subtract elements from current set.
@ ADD
Add elements to current set.
@ NEW
Create a new set and ADD elements to it.
const polyMesh & mesh_
Reference to the mesh.
General set of labels of mesh quantity (points, cells, faces).
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const polyBoundaryMesh & patches
bool read(const char *buf, int32_t &val)
Same as readInt32.
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?
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
messageStream SeriousError
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
List< bool > boolList
A List of bools.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
constexpr char nl
The newline '\n' character (0x0a)
dict add("bounds", meshBb)
#define forAll(list, i)
Loop across all elements in list.