Go to the documentation of this file.
42 return cellShapeControls().cellSize(pt);
54 (!vA->internalOrBoundaryPoint() || vA->referred())
55 && (!vB->internalOrBoundaryPoint() || vB->referred())
64 targetCellSize(
topoint(vA->point()))
65 *targetCellSize(
topoint(vB->point()))
68 else if (!vB->internalOrBoundaryPoint() || vB->referred())
70 return vA->targetCellSize();
72 else if (!vA->internalOrBoundaryPoint() || vA->referred())
74 return vB->targetCellSize();
83 const Delaunay::Finite_facets_iterator& fit
93 const label oppositeVertex = fit->second;
95 for (
label i = 0; i < 3; i++)
97 Vertex_handle v =
c->vertex(vertex_triple_index(oppositeVertex, i));
99 if (v->internalOrBoundaryPoint() && !v->referred())
102 sizeSum += v->targetCellSize();
113 for (
label i = 0; i < 3; i++)
115 Vertex_handle v =
c->vertex(vertex_triple_index(oppositeVertex, i));
117 sizeSum += targetCellSize(
topoint(v->point()));
126 <<
"sizeSum = " << sizeSum
132 return pow(sizeSum, (1.0/nProducts));
141 return targetCellSize(pt)*foamyHexMeshControls().pointPairDistanceCoeff();
151 pointPairDistance(pt)
152 *foamyHexMeshControls().mixedFeaturePointPPDistanceCoeff();
165 *foamyHexMeshControls().featurePointExclusionDistanceCoeff()
179 *foamyHexMeshControls().featureEdgeExclusionDistanceCoeff()
193 *foamyHexMeshControls().surfacePtExclusionDistanceCoeff()
207 *foamyHexMeshControls().surfaceSearchDistanceCoeff()
219 *foamyHexMeshControls().maxSurfaceProtrusionCoeff();
247 vertexCount() + pts.size(),
248 Vb::vtInternalSurface,
258 vertexCount() + pts.size(),
259 Vb::vtExternalSurface,
266 ptPairs_.addPointPair
268 pts[pts.size() - 2].index(),
269 pts[pts.size() - 1].index()
294 scalar pert = 1
e-12*defaultCellSize();
296 perturbedPt.
x() += pert*(rndGen_.scalar01() - 0.5);
297 perturbedPt.
y() += pert*(rndGen_.scalar01() - 0.5);
298 perturbedPt.
z() += pert*(rndGen_.scalar01() - 0.5);
320 vertexCount() + pts.size(),
321 Vb::vtInternalSurfaceBaffle,
331 vertexCount() + pts.size(),
332 Vb::vtExternalSurfaceBaffle,
339 ptPairs_.addPointPair
341 pts[pts.size() - 2].index(),
342 pts[pts.size() - 1].index()
355 !geometryToConformTo_.globalBounds().contains(pt)
356 || !geometryToConformTo_.inside(pt)
368 const Delaunay::Finite_edges_iterator& eit
397 (vA->internalOrBoundaryPoint() && !vA->referred())
398 || (vB->internalOrBoundaryPoint() && !vB->referred())
401 !vA->internalOrBoundaryPoint()
402 || !vB->internalOrBoundaryPoint()
410 const Delaunay::Finite_edges_iterator& eit
413 Cell_circulator ccStart = incident_cells(*eit);
414 Cell_circulator cc1 = ccStart;
415 Cell_circulator cc2 = cc1;
425 label cc1I = cc1->cellIndex();
427 label cc2I = cc2->cellIndex();
431 if (cc1->boundaryDualVertex())
433 tmpFaceBoundaryPoints.
append(
true);
437 tmpFaceBoundaryPoints.
append(
false);
445 }
while (cc1 != ccStart);
447 return tmpFaceBoundaryPoints;
453 const Delaunay::Finite_facets_iterator& fit
459 const label oppositeVertex = fit->second;
468 if (
findIndex(procsAttached, c1Procs[aPI] == -1))
470 procsAttached.
append(c1Procs[aPI]);
473 if (
findIndex(procsAttached, c2Procs[aPI] == -1))
475 procsAttached.
append(c2Procs[aPI]);
485 const Delaunay::Finite_facets_iterator& fit
489 const label oppositeVertex = fit->second;
493 c1->vertex(vertex_triple_index(oppositeVertex, 0))->referred()
494 ||
c1->vertex(vertex_triple_index(oppositeVertex, 1))->referred()
495 ||
c1->vertex(vertex_triple_index(oppositeVertex, 2))->referred()
502 const Delaunay::Finite_edges_iterator& eit
505 bool isProcBoundaryEdge =
false;
514 (vA->referred() && !vB->referred())
515 || (vB->referred() && !vA->referred())
517 && vA->internalOrBoundaryPoint()
518 && vB->internalOrBoundaryPoint()
521 isProcBoundaryEdge =
true;
524 return isProcBoundaryEdge;
552 return geometryToConformTo_;
562 <<
"The backgroundMeshDecomposition cannot be asked for in serial."
566 return decomposition_();
573 return cellShapeControl_;
580 return foamyHexMeshControls_;
Simple random number generator.
Controls for the conformalVoronoiMesh mesh generator.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
#define forAll(list, i)
Loop across all elements in list.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
static bool & parRun()
Is this a parallel run?
An indexed form of CGAL::Triangulation_vertex_base_3<K> used to keep track of the Delaunay vertices i...
Ostream & endl(Ostream &os)
Add newline and flush stream.
pointFromPoint topoint(const Point &P)
const dimensionedScalar c1
First radiation constant: default SI units: [W/m2].
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const dimensionedScalar c2
Second radiation constant: default SI units: [m.K].
const double e
Elementary charge.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
Container for searchableSurfaces.
Store a background polyMesh to use for the decomposition of space and queries for parallel conformalV...
Foam::scalar averageCellSize(const VertexType &vA, const VertexType &vB)
Return the target cell size from that stored on a pair of Delaunay vertices,.
Foam::FixedList< Foam::label, 4 > processorsAttached(const CellType &c)
const dimensionedScalar c
Speed of light in a vacuum.
scalar defaultCellSize() const
Return the defaultCellSize.
#define WarningInFunction
Report a warning using Foam::Warning.