From a0597834a9199f076e032e83226d8807f5e02eac Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 21 Feb 2012 13:00:35 +0000 Subject: [PATCH] ENH: renumberMesh: added Sloan renumbering --- .../mesh/manipulation/renumberMesh/Allwmake | 14 + .../manipulation/renumberMesh/Make/options | 2 + .../manipulation/renumberMesh/renumberMesh.C | 12 +- .../renumberMesh/renumberMeshDict | 2 +- src/renumber/Allwmake | 10 + src/renumber/SloanRenumber/Make/files | 3 + src/renumber/SloanRenumber/Make/options | 12 + src/renumber/SloanRenumber/SloanRenumber.C | 263 ++++++++++++++++++ src/renumber/SloanRenumber/SloanRenumber.H | 123 ++++++++ 9 files changed, 430 insertions(+), 11 deletions(-) create mode 100755 applications/utilities/mesh/manipulation/renumberMesh/Allwmake create mode 100644 src/renumber/SloanRenumber/Make/files create mode 100644 src/renumber/SloanRenumber/Make/options create mode 100644 src/renumber/SloanRenumber/SloanRenumber.C create mode 100644 src/renumber/SloanRenumber/SloanRenumber.H diff --git a/applications/utilities/mesh/manipulation/renumberMesh/Allwmake b/applications/utilities/mesh/manipulation/renumberMesh/Allwmake new file mode 100755 index 0000000000..f5f12d5993 --- /dev/null +++ b/applications/utilities/mesh/manipulation/renumberMesh/Allwmake @@ -0,0 +1,14 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +export SLOAN_LINK_FLAGS='' + +if [ -f "${FOAM_LIBBIN}/libSloanRenumber.so" ] +then + echo "Found libSloanRenumber.so -- enabling Sloan renumbering support." + export SLOAN_LINK_FLAGS="-lSloanRenumber" +fi + +wmake + +# ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/mesh/manipulation/renumberMesh/Make/options b/applications/utilities/mesh/manipulation/renumberMesh/Make/options index 6a2c95738d..72eeafc9d1 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/Make/options +++ b/applications/utilities/mesh/manipulation/renumberMesh/Make/options @@ -1,4 +1,5 @@ EXE_INC = \ + -DFULLDEBUG -g -O0 \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ @@ -11,4 +12,5 @@ EXE_LIBS = \ -lfiniteVolume \ -lgenericPatchFields \ -lrenumberMethods \ + $(SLOAN_LINK_FLAGS) \ -ldecompositionMethods -L$(FOAM_LIBBIN)/dummy -lmetisDecomp -lscotchDecomp diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index 487fde704a..4120f8c67a 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -131,9 +131,9 @@ void getBand forAll(nIntersect, cellI) { - for (label rowI = cellI-cellBandwidth[cellI]; rowI < cellI; rowI++) + for (label colI = cellI-cellBandwidth[cellI]; colI <= cellI; colI++) { - nIntersect[rowI]++; + nIntersect[colI]++; } } @@ -598,14 +598,6 @@ int main(int argc, char *argv[]) sumSqrIntersect ); - if (band != getBand(mesh.faceOwner(), mesh.faceNeighbour())) - { - FatalErrorIn(args.executable()) - << "band:" << band - << abort(FatalError); - } - - reduce(band, maxOp