diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMeshDict b/applications/utilities/mesh/manipulation/renumberMesh/renumberMeshDict index 229a250352..15547e985e 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMeshDict +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMeshDict @@ -40,8 +40,8 @@ method CuthillMcKee; //method Sloan; //method manual; //method random; +//method structured; //method spring; -//method boundaryFirst; //method zoltan; // only if compiled with zoltan support //CuthillMcKeeCoeffs @@ -57,6 +57,23 @@ manualCoeffs } +// For extruded (i.e. structured in one direction) meshes +structuredCoeffs +{ + // Patches that mesh was extruded from. These determine the starting + // layer of cells + patches (movingWall); + // Method to renumber the starting layer of cells + method random; + + // Renumber in columns (depthFirst) or in layers + depthFirst true; + + // Optional: reverse ordering + //reverse false; +} + + springCoeffs { // Maximum jump of cell indices. Is fraction of number of cells @@ -90,10 +107,4 @@ zoltanCoeffs } -//boundaryFirstCoeffs -//{ -// reverse true; -//} - - // ************************************************************************* // diff --git a/src/OpenFOAM/containers/Lists/UIndirectList/UIndirectList.H b/src/OpenFOAM/containers/Lists/UIndirectList/UIndirectList.H index e33acfa464..56121a22ef 100644 --- a/src/OpenFOAM/containers/Lists/UIndirectList/UIndirectList.H +++ b/src/OpenFOAM/containers/Lists/UIndirectList/UIndirectList.H @@ -29,6 +29,10 @@ Description Like IndirectList but does not store addressing. + Note the const_cast of the completeList. This is so we can use it both + on const and non-const lists. Alternative would be to have a const_ + variant etc. + SourceFiles UIndirectListI.H diff --git a/src/renumber/renumberMethods/Make/files b/src/renumber/renumberMethods/Make/files index c19f1e6b6d..4fe9cd69fb 100644 --- a/src/renumber/renumberMethods/Make/files +++ b/src/renumber/renumberMethods/Make/files @@ -3,6 +3,6 @@ manualRenumber/manualRenumber.C CuthillMcKeeRenumber/CuthillMcKeeRenumber.C randomRenumber/randomRenumber.C springRenumber/springRenumber.C -boundaryFirstRenumber/boundaryFirstRenumber.C +structuredRenumber/structuredRenumber.C LIB = $(FOAM_LIBBIN)/librenumberMethods diff --git a/src/renumber/renumberMethods/Make/options b/src/renumber/renumberMethods/Make/options index 03cb68d946..cc28bc2f00 100644 --- a/src/renumber/renumberMethods/Make/options +++ b/src/renumber/renumberMethods/Make/options @@ -1,7 +1,9 @@ EXE_INC = \ -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude LIB_LIBS = \ -ldecompositionMethods \ + -lfiniteVolume \ -lmeshTools diff --git a/src/renumber/renumberMethods/boundaryFirstRenumber/boundaryFirstRenumber.C b/src/renumber/renumberMethods/boundaryFirstRenumber/boundaryFirstRenumber.C deleted file mode 100644 index a68084c327..0000000000 --- a/src/renumber/renumberMethods/boundaryFirstRenumber/boundaryFirstRenumber.C +++ /dev/null @@ -1,258 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "boundaryFirstRenumber.H" -#include "addToRunTimeSelectionTable.H" -#include "bandCompression.H" -#include "decompositionMethod.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(boundaryFirstRenumber, 0); - - addToRunTimeSelectionTable - ( - renumberMethod, - boundaryFirstRenumber, - dictionary - ); -} - - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -Foam::label Foam::boundaryFirstRenumber::countInternalFaces -( - const primitiveMesh& mesh, - const label cellI -) const -{ - const cell& cFaces = mesh.cells()[cellI]; - - label nInt = 0; - - forAll(cFaces, i) - { - label faceI = cFaces[i]; - if (mesh.isInternalFace(faceI)) - { - nInt++; - } - } - return nInt; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::boundaryFirstRenumber::boundaryFirstRenumber -( - const dictionary& renumberDict -) -: - renumberMethod(renumberDict), - reverse_ - ( - renumberDict.found(typeName + "Coeffs") - ? Switch(renumberDict.subDict(typeName + "Coeffs").lookup("reverse")) - : Switch(true) - ) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -Foam::labelList Foam::boundaryFirstRenumber::renumber -( - const polyMesh& mesh, - const pointField& points -) const -{ - const labelList& own = mesh.faceOwner(); - const labelList& nei = mesh.faceNeighbour(); - - // Distance to boundary. Minimum of neighbours. - labelList distance(mesh.nCells(), -1); - - // New order - labelList newOrder(mesh.nCells()); - label cellInOrder = 0; - - - // Starting faces for walk. These are the zero distance faces. - DynamicList