50 shapeToCell::typeName,
51 "\n Usage: shapeToCell tet|pyr|prism|hex|tetWedge|wedge|splitHex\n\n"
52 " Select all cells of given cellShape.\n"
53 " (splitHex hardcoded with internal angle < 10 degrees)\n"
63void Foam::shapeToCell::combine(topoSet& set,
const bool add)
const
65 if (shape_ ==
"splitHex")
67 for (label celli = 0; celli <
mesh_.
nCells(); ++celli)
115 const polyMesh&
mesh,
120 shape_(
dict.getCompat<
word>(
"shape", {{
"type", 1806}}))
126 const polyMesh&
mesh,
130 topoSetCellSource(
mesh),
153 Info<<
" Adding all " << shape_ <<
" cells ..." <<
endl;
162 Info<<
" Removing all " << shape_ <<
" cells ..." <<
endl;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
static const cellModel * ptr(const modelType model)
Look up pointer to cellModel by enumeration, or nullptr on failure.
static const cellModel & ref(const modelType model)
Look up reference to cellModel by enumeration. Fatal on failure.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
static bool test(const UList< face > &faces)
Test if given list of faces satisfies criteria for HEX. (6 quad).
Mesh consisting of general polyhedral cells.
label nCells() const noexcept
Number of mesh cells.
A topoSetCellSource to select cells based on the type of their cell shapes.
static scalar featureCos
Cos of feature angle for polyHedral to be splitHex.
shapeToCell(const polyMesh &mesh, const word &shapeName)
Construct from components.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
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.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
void add(DimensionedField< scalar, GeoMesh > &result, const dimensioned< scalar > &dt1, const DimensionedField< scalar, GeoMesh > &f2)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensionedScalar cos(const dimensionedScalar &ds)
List< cellShape > cellShapeList
List of cellShape.
dict add("bounds", meshBb)
#define forAll(list, i)
Loop across all elements in list.
Unit conversion functions.