diff --git a/src/Allwmake b/src/Allwmake index a0622b30f7..97023aa700 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -46,7 +46,7 @@ wmake $makeType genericPatchFields # Build the proper scotchDecomp, metisDecomp etc. parallel/Allwmake $* -wmake $makeType renumberMethods +renumber/Allwmake $* wmake $makeType conversion diff --git a/src/renumber/Allwmake b/src/renumber/Allwmake new file mode 100755 index 0000000000..36c057dafe --- /dev/null +++ b/src/renumber/Allwmake @@ -0,0 +1,30 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory +makeType=${1:-libso} + +## get ZOLTAN_ARCH_PATH +#if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/zoltan.sh` +#then +# . $settings +# echo "using ZOLTAN_ARCH_PATH=$ZOLTAN_ARCH_PATH" +#else +# echo +# echo "Error: no config/zoltan.sh settings" +# echo +#fi + + +set -x + +wmake $makeType renumberMethods + +#if [ -n "$ZOLTAN_ARCH_PATH" ] +#then +# wmake $makeType zoltanRenumber +#else +# echo +# echo "Skipping zoltanRenumber" +# echo +#fi + +# ----------------------------------------------------------------- end-of-file diff --git a/src/renumber/renumberMethods/CuthillMcKeeRenumber/CuthillMcKeeRenumber.C b/src/renumber/renumberMethods/CuthillMcKeeRenumber/CuthillMcKeeRenumber.C new file mode 100644 index 0000000000..2732484b36 --- /dev/null +++ b/src/renumber/renumberMethods/CuthillMcKeeRenumber/CuthillMcKeeRenumber.C @@ -0,0 +1,106 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 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 "CuthillMcKeeRenumber.H" +#include "addToRunTimeSelectionTable.H" +#include "bandCompression.H" +#include "decompositionMethod.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(CuthillMcKeeRenumber, 0); + + addToRunTimeSelectionTable + ( + renumberMethod, + CuthillMcKeeRenumber, + dictionary + ); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::CuthillMcKeeRenumber::CuthillMcKeeRenumber(const dictionary& renumberDict) +: + renumberMethod(renumberDict), + reverse_ + ( + renumberDict.found(typeName + "Coeffs") + ? Switch(renumberDict.subDict(typeName + "Coeffs").lookup("reverse")) + : Switch(false) + ) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::labelList Foam::CuthillMcKeeRenumber::renumber +( + const polyMesh& mesh, + const pointField& points +) const +{ + CompactListList