From 7dee8058e1ea7d3230d392b435b571f333e5317d Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 30 Mar 2011 09:22:01 +0200 Subject: [PATCH 01/12] ENH: add Gcc46 rules --- etc/bashrc | 2 +- etc/cshrc | 2 +- etc/settings.csh | 7 +++++++ etc/settings.sh | 6 ++++++ wmake/rules/linux64Gcc46/c | 16 ++++++++++++++++ wmake/rules/linux64Gcc46/c++ | 21 +++++++++++++++++++++ wmake/rules/linux64Gcc46/c++Debug | 2 ++ wmake/rules/linux64Gcc46/c++Opt | 4 ++++ wmake/rules/linux64Gcc46/c++Prof | 2 ++ wmake/rules/linux64Gcc46/cDebug | 2 ++ wmake/rules/linux64Gcc46/cOpt | 2 ++ wmake/rules/linux64Gcc46/cProf | 2 ++ wmake/rules/linux64Gcc46/general | 8 ++++++++ wmake/rules/linux64Gcc46/mplibHPMPI | 3 +++ wmake/rules/linuxGcc46/c | 16 ++++++++++++++++ wmake/rules/linuxGcc46/c++ | 21 +++++++++++++++++++++ wmake/rules/linuxGcc46/c++Debug | 2 ++ wmake/rules/linuxGcc46/c++Opt | 2 ++ wmake/rules/linuxGcc46/c++Prof | 2 ++ wmake/rules/linuxGcc46/cDebug | 2 ++ wmake/rules/linuxGcc46/cOpt | 2 ++ wmake/rules/linuxGcc46/cProf | 2 ++ wmake/rules/linuxGcc46/general | 9 +++++++++ wmake/rules/linuxGcc46/mplibHPMPI | 3 +++ 24 files changed, 138 insertions(+), 2 deletions(-) create mode 100644 wmake/rules/linux64Gcc46/c create mode 100644 wmake/rules/linux64Gcc46/c++ create mode 100644 wmake/rules/linux64Gcc46/c++Debug create mode 100644 wmake/rules/linux64Gcc46/c++Opt create mode 100644 wmake/rules/linux64Gcc46/c++Prof create mode 100644 wmake/rules/linux64Gcc46/cDebug create mode 100644 wmake/rules/linux64Gcc46/cOpt create mode 100644 wmake/rules/linux64Gcc46/cProf create mode 100644 wmake/rules/linux64Gcc46/general create mode 100644 wmake/rules/linux64Gcc46/mplibHPMPI create mode 100644 wmake/rules/linuxGcc46/c create mode 100644 wmake/rules/linuxGcc46/c++ create mode 100644 wmake/rules/linuxGcc46/c++Debug create mode 100644 wmake/rules/linuxGcc46/c++Opt create mode 100644 wmake/rules/linuxGcc46/c++Prof create mode 100644 wmake/rules/linuxGcc46/cDebug create mode 100644 wmake/rules/linuxGcc46/cOpt create mode 100644 wmake/rules/linuxGcc46/cProf create mode 100644 wmake/rules/linuxGcc46/general create mode 100644 wmake/rules/linuxGcc46/mplibHPMPI diff --git a/etc/bashrc b/etc/bashrc index f5a29a3d89..2de27d0513 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -62,7 +62,7 @@ foamInstall=$HOME/$WM_PROJECT foamCompiler=system #- Compiler: -# WM_COMPILER = Gcc | Gcc43 | Gcc44 | Gcc45 | Clang | Icc (Intel icc) +# WM_COMPILER = Gcc | Gcc43 | Gcc44 | Gcc45 | Gcc46 | Clang | Icc (Intel icc) export WM_COMPILER=Gcc unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH diff --git a/etc/cshrc b/etc/cshrc index b932679ad0..a23a607fff 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -61,7 +61,7 @@ if ( ! $?FOAM_INST_DIR ) setenv FOAM_INST_DIR $foamInstall set foamCompiler=system #- Compiler: -# WM_COMPILER = Gcc | Gcc43 | Gcc44 | Gcc45 | Clang | Icc (Intel icc) +# WM_COMPILER = Gcc | Gcc43 | Gcc44 | Gcc45 | Gcc46 | Clang | Icc (Intel icc) setenv WM_COMPILER Gcc setenv WM_COMPILER_ARCH # defined but empty unsetenv WM_COMPILER_LIB_ARCH diff --git a/etc/settings.csh b/etc/settings.csh index 4e5677e3d9..5e4c849926 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -207,6 +207,13 @@ case ThirdParty: set gmp_version=gmp-5.0.1 set mpfr_version=mpfr-2.4.2 breaksw + case Gcc46: + case Gcc46++0x: + set gcc_version=gcc-4.6.0 + set gmp_version=gmp-5.0.1 + set mpfr_version=mpfr-2.4.2 + set mpc_version=mpc-0.8.1 + breaksw case Gcc45: case Gcc45++0x: set gcc_version=gcc-4.5.2 diff --git a/etc/settings.sh b/etc/settings.sh index d7fcf2e254..f9f83e42a4 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -227,6 +227,12 @@ OpenFOAM | ThirdParty) gmp_version=gmp-5.0.1 mpfr_version=mpfr-2.4.2 ;; + Gcc46 | Gcc46++0x) + gcc_version=gcc-4.6.0 + gmp_version=gmp-5.0.1 + mpfr_version=mpfr-2.4.2 + mpc_version=mpc-0.8.1 + ;; Gcc45 | Gcc45++0x) gcc_version=gcc-4.5.2 gmp_version=gmp-5.0.1 diff --git a/wmake/rules/linux64Gcc46/c b/wmake/rules/linux64Gcc46/c new file mode 100644 index 0000000000..f4114be314 --- /dev/null +++ b/wmake/rules/linux64Gcc46/c @@ -0,0 +1,16 @@ +.SUFFIXES: .c .h + +cWARN = -Wall + +cc = gcc -m64 + +include $(RULES)/c$(WM_COMPILE_OPTION) + +cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC + +ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@ + +LINK_LIBS = $(cDBUG) + +LINKLIBSO = $(cc) -shared +LINKEXE = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs diff --git a/wmake/rules/linux64Gcc46/c++ b/wmake/rules/linux64Gcc46/c++ new file mode 100644 index 0000000000..3ca193e296 --- /dev/null +++ b/wmake/rules/linux64Gcc46/c++ @@ -0,0 +1,21 @@ +.SUFFIXES: .C .cxx .cc .cpp + +c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast + +CC = g++ -m64 + +include $(RULES)/c++$(WM_COMPILE_OPTION) + +ptFLAGS = -DNoRepository -ftemplate-depth-100 + +c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC + +Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@ +cxxtoo = $(Ctoo) +cctoo = $(Ctoo) +cpptoo = $(Ctoo) + +LINK_LIBS = $(c++DBUG) + +LINKLIBSO = $(CC) $(c++FLAGS) -shared +LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed diff --git a/wmake/rules/linux64Gcc46/c++Debug b/wmake/rules/linux64Gcc46/c++Debug new file mode 100644 index 0000000000..19bdb9c334 --- /dev/null +++ b/wmake/rules/linux64Gcc46/c++Debug @@ -0,0 +1,2 @@ +c++DBUG = -ggdb3 -DFULLDEBUG +c++OPT = -O0 -fdefault-inline diff --git a/wmake/rules/linux64Gcc46/c++Opt b/wmake/rules/linux64Gcc46/c++Opt new file mode 100644 index 0000000000..3446f7f58c --- /dev/null +++ b/wmake/rules/linux64Gcc46/c++Opt @@ -0,0 +1,4 @@ +c++DBUG = +c++OPT = -O3 +#c++OPT = -march=nocona -O3 +# -ftree-vectorize -ftree-vectorizer-verbose=3 diff --git a/wmake/rules/linux64Gcc46/c++Prof b/wmake/rules/linux64Gcc46/c++Prof new file mode 100644 index 0000000000..3bda4dad55 --- /dev/null +++ b/wmake/rules/linux64Gcc46/c++Prof @@ -0,0 +1,2 @@ +c++DBUG = -pg +c++OPT = -O2 diff --git a/wmake/rules/linux64Gcc46/cDebug b/wmake/rules/linux64Gcc46/cDebug new file mode 100644 index 0000000000..72b638f458 --- /dev/null +++ b/wmake/rules/linux64Gcc46/cDebug @@ -0,0 +1,2 @@ +cDBUG = -ggdb -DFULLDEBUG +cOPT = -O1 -fdefault-inline -finline-functions diff --git a/wmake/rules/linux64Gcc46/cOpt b/wmake/rules/linux64Gcc46/cOpt new file mode 100644 index 0000000000..17318709f1 --- /dev/null +++ b/wmake/rules/linux64Gcc46/cOpt @@ -0,0 +1,2 @@ +cDBUG = +cOPT = -O3 diff --git a/wmake/rules/linux64Gcc46/cProf b/wmake/rules/linux64Gcc46/cProf new file mode 100644 index 0000000000..ca3ac9bf5f --- /dev/null +++ b/wmake/rules/linux64Gcc46/cProf @@ -0,0 +1,2 @@ +cDBUG = -pg +cOPT = -O2 diff --git a/wmake/rules/linux64Gcc46/general b/wmake/rules/linux64Gcc46/general new file mode 100644 index 0000000000..4a42b11b1e --- /dev/null +++ b/wmake/rules/linux64Gcc46/general @@ -0,0 +1,8 @@ +CPP = cpp -traditional-cpp + +PROJECT_LIBS = -l$(WM_PROJECT) -ldl + +include $(GENERAL_RULES)/standard + +include $(RULES)/c +include $(RULES)/c++ diff --git a/wmake/rules/linux64Gcc46/mplibHPMPI b/wmake/rules/linux64Gcc46/mplibHPMPI new file mode 100644 index 0000000000..574492a236 --- /dev/null +++ b/wmake/rules/linux64Gcc46/mplibHPMPI @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H +PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_amd64 -lmpi diff --git a/wmake/rules/linuxGcc46/c b/wmake/rules/linuxGcc46/c new file mode 100644 index 0000000000..d914fcd37d --- /dev/null +++ b/wmake/rules/linuxGcc46/c @@ -0,0 +1,16 @@ +.SUFFIXES: .c .h + +cWARN = -Wall + +cc = gcc -m32 + +include $(RULES)/c$(WM_COMPILE_OPTION) + +cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC + +ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@ + +LINK_LIBS = $(cDBUG) + +LINKLIBSO = $(cc) -shared +LINKEXE = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs diff --git a/wmake/rules/linuxGcc46/c++ b/wmake/rules/linuxGcc46/c++ new file mode 100644 index 0000000000..e862181fc5 --- /dev/null +++ b/wmake/rules/linuxGcc46/c++ @@ -0,0 +1,21 @@ +.SUFFIXES: .C .cxx .cc .cpp + +c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast + +CC = g++ -m32 + +include $(RULES)/c++$(WM_COMPILE_OPTION) + +ptFLAGS = -DNoRepository -ftemplate-depth-100 + +c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC + +Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@ +cxxtoo = $(Ctoo) +cctoo = $(Ctoo) +cpptoo = $(Ctoo) + +LINK_LIBS = $(c++DBUG) + +LINKLIBSO = $(CC) $(c++FLAGS) -shared +LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed diff --git a/wmake/rules/linuxGcc46/c++Debug b/wmake/rules/linuxGcc46/c++Debug new file mode 100644 index 0000000000..19bdb9c334 --- /dev/null +++ b/wmake/rules/linuxGcc46/c++Debug @@ -0,0 +1,2 @@ +c++DBUG = -ggdb3 -DFULLDEBUG +c++OPT = -O0 -fdefault-inline diff --git a/wmake/rules/linuxGcc46/c++Opt b/wmake/rules/linuxGcc46/c++Opt new file mode 100644 index 0000000000..2aedabd628 --- /dev/null +++ b/wmake/rules/linuxGcc46/c++Opt @@ -0,0 +1,2 @@ +c++DBUG = +c++OPT = -O3 diff --git a/wmake/rules/linuxGcc46/c++Prof b/wmake/rules/linuxGcc46/c++Prof new file mode 100644 index 0000000000..3bda4dad55 --- /dev/null +++ b/wmake/rules/linuxGcc46/c++Prof @@ -0,0 +1,2 @@ +c++DBUG = -pg +c++OPT = -O2 diff --git a/wmake/rules/linuxGcc46/cDebug b/wmake/rules/linuxGcc46/cDebug new file mode 100644 index 0000000000..72b638f458 --- /dev/null +++ b/wmake/rules/linuxGcc46/cDebug @@ -0,0 +1,2 @@ +cDBUG = -ggdb -DFULLDEBUG +cOPT = -O1 -fdefault-inline -finline-functions diff --git a/wmake/rules/linuxGcc46/cOpt b/wmake/rules/linuxGcc46/cOpt new file mode 100644 index 0000000000..17318709f1 --- /dev/null +++ b/wmake/rules/linuxGcc46/cOpt @@ -0,0 +1,2 @@ +cDBUG = +cOPT = -O3 diff --git a/wmake/rules/linuxGcc46/cProf b/wmake/rules/linuxGcc46/cProf new file mode 100644 index 0000000000..ca3ac9bf5f --- /dev/null +++ b/wmake/rules/linuxGcc46/cProf @@ -0,0 +1,2 @@ +cDBUG = -pg +cOPT = -O2 diff --git a/wmake/rules/linuxGcc46/general b/wmake/rules/linuxGcc46/general new file mode 100644 index 0000000000..4b051e6b98 --- /dev/null +++ b/wmake/rules/linuxGcc46/general @@ -0,0 +1,9 @@ +CPP = cpp -traditional-cpp +LD = ld -melf_i386 + +PROJECT_LIBS = -l$(WM_PROJECT) -ldl + +include $(GENERAL_RULES)/standard + +include $(RULES)/c +include $(RULES)/c++ diff --git a/wmake/rules/linuxGcc46/mplibHPMPI b/wmake/rules/linuxGcc46/mplibHPMPI new file mode 100644 index 0000000000..8aff40632b --- /dev/null +++ b/wmake/rules/linuxGcc46/mplibHPMPI @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H +PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_ia32 -lmpi From 31cea7cb8fff66af50d2a75ef5b3e4d8794e3400 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 30 Mar 2011 16:47:03 +0100 Subject: [PATCH 02/12] STYLE: treeData*: renamed points() to shapePoints() to avoid confusion --- src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C | 2 +- src/OpenFOAM/algorithms/indexedOctree/treeDataCell.H | 2 +- src/OpenFOAM/meshes/polyMesh/polyMesh.C | 2 ++ src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C | 2 ++ src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H | 6 ++++-- src/meshTools/indexedOctree/treeDataEdge.C | 4 ++-- src/meshTools/indexedOctree/treeDataEdge.H | 4 ++-- src/meshTools/indexedOctree/treeDataFace.C | 4 ++-- src/meshTools/indexedOctree/treeDataFace.H | 4 ++-- src/meshTools/indexedOctree/treeDataPoint.C | 2 +- src/meshTools/indexedOctree/treeDataPoint.H | 7 ++++++- src/meshTools/indexedOctree/treeDataPrimitivePatch.C | 4 ++-- src/meshTools/indexedOctree/treeDataPrimitivePatch.H | 4 ++-- src/meshTools/indexedOctree/treeDataTriSurface.C | 4 ++-- src/meshTools/indexedOctree/treeDataTriSurface.H | 4 ++-- 15 files changed, 33 insertions(+), 22 deletions(-) diff --git a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C index c528f8fa16..0ea4168bd2 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C +++ b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C @@ -126,7 +126,7 @@ Foam::treeDataCell::treeDataCell // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::pointField Foam::treeDataCell::points() const +Foam::pointField Foam::treeDataCell::shapePoints() const { pointField cc(cellLabels_.size()); diff --git a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.H b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.H index 7cebddafa9..0e55f5168a 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.H +++ b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.H @@ -125,7 +125,7 @@ public: //- Get representative point cloud for all shapes inside // (one point per shape) - pointField points() const; + pointField shapePoints() const; // Search diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index 9891c79e5b..4c08d917e7 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -34,6 +34,8 @@ License #include "OSspecific.H" #include "demandDrivenData.H" #include "polyMeshTetDecomposition.H" +#include "indexedOctree.H" +#include "treeDataCell.H" #include "pointMesh.H" diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C index b0e83ce670..d14807abf8 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C @@ -25,6 +25,8 @@ License #include "primitiveMesh.H" #include "demandDrivenData.H" +#include "indexedOctree.H" +#include "treeDataCell.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H index cc3bc2c80a..92937ed158 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H @@ -67,14 +67,16 @@ SourceFiles #include "Map.H" #include "EdgeMap.H" #include "boundBox.H" -#include "indexedOctree.H" -#include "treeDataCell.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { +// Forward declaration of classes +class treeDataCell; +template class indexedOctree; + /*---------------------------------------------------------------------------*\ Class primitiveMesh Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/meshTools/indexedOctree/treeDataEdge.C b/src/meshTools/indexedOctree/treeDataEdge.C index 3146bcd4d4..2dab1ce1e6 100644 --- a/src/meshTools/indexedOctree/treeDataEdge.C +++ b/src/meshTools/indexedOctree/treeDataEdge.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -95,7 +95,7 @@ Foam::treeDataEdge::treeDataEdge // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::pointField Foam::treeDataEdge::points() const +Foam::pointField Foam::treeDataEdge::shapePoints() const { pointField eMids(edgeLabels_.size()); diff --git a/src/meshTools/indexedOctree/treeDataEdge.H b/src/meshTools/indexedOctree/treeDataEdge.H index 635babcf61..9a4864783f 100644 --- a/src/meshTools/indexedOctree/treeDataEdge.H +++ b/src/meshTools/indexedOctree/treeDataEdge.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -128,7 +128,7 @@ public: //- Get representative point cloud for all shapes inside // (one point per shape) - pointField points() const; + pointField shapePoints() const; // Search diff --git a/src/meshTools/indexedOctree/treeDataFace.C b/src/meshTools/indexedOctree/treeDataFace.C index 66d6feec71..5afdfc98b4 100644 --- a/src/meshTools/indexedOctree/treeDataFace.C +++ b/src/meshTools/indexedOctree/treeDataFace.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -144,7 +144,7 @@ Foam::treeDataFace::treeDataFace // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::pointField Foam::treeDataFace::points() const +Foam::pointField Foam::treeDataFace::shapePoints() const { pointField cc(faceLabels_.size()); diff --git a/src/meshTools/indexedOctree/treeDataFace.H b/src/meshTools/indexedOctree/treeDataFace.H index 89ed27e24b..71a08887ba 100644 --- a/src/meshTools/indexedOctree/treeDataFace.H +++ b/src/meshTools/indexedOctree/treeDataFace.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -140,7 +140,7 @@ public: //- Get representative point cloud for all shapes inside // (one point per shape) - pointField points() const; + pointField shapePoints() const; // Search diff --git a/src/meshTools/indexedOctree/treeDataPoint.C b/src/meshTools/indexedOctree/treeDataPoint.C index cabc1acf7f..1685b3b4e9 100644 --- a/src/meshTools/indexedOctree/treeDataPoint.C +++ b/src/meshTools/indexedOctree/treeDataPoint.C @@ -54,7 +54,7 @@ Foam::treeDataPoint::treeDataPoint // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::pointField Foam::treeDataPoint::points() const +Foam::pointField Foam::treeDataPoint::shapePoints() const { if (pointLabels_.size()) { diff --git a/src/meshTools/indexedOctree/treeDataPoint.H b/src/meshTools/indexedOctree/treeDataPoint.H index 4f67b15a3f..291927625c 100644 --- a/src/meshTools/indexedOctree/treeDataPoint.H +++ b/src/meshTools/indexedOctree/treeDataPoint.H @@ -94,9 +94,14 @@ public: return pointLabels_; } + const pointField& points() const + { + return points_; + } + //- Get representative point cloud for all shapes inside // (one point per shape) - pointField points() const; + pointField shapePoints() const; // Search diff --git a/src/meshTools/indexedOctree/treeDataPrimitivePatch.C b/src/meshTools/indexedOctree/treeDataPrimitivePatch.C index 87f033d3a3..e6b485d6f4 100644 --- a/src/meshTools/indexedOctree/treeDataPrimitivePatch.C +++ b/src/meshTools/indexedOctree/treeDataPrimitivePatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -128,7 +128,7 @@ template > Foam::pointField Foam::treeDataPrimitivePatch:: -points() const +shapePoints() const { pointField cc(patch_.size()); diff --git a/src/meshTools/indexedOctree/treeDataPrimitivePatch.H b/src/meshTools/indexedOctree/treeDataPrimitivePatch.H index 5c098d0be8..b87514a4a2 100644 --- a/src/meshTools/indexedOctree/treeDataPrimitivePatch.H +++ b/src/meshTools/indexedOctree/treeDataPrimitivePatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -118,7 +118,7 @@ public: //- Get representative point cloud for all shapes inside // (one point per shape) - pointField points() const; + pointField shapePoints() const; // Search diff --git a/src/meshTools/indexedOctree/treeDataTriSurface.C b/src/meshTools/indexedOctree/treeDataTriSurface.C index 3e515cf699..63c76de482 100644 --- a/src/meshTools/indexedOctree/treeDataTriSurface.C +++ b/src/meshTools/indexedOctree/treeDataTriSurface.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -187,7 +187,7 @@ Foam::treeDataTriSurface::treeDataTriSurface(const triSurface& surface) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::pointField Foam::treeDataTriSurface::points() const +Foam::pointField Foam::treeDataTriSurface::shapePoints() const { const pointField& points = surface_.points(); diff --git a/src/meshTools/indexedOctree/treeDataTriSurface.H b/src/meshTools/indexedOctree/treeDataTriSurface.H index 377294dcbd..47778c61c5 100644 --- a/src/meshTools/indexedOctree/treeDataTriSurface.H +++ b/src/meshTools/indexedOctree/treeDataTriSurface.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -103,7 +103,7 @@ public: //- Get representative point cloud for all shapes inside // (one point per shape) - pointField points() const; + pointField shapePoints() const; // Search From 3177e81566e39512f6ba5bd115a1c291a67e432a Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 31 Mar 2011 13:53:48 +0200 Subject: [PATCH 03/12] ENH: adjust thermalPorousZone to match documentation eg, dictionary entry: thermalModel { type none; // fixedTemperature; // fixedTemperature coefficients T 350; } A missing thermalModel is treated as 'none' --- .../cfdTools/general/porousMedia/porousZone.C | 9 ++++++++- .../fixedTemperature/fixedTemperature.C | 6 +++--- .../fixedTemperature/fixedTemperature.H | 5 ++--- .../thermalModel/noThermalModel/noThermalModel.H | 5 ++--- .../thermalModel/thermalModel/thermalModel.C | 8 ++++---- .../thermalModel/thermalModel/thermalModel.H | 14 +++++++------- .../thermalModel/thermalModel/thermalModelNew.C | 10 ++++++++-- .../thermalPorousZone/thermalPorousZone.C | 7 +++++-- .../thermalPorousZone/thermalPorousZone.H | 4 ++-- .../thermalPorousZone/thermalPorousZones.C | 2 +- .../thermalPorousZone/thermalPorousZones.H | 7 ++++--- .../angledDuctImplicit/constant/porousZones | 9 +++++---- 12 files changed, 51 insertions(+), 35 deletions(-) diff --git a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C index cdce53e932..97fe34d586 100644 --- a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C +++ b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -445,6 +445,13 @@ void Foam::porousZone::writeDict(Ostream& os, bool subDict) const dictPtr->write(os); } + // thermalModel + if (const dictionary* dictPtr = dict_.subDictPtr("thermalModel")) + { + os << indent << "thermalModel"; + dictPtr->write(os); + } + os << decrIndent << indent << token::END_BLOCK << endl; } diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C index dba5a3d470..4f75d3ee13 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,8 +51,8 @@ namespace porousMedia Foam::porousMedia::fixedTemperature::fixedTemperature(const porousZone& pZone) : - thermalModel(pZone, typeName), - T_(readScalar(coeffDict_.lookup("T"))) + thermalModel(pZone), + T_(readScalar(thermalCoeffs_.lookup("T"))) {} diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.H b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.H index 4ae9aab656..5498cf7b90 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.H +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,7 +33,6 @@ Description #define fixedTemperature_H #include "thermalModel.H" -#include "autoPtr.H" #include "runTimeSelectionTables.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -81,7 +80,7 @@ public: //- Add the thermal source to the enthalpy equation virtual void addEnthalpySource ( - const basicThermo& thermo, + const basicThermo&, const volScalarField& rho, fvScalarMatrix& hEqn ) const; diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.H b/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.H index 123a9b2fd5..4f6df99852 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.H +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,7 +33,6 @@ Description #define noThermalModel_H #include "thermalModel.H" -#include "autoPtr.H" #include "runTimeSelectionTables.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -73,7 +72,7 @@ public: //- Add the thermal source to the enthalpy equation virtual void addEnthalpySource ( - const basicThermo& thermo, + const basicThermo&, const volScalarField& rho, fvScalarMatrix& hEqn ) const; diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.C index d7e36c8ed8..36d06cf91e 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.C +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,18 +42,18 @@ namespace porousMedia Foam::porousMedia::thermalModel::thermalModel(const porousZone& pZone) : pZone_(pZone), - coeffDict_(dictionary::null) + thermalCoeffs_(pZone.dict().subDictPtr("thermalModel")) {} Foam::porousMedia::thermalModel::thermalModel ( const porousZone& pZone, - const word& modelType + const dictionary& thermalCoeffs ) : pZone_(pZone), - coeffDict_(pZone_.dict().subDict(modelType + "Coeffs")) + thermalCoeffs_(thermalCoeffs) {} diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.H b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.H index bda42db68e..a4f762c285 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.H +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -63,8 +63,8 @@ protected: //- Reference to the porous zone const porousZone& pZone_; - //- Sub-model coefficients dictionary - const dictionary coeffDict_; + //- Thermal model coefficients dictionary + const dictionary thermalCoeffs_; public: @@ -87,11 +87,11 @@ public: // Constructors - //- Construct null from porous zone + //- Construct from porous zone, coefficients from "thermalModel" entry thermalModel(const porousZone&); - //- Construct from porous zone and model type name - thermalModel(const porousZone&, const word& modelType); + //- Construct from porous zone and thermal model coefficients + thermalModel(const porousZone&, const dictionary& thermalCoeffs); //- Destructor @@ -107,7 +107,7 @@ public: //- Add the thermal source to the enthalpy equation virtual void addEnthalpySource ( - const basicThermo& thermo, + const basicThermo&, const volScalarField& rho, fvScalarMatrix& hEqn ) const = 0; diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModelNew.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModelNew.C index 8b89b7eef1..731fdeac4a 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModelNew.C +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModelNew.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,7 +33,13 @@ Foam::porousMedia::thermalModel::New const porousZone& pZone ) { - const word modelType(pZone.dict().lookup("thermalModel")); + // a missing thermalModel is the same as type "none" + word modelType("none"); + + if (const dictionary* dictPtr = pZone.dict().subDictPtr("thermalModel")) + { + dictPtr->lookup("type") >> modelType; + } Info<< "Selecting thermalModel " << modelType << endl; diff --git a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C index 9207716af5..78ab986742 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C +++ b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,7 +51,10 @@ void Foam::thermalPorousZone::addEnthalpySource fvScalarMatrix& hEqn ) const { - model_->addEnthalpySource(thermo, rho, hEqn); + if (model_.valid()) + { + model_->addEnthalpySource(thermo, rho, hEqn); + } } diff --git a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.H b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.H index 57d5e29237..ce864586f9 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.H +++ b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -127,7 +127,7 @@ public: //- Add the thermal source to the enthalpy equation void addEnthalpySource ( - const basicThermo& thermo, + const basicThermo&, const volScalarField& rho, fvScalarMatrix& hEqn ) const; diff --git a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZones.C b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZones.C index a7d80ab9b1..daccc25749 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZones.C +++ b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZones.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZones.H b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZones.H index f30e0e50c3..2589e51ce5 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZones.H +++ b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZones.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,8 @@ Description thermalPorousZone. The input file \c constant/thermalPorousZone is implemented as - IOPtrList\ and contains the following type of data: + IOPtrList\ (but written as a dictionary) + and contains the following type of data: \verbatim 1 @@ -94,7 +95,7 @@ public: //- Add the thermal source to the enthalpy equation void addEnthalpySource ( - const basicThermo& thermo, + const basicThermo&, const volScalarField& rho, fvScalarMatrix& hEqn ) const; diff --git a/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/porousZones b/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/porousZones index e4d251bf9e..ef7fd5ea5e 100644 --- a/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/porousZones +++ b/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/porousZones @@ -31,11 +31,12 @@ FoamFile f f [0 -1 0 0 0 0 0] (0 0 0); } - thermalModel none; // fixedTemperature; - - fixedTemperatureCoeffs + thermalModel { - T 350; + type none; // fixedTemperature; + + // fixedTemperature coefficients + T 350; } } ) From e86458f8e8a09afc823dd64e55553d40f86df3b4 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 31 Mar 2011 14:19:30 +0200 Subject: [PATCH 04/12] GIT: copyright years on git push --- src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C index ef22aeee8e..c30dfd0722 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License From d311e2901198f0af605fb1f81fe3f4732fff4dc0 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 1 Apr 2011 03:16:14 +0100 Subject: [PATCH 05/12] BUG: size was returning points size instead of subset size --- src/meshTools/indexedOctree/treeDataPoint.H | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/meshTools/indexedOctree/treeDataPoint.H b/src/meshTools/indexedOctree/treeDataPoint.H index 291927625c..336479d69b 100644 --- a/src/meshTools/indexedOctree/treeDataPoint.H +++ b/src/meshTools/indexedOctree/treeDataPoint.H @@ -86,7 +86,12 @@ public: inline label size() const { - return points_.size(); + return + ( + pointLabels_.size() + ? pointLabels_.size() + : points_.size() + ); } inline const labelList& pointLabels() const From 7d728f5c77f7e149ca8f686140dc90fe416e9ad0 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 1 Apr 2011 03:33:49 +0100 Subject: [PATCH 06/12] ENH: snappyHexMeshDict: added comment. Changed wrt 17x --- .../iglooWithFridges/system/snappyHexMeshDict | 1 + .../snappyMultiRegionHeater/system/snappyHexMeshDict | 5 +++-- .../wingMotion_snappyHexMesh/system/snappyHexMeshDict | 2 +- .../simpleFoam/motorBike/system/snappyHexMeshDict | 2 +- .../simpleWindFoam/turbineSiting/system/snappyHexMeshDict | 2 +- .../LTSInterFoam/wigleyHull/system/snappyHexMeshDict | 2 ++ .../cavitatingBullet/system/snappyHexMeshDict | 6 ++++-- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict index efbcd36312..6266de7dfd 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict @@ -292,6 +292,7 @@ addLayersControls //- If points get not extruded do nGrow layers of connected faces that are // also not grown. This helps convergence of the layer addition process // close to features. + // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x) nGrow 0; diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/snappyHexMeshDict b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/snappyHexMeshDict index 6e7fa19ef8..e91adb216d 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/snappyHexMeshDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/snappyHexMeshDict @@ -282,9 +282,9 @@ addLayersControls //- If points get not extruded do nGrow layers of connected faces that are // also not grown. This helps convergence of the layer addition process // close to features. + // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x) nGrow 0; - // Advanced settings //- When not to extrude surface. 0 is flat surface, 90 is when two faces @@ -312,7 +312,8 @@ addLayersControls maxThicknessToMedialRatio 0.3; // Angle used to pick up medial axis points - minMedianAxisAngle 130; + // Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x. + minMedianAxisAngle 90; // Create buffer region for new layer terminations nBufferCellsNoExtrude 0; diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/snappyHexMeshDict b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/snappyHexMeshDict index 5484dbc3c7..788aa3ecbe 100644 --- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/snappyHexMeshDict +++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/snappyHexMeshDict @@ -206,9 +206,9 @@ addLayersControls //- If points get not extruded do nGrow layers of connected faces that are // also not grown. This helps convergence of the layer addition process // close to features. + // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x) nGrow 0; - // Advanced settings //- When not to extrude surface. 0 is flat surface, 90 is when two faces diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict b/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict index d7678a15cd..db4951b374 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict +++ b/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict @@ -219,9 +219,9 @@ addLayersControls //- If points get not extruded do nGrow layers of connected faces that are // also not grown. This helps convergence of the layer addition process // close to features. + // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x) nGrow 0; - // Advanced settings //- When not to extrude surface. 0 is flat surface, 90 is when two faces diff --git a/tutorials/incompressible/simpleWindFoam/turbineSiting/system/snappyHexMeshDict b/tutorials/incompressible/simpleWindFoam/turbineSiting/system/snappyHexMeshDict index 25301e24cd..61028710ce 100644 --- a/tutorials/incompressible/simpleWindFoam/turbineSiting/system/snappyHexMeshDict +++ b/tutorials/incompressible/simpleWindFoam/turbineSiting/system/snappyHexMeshDict @@ -290,7 +290,7 @@ addLayersControls //- If points get not extruded do nGrow layers of connected faces that are // also not grown. This helps convergence of the layer addition process // close to features. - // Note: changed(corrected) w.r.t 16x! (didn't do anything in 16x) + // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x) nGrow 0; diff --git a/tutorials/multiphase/LTSInterFoam/wigleyHull/system/snappyHexMeshDict b/tutorials/multiphase/LTSInterFoam/wigleyHull/system/snappyHexMeshDict index 31b2527a75..840ab30e65 100644 --- a/tutorials/multiphase/LTSInterFoam/wigleyHull/system/snappyHexMeshDict +++ b/tutorials/multiphase/LTSInterFoam/wigleyHull/system/snappyHexMeshDict @@ -241,6 +241,7 @@ addLayersControls //- If points get not extruded do nGrow layers of connected faces that are // also not grown. This helps convergence of the layer addition process // close to features. + // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x) nGrow 0; @@ -271,6 +272,7 @@ addLayersControls maxThicknessToMedialRatio 0.3; // Angle used to pick up medial axis points + // Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x. minMedianAxisAngle 90; // Create buffer region for new layer terminations diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/snappyHexMeshDict b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/snappyHexMeshDict index 3486a71222..dfc0a4375d 100644 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/snappyHexMeshDict +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/snappyHexMeshDict @@ -224,7 +224,8 @@ addLayersControls //- If points get not extruded do nGrow layers of connected faces that are // also not grown. This helps convergence of the layer addition process // close to features. - nGrow 1; + // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x) + nGrow 0; // Advanced settings @@ -254,7 +255,8 @@ addLayersControls maxThicknessToMedialRatio 0.3; // Angle used to pick up medial axis points - minMedianAxisAngle 130; + // Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x. + minMedianAxisAngle 90; // Create buffer region for new layer terminations nBufferCellsNoExtrude 0; From 646f9f8b4c9dee0537fd9a3f73ae58f493a67cb7 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 1 Apr 2011 03:35:43 +0100 Subject: [PATCH 07/12] ENH: meshRefinement: extend test vectors for robustness. 17x indexedOctree was missing intersections which could lead to less refinement --- .../autoHexMesh/meshRefinement/meshRefinement.C | 12 ++++++------ .../meshRefinement/meshRefinementBaffles.C | 8 ++++---- .../meshRefinement/meshRefinementRefine.C | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C index 0c5945f464..738a5cced3 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C @@ -216,8 +216,8 @@ void Foam::meshRefinement::updateIntersections(const labelList& changedFaces) // Extend segments a bit { const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); - start += smallVec; - end -= smallVec; + start -= smallVec; + end += smallVec; } @@ -327,8 +327,8 @@ void Foam::meshRefinement::checkData() // Extend segments a bit { const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); - start += smallVec; - end -= smallVec; + start -= smallVec; + end += smallVec; } @@ -2266,8 +2266,8 @@ void Foam::meshRefinement::dumpIntersections(const fileName& prefix) const // Extend segments a bit { const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); - start += smallVec; - end -= smallVec; + start -= smallVec; + end += smallVec; } diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C index 8f8a532e2c..f3ab1e65c9 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C @@ -286,8 +286,8 @@ void Foam::meshRefinement::getBafflePatches // Extend segments a bit { const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); - start += smallVec; - end -= smallVec; + start -= smallVec; + end += smallVec; } @@ -2457,8 +2457,8 @@ Foam::autoPtr Foam::meshRefinement::zonify // Extend segments a bit { const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); - start += smallVec; - end -= smallVec; + start -= smallVec; + end += smallVec; } diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C index 96821d4718..a7cc79ee7a 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C @@ -629,8 +629,8 @@ Foam::label Foam::meshRefinement::markSurfaceRefinement // Extend segments a bit { const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); - start += smallVec; - end -= smallVec; + start -= smallVec; + end += smallVec; } @@ -845,8 +845,8 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement // Extend segments a bit { const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); - start += smallVec; - end -= smallVec; + start -= smallVec; + end += smallVec; } From 18c364752465c62804804bcdad2c2544e23f3deb Mon Sep 17 00:00:00 2001 From: graham Date: Fri, 1 Apr 2011 15:46:52 +0100 Subject: [PATCH 08/12] BUG: Wrong application name. --- tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allrun | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allrun b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allrun index dfe52836b5..a59d39972d 100755 --- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allrun +++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allrun @@ -7,7 +7,7 @@ cd ${0%/*} || exit 1 # run from this directory runApplication blockMesh runApplication decomposePar runParallel dsmcInitialise 4 -runParallel dsmcFoam 4 -runApplication `getApplication` -noLagrangian +runParallel `getApplication` 4 +runApplication reconstructPar -noLagrangian # ----------------------------------------------------------------- end-of-file From 069bfbb5081ca2321b1c96a477bf56ba0a995391 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 1 Apr 2011 17:35:03 +0100 Subject: [PATCH 09/12] ENH: Time: set writePrecision on error streams --- src/OpenFOAM/db/Time/TimeIO.C | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/OpenFOAM/db/Time/TimeIO.C b/src/OpenFOAM/db/Time/TimeIO.C index da542524b7..437a0773e8 100644 --- a/src/OpenFOAM/db/Time/TimeIO.C +++ b/src/OpenFOAM/db/Time/TimeIO.C @@ -168,6 +168,12 @@ void Foam::Time::readDict() Pout.precision(IOstream::defaultPrecision()); Perr.precision(IOstream::defaultPrecision()); + + FatalError().precision(IOstream::defaultPrecision()); + FatalIOError.error::operator()().precision + ( + IOstream::defaultPrecision() + ); } if (controlDict_.found("writeCompression")) From df0631c99c66640463b97b3d3bff56cf2cdc8f6d Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 1 Apr 2011 17:36:20 +0100 Subject: [PATCH 10/12] STYLE: dlLibraryTable.C: dlclose comment --- .../db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C b/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C index 09537c8e73..3d1878a5f7 100644 --- a/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C +++ b/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C @@ -55,6 +55,10 @@ Foam::dlLibraryTable::~dlLibraryTable() { forAllConstIter(dlLibraryTable, *this, iter) { + // bug in dlclose - does not call static destructors of + // loaded library when actually unloading the library. + // See https://bugzilla.novell.com/show_bug.cgi?id=680125 and 657627. + // Seems related to using a non-system compiler! dlClose(iter.key()); } } From 1156b36b19791f1f4215369c74f3fdaba0b5aa46 Mon Sep 17 00:00:00 2001 From: sergio Date: Tue, 5 Apr 2011 10:07:18 +0100 Subject: [PATCH 11/12] ENH: Add nLayers to 1Dregion Models --- .../regionModel/regionModel1D/regionModel1D.C | 4 ++++ .../regionModel/regionModel1D/regionModel1D.H | 8 +++++++- .../regionModel/regionModel1D/regionModel1DI.H | 6 ++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/regionModels/regionModel/regionModel1D/regionModel1D.C b/src/regionModels/regionModel/regionModel1D/regionModel1D.C index 19bf9f2ece..8997340266 100644 --- a/src/regionModels/regionModel/regionModel1D/regionModel1D.C +++ b/src/regionModels/regionModel/regionModel1D/regionModel1D.C @@ -114,6 +114,8 @@ void Foam::regionModels::regionModel1D::initialise() boundaryFaceCells_[localPyrolysisFaceI].transfer(cellIDs); localPyrolysisFaceI++; + + nLayers_ = nCells; } } @@ -266,6 +268,7 @@ Foam::regionModels::regionModel1D::regionModel1D(const fvMesh& mesh) boundaryFaceFaces_(), boundaryFaceCells_(), boundaryFaceOppositeFace_(), + nLayers_(0), nMagSfPtr_(NULL), moveMesh_(false) {} @@ -283,6 +286,7 @@ Foam::regionModels::regionModel1D::regionModel1D boundaryFaceFaces_(regionMesh().nCells()), boundaryFaceCells_(regionMesh().nCells()), boundaryFaceOppositeFace_(regionMesh().nCells()), + nLayers_(0), nMagSfPtr_(NULL), moveMesh_(true) { diff --git a/src/regionModels/regionModel/regionModel1D/regionModel1D.H b/src/regionModels/regionModel/regionModel1D/regionModel1D.H index 7b42a5467b..35a6b75dfc 100644 --- a/src/regionModels/regionModel/regionModel1D/regionModel1D.H +++ b/src/regionModels/regionModel/regionModel1D/regionModel1D.H @@ -88,6 +88,9 @@ protected: //- Global boundary face IDs oppossite coupled patch labelList boundaryFaceOppositeFace_; + //- Number of layers in the region + label nLayers_; + // Geometry @@ -115,7 +118,7 @@ protected: public: //- Runtime type information - TypeName("regionModel"); + TypeName("regionModel1D"); // Constructors @@ -152,6 +155,9 @@ public: //- Return the global boundary face IDs oppossite coupled patch inline const labelList& boundaryFaceOppositeFace() const; + //- Return the number of layers in the region + inline label nLayers() const; + // Geometry diff --git a/src/regionModels/regionModel/regionModel1D/regionModel1DI.H b/src/regionModels/regionModel/regionModel1D/regionModel1DI.H index 55e61d3eef..7ab5cf08a5 100644 --- a/src/regionModels/regionModel/regionModel1D/regionModel1DI.H +++ b/src/regionModels/regionModel/regionModel1D/regionModel1DI.H @@ -49,6 +49,12 @@ Foam::regionModels::regionModel1D::boundaryFaceOppositeFace() const } +inline Foam::label Foam::regionModels::regionModel1D::nLayers() const +{ + return nLayers_; +} + + inline const Foam::surfaceScalarField& Foam::regionModels::regionModel1D::nMagSf() const { From 6682c226cfbceea7e93023d4a18a437e05d6a4a4 Mon Sep 17 00:00:00 2001 From: sergio Date: Tue, 5 Apr 2011 10:16:45 +0100 Subject: [PATCH 12/12] ENH: Change definition of emission --- .../fvDOM/radiativeIntensityRay/radiativeIntensityRay.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thermophysicalModels/radiationModels/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C b/src/thermophysicalModels/radiationModels/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C index 4edf09663f..109f633b9b 100644 --- a/src/thermophysicalModels/radiationModels/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C +++ b/src/thermophysicalModels/radiationModels/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C @@ -197,7 +197,7 @@ Foam::scalar Foam::radiation::radiativeIntensityRay::correct() 1.0/constant::mathematical::pi*omega_ *( k*blackBody_.bLambda(lambdaI) - + absorptionEmission_.ECont(lambdaI) + + absorptionEmission_.ECont(lambdaI)/4 ) );