mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Patches for mesh quality eval are now proc patches.
Forcing empty patches to write in parallel.
This commit is contained in:
@ -1421,7 +1421,6 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality
|
|||||||
timeCheck("Start of checkPolyMeshQuality");
|
timeCheck("Start of checkPolyMeshQuality");
|
||||||
|
|
||||||
Info<< nl << "Creating polyMesh to assess quality" << endl;
|
Info<< nl << "Creating polyMesh to assess quality" << endl;
|
||||||
Info<< nl << "THIS NEEDS TO USE PARALLEL EVALUATION OF QUALITY" << endl;
|
|
||||||
|
|
||||||
createFacesOwnerNeighbourAndPatches
|
createFacesOwnerNeighbourAndPatches
|
||||||
(
|
(
|
||||||
@ -1458,21 +1457,38 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality
|
|||||||
|
|
||||||
List<polyPatch*> patches(patchStarts.size());
|
List<polyPatch*> patches(patchStarts.size());
|
||||||
|
|
||||||
forAll (patches, p)
|
forAll(patches, p)
|
||||||
{
|
{
|
||||||
patches[p] = new polyPatch
|
if (patchTypes[p] == processorPolyPatch::typeName)
|
||||||
(
|
{
|
||||||
patchNames[p],
|
patches[p] = new processorPolyPatch
|
||||||
patchSizes[p],
|
(
|
||||||
patchStarts[p],
|
patchNames[p],
|
||||||
p,
|
patchSizes[p],
|
||||||
pMesh.boundaryMesh()
|
patchStarts[p],
|
||||||
);
|
p,
|
||||||
|
pMesh.boundaryMesh(),
|
||||||
|
Pstream::myProcNo(),
|
||||||
|
procNeighbours[p]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
patches[p] = polyPatch::New
|
||||||
|
(
|
||||||
|
patchTypes[p],
|
||||||
|
patchNames[p],
|
||||||
|
patchSizes[p],
|
||||||
|
patchStarts[p],
|
||||||
|
p,
|
||||||
|
pMesh.boundaryMesh()
|
||||||
|
).ptr();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pMesh.addPatches(patches);
|
pMesh.addPatches(patches);
|
||||||
|
|
||||||
// mesh.overrideCellCentres(cellCentres);
|
// pMesh.overrideCellCentres(cellCentres);
|
||||||
|
|
||||||
timeCheck("polyMesh created, checking quality");
|
timeCheck("polyMesh created, checking quality");
|
||||||
|
|
||||||
@ -2018,7 +2034,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
|
|||||||
procNeighbours,
|
procNeighbours,
|
||||||
patchFaces,
|
patchFaces,
|
||||||
patchOwners,
|
patchOwners,
|
||||||
false
|
includeEmptyPatches
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2161,9 +2177,6 @@ void Foam::conformalVoronoiMesh::sortProcPatches
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "PROC PATCH SORT IS WRONG, OWNER PATCH CELL INDEX IS NOT UNIQUE"
|
|
||||||
<< endl;
|
|
||||||
|
|
||||||
forAll(patchSortingIndices, patchI)
|
forAll(patchSortingIndices, patchI)
|
||||||
{
|
{
|
||||||
faceList& faces = patchFaces[patchI];
|
faceList& faces = patchFaces[patchI];
|
||||||
@ -2290,6 +2303,12 @@ void Foam::conformalVoronoiMesh::addPatches
|
|||||||
bool includeEmptyPatches
|
bool includeEmptyPatches
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
|
// Always write out all patches in parallel
|
||||||
|
if (Pstream::parRun())
|
||||||
|
{
|
||||||
|
includeEmptyPatches = true;
|
||||||
|
}
|
||||||
|
|
||||||
label nTotalPatches = patchNames.size();
|
label nTotalPatches = patchNames.size();
|
||||||
|
|
||||||
label nValidPatches = 0;
|
label nValidPatches = 0;
|
||||||
|
|||||||
@ -360,11 +360,7 @@ void Foam::conformalVoronoiMesh::writeMesh
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "addPatches(patches, false); FALSE REQUIRED TO AVOID MEMORY CRASH"
|
mesh.addPatches(patches);
|
||||||
<< endl;
|
|
||||||
|
|
||||||
// mesh.addPatches(patches);
|
|
||||||
mesh.addPatches(patches, false);
|
|
||||||
|
|
||||||
if (!mesh.write())
|
if (!mesh.write())
|
||||||
{
|
{
|
||||||
@ -394,7 +390,6 @@ void Foam::conformalVoronoiMesh::writeMesh
|
|||||||
|
|
||||||
// cellCs.write();
|
// cellCs.write();
|
||||||
|
|
||||||
|
|
||||||
Info<< "DISABLED WRITING OF CELL SIZE AND PROTRUSION SET" << endl;
|
Info<< "DISABLED WRITING OF CELL SIZE AND PROTRUSION SET" << endl;
|
||||||
|
|
||||||
// writeCellSizes(mesh);
|
// writeCellSizes(mesh);
|
||||||
|
|||||||
Reference in New Issue
Block a user