45 shapeToCell::typeName,
46 "\n Usage: shapeToCell tet|pyr|prism|hex|tetWedge|wedge|splitHex\n\n" 47 " Select all cells of given cellShape.\n" 48 " (splitHex hardcoded with internal angle < 10 degrees)\n" 58 void Foam::shapeToCell::combine(topoSet&
set,
const bool add)
const 60 if (type_ ==
"splitHex")
62 for (
label celli = 0; celli < mesh_.nCells(); celli++)
64 cellFeatures superCell(mesh_, featureCos, celli);
66 if (hexMatcher().
isA(superCell.faces()))
68 addOrDelete(
set, celli, add);
80 if (cellShapes[celli].model() == wantedModel)
82 addOrDelete(
set, celli, add);
115 type_(dict.
lookup(
"type"))
157 Info<<
" Adding all cells of type " << type_ <<
" ..." <<
endl;
163 Info<<
" Removing all cells of type " << type_ <<
" ..." <<
endl;
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
#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.
static const cellModel * lookup(const word &)
Look up a model by name and return a pointer to the model or nullptr.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Unit conversion functions.
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.
AccessType combine(const List< T > &, AccessOp aop=accessOp< T >())
Combines sublists into one big list.
Macros for easy insertion into run-time selection tables.
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
Base class of a source for a topoSet.
virtual ~shapeToCell()
Destructor.
List< cellShape > cellShapeList
List of cellShapes and PtrList of List of cellShape.
dimensionedScalar cos(const dimensionedScalar &ds)
A class for handling words, derived from string.
setAction
Enumeration defining the valid actions.
static scalar featureCos
Cos of feature angle for polyHedral to be splitHex.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
General set of labels of mesh quantity (points, cells, faces).
shapeToCell(const polyMesh &mesh, const word &type)
Construct from components.
Class with constructor to add usage string to table.
Mesh consisting of general polyhedral cells.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.