mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'cvMesh'
This commit is contained in:
@ -41,10 +41,10 @@ void Foam::conformalVoronoiMesh::conformToSurface()
|
|||||||
{
|
{
|
||||||
reconformationMode reconfMode = reconformationControl();
|
reconformationMode reconfMode = reconformationControl();
|
||||||
|
|
||||||
if (Pstream::parRun())
|
// if (Pstream::parRun())
|
||||||
{
|
// {
|
||||||
seedProcessorBoundarySurfaces(true);
|
// seedProcessorBoundarySurfaces(true);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (reconfMode == rmNone)
|
if (reconfMode == rmNone)
|
||||||
{
|
{
|
||||||
@ -74,15 +74,15 @@ void Foam::conformalVoronoiMesh::conformToSurface()
|
|||||||
storeSurfaceConformation();
|
storeSurfaceConformation();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Pstream::parRun())
|
// if (Pstream::parRun())
|
||||||
{
|
// {
|
||||||
label nFarPoints = removeProcessorBoundarySeeds(true);
|
// label nFarPoints = removeProcessorBoundarySeeds(true);
|
||||||
|
//
|
||||||
reduce(nFarPoints, sumOp<label>());
|
// reduce(nFarPoints, sumOp<label>());
|
||||||
|
//
|
||||||
Info<< " Removed " << nFarPoints
|
// Info<< " Removed " << nFarPoints
|
||||||
<< " far points from the mesh." << endl;
|
// << " far points from the mesh." << endl;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// reportSurfaceConformationQuality();
|
// reportSurfaceConformationQuality();
|
||||||
}
|
}
|
||||||
@ -915,7 +915,7 @@ void Foam::conformalVoronoiMesh::seedProcessorBoundarySurfaces
|
|||||||
|
|
||||||
label nFarPoints = 0;
|
label nFarPoints = 0;
|
||||||
|
|
||||||
const scalar normalDistance = 5.0;
|
const scalar normalDistance = 2.0;
|
||||||
const scalar pert = 0.1*(rndGen_.scalar01() - 0.5);
|
const scalar pert = 0.1*(rndGen_.scalar01() - 0.5);
|
||||||
|
|
||||||
forAll(bMesh, patchI)
|
forAll(bMesh, patchI)
|
||||||
@ -1465,7 +1465,7 @@ void Foam::conformalVoronoiMesh::buildParallelInterfaceInfluence
|
|||||||
label cIInner = 0;
|
label cIInner = 0;
|
||||||
label cIOuter = 0;
|
label cIOuter = 0;
|
||||||
|
|
||||||
// seedProcessorBoundarySurfaces(true);
|
seedProcessorBoundarySurfaces(true);
|
||||||
|
|
||||||
label cellIndexCount = 0;
|
label cellIndexCount = 0;
|
||||||
for
|
for
|
||||||
@ -1530,7 +1530,7 @@ void Foam::conformalVoronoiMesh::buildParallelInterfaceInfluence
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
(testCellInfluence[cit->cellIndex()] == 0)
|
(testCellInfluence[cit->cellIndex()] == 0)
|
||||||
//&& (cit->real() || cit->hasFarPoint())
|
&& (cit->real() || cit->hasFarPoint())
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const Foam::point& cc = cit->dual();
|
const Foam::point& cc = cit->dual();
|
||||||
@ -1553,15 +1553,18 @@ void Foam::conformalVoronoiMesh::buildParallelInterfaceInfluence
|
|||||||
|
|
||||||
timeCheck("End of testing cell influence");
|
timeCheck("End of testing cell influence");
|
||||||
|
|
||||||
Pout<< "Number of quick rejections = " << nQuickRejections << endl;
|
// Pout<< "Number of quick rejections = " << nQuickRejections << endl;
|
||||||
Pout<< "Number of influences = " << circumcentre.size() << endl;
|
Pout<< "Number of influences = " << circumcentre.size() << endl;
|
||||||
|
|
||||||
// Increasing the circumspheres to increase the overlaps and compensate for
|
// Increasing the circumspheres to increase the overlaps and compensate for
|
||||||
// floating point errors missing some referrals
|
// floating point errors missing some referrals
|
||||||
labelListList circumsphereOverlaps
|
labelListList circumsphereOverlaps
|
||||||
(
|
= decomposition_().overlapsProcessors
|
||||||
overlapsProc(circumcentre, sqr(1.01)*circumradiusSqr)
|
(
|
||||||
);
|
circumcentre,
|
||||||
|
sqr(1.01)*circumradiusSqr,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
timeCheck("End of increasing overlaps");
|
timeCheck("End of increasing overlaps");
|
||||||
|
|
||||||
@ -1624,13 +1627,12 @@ void Foam::conformalVoronoiMesh::buildParallelInterfaceInfluence
|
|||||||
cIOuter++;
|
cIOuter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
label nFarPoints = removeProcessorBoundarySeeds(true);
|
||||||
|
|
||||||
// label nFarPoints = removeProcessorBoundarySeeds(true);
|
reduce(nFarPoints, sumOp<label>());
|
||||||
//
|
|
||||||
// reduce(nFarPoints, sumOp<label>());
|
Info<< " Removed " << nFarPoints
|
||||||
//
|
<< " far points from the mesh." << endl;
|
||||||
// Info<< " Removed " << nFarPoints
|
|
||||||
// << " far points from the mesh." << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// seedProcessorBoundarySurfaces(false);
|
// seedProcessorBoundarySurfaces(false);
|
||||||
@ -1745,6 +1747,8 @@ void Foam::conformalVoronoiMesh::referVertices
|
|||||||
|
|
||||||
timeCheck("Start of referVertices " + stageName + " insertion.");
|
timeCheck("Start of referVertices " + stageName + " insertion.");
|
||||||
|
|
||||||
|
label inserted = 0;
|
||||||
|
|
||||||
for (label procI = 0; procI < Pstream::nProcs(); procI++)
|
for (label procI = 0; procI < Pstream::nProcs(); procI++)
|
||||||
{
|
{
|
||||||
const labelList& constructMap = pointMap.constructMap()[procI];
|
const labelList& constructMap = pointMap.constructMap()[procI];
|
||||||
@ -1774,12 +1778,18 @@ void Foam::conformalVoronoiMesh::referVertices
|
|||||||
encodedProcI
|
encodedProcI
|
||||||
);
|
);
|
||||||
|
|
||||||
|
inserted++;
|
||||||
|
|
||||||
receivedVertices[procI].insert(origIndex);
|
receivedVertices[procI].insert(origIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reduce(inserted, sumOp<label>());
|
||||||
|
|
||||||
|
Info<< " Inserted " << stageName << " vertices " << inserted << endl;
|
||||||
|
|
||||||
Info<< " Total " << stageName << " vertices " << totalVertices << endl;
|
Info<< " Total " << stageName << " vertices " << totalVertices << endl;
|
||||||
|
|
||||||
timeCheck("End of referVertices " + stageName);
|
timeCheck("End of referVertices " + stageName);
|
||||||
|
|||||||
Reference in New Issue
Block a user