41 void Foam::cylinderAnnulusToFace::combine(topoSet&
set,
const bool add)
const 43 const vector axis = point2_ - point1_;
44 const scalar orad2 =
sqr(outerRadius_);
45 const scalar irad2 =
sqr(innerRadius_);
46 const scalar magAxis2 =
magSqr(axis);
52 vector d = ctrs[facei] - point1_;
53 scalar magD = d & axis;
55 if ((magD > 0) && (magD < magAxis2))
57 scalar d2 = (d & d) -
sqr(magD)/magAxis2;
58 if ((d2 < orad2) && (d2 > irad2))
60 addOrDelete(
set, facei, add);
74 const scalar outerRadius,
75 const scalar innerRadius
81 outerRadius_(outerRadius),
82 innerRadius_(innerRadius)
95 outerRadius_(dict.
lookup<scalar>(
"outerRadius")),
96 innerRadius_(dict.
lookup<scalar>(
"innerRadius"))
116 Info<<
" Adding faces with centre within cylinder annulus," 118 << point1_ <<
", point2 = " << point2_ <<
" and outer radius = " 119 << outerRadius_ <<
" and inner radius = " << innerRadius_ <<
endl;
125 Info<<
" Removing faces with centre within cylinder, with point1 = " 126 << point1_ <<
", point2 = " << point2_ <<
" and outer radius = " 127 << outerRadius_ <<
" and inner radius " << innerRadius_ <<
endl;
cylinderAnnulusToFace(const polyMesh &mesh, const vector &point1, const vector &point2, const scalar outerRadius, const scalar innerRadius)
Construct from components.
#define forAll(list, i)
Loop across all elements in list.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
Vector< scalar > vector
A scalar version of the templated Vector.
Macros for easy insertion into run-time selection tables.
virtual ~cylinderAnnulusToFace()
Base class of a source for a topoSet.
vectorField pointField
pointField is a vectorField.
setAction
Enumeration defining the valid actions.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
General set of labels of mesh quantity (points, cells, faces).
Mesh consisting of general polyhedral cells.
ITstream & lookupBackwardsCompatible(const wordList &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream, trying a list of keywords.
treeBoundBox combine(const treeBoundBox &a, const treeBoundBox &b)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.