mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: Temporary - remove the proper patching and used addPatches(..., false)
Stops failures when boundaries are imperfect.
This commit is contained in:
@ -1457,63 +1457,63 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality
|
||||
|
||||
List<polyPatch*> patches(patchStarts.size());
|
||||
|
||||
label nValidPatches = 0;
|
||||
|
||||
forAll(patches, p)
|
||||
{
|
||||
if (patchTypes[p] == processorPolyPatch::typeName)
|
||||
{
|
||||
// Do not create empty processor patches
|
||||
|
||||
if (patchSizes[p] > 0)
|
||||
{
|
||||
patches[nValidPatches] = new processorPolyPatch
|
||||
(
|
||||
patchNames[p],
|
||||
patchSizes[p],
|
||||
patchStarts[p],
|
||||
nValidPatches,
|
||||
pMesh.boundaryMesh(),
|
||||
Pstream::myProcNo(),
|
||||
procNeighbours[p]
|
||||
);
|
||||
|
||||
nValidPatches++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
patches[nValidPatches] = polyPatch::New
|
||||
(
|
||||
patchTypes[p],
|
||||
patchNames[p],
|
||||
patchSizes[p],
|
||||
patchStarts[p],
|
||||
nValidPatches,
|
||||
pMesh.boundaryMesh()
|
||||
).ptr();
|
||||
|
||||
nValidPatches++;
|
||||
}
|
||||
}
|
||||
|
||||
patches.setSize(nValidPatches);
|
||||
|
||||
pMesh.addPatches(patches);
|
||||
// label nValidPatches = 0;
|
||||
|
||||
// forAll(patches, p)
|
||||
// {
|
||||
// patches[p] = new polyPatch
|
||||
// (
|
||||
// patchNames[p],
|
||||
// patchSizes[p],
|
||||
// patchStarts[p],
|
||||
// p,
|
||||
// pMesh.boundaryMesh()
|
||||
// );
|
||||
// if (patchTypes[p] == processorPolyPatch::typeName)
|
||||
// {
|
||||
// // Do not create empty processor patches
|
||||
|
||||
// if (patchSizes[p] > 0)
|
||||
// {
|
||||
// patches[nValidPatches] = new processorPolyPatch
|
||||
// (
|
||||
// patchNames[p],
|
||||
// patchSizes[p],
|
||||
// patchStarts[p],
|
||||
// nValidPatches,
|
||||
// pMesh.boundaryMesh(),
|
||||
// Pstream::myProcNo(),
|
||||
// procNeighbours[p]
|
||||
// );
|
||||
|
||||
// nValidPatches++;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// patches[nValidPatches] = polyPatch::New
|
||||
// (
|
||||
// patchTypes[p],
|
||||
// patchNames[p],
|
||||
// patchSizes[p],
|
||||
// patchStarts[p],
|
||||
// nValidPatches,
|
||||
// pMesh.boundaryMesh()
|
||||
// ).ptr();
|
||||
|
||||
// nValidPatches++;
|
||||
// }
|
||||
// }
|
||||
|
||||
// pMesh.addPatches(patches, false);
|
||||
// patches.setSize(nValidPatches);
|
||||
|
||||
// pMesh.addPatches(patches);
|
||||
|
||||
forAll(patches, p)
|
||||
{
|
||||
patches[p] = new polyPatch
|
||||
(
|
||||
patchNames[p],
|
||||
patchSizes[p],
|
||||
patchStarts[p],
|
||||
p,
|
||||
pMesh.boundaryMesh()
|
||||
);
|
||||
}
|
||||
|
||||
pMesh.addPatches(patches, false);
|
||||
|
||||
// pMesh.overrideCellCentres(cellCentres);
|
||||
|
||||
|
||||
@ -372,7 +372,8 @@ void Foam::conformalVoronoiMesh::writeMesh
|
||||
|
||||
patches.setSize(nValidPatches);
|
||||
|
||||
mesh.addPatches(patches);
|
||||
// mesh.addPatches(patches);
|
||||
mesh.addPatches(patches, false);
|
||||
|
||||
if (!mesh.write())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user