mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Fixed missing sqr() from cell size lookup in uniformGrid and pointsFile.
Added report of number of location attempts and success rate for densityWeightedStochastic.
This commit is contained in:
@ -75,8 +75,12 @@ std::vector<Vb::Point> densityWeightedStochastic::initialPoints() const
|
||||
|
||||
vector span = bb.span();
|
||||
|
||||
label trialPoints = 0;
|
||||
|
||||
while (volumeAdded < totalVolume_)
|
||||
{
|
||||
trialPoints++;
|
||||
|
||||
point p =
|
||||
min
|
||||
+ vector
|
||||
@ -110,6 +114,11 @@ std::vector<Vb::Point> densityWeightedStochastic::initialPoints() const
|
||||
}
|
||||
}
|
||||
|
||||
Info<< nl << " " << typeName << " - "
|
||||
<< trialPoints << " locations queried ("
|
||||
<< scalar(initialPoints.size())/scalar(trialPoints)
|
||||
<< " success rate)" << endl;
|
||||
|
||||
return initialPoints;
|
||||
}
|
||||
|
||||
|
||||
@ -74,10 +74,13 @@ std::vector<Vb::Point> pointFile::initialPoints() const
|
||||
(
|
||||
points,
|
||||
minimumSurfaceDistanceCoeffSqr_
|
||||
*cvMesh_.cellSizeControl().cellSize
|
||||
*sqr
|
||||
(
|
||||
points,
|
||||
List<bool>(points.size(), false)
|
||||
cvMesh_.cellSizeControl().cellSize
|
||||
(
|
||||
points,
|
||||
List<bool>(points.size(), false)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -119,7 +119,7 @@ std::vector<Vb::Point> uniformGrid::initialPoints() const
|
||||
(
|
||||
points,
|
||||
minimumSurfaceDistanceCoeffSqr_
|
||||
*cvMesh_.cellSizeControl().cellSize(points, isSurfacePoint)
|
||||
*sqr(cvMesh_.cellSizeControl().cellSize(points, isSurfacePoint))
|
||||
);
|
||||
|
||||
forAll(insidePoints, i)
|
||||
|
||||
Reference in New Issue
Block a user