37 namespace patchToPatches
56 const scalar l = bb.
maxDim();
72 const point& srcC = srcSpheres_[srcFacei].first();
73 const scalar srcR = srcSpheres_[srcFacei].second();
74 const point& tgtC = tgtSpheres_[tgtFacei].first();
75 const scalar tgtR = tgtSpheres_[tgtFacei].second();
77 if (
magSqr(srcC - tgtC) <
sqr(srcR + tgtR))
79 srcLocalTgtFaces_[srcFacei].append(tgtFacei);
80 tgtLocalSrcFaces_[tgtFacei].append(srcFacei);
107 srcSpheres_.resize(srcPatch.size());
108 forAll(srcPatch, srcFacei)
110 srcSpheres_[srcFacei] =
117 tgtSpheres_.resize(tgtPatch.size());
118 forAll(tgtPatch, tgtFacei)
120 tgtSpheres_[tgtFacei] =
#define forAll(list, i)
Loop across all elements in list.
Functions for constructing bounding spheres of lists of points.
const Field< PointType > & points() const
Return reference to global points.
A List with indirect addressing.
point midpoint() const
The midpoint of the bounding box.
scalar maxDim() const
Largest length/height/width dimension.
A face is a list of labels corresponding to mesh vertices.
Class to generate coupling geometry between two primitive patches.
virtual void initialise(const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch)
Initialisation.
Class to generate patchToPatch coupling geometry. Couples a face to the single nearby opposite face o...
nearby(const bool reverse)
Construct from components.
virtual bool intersectFaces(const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch, const label srcFacei, const label tgtFacei)
Intersect two faces.
virtual treeBoundBox srcBox(const face &srcFace, const pointField &srcPoints, const vectorField &srcPointNormals) const
Get the bound box for a source face.
virtual void initialise(const primitiveOldTimePatch &srcPatch, const vectorField &srcPointNormals, const vectorField &srcPointNormals0, const primitiveOldTimePatch &tgtPatch)
Initialisation.
Standard boundBox + extra functionality for use in octree.
const dimensionedScalar c
Speed of light in a vacuum.
defineTypeNameAndDebug(intersection, 0)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
void reverse(UList< T > &, const label n)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
Tuple2< point, scalar > boundSphere(const PointField &ps, randomGenerator &rndGen)
Compute a bounding sphere for an arbitrary number of points, and given an.