diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index 4bb6512a35fbaa331ec7753811f43c2330981143..791f68cf98b971857449ff053c754adb0e8e2350 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -28,6 +28,9 @@ Description Renumbers the cell list in order to reduce the bandwidth, reading and renumbering all fields from all the time directories. + By default uses bandCompression (CuthillMcKee) but will + read system/renumberMeshDict if present and use the method from there. + \*---------------------------------------------------------------------------*/ #include "argList.H" @@ -41,6 +44,7 @@ Description #include "decompositionMethod.H" #include "renumberMethod.H" #include "zeroGradientFvPatchFields.H" +#include "CuthillMcKeeRenumber.H" using namespace Foam; @@ -535,20 +539,33 @@ int main(int argc, char *argv[]) // Construct renumberMethod - IOdictionary renumberDict + IOobject io ( - IOobject - ( - "renumberMeshDict", - runTime.system(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) + "renumberMeshDict", + runTime.system(), + mesh, + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE ); - autoPtr<renumberMethod> renumberPtr = renumberMethod::New(renumberDict); - Info<< "Selecting renumberMethod " << renumberPtr().type() << endl; + autoPtr<renumberMethod> renumberPtr; + + if (io.headerOk()) + { + Info<< "Detected local " << runTime.system()/io.name() << "." << nl + << "Using this to select renumberMethod." << nl << endl; + renumberPtr = renumberMethod::New(IOdictionary(io)); + } + else + { + Info<< "No local " << runTime.system()/io.name() + << " dictionary found. Using default renumberMethod." << nl + << endl; + dictionary renumberDict; + renumberPtr.reset(new CuthillMcKeeRenumber(renumberDict)); + } + + Info<< "Selecting renumberMethod " << renumberPtr().type() << nl << endl; @@ -641,6 +658,7 @@ int main(int argc, char *argv[]) PtrList<surfaceTensorField> stFlds; ReadFields(mesh, objects, stFlds); + Info<< endl; // From renumbering: // - from new cell/face back to original cell/face diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/renumberMeshDict b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/renumberMeshDict deleted file mode 100644 index 9804c39c1600f50018ce9f00cc40eb760f63cc21..0000000000000000000000000000000000000000 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/renumberMeshDict +++ /dev/null @@ -1,44 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - note "mesh renumbering dictionary"; - object renumberMeshDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -method CuthillMcKee; -//method manual; -//method random; -//method spring; - -manualCoeffs -{ - // In system directory: old to new labelIOList - dataFile "cellMap"; -} - - -springCoeffs -{ - // Maximum jump of cell indices. Is fraction of number of cells - maxCo 0.1; - - // Limit the amount of movement; the fraction maxCo gets decreased - // with every iteration - freezeFraction 0.9; - - // Maximum number of iterations - maxIter 1000; -} - - -// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/system/renumberMeshDict b/tutorials/incompressible/simpleFoam/turbineSiting/system/renumberMeshDict deleted file mode 100644 index 9804c39c1600f50018ce9f00cc40eb760f63cc21..0000000000000000000000000000000000000000 --- a/tutorials/incompressible/simpleFoam/turbineSiting/system/renumberMeshDict +++ /dev/null @@ -1,44 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - note "mesh renumbering dictionary"; - object renumberMeshDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -method CuthillMcKee; -//method manual; -//method random; -//method spring; - -manualCoeffs -{ - // In system directory: old to new labelIOList - dataFile "cellMap"; -} - - -springCoeffs -{ - // Maximum jump of cell indices. Is fraction of number of cells - maxCo 0.1; - - // Limit the amount of movement; the fraction maxCo gets decreased - // with every iteration - freezeFraction 0.9; - - // Maximum number of iterations - maxIter 1000; -} - - -// ************************************************************************* //