ENH: Temporary - remove the proper patching and used addPatches(..., false)

Stops failures when boundaries are imperfect.
This commit is contained in:
graham
2011-05-04 15:26:10 +01:00
parent dac5beb53a
commit 7176af222a
2 changed files with 54 additions and 53 deletions

View File

@ -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);

View File

@ -372,7 +372,8 @@ void Foam::conformalVoronoiMesh::writeMesh
patches.setSize(nValidPatches);
mesh.addPatches(patches);
// mesh.addPatches(patches);
mesh.addPatches(patches, false);
if (!mesh.write())
{