From 1422c1aa3a50df79f69c3245130c1b2324398aad Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 19 Dec 2016 10:01:31 +0000 Subject: [PATCH 1/2] BUG: etc: use of wrong variable name --- etc/config.csh/vtk | 2 +- etc/config.sh/vtk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/config.csh/vtk b/etc/config.csh/vtk index bd39d000ec..d98dfb6ddb 100644 --- a/etc/config.csh/vtk +++ b/etc/config.csh/vtk @@ -45,7 +45,7 @@ setenv MESA_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa_v #------------------------------------------------------------------------------ if ($?FOAM_VERBOSE && $?prompt) then - echo "Using vtk ($vtk_version) -> $VTK_ARCH_PATH" + echo "Using vtk ($vtk_version) -> $VTK_DIR" echo "Using mesa ($mesa_version) -> $MESA_ARCH_PATH" endif diff --git a/etc/config.sh/vtk b/etc/config.sh/vtk index 67ce07dfc7..a0fa15f693 100644 --- a/etc/config.sh/vtk +++ b/etc/config.sh/vtk @@ -44,7 +44,7 @@ export MESA_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa_v #------------------------------------------------------------------------------ if [ "$FOAM_VERBOSE" -a "$PS1" ] then - echo "Using vtk ($vtk_version) -> $VTK_ARCH_PATH" 1>&2 + echo "Using vtk ($vtk_version) -> $VTK_DIR" 1>&2 echo "Using mesa ($mesa_version) -> $MESA_ARCH_PATH" 1>&2 fi From 23a6cadfa68f412b14f67e679c253faaeec0b056 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 19 Dec 2016 12:58:49 +0000 Subject: [PATCH 2/2] BUG: redistributePar: remove inconsistent *ProcAddressing. Fixes #351. --- .../manipulation/renumberMesh/renumberMesh.C | 24 ++++++++++- .../renumberMesh/renumberMeshDict | 2 +- .../redistributePar/redistributePar.C | 40 +++++++++++++++---- 3 files changed, 56 insertions(+), 10 deletions(-) diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index 80a4dc58e8..4275238815 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -1111,6 +1111,11 @@ int main(int argc, char *argv[]) cellProcAddressing.writeOpt() = IOobject::NO_WRITE; } } + else + { + cellProcAddressing.writeOpt() = IOobject::NO_WRITE; + } + if (faceProcAddressing.headerOk()) { if (faceProcAddressing.size() == mesh.nFaces()) @@ -1146,6 +1151,11 @@ int main(int argc, char *argv[]) faceProcAddressing.writeOpt() = IOobject::NO_WRITE; } } + else + { + faceProcAddressing.writeOpt() = IOobject::NO_WRITE; + } + if (pointProcAddressing.headerOk()) { if (pointProcAddressing.size() == mesh.nPoints()) @@ -1160,20 +1170,30 @@ int main(int argc, char *argv[]) } else { - Info<< "Not writing consistent processor point decomposition" + Info<< "Not writing inconsistent processor point decomposition" << " map " << pointProcAddressing.filePath() << endl; pointProcAddressing.writeOpt() = IOobject::NO_WRITE; } } + else + { + pointProcAddressing.writeOpt() = IOobject::NO_WRITE; + } + if (boundaryProcAddressing.headerOk()) { if (boundaryProcAddressing.size() != mesh.boundaryMesh().size()) { - Info<< "Not writing consistent processor patch decomposition" + Info<< "Not writing inconsistent processor patch decomposition" << " map " << boundaryProcAddressing.filePath() << endl; boundaryProcAddressing.writeOpt() = IOobject::NO_WRITE; } } + else + { + boundaryProcAddressing.writeOpt() = IOobject::NO_WRITE; + } + diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMeshDict b/applications/utilities/mesh/manipulation/renumberMesh/renumberMeshDict index c6321991cc..886285c952 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMeshDict +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMeshDict @@ -16,7 +16,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Write maps from renumbered back to original mesh -writeMaps true; +writeMaps false; // Optional entry: sort cells on coupled boundaries to last for use with // e.g. nonBlockingGaussSeidel. diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C index aee47e55fd..3c53c60c6a 100644 --- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C +++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C @@ -2532,14 +2532,40 @@ int main(int argc, char *argv[]) bool haveAddressing = false; if (haveMesh[Pstream::myProcNo()]) { - haveAddressing = IOobject + // Read faces (just to know their size) + faceCompactIOList faces ( - "faceProcAddressing", - facesInstance, - meshSubDir, - runTime, - IOobject::READ_IF_PRESENT - ).typeHeaderOk(true); + IOobject + ( + "faces", + facesInstance, + meshSubDir, + runTime, + IOobject::MUST_READ + ) + ); + + // Check faceProcAddressing + labelIOList faceProcAddressing + ( + IOobject + ( + "faceProcAddressing", + facesInstance, + meshSubDir, + runTime, + IOobject::READ_IF_PRESENT + ), + labelList(0) + ); + if + ( + faceProcAddressing.headerOk() + && faceProcAddressing.size() == faces.size() + ) + { + haveAddressing = true; + } } else {