57 "\n Usage: cellToFace <cellSet> all|both\n\n" 58 " Select -all : all faces of cells in the cellSet\n" 59 " -both: faces where both neighbours are in the cellSet\n\n" 63 Foam::cellToFace::cellActionNames_;
68 void Foam::cellToFace::combine(
topoSet&
set,
const bool add)
const 77 cellSet loadedSet(mesh_, setName_);
84 const label celli = iter.key();
85 const labelList& cFaces = mesh_.cells()[celli];
89 addOrDelete(
set, cFaces[cFacei], add);
93 else if (option_ == BOTH)
97 const label nInt = mesh_.nInternalFaces();
99 const labelList& nei = mesh_.faceNeighbour();
104 for (
label facei = 0; facei < nInt; facei++)
106 if (loadedSet.
found(own[facei]) && loadedSet.
found(nei[facei]))
108 addOrDelete(
set, facei, add);
114 boolList neiInSet(mesh_.nFaces()-nInt,
false);
125 neiInSet[facei-nInt] = loadedSet.
found(own[facei]);
143 if (loadedSet.
found(own[facei]) && neiInSet[facei-nInt])
145 addOrDelete(
set, facei, add);
179 setName_(dict.
lookup(
"set")),
180 option_(cellActionNames_.read(dict.
lookup(
"option")))
192 setName_(checkIs(is)),
193 option_(cellActionNames_.read(checkIs(is)))
213 Info<<
" Adding faces according to cellSet " << setName_
220 Info<<
" Removing faces according to cellSet " << setName_
#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.
A list of keyword definitions, which are a keyword followed by any number of values (e...
cellAction
Enumeration defining the valid options.
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.
Macros for easy insertion into run-time selection tables.
Base class of a source for a topoSet.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
label start() const
Return start label of this patch in the polyMesh face list.
messageStream SeriousError
virtual bool coupled() const
Return true if this patch is geometrically coupled (i.e. faces and.
A class for handling words, derived from string.
setAction
Enumeration defining the valid actions.
virtual ~cellToFace()
Destructor.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
bool found(const Key &) const
Return true if hashedEntry is found in table.
cellToFace(const polyMesh &mesh, const word &setName, const cellAction option)
Construct from components.
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).
bool exists(const fileName &, const bool checkGzip=true)
Does the name exist (as DIRECTORY or FILE) in the file system?
Class with constructor to add usage string to table.
A collection of cell labels.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
static fileName localPath(const polyMesh &mesh, const word &name)
Name of file set will use.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.