diff --git a/applications/utilities/postProcessing/sampling/sample/sampleDict b/applications/utilities/postProcessing/sampling/sample/sampleDict index cc25676c75..1616bbb662 100644 --- a/applications/utilities/postProcessing/sampling/sample/sampleDict +++ b/applications/utilities/postProcessing/sampling/sample/sampleDict @@ -161,6 +161,10 @@ surfaces isoField rho; isoValue 0.5; interpolate true; + + //zone ABC; // Optional: zone only + //exposedPatchName fixedWalls; // Optional: zone only + // regularise false; // Optional: do not simplify } constantIso @@ -171,7 +175,7 @@ surfaces isoField rho; isoValue 0.5; interpolate false; - // regularise false; // Optional: do not simplify + regularise false; // do not simplify } ); diff --git a/src/sampling/sampledSurface/isoSurface/isoSurface.C b/src/sampling/sampledSurface/isoSurface/isoSurface.C index e146c90f7a..b092f62605 100644 --- a/src/sampling/sampledSurface/isoSurface/isoSurface.C +++ b/src/sampling/sampledSurface/isoSurface/isoSurface.C @@ -206,7 +206,8 @@ void Foam::isoSurface::calcCutTypes if (debug) { Pout<< "isoSurface : detected " << nCutCells_ - << " candidate cut cells." << endl; + << " candidate cut cells (out of " << mesh_.nCells() + << ")." << endl; } } @@ -814,65 +815,53 @@ Foam::triSurface Foam::isoSurface::stitchTriPoints tris.transfer(dynTris); } + if (debug) + { + Pout<< "isoSurface : merged from " << nTris + << " down to " << tris.size() << " triangles." << endl; + } - // Use face centres to determine 'flat hole' situation (see RMT paper). + + // Determine 'flat hole' situation (see RMT paper). // Two unconnected triangles get connected because (some of) the edges // separating them get collapsed. Below only checks for duplicate triangles, // not non-manifold edge connectivity. if (checkDuplicates) { - if (debug) - { - Pout<< "isoSurface : merged from " << nTris - << " down to " << tris.size() << " triangles." << endl; - } + labelListList pointFaces; + invertManyToMany(newPoints.size(), tris, pointFaces); + + // Filter out duplicates. + DynamicList