From a643ad71eb36c6904e41cc76117a00b9fab114ac Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 27 Jan 2014 15:24:25 +0000 Subject: [PATCH 1/7] ENH: simpleShapes: no need for naming of patches --- .../simpleShapes/system/foamyHexMeshDict | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/tutorials/mesh/foamyHexMesh/simpleShapes/system/foamyHexMeshDict b/tutorials/mesh/foamyHexMesh/simpleShapes/system/foamyHexMeshDict index e8e2fd9d59..f73263a5aa 100644 --- a/tutorials/mesh/foamyHexMesh/simpleShapes/system/foamyHexMeshDict +++ b/tutorials/mesh/foamyHexMesh/simpleShapes/system/foamyHexMeshDict @@ -23,28 +23,12 @@ geometry { name sphere; type triSurfaceMesh; - - regions - { - ascii - { - name sphere_patch; - } - } } cone_orient.stl { name cone; type triSurfaceMesh; - - regions - { - ascii - { - name cone_patch; - } - } } // Outside of domain From 8b85cb04f67d63f64f151771df961b2cfa1133c3 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 28 Jan 2014 10:01:43 +0000 Subject: [PATCH 2/7] ENH: mapFields: switch off debug --- applications/utilities/preProcessing/mapFields/Make/options | 1 - 1 file changed, 1 deletion(-) diff --git a/applications/utilities/preProcessing/mapFields/Make/options b/applications/utilities/preProcessing/mapFields/Make/options index b4ed87bf74..7bd964094e 100644 --- a/applications/utilities/preProcessing/mapFields/Make/options +++ b/applications/utilities/preProcessing/mapFields/Make/options @@ -1,5 +1,4 @@ EXE_INC = \ - -DFULLDEBUG -g -O0 \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ From 340accf46d73ac829d0d1dc4e035ca4a8aad940a Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 28 Jan 2014 10:13:05 +0000 Subject: [PATCH 3/7] ENH: OpenCFD: naming regions --- tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/T | 10 +++---- tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/U | 10 +++---- tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/p | 10 +++---- .../OpenCFD/system/foamyQuadMeshDict | 28 +++++++++++++++++++ 4 files changed, 43 insertions(+), 15 deletions(-) diff --git a/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/T b/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/T index 9a6eca29ca..be34e9a10d 100644 --- a/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/T +++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/T @@ -20,28 +20,28 @@ internalField uniform 1; boundaryField { - box_inlet + inlet { type fixedValue; value uniform 1; } - box_outlet + outlet { type zeroGradient; } - box_bottom + bottom { type zeroGradient; } - box_top + top { type zeroGradient; } - letters_text + letters { type zeroGradient; } diff --git a/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/U b/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/U index 8bfcf3d178..3b20a7f85e 100644 --- a/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/U +++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/U @@ -20,18 +20,18 @@ internalField uniform (0 0 0); boundaryField { - box_inlet + inlet { type fixedValue; value uniform (3 0 0); } - box_outlet + outlet { type zeroGradient; } - box_bottom + bottom { type supersonicFreestream; UInf (3 0 0); @@ -40,7 +40,7 @@ boundaryField gamma 1.4; } - box_top + top { type supersonicFreestream; UInf (3 0 0); @@ -49,7 +49,7 @@ boundaryField gamma 1.4; } - letters_text + letters { type fixedValue; value uniform (0 0 0); diff --git a/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/p b/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/p index 634675e05c..17ffaefbbc 100644 --- a/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/p +++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/p @@ -20,28 +20,28 @@ internalField uniform 1; boundaryField { - box_inlet + inlet { type fixedValue; value uniform 1; } - box_outlet + outlet { type zeroGradient; } - box_bottom + bottom { type zeroGradient; } - box_top + top { type zeroGradient; } - letters_text + letters { type zeroGradient; } diff --git a/tutorials/mesh/foamyQuadMesh/OpenCFD/system/foamyQuadMeshDict b/tutorials/mesh/foamyQuadMesh/OpenCFD/system/foamyQuadMeshDict index a16e7f3fbc..0e6990e169 100644 --- a/tutorials/mesh/foamyQuadMesh/OpenCFD/system/foamyQuadMeshDict +++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/system/foamyQuadMeshDict @@ -27,6 +27,34 @@ geometry { name box; type closedTriSurfaceMesh; + + regions + { + back + { + name back; + } + front + { + name front; + } + bottom + { + name bottom; + } + top + { + name top; + } + inlet + { + name inlet; + } + outlet + { + name outlet; + } + } } } From 6d5dd7e30de45c22db1a4b73a7e369e96e59d360 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 28 Jan 2014 10:42:46 +0000 Subject: [PATCH 4/7] ENH: decomposePar: corrected comment in header --- .../parallelProcessing/decomposePar/decomposePar.C | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index a2ef7e656a..9d7d5ac3ae 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,8 +55,8 @@ Usage \param -fields \n Use existing geometry decomposition and convert fields only. - \param -sets \n - Decompose cellSets, faceSets, pointSets. + \param -noSets \n + Skip decomposing cellSets, faceSets, pointSets. \param -force \n Remove any existing \a processor subdirectories before decomposing the From f8d44081f9863b28607af6ef040d930990c69476 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 28 Jan 2014 12:51:18 +0000 Subject: [PATCH 5/7] ENH: foamLog.db: add AMI weights --- bin/tools/foamLog.db | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/tools/foamLog.db b/bin/tools/foamLog.db index f4c05bc010..d2719eb203 100644 --- a/bin/tools/foamLog.db +++ b/bin/tools/foamLog.db @@ -51,3 +51,5 @@ epsAvg/bounding epsilon,/average: alpha1Min/Min\(alpha1\) =/Min(alpha1) = alpha1Max/Max\(alpha1\) =/Max(alpha1) = +# AMI +AMIMin/AMI: Patch source sum/average = From f14b5e24560e1daebb97207656f54e4e9ad7c9e0 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 28 Jan 2014 12:54:14 +0000 Subject: [PATCH 6/7] ENH: etc: added CGAL setup --- .../utilities/mesh/generation/Allwmake | 2 +- .../mesh/generation/foamyHexMesh/Allwmake | 2 +- .../mesh/generation/foamyQuadMesh/Allwmake | 2 +- etc/bashrc | 1 + etc/config/CGAL.csh | 50 ++++++++++++++++++ etc/config/CGAL.sh | 51 +++++++++++++++++++ etc/config/settings.csh | 29 ----------- etc/config/settings.sh | 34 ------------- etc/cshrc | 1 + 9 files changed, 106 insertions(+), 66 deletions(-) create mode 100644 etc/config/CGAL.csh create mode 100644 etc/config/CGAL.sh diff --git a/applications/utilities/mesh/generation/Allwmake b/applications/utilities/mesh/generation/Allwmake index 8f7cbada96..f9861db464 100755 --- a/applications/utilities/mesh/generation/Allwmake +++ b/applications/utilities/mesh/generation/Allwmake @@ -7,7 +7,7 @@ wmake all extrude wmake all extrude2DMesh wmake all snappyHexMesh -if [ -d "$CGAL_ARCH_PATH" ] +if [ -n "$CGAL_ARCH_PATH" ] then wmake libso foamyHexMesh/conformalVoronoiMesh wmake all foamyHexMesh diff --git a/applications/utilities/mesh/generation/foamyHexMesh/Allwmake b/applications/utilities/mesh/generation/foamyHexMesh/Allwmake index 3a5c35d779..67770e51c5 100755 --- a/applications/utilities/mesh/generation/foamyHexMesh/Allwmake +++ b/applications/utilities/mesh/generation/foamyHexMesh/Allwmake @@ -2,7 +2,7 @@ cd ${0%/*} || exit 1 # run from this directory set -x -if [ -d "$CGAL_ARCH_PATH" ] +if [ -n "$CGAL_ARCH_PATH" ] then wmake libso conformalVoronoiMesh wmake diff --git a/applications/utilities/mesh/generation/foamyQuadMesh/Allwmake b/applications/utilities/mesh/generation/foamyQuadMesh/Allwmake index 18fc1e952a..242939465f 100755 --- a/applications/utilities/mesh/generation/foamyQuadMesh/Allwmake +++ b/applications/utilities/mesh/generation/foamyQuadMesh/Allwmake @@ -2,7 +2,7 @@ cd ${0%/*} || exit 1 # run from this directory set -x -if [ -d "$CGAL_ARCH_PATH" ] +if [ -n "$CGAL_ARCH_PATH" ] then #- Already built by ../Allwake #wmake libso ../foamyHexMesh/conformalVoronoiMesh diff --git a/etc/bashrc b/etc/bashrc index 0a3f216d51..5ac6a20081 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -214,6 +214,7 @@ _foamSource $WM_PROJECT_DIR/etc/config/aliases.sh _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.sh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.sh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/gperftools.sh` +_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/CGAL.sh` # Clean environment paths again. Only remove duplicates diff --git a/etc/config/CGAL.csh b/etc/config/CGAL.csh new file mode 100644 index 0000000000..2e3f81f0e4 --- /dev/null +++ b/etc/config/CGAL.csh @@ -0,0 +1,50 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2014 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 . +# +# File +# config/CGAL.csh +# +# Description +# Setup file for CGAL (& boost) include/libraries. +# Sourced from OpenFOAM-/etc/cshrc +##------------------------------------------------------------------------------ + +set boost_version=boost-system +set cgal_version=CGAL-4.3 + +setenv BOOST_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version +setenv CGAL_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version + +if ($?FOAM_VERBOSE && $?prompt) then + echo "Using CGAL and boost" + echo " $cgal_version at $CGAL_ARCH_PATH" + echo " $boost_version at $BOOST_ARCH_PATH" +endif + +if ( -d "$BOOST_ARCH_PATH" ) then + _foamAddLib $BOOST_ARCH_PATH/lib +endif + +unset boost_version cgal_version + +# ----------------------------------------------------------------------------- diff --git a/etc/config/CGAL.sh b/etc/config/CGAL.sh new file mode 100644 index 0000000000..dcb2606461 --- /dev/null +++ b/etc/config/CGAL.sh @@ -0,0 +1,51 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2014 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 . +# +# File +# config/CGAL.sh +# +# Description +# Setup file for CGAL (& boost) include/libraries. +# Sourced from OpenFOAM-/etc/bashrc +#------------------------------------------------------------------------------ + +boost_version=boost-system +cgal_version=CGAL-4.3 + +export BOOST_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version +export CGAL_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version + +if [ "$FOAM_VERBOSE" -a "$PS1" ] +then + echo "Using CGAL and boost" + echo " $cgal_version at $CGAL_ARCH_PATH" + echo " $boost_version at $BOOST_ARCH_PATH" +fi + +if ( -d "$BOOST_ARCH_PATH" ) then + _foamAddLib $BOOST_ARCH_PATH/lib +fi + +unset boost_version cgal_version + +# ----------------------------------------------------------------------------- diff --git a/etc/config/settings.csh b/etc/config/settings.csh index af748c57c2..a316037710 100644 --- a/etc/config/settings.csh +++ b/etc/config/settings.csh @@ -353,35 +353,6 @@ if ( $?WM_CXXFLAGS ) then endif -# boost and CGAL -# ~~~~~~~~~~~~~~ - -set boost_version=boost_1_45_0 -set cgal_version=CGAL-4.0 - -setenv BOOST_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version -setenv CGAL_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version - -# enabled if CGAL is available -if ($?FOAM_VERBOSE && $?prompt) then - echo "Checking for" - echo " $cgal_version at $CGAL_ARCH_PATH" - echo " $boost_version at $BOOST_ARCH_PATH" -endif - -if ( -d "$CGAL_ARCH_PATH" ) then - if ( -d "$BOOST_ARCH_PATH" ) then - _foamAddLib $BOOST_ARCH_PATH/lib - else - unsetenv BOOST_ARCH_PATH - endif - _foamAddLib $CGAL_ARCH_PATH/lib -else - unsetenv BOOST_ARCH_PATH CGAL_ARCH_PATH MPFR_ARCH_PATH GMP_ARCH_PATH -endif - -unset boost_version cgal_version - # Communications library # ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/etc/config/settings.sh b/etc/config/settings.sh index bc8fd220c5..487c550d24 100644 --- a/etc/config/settings.sh +++ b/etc/config/settings.sh @@ -370,40 +370,6 @@ then fi -# boost and CGAL -# ~~~~~~~~~~~~~~ - -boost_version=boost_1_45_0 -cgal_version=CGAL-4.0 - -export BOOST_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version -export CGAL_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version - -# enabled if CGAL is available -if [ "$FOAM_VERBOSE" -a "$PS1" ] -then - echo "Checking for" - echo " $cgal_version at $CGAL_ARCH_PATH" - echo " $boost_version at $BOOST_ARCH_PATH" -fi - -if [ -d "$CGAL_ARCH_PATH" ] -then - if [ -d "$BOOST_ARCH_PATH" ] - then - _foamAddLib $BOOST_ARCH_PATH/lib - _foamAddLib $BOOST_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH - else - unset BOOST_ARCH_PATH - fi - _foamAddLib $CGAL_ARCH_PATH/lib - _foamAddLib $CGAL_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH -else - unset BOOST_ARCH_PATH CGAL_ARCH_PATH MPFR_ARCH_PATH GMP_ARCH_PATH -fi - -unset boost_version cgal_version - # Communications library # ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/etc/cshrc b/etc/cshrc index bb232b22be..fc86f61432 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -203,6 +203,7 @@ _foamSource $WM_PROJECT_DIR/etc/config/aliases.csh # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.csh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.csh` +_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/CGAL.csh` # Clean environment paths again. Only remove duplicates From 5ae141856a845021aee285c8850d79f20d099d9a Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 28 Jan 2014 12:54:14 +0000 Subject: [PATCH 7/7] ENH: etc: added CGAL setup --- .../utilities/mesh/generation/Allwmake | 2 +- .../mesh/generation/foamyHexMesh/Allwmake | 2 +- .../mesh/generation/foamyQuadMesh/Allwmake | 2 +- etc/bashrc | 1 + etc/config/CGAL.csh | 50 ++++++++++++++++++ etc/config/CGAL.sh | 52 +++++++++++++++++++ etc/config/settings.csh | 29 ----------- etc/config/settings.sh | 34 ------------ etc/cshrc | 1 + 9 files changed, 107 insertions(+), 66 deletions(-) create mode 100644 etc/config/CGAL.csh create mode 100644 etc/config/CGAL.sh diff --git a/applications/utilities/mesh/generation/Allwmake b/applications/utilities/mesh/generation/Allwmake index 8f7cbada96..f9861db464 100755 --- a/applications/utilities/mesh/generation/Allwmake +++ b/applications/utilities/mesh/generation/Allwmake @@ -7,7 +7,7 @@ wmake all extrude wmake all extrude2DMesh wmake all snappyHexMesh -if [ -d "$CGAL_ARCH_PATH" ] +if [ -n "$CGAL_ARCH_PATH" ] then wmake libso foamyHexMesh/conformalVoronoiMesh wmake all foamyHexMesh diff --git a/applications/utilities/mesh/generation/foamyHexMesh/Allwmake b/applications/utilities/mesh/generation/foamyHexMesh/Allwmake index 3a5c35d779..67770e51c5 100755 --- a/applications/utilities/mesh/generation/foamyHexMesh/Allwmake +++ b/applications/utilities/mesh/generation/foamyHexMesh/Allwmake @@ -2,7 +2,7 @@ cd ${0%/*} || exit 1 # run from this directory set -x -if [ -d "$CGAL_ARCH_PATH" ] +if [ -n "$CGAL_ARCH_PATH" ] then wmake libso conformalVoronoiMesh wmake diff --git a/applications/utilities/mesh/generation/foamyQuadMesh/Allwmake b/applications/utilities/mesh/generation/foamyQuadMesh/Allwmake index 18fc1e952a..242939465f 100755 --- a/applications/utilities/mesh/generation/foamyQuadMesh/Allwmake +++ b/applications/utilities/mesh/generation/foamyQuadMesh/Allwmake @@ -2,7 +2,7 @@ cd ${0%/*} || exit 1 # run from this directory set -x -if [ -d "$CGAL_ARCH_PATH" ] +if [ -n "$CGAL_ARCH_PATH" ] then #- Already built by ../Allwake #wmake libso ../foamyHexMesh/conformalVoronoiMesh diff --git a/etc/bashrc b/etc/bashrc index 0a3f216d51..5ac6a20081 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -214,6 +214,7 @@ _foamSource $WM_PROJECT_DIR/etc/config/aliases.sh _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.sh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.sh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/gperftools.sh` +_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/CGAL.sh` # Clean environment paths again. Only remove duplicates diff --git a/etc/config/CGAL.csh b/etc/config/CGAL.csh new file mode 100644 index 0000000000..2e3f81f0e4 --- /dev/null +++ b/etc/config/CGAL.csh @@ -0,0 +1,50 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2014 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 . +# +# File +# config/CGAL.csh +# +# Description +# Setup file for CGAL (& boost) include/libraries. +# Sourced from OpenFOAM-/etc/cshrc +##------------------------------------------------------------------------------ + +set boost_version=boost-system +set cgal_version=CGAL-4.3 + +setenv BOOST_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version +setenv CGAL_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version + +if ($?FOAM_VERBOSE && $?prompt) then + echo "Using CGAL and boost" + echo " $cgal_version at $CGAL_ARCH_PATH" + echo " $boost_version at $BOOST_ARCH_PATH" +endif + +if ( -d "$BOOST_ARCH_PATH" ) then + _foamAddLib $BOOST_ARCH_PATH/lib +endif + +unset boost_version cgal_version + +# ----------------------------------------------------------------------------- diff --git a/etc/config/CGAL.sh b/etc/config/CGAL.sh new file mode 100644 index 0000000000..cc67908f10 --- /dev/null +++ b/etc/config/CGAL.sh @@ -0,0 +1,52 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2014 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 . +# +# File +# config/CGAL.sh +# +# Description +# Setup file for CGAL (& boost) include/libraries. +# Sourced from OpenFOAM-/etc/bashrc +#------------------------------------------------------------------------------ + +boost_version=boost-system +cgal_version=CGAL-4.3 + +export BOOST_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version +export CGAL_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version + +if [ "$FOAM_VERBOSE" -a "$PS1" ] +then + echo "Using CGAL and boost" + echo " $cgal_version at $CGAL_ARCH_PATH" + echo " $boost_version at $BOOST_ARCH_PATH" +fi + +if [ -d "$BOOST_ARCH_PATH" ] +then + _foamAddLib $BOOST_ARCH_PATH/lib +fi + +unset boost_version cgal_version + +# ----------------------------------------------------------------------------- diff --git a/etc/config/settings.csh b/etc/config/settings.csh index af748c57c2..a316037710 100644 --- a/etc/config/settings.csh +++ b/etc/config/settings.csh @@ -353,35 +353,6 @@ if ( $?WM_CXXFLAGS ) then endif -# boost and CGAL -# ~~~~~~~~~~~~~~ - -set boost_version=boost_1_45_0 -set cgal_version=CGAL-4.0 - -setenv BOOST_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version -setenv CGAL_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version - -# enabled if CGAL is available -if ($?FOAM_VERBOSE && $?prompt) then - echo "Checking for" - echo " $cgal_version at $CGAL_ARCH_PATH" - echo " $boost_version at $BOOST_ARCH_PATH" -endif - -if ( -d "$CGAL_ARCH_PATH" ) then - if ( -d "$BOOST_ARCH_PATH" ) then - _foamAddLib $BOOST_ARCH_PATH/lib - else - unsetenv BOOST_ARCH_PATH - endif - _foamAddLib $CGAL_ARCH_PATH/lib -else - unsetenv BOOST_ARCH_PATH CGAL_ARCH_PATH MPFR_ARCH_PATH GMP_ARCH_PATH -endif - -unset boost_version cgal_version - # Communications library # ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/etc/config/settings.sh b/etc/config/settings.sh index bc8fd220c5..487c550d24 100644 --- a/etc/config/settings.sh +++ b/etc/config/settings.sh @@ -370,40 +370,6 @@ then fi -# boost and CGAL -# ~~~~~~~~~~~~~~ - -boost_version=boost_1_45_0 -cgal_version=CGAL-4.0 - -export BOOST_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version -export CGAL_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version - -# enabled if CGAL is available -if [ "$FOAM_VERBOSE" -a "$PS1" ] -then - echo "Checking for" - echo " $cgal_version at $CGAL_ARCH_PATH" - echo " $boost_version at $BOOST_ARCH_PATH" -fi - -if [ -d "$CGAL_ARCH_PATH" ] -then - if [ -d "$BOOST_ARCH_PATH" ] - then - _foamAddLib $BOOST_ARCH_PATH/lib - _foamAddLib $BOOST_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH - else - unset BOOST_ARCH_PATH - fi - _foamAddLib $CGAL_ARCH_PATH/lib - _foamAddLib $CGAL_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH -else - unset BOOST_ARCH_PATH CGAL_ARCH_PATH MPFR_ARCH_PATH GMP_ARCH_PATH -fi - -unset boost_version cgal_version - # Communications library # ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/etc/cshrc b/etc/cshrc index bb232b22be..fc86f61432 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -203,6 +203,7 @@ _foamSource $WM_PROJECT_DIR/etc/config/aliases.csh # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.csh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.csh` +_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/CGAL.csh` # Clean environment paths again. Only remove duplicates