30 bool Foam::CV2D::dualCellSurfaceIntersection
32 const Triangulation::Finite_vertices_iterator& vit
35 Triangulation::Edge_circulator ecStart = incident_edges(vit);
36 Triangulation::Edge_circulator ec = ecStart;
42 point e0 =
toPoint3D(circumcenter(ec->first));
50 point e1 =
toPoint3D(circumcenter(ec->first->neighbor(ec->second)));
67 }
while (++ec != ecStart);
73 void Foam::CV2D::insertPointPairs
75 const DynamicList<point2D>& nearSurfacePoints,
76 const DynamicList<point2D>& surfacePoints,
77 const DynamicList<label>& surfaceTris,
78 const DynamicList<label>& surfaceHits,
88 nearSurfacePoints[ppi],
105 qSurf_.
geometry()[surfaceHits[ppi]].getNormal
107 List<pointIndexHit>(1, pHit),
120 Info<< surfacePoints.size() <<
" point-pairs inserted" <<
endl;
127 forAll(surfacePoints, ppi)
133 Info<<
"insertPointPairs: Written " << surfacePoints.size()
134 <<
" inserted point-pair locations to file " 135 << str.name() <<
endl;
140 void Foam::CV2D::insertSurfaceNearestPointPairs()
142 Info<<
"insertSurfaceNearestPointPairs: ";
144 label nSurfacePointsEst =
147 number_of_vertices(),
148 size_t(10*
sqrt(scalar(number_of_vertices())))
151 DynamicList<point2D> nearSurfacePoints(nSurfacePointsEst);
152 DynamicList<point2D> surfacePoints(nSurfacePointsEst);
153 DynamicList<label> surfaceTris(nSurfacePointsEst);
154 DynamicList<label> surfaceHits(nSurfacePointsEst);
164 Triangulation::Finite_vertices_iterator vit = finite_vertices_begin();
165 vit != finite_vertices_end();
169 if (vit->internalPoint())
174 label hitSurface = -1;
186 vit->setNearBoundary();
222 if (dualCellSurfaceIntersection(vit))
224 nearSurfacePoints.append(vert);
225 surfacePoints.append(
toPoint2D(pHit.hitPoint()));
226 surfaceTris.append(pHit.index());
227 surfaceHits.append(hitSurface);
239 "surfaceNearestIntersections.obj" #define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
point toPoint3D(const point2D &) const
const cv2DControls & meshControls() const
PointIndexHit< point > pointIndexHit
const point2D & toPoint2D(const point &) const
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
bool contains(const vector &dir, const point &) const
Contains point (inside or on edge) and moving in direction.
const point2D & point2DFromPoint
dimensioned< scalar > magSqr(const dimensioned< Type > &)
scalar minEdgeLen2() const
Return the minEdgeLen squared.
Field< vector > vectorField
Specialisation of Field<T> for vector.