41 void Foam::cylinderToFace::combine(topoSet& set,
const bool add)
const
43 const vector axis = point2_ - point1_;
44 const scalar rad2 =
sqr(radius_);
45 const scalar magAxis2 =
magSqr(axis);
51 vector d = ctrs[facei] - point1_;
52 scalar magD = d & axis;
54 if ((magD > 0) && (magD < magAxis2))
56 scalar d2 =
magSqr(d) -
sqr(magD)/magAxis2;
86 const dictionary&
dict
112 Info<<
" Adding faces with centre within cylinder, with point1 = "
113 << point1_ <<
", point2 = " << point2_ <<
" and radius = "
120 Info<<
" Removing faces with centre within cylinder, with point1 = "
121 << point1_ <<
", point2 = " << point2_ <<
" and radius = "
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
cylinderToFace(const polyMesh &mesh, const vector &point1, const vector &point2, const scalar radius)
Construct from components.
virtual ~cylinderToFace()
Destructor.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
const vectorField & faceCentres() const
void addOrDelete(topoSet &set, const label celli, const bool) const
Add (if bool) celli to set or delete celli from set.
setAction
Enumeration defining the valid actions.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
void add(GeometricField< typename typeOfSum< Type1, Type2 >::type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type1, GeoMesh, PrimitiveField2 > &gf1, const GeometricField< Type2, GeoMesh, PrimitiveField3 > &gf2)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet & dimLength
vectorField pointField
pointField is a vectorField.
vector point
Point is a vector.
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
Vector< scalar > vector
A scalar version of the templated Vector.
treeBoundBox combine(const treeBoundBox &a, const treeBoundBox &b)
tmp< DimensionedField< scalar, GeoMesh, Field > > magSqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)