62 "\n Usage: nbrToCell <nNeighbours>\n\n"
63 " Select all cells with <= nNeighbours neighbouring cells\n\n"
69void Foam::nbrToCell::combine(topoSet& set,
const bool add)
const
86 label facei =
pp.start();
89 isCoupled[facei-
mesh_.nInternalFaces()] =
true;
97 const cell& cFaces =
cells[celli];
101 for (
const label facei : cFaces)
103 if (
mesh_.isInternalFace(facei))
107 else if (isCoupled[facei-
mesh_.nInternalFaces()])
113 if (nNbrCells <= minNbrs_)
168 Info<<
" Adding cells with only " << minNbrs_
169 <<
" or fewer neighbouring cells" <<
" ..." <<
endl;
178 Info<<
" Removing cells with only " << minNbrs_
179 <<
" or fewer neighbouring cells" <<
" ..." <<
endl;
Macros for easy insertion into run-time selection tables.
#define addNamedToRunTimeSelectionTable(baseType, thisType, argNames, lookupName)
Add to construction table with 'lookupName' as the key.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A topoSetCellSource to select cells with N or less number of neighbouring cells (i....
nbrToCell(const polyMesh &mesh, const label minNbrs)
Construct from components.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
Mesh consisting of general polyhedral cells.
const cellList & cells() const
The topoSetCellSource is a intermediate class for handling topoSet sources for selecting cells.
topoSetCellSource(const polyMesh &mesh)
Construct from mesh.
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.
bool verbose_
Output verbosity (default: true).
const polyMesh & mesh() const noexcept
Reference to the mesh.
const polyMesh & mesh_
Reference to the mesh.
static Istream & checkIs(Istream &is)
Check state of stream.
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
label readLabel(const char *buf)
Parse entire buffer as a label, skipping leading/trailing whitespace.
messageStream Info
Information stream (stdout output on master, null elsewhere).
MinMax< label > labelMinMax
A label min/max range.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void add(DimensionedField< scalar, GeoMesh > &result, const dimensioned< scalar > &dt1, const DimensionedField< scalar, GeoMesh > &f2)
List< cell > cellList
List of cell.
List< bool > boolList
A List of bools.
dict add("bounds", meshBb)
#define forAll(list, i)
Loop across all elements in list.