Go to the documentation of this file.
42 cylinderAnnulusToCell::typeName,
43 "\n Usage: cylinderAnnulusToCell (p1X p1Y p1Z) (p2X p2Y p2Z)"
44 " outerRadius innerRadius\n\n"
45 " Select all cells with cell centre within bounding cylinder annulus\n\n"
56 const scalar magAxis2 =
magSqr(axis);
63 scalar magD = d & axis;
65 if ((magD > 0) && (magD < magAxis2))
67 scalar d2 = (d & d) -
sqr(magD)/magAxis2;
68 if ((d2 < orad2) && (d2 > irad2))
84 const scalar outerRadius,
85 const scalar innerRadius
91 outerRadius_(outerRadius),
92 innerRadius_(innerRadius)
141 Info<<
" Adding cells with centre within cylinder annulus,"
143 << p1_ <<
", p2 = " << p2_ <<
" and outer radius = " << outerRadius_
144 <<
" and inner radius = " << innerRadius_
151 Info<<
" Removing cells with centre within cylinder, with p1 = "
152 << p1_ <<
", p2 = " << p2_ <<
" and outer radius = " << outerRadius_
153 <<
" and inner radius " << innerRadius_
scalar outerRadius_
Outer Radius.
#define forAll(list, i)
Loop across all elements in list.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
AccessType combine(const List< T > &, AccessOp aop=accessOp< T >())
Combines sublists into one big list.
Class with constructor to add usage string to table.
cylinderAnnulusToCell(const polyMesh &mesh, const vector &p1, const vector &p2, const scalar outerRadius, const scalar innerRadius)
Construct from components.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
setAction
Enumeration defining the valid actions.
Mesh consisting of general polyhedral cells.
static addToUsageTable usage_
Add usage string.
Pre-declare SubField and related Field type.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
General set of labels of mesh quantity (points, cells, faces).
vector p1_
First point on cylinder axis.
A list of keyword definitions, which are a keyword followed by any number of values (e....
scalar innerRadius_
Inner Radius.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Macros for easy insertion into run-time selection tables.
Base class of a source for a topoSet.
void combine(topoSet &set, const bool add) const
const vectorField & cellCentres() const
dimensionedSymmTensor sqr(const dimensionedVector &dv)
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
virtual ~cylinderAnnulusToCell()
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
void addOrDelete(topoSet &set, const label cellI, const bool) const
Add (if bool) cellI to set or delete cellI from set.
vector p2_
Second point on cylinder axis.