From df5854379913c42219adf49c6fb57f02d4ae74ef Mon Sep 17 00:00:00 2001 From: graham Date: Thu, 14 Oct 2010 18:02:22 +0100 Subject: [PATCH] ENH: Writing cellCentres to polyMesh dir and optional reading. --- .../mesh/manipulation/checkMesh/checkMesh.C | 12 ++++++++---- .../mesh/manipulation/checkMesh/checkTopology.C | 4 ++-- .../conformalVoronoiMeshCalcDualMesh.C | 7 +++---- .../conformalVoronoiMesh/conformalVoronoiMeshIO.C | 3 ++- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C b/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C index 6340010ace..4457a6b2c8 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C @@ -96,16 +96,20 @@ int main(int argc, char *argv[]) IOobject ( "cellCentres", - runTime.constant(), + mesh.pointsInstance(), + polyMesh::meshSubDir, runTime, - IOobject::MUST_READ, + IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ) ); - Info<< "Read " << overrideCCs.size() << " cell centres" << endl; + if (overrideCCs.headerOk()) + { + Info<< "Read " << overrideCCs.size() << " cell centres" << endl; - mesh.overrideCellCentres(overrideCCs); + mesh.overrideCellCentres(overrideCCs); + } // Reconstruct globalMeshData mesh.globalData(); diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C index 09fb5484e9..2204336ac7 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C @@ -167,7 +167,7 @@ Foam::label Foam::checkTopology if (nOneCells > 0) { Info<< " < 0) { Info<< " <