58 "\n Usage: cellToFace <cellSet> all|both\n\n" 59 " Select -all : all faces of cells in the cellSet\n" 60 " -both: faces where both neighbours are in the cellSet\n\n" 64 Foam::cellToFace::cellActionNames_;
69 void Foam::cellToFace::combine(
topoSet&
set,
const bool add)
const 78 cellSet loadedSet(mesh_, setName_);
85 const label celli = iter.key();
86 const labelList& cFaces = mesh_.cells()[celli];
90 addOrDelete(
set, cFaces[cFacei], add);
94 else if (option_ == BOTH)
98 const label nInt = mesh_.nInternalFaces();
100 const labelList& nei = mesh_.faceNeighbour();
105 for (
label facei = 0; facei < nInt; facei++)
107 if (loadedSet.
found(own[facei]) && loadedSet.
found(nei[facei]))
109 addOrDelete(
set, facei, add);
115 boolList neiInSet(mesh_.nFaces()-nInt,
false);
126 neiInSet[facei-nInt] = loadedSet.
found(own[facei]);
144 if (loadedSet.
found(own[facei]) && neiInSet[facei-nInt])
146 addOrDelete(
set, facei, add);
178 setName_(dict.
lookup(
"set")),
179 option_(cellActionNames_.read(dict.
lookup(
"option")))
190 setName_(checkIs(is)),
191 option_(cellActionNames_.read(checkIs(is)))
211 Info<<
" Adding faces according to cellSet " << setName_
218 Info<<
" Removing faces according to cellSet " << setName_
bool exists(const fileName &, const bool checkVariants=true, const bool followLink=true)
Does the name exist (as directory or file) in the file system?
#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.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
virtual bool coupled() const
Return true if this patch is geometrically coupled (i.e. faces and.
messageStream SeriousError
bool found(const Key &) const
Return true if hashedEntry is found in table.
A class for handling words, derived from string.
setAction
Enumeration defining the valid actions.
virtual ~cellToFace()
Destructor.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
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).
Class with constructor to add usage string to table.
A collection of cell labels.
label start() const
Return start label of this patch in the polyMesh face list.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
fileName localPath() const
Return the path relative to the case.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.