From 20693b96bddda69b7f86b8fae7d04f7f0be81bc6 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 2 May 2011 14:52:11 +0200 Subject: [PATCH 01/30] CONF: move OpenFOAM etc/apps -> etc/config - use standard *.sh, *.csh endings --- .gitignore | 2 -- bin/tools/foamConfigurePaths | 2 +- etc/aliases.csh | 2 +- etc/aliases.sh | 2 +- etc/bashrc | 4 ++-- etc/{apps/ensight/cshrc => config/ensight.csh} | 2 +- etc/{apps/ensight/bashrc => config/ensight.sh} | 2 +- etc/config/{compiler.csh-EXAMPLE => example/compiler.csh} | 4 ++-- etc/config/{compiler.sh-EXAMPLE => example/compiler.sh} | 4 ++-- etc/config/{openmpi.csh-EXAMPLE => example/openmpi.csh} | 4 ++-- etc/config/{openmpi.sh-EXAMPLE => example/openmpi.sh} | 4 ++-- .../cshrc-EXAMPLE => config/example/paraview.csh} | 8 ++++---- .../bashrc-EXAMPLE => config/example/paraview.sh} | 8 ++++---- etc/{apps/paraview3/cshrc => config/paraview.csh} | 2 +- etc/{apps/paraview3/bashrc => config/paraview.sh} | 3 +-- etc/{apps/scotch/bashrc => config/scotch.sh} | 3 +-- etc/cshrc | 4 ++-- src/parallel/decompose/Allwmake | 4 ++-- 18 files changed, 30 insertions(+), 34 deletions(-) rename etc/{apps/ensight/cshrc => config/ensight.csh} (98%) rename etc/{apps/ensight/bashrc => config/ensight.sh} (98%) rename etc/config/{compiler.csh-EXAMPLE => example/compiler.csh} (94%) rename etc/config/{compiler.sh-EXAMPLE => example/compiler.sh} (94%) rename etc/config/{openmpi.csh-EXAMPLE => example/openmpi.csh} (93%) rename etc/config/{openmpi.sh-EXAMPLE => example/openmpi.sh} (93%) rename etc/{apps/paraview3/cshrc-EXAMPLE => config/example/paraview.csh} (86%) rename etc/{apps/paraview3/bashrc-EXAMPLE => config/example/paraview.sh} (86%) rename etc/{apps/paraview3/cshrc => config/paraview.csh} (99%) rename etc/{apps/paraview3/bashrc => config/paraview.sh} (99%) rename etc/{apps/scotch/bashrc => config/scotch.sh} (98%) diff --git a/.gitignore b/.gitignore index e2c6f9b41f..1b8ce3cde3 100644 --- a/.gitignore +++ b/.gitignore @@ -60,8 +60,6 @@ doc/[Dd]oxygen/man # untracked configuration files /etc/prefs.csh /etc/prefs.sh -/etc/config/*.csh -/etc/config/*.sh # source packages - anywhere *.tar.bz2 diff --git a/bin/tools/foamConfigurePaths b/bin/tools/foamConfigurePaths index f3948c3cc2..9526748f07 100755 --- a/bin/tools/foamConfigurePaths +++ b/bin/tools/foamConfigurePaths @@ -131,7 +131,7 @@ do paraviewInstall="$2" # replace ParaView_DIR=... _inlineSed \ - etc/apps/paraview3/bashrc \ + etc/config/paraview.sh \ '/^[^#]/s@ParaView_DIR=.*@ParaView_DIR='"$paraviewInstall@" \ "Replacing ParaView_DIR setting by '$paraviewInstall'" shift 2 diff --git a/etc/aliases.csh b/etc/aliases.csh index 558390b403..5c5b344497 100644 --- a/etc/aliases.csh +++ b/etc/aliases.csh @@ -49,7 +49,7 @@ alias wmSchedOFF 'unsetenv WM_SCHEDULER' # Change ParaView version # ~~~~~~~~~~~~~~~~~~~~~~~ -alias foamPV 'source `$WM_PROJECT_DIR/etc/apps/paraview3/cshrc` ParaView_VERSION=\!*; echo paraview-$ParaView_VERSION' +alias foamPV 'source `$WM_PROJECT_DIR/etc/config/paraview.csh` ParaView_VERSION=\!*; echo paraview-$ParaView_VERSION' # Change directory aliases diff --git a/etc/aliases.sh b/etc/aliases.sh index e9c1227004..df0fda7389 100644 --- a/etc/aliases.sh +++ b/etc/aliases.sh @@ -52,7 +52,7 @@ alias wmSchedOFF='unset WM_SCHEDULER' unset foamPV foamPV() { - . $WM_PROJECT_DIR/etc/apps/paraview3/bashrc ParaView_VERSION=$1 + . $WM_PROJECT_DIR/etc/config/paraview.sh ParaView_VERSION=$1 echo "paraview-$ParaView_VERSION (major: $ParaView_MAJOR)" } diff --git a/etc/bashrc b/etc/bashrc index d2539c5b50..3aaff82598 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -206,8 +206,8 @@ _foamSource $WM_PROJECT_DIR/etc/aliases.sh # Source user setup files for optional packages # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/bashrc` -_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile apps/ensight/bashrc` +_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.sh` +_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.sh` # Clean environment paths again. Only remove duplicates diff --git a/etc/apps/ensight/cshrc b/etc/config/ensight.csh similarity index 98% rename from etc/apps/ensight/cshrc rename to etc/config/ensight.csh index 73a00884fc..b1ce4ba112 100644 --- a/etc/apps/ensight/cshrc +++ b/etc/config/ensight.csh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see . # # File -# ensight/cshrc +# config/ensight.csh # # Description # Setup file for Ensight diff --git a/etc/apps/ensight/bashrc b/etc/config/ensight.sh similarity index 98% rename from etc/apps/ensight/bashrc rename to etc/config/ensight.sh index 0e6b981bc8..16ac2bd839 100644 --- a/etc/apps/ensight/bashrc +++ b/etc/config/ensight.sh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see . # # File -# ensight/bashrc +# config/ensight.sh # # Description # Setup file for Ensight diff --git a/etc/config/compiler.csh-EXAMPLE b/etc/config/example/compiler.csh similarity index 94% rename from etc/config/compiler.csh-EXAMPLE rename to etc/config/example/compiler.csh index 6d54edbd47..6905daf8bd 100644 --- a/etc/config/compiler.csh-EXAMPLE +++ b/etc/config/example/compiler.csh @@ -22,10 +22,10 @@ # along with OpenFOAM. If not, see . # # File -# config/compiler.csh +# config/example/compiler.csh # # Description -# Fine tuning of ThirdParty compiler settings for OpenFOAM +# Example of fine tuning ThirdParty compiler settings for OpenFOAM # Sourced from OpenFOAM-/etc/settings.csh # #------------------------------------------------------------------------------ diff --git a/etc/config/compiler.sh-EXAMPLE b/etc/config/example/compiler.sh similarity index 94% rename from etc/config/compiler.sh-EXAMPLE rename to etc/config/example/compiler.sh index bc6aada36e..7dffdcc10c 100644 --- a/etc/config/compiler.sh-EXAMPLE +++ b/etc/config/example/compiler.sh @@ -22,10 +22,10 @@ # along with OpenFOAM. If not, see . # # File -# config/compiler.sh +# config/example/compiler.sh # # Description -# Fine tuning of ThirdParty compiler settings for OpenFOAM +# Example of fine tuning ThirdParty compiler settings for OpenFOAM # Sourced from OpenFOAM-/etc/settings.sh # #------------------------------------------------------------------------------ diff --git a/etc/config/openmpi.csh-EXAMPLE b/etc/config/example/openmpi.csh similarity index 93% rename from etc/config/openmpi.csh-EXAMPLE rename to etc/config/example/openmpi.csh index 94be702e9d..da07872d31 100644 --- a/etc/config/openmpi.csh-EXAMPLE +++ b/etc/config/example/openmpi.csh @@ -22,10 +22,10 @@ # along with OpenFOAM. If not, see . # # File -# config/openmpi.csh +# config/example/openmpi.csh # # Description -# Fine tuning of openmpi settings for OpenFOAM +# Example of fine tuning openmpi settings for OpenFOAM # Sourced from OpenFOAM-/etc/settings.csh # #------------------------------------------------------------------------------ diff --git a/etc/config/openmpi.sh-EXAMPLE b/etc/config/example/openmpi.sh similarity index 93% rename from etc/config/openmpi.sh-EXAMPLE rename to etc/config/example/openmpi.sh index b7c5035b04..7c0ed18543 100644 --- a/etc/config/openmpi.sh-EXAMPLE +++ b/etc/config/example/openmpi.sh @@ -22,10 +22,10 @@ # along with OpenFOAM. If not, see . # # File -# config/openmpi.sh +# config/example/openmpi.sh # # Description -# Fine tuning of openmpi settings for OpenFOAM +# Example of fine tuning openmpi settings for OpenFOAM # Sourced from OpenFOAM-/etc/settings.sh # #------------------------------------------------------------------------------ diff --git a/etc/apps/paraview3/cshrc-EXAMPLE b/etc/config/example/paraview.csh similarity index 86% rename from etc/apps/paraview3/cshrc-EXAMPLE rename to etc/config/example/paraview.csh index 475dbffce0..8509e924e3 100644 --- a/etc/apps/paraview3/cshrc-EXAMPLE +++ b/etc/config/example/paraview.csh @@ -22,10 +22,10 @@ # along with OpenFOAM. If not, see . # # File -# paraview3/cshrc-EXAMPLE +# config/example/paraview.csh # # Description -# Example of chaining to the standard paraview3/cshrc with a +# Example of chaining to the standard config/paraview.csh with a # different ParaView_VERSION # # Note @@ -35,10 +35,10 @@ #------------------------------------------------------------------------------ # -# Use other (shipped) cshrc with a different ParaView_VERSION +# Use other (shipped) paraview.csh with a different ParaView_VERSION # -set foamFile=`$WM_PROJECT_DIR/bin/foamEtcFile -mode o apps/paraview3/cshrc` +set foamFile=`$WM_PROJECT_DIR/bin/foamEtcFile -mode o config/paraview.csh` if ( $status == 0 ) source $foamFile ParaView_VERSION=3.9.0 unset foamFile diff --git a/etc/apps/paraview3/bashrc-EXAMPLE b/etc/config/example/paraview.sh similarity index 86% rename from etc/apps/paraview3/bashrc-EXAMPLE rename to etc/config/example/paraview.sh index 8db47a9ec7..09b300f137 100644 --- a/etc/apps/paraview3/bashrc-EXAMPLE +++ b/etc/config/example/paraview.sh @@ -22,10 +22,10 @@ # along with OpenFOAM. If not, see . # # File -# paraview3/bashrc-EXAMPLE +# config/example/paraview.sh # # Description -# Example of chaining to the standard paraview3/bashrc with a +# Example of chaining to the standard config/paraview.sh with a # different ParaView_VERSION # # Note @@ -35,10 +35,10 @@ #------------------------------------------------------------------------------ # -# Use other (shipped) bashrc with a different ParaView_VERSION +# Use other (shipped) paraview.sh with a different ParaView_VERSION # -foamFile=$($WM_PROJECT_DIR/bin/foamEtcFile -mode o apps/paraview3/bashrc 2>/dev/null) +foamFile=$($WM_PROJECT_DIR/bin/foamEtcFile -mode o config/paraview.sh 2>/dev/null) [ $? -eq 0 ] && . $foamFile ParaView_VERSION=3.9.0 unset foamFile diff --git a/etc/apps/paraview3/cshrc b/etc/config/paraview.csh similarity index 99% rename from etc/apps/paraview3/cshrc rename to etc/config/paraview.csh index 867353e843..c9adc6f198 100644 --- a/etc/apps/paraview3/cshrc +++ b/etc/config/paraview.csh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see . # # File -# paraview3/cshrc +# config/paraview.csh # # Description # Setup file for paraview-3.x diff --git a/etc/apps/paraview3/bashrc b/etc/config/paraview.sh similarity index 99% rename from etc/apps/paraview3/bashrc rename to etc/config/paraview.sh index 1dd5386829..1c38b3dd3f 100644 --- a/etc/apps/paraview3/bashrc +++ b/etc/config/paraview.sh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see . # # File -# paraview3/bashrc +# config/paraview.sh # # Description # Setup file for paraview-3.x @@ -113,7 +113,6 @@ else unset PV_PLUGIN_PATH fi - unset _foamParaviewEval unset cleaned cmake paraviewInstDir paraviewPython diff --git a/etc/apps/scotch/bashrc b/etc/config/scotch.sh similarity index 98% rename from etc/apps/scotch/bashrc rename to etc/config/scotch.sh index 0fb6952110..f32f62292c 100644 --- a/etc/apps/scotch/bashrc +++ b/etc/config/scotch.sh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see . # # File -# scotch/bashrc +# config/scotch.sh # # Description # Setup file for scotch include/libraries. @@ -36,5 +36,4 @@ export SCOTCH_VERSION=scotch_5.1.11 export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$SCOTCH_VERSION - # ----------------------------------------------------------------------------- diff --git a/etc/cshrc b/etc/cshrc index c2c1b12a9b..330fd66aa9 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -199,8 +199,8 @@ _foamSource $WM_PROJECT_DIR/etc/aliases.csh # Source user setup files for optional packages # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/cshrc` -_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile apps/ensight/cshrc` +_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.csh` +_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.csh` # Clean environment paths again. Only remove duplicates diff --git a/src/parallel/decompose/Allwmake b/src/parallel/decompose/Allwmake index cded295a7e..b620b27791 100755 --- a/src/parallel/decompose/Allwmake +++ b/src/parallel/decompose/Allwmake @@ -3,13 +3,13 @@ cd ${0%/*} || exit 1 # run from this directory makeType=${1:-libso} # get SCOTCH_VERSION, SCOTCH_ARCH_PATH -if settings=`$WM_PROJECT_DIR/bin/foamEtcFile apps/scotch/bashrc` +if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/scotch.sh` then . $settings echo "using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH" else echo - echo "Error: no apps/scotch/bashrc settings" + echo "Error: no config/scotch.sh settings" echo fi From 3202ef296cd0118163d0b8c846210b34cf7d24f9 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 3 May 2011 15:06:48 +0200 Subject: [PATCH 02/30] CONF: consolidate more files into OpenFOAM etc/config --- .gitignore | 2 + etc/bashrc | 4 +- etc/config/README | 51 +++++++++++++++++++ etc/{ => config}/aliases.csh | 4 +- etc/{ => config}/aliases.sh | 4 +- etc/config/ensight.csh | 2 +- etc/config/ensight.sh | 2 +- .../example/prefs.csh} | 2 +- .../example/prefs.sh} | 2 +- etc/{ => config}/unset.csh | 2 +- etc/{ => config}/unset.sh | 2 +- etc/cshrc | 4 +- 12 files changed, 67 insertions(+), 14 deletions(-) create mode 100644 etc/config/README rename etc/{ => config}/aliases.csh (96%) rename etc/{ => config}/aliases.sh (97%) rename etc/{prefs.csh-EXAMPLE => config/example/prefs.csh} (98%) rename etc/{prefs.sh-EXAMPLE => config/example/prefs.sh} (98%) rename etc/{ => config}/unset.csh (99%) rename etc/{ => config}/unset.sh (99%) diff --git a/.gitignore b/.gitignore index 1b8ce3cde3..67ac189fcc 100644 --- a/.gitignore +++ b/.gitignore @@ -60,6 +60,8 @@ doc/[Dd]oxygen/man # untracked configuration files /etc/prefs.csh /etc/prefs.sh +/etc/config/prefs.csh +/etc/config/prefs.sh # source packages - anywhere *.tar.bz2 diff --git a/etc/bashrc b/etc/bashrc index 3aaff82598..62c9854d95 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -177,7 +177,7 @@ _foamEval() _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh` # Evaluate command-line parameters and record settings for later -# these can be used to set/unset values, or specify prefs files +# these can be used to set/unset values, or specify alternative pref files export FOAM_SETTINGS="$@" _foamEval $@ @@ -201,7 +201,7 @@ export PATH LD_LIBRARY_PATH MANPATH # Source project setup files # ~~~~~~~~~~~~~~~~~~~~~~~~~~ _foamSource $WM_PROJECT_DIR/etc/settings.sh -_foamSource $WM_PROJECT_DIR/etc/aliases.sh +_foamSource $WM_PROJECT_DIR/etc/config/aliases.sh # Source user setup files for optional packages diff --git a/etc/config/README b/etc/config/README new file mode 100644 index 0000000000..8c22b46016 --- /dev/null +++ b/etc/config/README @@ -0,0 +1,51 @@ +The main OpenFOAM settings are located in the parent etc/ directory + +* bashrc, cshrc + entry point for sourcing + +* settings.csh, settings.sh + core settings + +* prefs.csh, prefs.sh + these files are untracked and can be used for some site-defined + settings + + +The etc/config/ directory contains various configuration files in +sh/csh variants: + +* aliases.csh, aliases.sh + aliases for interactive shells + +* unset.csh, unset.sh + sourced to clear as many OpenFOAM environment settings as possible + + +* ensight.csh, ensight.sh + application settings for EnSight + +* paraview.csh, paraview.sh + application settings for ParaView + +* scotch.sh + application settings for compiling against scotch + +--- + +The config/example directory contains various example configuration files +in sh/csh variants + +* compiler.csh, compiler.sh + an example of fine tuning ThirdParty compiler settings for OpenFOAM + +* openmpi.csh, openmpi.sh + an example of fine tuning openmpi settings for OpenFOAM + +* paraview.csh, paraview.sh + an example of chaining to the standard config/paraview.sh with a + different ParaView_VERSION + +* prefs.csh, prefs.sh + an example of supplying alternative site-defined settings + +--- diff --git a/etc/aliases.csh b/etc/config/aliases.csh similarity index 96% rename from etc/aliases.csh rename to etc/config/aliases.csh index 5c5b344497..6573c91973 100644 --- a/etc/aliases.csh +++ b/etc/config/aliases.csh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see . # # File -# etc/aliases.csh +# etc/config/aliases.csh # # Description # Aliases for working with OpenFOAM @@ -39,7 +39,7 @@ alias wmSP 'wmSET WM_PRECISION_OPTION=SP' alias wmDP 'wmSET WM_PRECISION_OPTION=DP' # clear env -alias wmUNSET='source $WM_PROJECT_DIR/etc/unset.csh' +alias wmUNSET='source $WM_PROJECT_DIR/etc/config/unset.csh' # Toggle wmakeScheduler on/off # - also need to set WM_HOSTS diff --git a/etc/aliases.sh b/etc/config/aliases.sh similarity index 97% rename from etc/aliases.sh rename to etc/config/aliases.sh index df0fda7389..188159745c 100644 --- a/etc/aliases.sh +++ b/etc/config/aliases.sh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see . # # File -# etc/aliases.sh +# etc/config/aliases.sh # # Description # Aliases for working with OpenFOAM @@ -39,7 +39,7 @@ alias wmSP='wmSET WM_PRECISION_OPTION=SP' alias wmDP='wmSET WM_PRECISION_OPTION=DP' # clear env -alias wmUNSET='. $WM_PROJECT_DIR/etc/unset.sh' +alias wmUNSET='. $WM_PROJECT_DIR/etc/config/unset.sh' # Toggle wmakeScheduler on/off # - also need to set WM_HOSTS diff --git a/etc/config/ensight.csh b/etc/config/ensight.csh index b1ce4ba112..484fa0fc02 100644 --- a/etc/config/ensight.csh +++ b/etc/config/ensight.csh @@ -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 diff --git a/etc/config/ensight.sh b/etc/config/ensight.sh index 16ac2bd839..597c51c010 100644 --- a/etc/config/ensight.sh +++ b/etc/config/ensight.sh @@ -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 diff --git a/etc/prefs.csh-EXAMPLE b/etc/config/example/prefs.csh similarity index 98% rename from etc/prefs.csh-EXAMPLE rename to etc/config/example/prefs.csh index 56091f798e..83f7a7b7b4 100644 --- a/etc/prefs.csh-EXAMPLE +++ b/etc/config/example/prefs.csh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see . # # File -# etc/prefs.csh +# config/example/prefs.csh # # Description # Preset variables for the OpenFOAM configuration - C-Shell shell syntax. diff --git a/etc/prefs.sh-EXAMPLE b/etc/config/example/prefs.sh similarity index 98% rename from etc/prefs.sh-EXAMPLE rename to etc/config/example/prefs.sh index f3e771d030..d2251ce63f 100644 --- a/etc/prefs.sh-EXAMPLE +++ b/etc/config/example/prefs.sh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see . # # File -# etc/prefs.sh +# config/example/prefs.sh # # Description # Preset variables for the OpenFOAM configuration - POSIX shell syntax. diff --git a/etc/unset.csh b/etc/config/unset.csh similarity index 99% rename from etc/unset.csh rename to etc/config/unset.csh index 48a1637912..d9a3d69787 100644 --- a/etc/unset.csh +++ b/etc/config/unset.csh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see . # # File -# etc/unset.csh +# etc/config/unset.csh # # Description # Clear as many OpenFOAM environment settings as possible diff --git a/etc/unset.sh b/etc/config/unset.sh similarity index 99% rename from etc/unset.sh rename to etc/config/unset.sh index 23e182aa53..66ee2e35b5 100644 --- a/etc/unset.sh +++ b/etc/config/unset.sh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see . # # File -# etc/unset.sh +# etc/config/unset.sh # # Description # Clear as many OpenFOAM environment settings as possible diff --git a/etc/cshrc b/etc/cshrc index 330fd66aa9..c87986832a 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -138,7 +138,7 @@ alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Sourcing: \!*"; if (\!* _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.csh` # Evaluate command-line parameters and record settings for later -# these can be used to set/unset values, or specify prefs files +# these can be used to set/unset values, or specify alternative pref files setenv FOAM_SETTINGS "${*}" while ( $#argv > 0 ) switch ($argv[1]) @@ -195,7 +195,7 @@ if ( $status == 0 ) setenv MANPATH $cleaned # Source project setup files # ~~~~~~~~~~~~~~~~~~~~~~~~~~ _foamSource $WM_PROJECT_DIR/etc/settings.csh -_foamSource $WM_PROJECT_DIR/etc/aliases.csh +_foamSource $WM_PROJECT_DIR/etc/config/aliases.csh # Source user setup files for optional packages # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From e8e5d2f5a86533b88cf46affe4f2486e63b541b4 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 19 May 2011 13:35:41 +0200 Subject: [PATCH 03/30] CONF: move settings.{csh,sh} into OpenFOAM etc/config - leave bashrc/cshrc and prefs.{csh,sh} in etc/ for visibility --- etc/bashrc | 2 +- etc/config/README | 6 +++--- etc/config/example/compiler.csh | 2 +- etc/config/example/compiler.sh | 2 +- etc/config/example/openmpi.csh | 2 +- etc/config/example/openmpi.sh | 2 +- etc/{ => config}/settings.csh | 10 +++++----- etc/{ => config}/settings.sh | 10 +++++----- etc/cshrc | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) rename etc/{ => config}/settings.csh (98%) rename etc/{ => config}/settings.sh (97%) diff --git a/etc/bashrc b/etc/bashrc index 62c9854d95..6cd4d8a8cf 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -200,7 +200,7 @@ export PATH LD_LIBRARY_PATH MANPATH # Source project setup files # ~~~~~~~~~~~~~~~~~~~~~~~~~~ -_foamSource $WM_PROJECT_DIR/etc/settings.sh +_foamSource $WM_PROJECT_DIR/etc/config/settings.sh _foamSource $WM_PROJECT_DIR/etc/config/aliases.sh diff --git a/etc/config/README b/etc/config/README index 8c22b46016..2ad58dda54 100644 --- a/etc/config/README +++ b/etc/config/README @@ -3,9 +3,6 @@ The main OpenFOAM settings are located in the parent etc/ directory * bashrc, cshrc entry point for sourcing -* settings.csh, settings.sh - core settings - * prefs.csh, prefs.sh these files are untracked and can be used for some site-defined settings @@ -14,6 +11,9 @@ The main OpenFOAM settings are located in the parent etc/ directory The etc/config/ directory contains various configuration files in sh/csh variants: +* settings.csh, settings.sh + core settings + * aliases.csh, aliases.sh aliases for interactive shells diff --git a/etc/config/example/compiler.csh b/etc/config/example/compiler.csh index 6905daf8bd..a317a703c5 100644 --- a/etc/config/example/compiler.csh +++ b/etc/config/example/compiler.csh @@ -26,7 +26,7 @@ # # Description # Example of fine tuning ThirdParty compiler settings for OpenFOAM -# Sourced from OpenFOAM-/etc/settings.csh +# Sourced from OpenFOAM-/etc/config/settings.csh # #------------------------------------------------------------------------------ diff --git a/etc/config/example/compiler.sh b/etc/config/example/compiler.sh index 7dffdcc10c..3f13b1d9ea 100644 --- a/etc/config/example/compiler.sh +++ b/etc/config/example/compiler.sh @@ -26,7 +26,7 @@ # # Description # Example of fine tuning ThirdParty compiler settings for OpenFOAM -# Sourced from OpenFOAM-/etc/settings.sh +# Sourced from OpenFOAM-/etc/config/settings.sh # #------------------------------------------------------------------------------ diff --git a/etc/config/example/openmpi.csh b/etc/config/example/openmpi.csh index da07872d31..6b46e7494c 100644 --- a/etc/config/example/openmpi.csh +++ b/etc/config/example/openmpi.csh @@ -26,7 +26,7 @@ # # Description # Example of fine tuning openmpi settings for OpenFOAM -# Sourced from OpenFOAM-/etc/settings.csh +# Sourced from OpenFOAM-/etc/config/settings.csh # #------------------------------------------------------------------------------ diff --git a/etc/config/example/openmpi.sh b/etc/config/example/openmpi.sh index 7c0ed18543..1573aadf52 100644 --- a/etc/config/example/openmpi.sh +++ b/etc/config/example/openmpi.sh @@ -26,7 +26,7 @@ # # Description # Example of fine tuning openmpi settings for OpenFOAM -# Sourced from OpenFOAM-/etc/settings.sh +# Sourced from OpenFOAM-/etc/config/settings.sh # #------------------------------------------------------------------------------ diff --git a/etc/settings.csh b/etc/config/settings.csh similarity index 98% rename from etc/settings.csh rename to etc/config/settings.csh index b3daf1e288..986a35a1b6 100644 --- a/etc/settings.csh +++ b/etc/config/settings.csh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see . # # File -# etc/settings.csh +# etc/config/settings.csh # # Description # Startup file for OpenFOAM @@ -193,7 +193,7 @@ unsetenv MPFR_ARCH_PATH GMP_ARCH_PATH # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if ( ! $?foamCompiler ) then set foamCompiler=system - echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:" + echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:" echo " foamCompiler not set, using '$foamCompiler'" endif @@ -241,7 +241,7 @@ case ThirdParty: breaksw default: echo - echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:" + echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:" echo " Unknown OpenFOAM compiler type '$WM_COMPILER'" echo " Please check your settings" echo @@ -262,7 +262,7 @@ case ThirdParty: # Check that the compiler directory can be found if ( ! -d "$gccDir" ) then echo - echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:" + echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:" echo " Cannot find $gccDir installation." echo " Please install this compiler version or if you wish to use the system compiler," echo " change the 'foamCompiler' setting to 'system'" @@ -302,7 +302,7 @@ case ThirdParty: # Check that the compiler directory can be found if ( ! -d "$clangDir" ) then echo - echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:" + echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:" echo " Cannot find $clangDir installation." echo " Please install this compiler version or if you wish to use the system compiler," echo " change the 'foamCompiler' setting to 'system'" diff --git a/etc/settings.sh b/etc/config/settings.sh similarity index 97% rename from etc/settings.sh rename to etc/config/settings.sh index 954868dad1..086ab174c9 100644 --- a/etc/settings.sh +++ b/etc/config/settings.sh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see . # # File -# etc/settings.sh +# etc/config/settings.sh # # Description # Startup file for OpenFOAM @@ -215,7 +215,7 @@ unset MPFR_ARCH_PATH GMP_ARCH_PATH if [ -z "$foamCompiler" ] then foamCompiler=system - echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:" 1>&2 + echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2 echo " foamCompiler not set, using '$foamCompiler'" 1>&2 fi @@ -258,7 +258,7 @@ OpenFOAM | ThirdParty) ;; *) echo - echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:" + echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" echo " Unknown OpenFOAM compiler type '$WM_COMPILER'" echo " Please check your settings" echo @@ -278,7 +278,7 @@ OpenFOAM | ThirdParty) # Check that the compiler directory can be found [ -d "$gccDir" ] || { echo - echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:" + echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" echo " Cannot find $gccDir installation." echo " Please install this compiler version or if you wish to use the system compiler," echo " change the 'foamCompiler' setting to 'system'" @@ -322,7 +322,7 @@ OpenFOAM | ThirdParty) # Check that the compiler directory can be found [ -d "$clangDir" ] || { echo - echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:" + echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" echo " Cannot find $clangDir installation." echo " Please install this compiler version or if you wish to use the system compiler," echo " change the 'foamCompiler' setting to 'system'" diff --git a/etc/cshrc b/etc/cshrc index c87986832a..8e2597e901 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -194,7 +194,7 @@ if ( $status == 0 ) setenv MANPATH $cleaned # Source project setup files # ~~~~~~~~~~~~~~~~~~~~~~~~~~ -_foamSource $WM_PROJECT_DIR/etc/settings.csh +_foamSource $WM_PROJECT_DIR/etc/config/settings.csh _foamSource $WM_PROJECT_DIR/etc/config/aliases.csh # Source user setup files for optional packages From 020d5f9b2d342a02302c2d67246a162324549896 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 19 May 2011 17:32:57 +0200 Subject: [PATCH 04/30] EHN: preserve WM_PROJECT_SITE in bashrc, cshrc - otherwise there is actually no means of placing a site-site prefs.sh in the $WM_PROJECT_SITE/ directory --- etc/bashrc | 7 ++++++- etc/cshrc | 10 ++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/etc/bashrc b/etc/bashrc index 6cd4d8a8cf..edebe538fc 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -120,7 +120,12 @@ export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION # Location of site-specific templates etc # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # unset is equivalent to $WM_PROJECT_INST_DIR/site -unset WM_PROJECT_SITE +if [ -d "$WM_PROJECT_SITE" ] +then + export WM_PROJECT_SITE +else + unset WM_PROJECT_SITE +fi # Location of user files # ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/etc/cshrc b/etc/cshrc index 8e2597e901..658f93da69 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -107,9 +107,6 @@ if ( $?WM_PROJECT_INST_DIR ) then set foamOldDirs="$WM_PROJECT_INST_DIR $foamOldDirs" endif endif -if ( $?WM_PROJECT_SITE ) then - set foamOldDirs="$WM_PROJECT_SITE $foamOldDirs" -endif # Location of installation @@ -124,7 +121,12 @@ setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION # Location of site-specific templates etc # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # unset is equivalent to $WM_PROJECT_INST_DIR/site -unsetenv WM_PROJECT_SITE +if ( $?WM_PROJECT_SITE ) then + set foamOldDirs="$WM_PROJECT_SITE $foamOldDirs" + if ( ! -d "$WM_PROJECT_SITE" ) unsetenv WM_PROJECT_SITE +else + unsetenv WM_PROJECT_SITE +endif # Location of user files # ~~~~~~~~~~~~~~~~~~~~~~ From c334f75873d5b687a84fe3cfcee0300c10d78e4a Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 23 May 2011 12:24:13 +0100 Subject: [PATCH 05/30] BUG: octree.C : tree building criterion needs to look at any change in tree. --- src/meshTools/octree/octree.C | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/meshTools/octree/octree.C b/src/meshTools/octree/octree.C index 86c2ffc62a..8731f0ef1f 100644 --- a/src/meshTools/octree/octree.C +++ b/src/meshTools/octree/octree.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 @@ -149,6 +149,7 @@ Foam::octree::octree // - has some guaranteed maximum size (maxShapeRatio) label oldNLeaves = -1; // make test below pass first time. + label oldNNodes = -1; deepestLevel_ = 1; while ( @@ -169,11 +170,11 @@ Foam::octree::octree break; } - if (oldNLeaves == nLeaves()) + if ((oldNLeaves == nLeaves()) && (oldNNodes == nNodes())) { if (debug & 1) { - Pout<< "octree : exiting since nLeaves does not change" + Pout<< "octree : exiting since nLeaves and nNodes do not change" << endl; } break; @@ -185,6 +186,7 @@ Foam::octree::octree } oldNLeaves = nLeaves(); + oldNNodes = nNodes(); topNode_->redistribute ( From ffffda19efc4f54ce627108abd12d883c80d34bd Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 23 May 2011 12:25:20 +0100 Subject: [PATCH 06/30] ENH: etc/controlDict: added missing entry --- etc/controlDict | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/controlDict b/etc/controlDict index cc45466672..f34834ca55 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -492,6 +492,7 @@ DebugSwitches geomCellLooper 0; geometricSurfacePatch 0; global 0; + globalIndexAndTransform 0; globalMeshData 0; globalPoints 0; gnuplot 0; From f206f572c92b86a1e02823f50499dd829fed1615 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 23 May 2011 16:05:56 +0100 Subject: [PATCH 07/30] ENH: ReleaseNotes-dev --- ReleaseNotes-dev | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ReleaseNotes-dev b/ReleaseNotes-dev index 5f25edc276..60ae48071f 100644 --- a/ReleaseNotes-dev +++ b/ReleaseNotes-dev @@ -241,9 +241,11 @@ - works in parallel + =snappyHexMesh=: + extrude across multi-processor boundaries - + preserve faceZones during layering - + combining patch faces after snapping + + preserve faceZones shape during layering + + combining coincident patch faces is now default after snapping + *Warning*: + - snapControls::tolerance setting fixed w.r.t. 17x. Is the + multiplication to calculate the local search distance for nearest. - minMedianAxisAngle angle fixed w.r.t. 17x. Set to 90 to get same behaviour as 130 in 17x. - nGrow did not work in 17x. Set to 0 @@ -308,6 +310,8 @@ + multipleBoxes, hotBoxes, panel, evaporationTest + =interDyMFoam= tutorials: + testTubeMixer: showcases =solidBodyMotionFunction= + + =snappyHexMesh= tutorials: + + flange: demonstration of feature lines in snappyHexMesh * Other + compilable with =clang= From 2ecef2c7b95686b63294755399be878fa1526897 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 23 May 2011 16:07:00 +0100 Subject: [PATCH 08/30] BUG: globalPoints: handling shared points on V-cyclics --- .../polyMesh/globalMeshData/globalPoints.C | 131 +++++++++--------- 1 file changed, 67 insertions(+), 64 deletions(-) diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C index 9a1954c507..0b12acd728 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C @@ -613,80 +613,83 @@ void Foam::globalPoints::receivePatchPoints label meshPointA = meshPoints[i]; label meshPointB = coupledMeshPoints[i]; - //Pout<< "Connection between point " << meshPointA - // << " at " << mesh_.points()[meshPointA] - // << " and " << meshPointB - // << " at " << mesh_.points()[meshPointB] << endl; - - label localA = meshToLocalPoint - ( - meshToPatchPoint, - meshPointA - ); - label localB = meshToLocalPoint - ( - meshToPatchPoint, - meshPointB - ); - - - // Do we have information on pointA? - Map