Go to the documentation of this file.
43 cylinderAnnulusToFace,
49 cylinderAnnulusToFace,
55 cylinderAnnulusToFace,
62 cylinderAnnulusToFace,
71 cylinderAnnulusToFace::typeName,
72 "\n Usage: cylinderAnnulusToFace (p1X p1Y p1Z) (p2X p2Y p2Z)"
73 " outerRadius innerRadius\n\n"
74 " Select all faces with face centre within bounding cylinder annulus\n\n"
80 void Foam::cylinderAnnulusToFace::combine(topoSet& set,
const bool add)
const
84 const vector axis = (point2_ - point1_);
85 const scalar magAxis2 =
magSqr(axis);
86 const scalar orad2 =
sqr(radius_);
87 const scalar irad2 = innerRadius_ > 0 ?
sqr(innerRadius_) : -1;
93 const vector d = ctrs[elemi] - point1_;
94 const scalar magD = d & axis;
96 if ((magD > 0) && (magD < magAxis2))
98 const scalar d2 = (d & d) -
sqr(magD)/magAxis2;
99 if ((d2 < orad2) && (d2 > irad2))
116 const scalar innerRadius
123 innerRadius_(innerRadius)
125 if (innerRadius_ > radius_)
128 <<
"inner radius = " << innerRadius_ <<
"cannot be larger than "
129 <<
"outer radius = " << radius_
159 point1_(checkIs(is)),
160 point2_(checkIs(is)),
161 radius_(readScalar(checkIs(is))),
162 innerRadius_(readScalar(checkIs(is)))
178 Info<<
" Adding faces with centre within cylinder annulus,"
179 <<
" with p1 = " << point1_ <<
", p2 = " << point2_
180 <<
", radius = " << radius_
181 <<
", inner radius = " << innerRadius_
191 Info<<
" Removing faces with centre within cylinder annulus,"
192 <<
" with p1 = " << point1_ <<
", p2 = " << point2_
193 <<
", radius = " << radius_
194 <<
", inner radius = " << innerRadius_
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
vectorField pointField
pointField is a vectorField.
Class with constructor to add usage string to table.
A topoSetFaceSource to select all faces whose face centre inside a given bounding cylinder annulus.
Ostream & endl(Ostream &os)
Add newline and flush stream.
setAction
Enumeration defining the valid actions.
The topoSetFaceSource is a intermediate class for handling topoSet sources for selecting faces.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Create a new set and ADD elements to it.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
messageStream Info
Information stream (uses stdout - output is on the master only)
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
Apply specified action to the topoSet.
General set of labels of mesh quantity (points, cells, faces).
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
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.
Subtract elements from the set.
Vector< scalar > vector
A scalar version of the templated Vector.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
static MinMax< T > ge(const T &minVal)
A semi-infinite range from minVal to the type max.
const vectorField & faceCentres() const
T getCheck(const word &keyword, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const
void addOrDelete(topoSet &set, const label id, const bool add) const
Add or delete id from set. Add when 'add' is true.
const polyMesh & mesh_
Reference to the mesh.
defineTypeNameAndDebug(combustionModel, 0)
cylinderAnnulusToFace(const polyMesh &mesh, const point &point1, const point &point2, const scalar radius, const scalar innerRadius=0)
Construct from components.