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" 63 void Foam::shapeToCell::combine(topoSet&
set,
const bool add)
const 65 if (shape_ ==
"splitHex")
67 for (label celli = 0; celli <
mesh_.
nCells(); ++celli)
102 topoSetCellSource(
mesh),
115 const polyMesh&
mesh,
116 const dictionary&
dict 125 const polyMesh&
mesh,
129 topoSetCellSource(
mesh),
152 Info<<
" Adding all " << shape_ <<
" cells ..." <<
endl;
161 Info<<
" Removing all " << shape_ <<
" cells ..." <<
endl;
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Create a new set and ADD elements to it.
Add elements to current set.
Unit conversion functions.
const cellShapeList & cellShapes() const
Return cell shapes.
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< cellShape > cellShapeList
List of cellShape.
static bool test(const UList< face > &faces)
Test if given list of faces satisfies criteria for HEX. (6 quad)
void addOrDelete(topoSet &set, const label id, const bool add) const
Add or delete id from set. Add when 'add' is true.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
static const cellModel & ref(const modelType model)
Look up reference to cellModel by enumeration. Fatal on failure.
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
dimensionedScalar cos(const dimensionedScalar &ds)
A class for handling words, derived from Foam::string.
setAction
Enumeration defining various actions.
static const cellModel * ptr(const modelType model)
Look up pointer to cellModel by enumeration, or nullptr on failure.
shapeToCell(const polyMesh &mesh, const word &shapeName)
Construct from components.
const polyMesh & mesh_
Reference to the mesh.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
static scalar featureCos
Cos of feature angle for polyHedral to be splitHex.
defineTypeNameAndDebug(combustionModel, 0)
A topoSetCellSource to select cells based on the type of their cell shapes.
Subtract elements from current set.
Class with constructor to add usage string to table.
label nCells() const noexcept
Number of mesh cells.
messageStream Info
Information stream (stdout output on master, null elsewhere)
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)