From f2284753ef2ec0f77d001a4c3f0b1325ec504016 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 27 Jul 2010 12:08:29 +0100 Subject: [PATCH 01/13] ENH: foamExec : use foamEtcFile to support debian naming. --- bin/foamEtcFile | 189 +++++++++++++++++++++++++++++++++++++++++------- bin/foamExec | 109 +++++++--------------------- 2 files changed, 189 insertions(+), 109 deletions(-) diff --git a/bin/foamEtcFile b/bin/foamEtcFile index d2c74039..5bae566b 100755 --- a/bin/foamEtcFile +++ b/bin/foamEtcFile @@ -1,11 +1,11 @@ #!/bin/sh -#---------------------------------*- sh -*------------------------------------- +#------------------------------------------------------------------------------ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. # \\/ M anipulation | -#------------------------------------------------------------------------------ +#------------------------------------------------------------------------------- # License # This file is part of OpenFOAM. # @@ -26,12 +26,19 @@ # foamEtcFile # # Description -# Locate user/site/shipped file with the semantics used in the -# ~OpenFOAM/fileName expansion +# Locate user/group/shipped file with semantics similar to the +# ~OpenFOAM/fileName expansion. +# +# The -mode option can be used to allow chaining from +# personal settings to site-wide settings. +# +# For example, within the user ~/.OpenFOAM//prefs.sh: +# @verbatim +# foamPrefs=`$WM_PROJECT_DIR/bin/foamEtcFile -m go prefs.sh` \ +# && _foamSource $foamPrefs +# @endverbatim # #------------------------------------------------------------------------------- -unset listOpt quietOpt - usage() { [ "$quietOpt" = true ] && exit 1 @@ -39,24 +46,89 @@ usage() { while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat< any combination of u(user), g(group), o(other) + -prefix specify an alternative installation prefix + -quiet suppress all normal output + -version specify an alternative OpenFOAM version + in the form Maj.Min.Rev (eg, 1.7.0) + -help print the usage + + Locate user/group/shipped file with semantics similar to the + ~OpenFOAM/fileName expansion. - Locate user/site/shipped file with the semantics used in the - ~OpenFOAM/fileName expansion + The options can also be specified as a single character + (eg, '-q' instead of '-quiet'), but must not be grouped. - Exit status 0 when the file is found and output resolved path to stdout. - Exit status 1 for miscellaneous errors. - Exit status 2 when the file is not found. + Exit status + 0 when the file is found. Print resolved path to stdout. + 1 for miscellaneous errors. + 2 when the file is not found. USAGE exit 1 } +# +# This script must exist in /OpenFOAM-/bin/ +# or /openfoam/bin/ (for the debian version) +# +#------------------------------------------------------------------------------- + +# the bindir: +binDir="${0%/*}" + +# the project dir: +projectDir="${binDir%/bin}" + +# the prefix dir (same as foamInstall): +prefixDir="${projectDir%/*}" + +# the name used for the project directory +projectDirName="${projectDir##*/}" + +# version number used for debian packaging +unset versionNum + +# +# handle standard and debian naming convention +# +case "$projectDirName" in +OpenFOAM-*) # standard naming convention OpenFOAM- + version="${projectDirName##OpenFOAM-}" + ;; + +openfoam[0-9]*) # debian naming convention 'openfoam' + versionNum="${projectDirName##openfoam}" + case "$versionNum" in + ??) # convert 2 digit version number to decimal delineated + version=$(echo "$versionNum" | sed -e 's@\(.\)\(.\)@\1.\2@') + ;; + ???) # convert 3 digit version number to decimal delineated + version=$(echo "$versionNum" | sed -e 's@\(.\)\(.\)\(.\)@\1.\2.\3@') + ;; + ????) # convert 4 digit version number to decimal delineated + version=$(echo "$versionNum" | sed -e 's@\(.\)\(.\)\(.\)\(.\)@\1.\2.\3.\4@') + ;; + *) # failback - use current environment setting + version="$WM_PROJECT_VERSION" + ;; + esac + ;; + +*) + echo "Error : unknown/unsupported naming convention" + exit 1 + ;; +esac + + +# default mode is 'ugo' +mode=ugo +unset listOpt quietOpt # parse options while [ "$#" -gt 0 ] @@ -67,12 +139,43 @@ do ;; -l | -list) listOpt=true + ;; + -m | -mode) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + mode="$2" + + # sanity check: + case "$mode" in + *u* | *g* | *o* ) + ;; + *) + usage "'$1' option with invalid mode '$mode'" + ;; + esac + shift + ;; + -p | -prefix) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + prefixDir="$2" shift ;; -q | -quiet) quietOpt=true + ;; + -v | -version) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + version="$2" + # convert x.y.z -> xyz version (if installation looked like debian) + if [ -n "$versionNum" ] + then + versionNum=$(echo "$version" | sed -e 's@\.@@g') + fi shift ;; + --) + shift + break + ;; -*) usage "unknown option: '$*'" ;; @@ -80,20 +183,52 @@ do break ;; esac + shift done -# Save the essential bits of information: +# debugging: +# echo "Installed locations:" +# for i in projectDir prefixDir projectDirName version versionNum +# do +# eval echo "$i=\$$i" +# done + + +# Save the essential bits of information +# silently remove leading ~OpenFOAM/ (used in Foam::findEtcFile) nArgs=$# -fileName="$1" - -# The various places to be searched: -set -- \ - $HOME/.${WM_PROJECT:-OpenFOAM}/$WM_PROJECT_VERSION \ - $HOME/.${WM_PROJECT:-OpenFOAM} \ - $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION \ - $WM_PROJECT_INST_DIR/site \ - $WM_PROJECT_DIR/etc +fileName="${1#~OpenFOAM/}" + +# Define the various places to be searched: +unset dirList +case "$mode" in +*u*) # user + dirList="$dirList $HOME/.${WM_PROJECT:-OpenFOAM}/$version" + dirList="$dirList $HOME/.${WM_PROJECT:-OpenFOAM}" + ;; +esac + +case "$mode" in +*g*) # group + dirList="$dirList $prefixDir/site/$version" + dirList="$dirList $prefixDir/site" + ;; +esac + +case "$mode" in +*o*) # other (shipped) + if [ -n "$versionNum" ] + then + # debian packaging + dirList="$dirList $prefixDir/openfoam$versionNum/etc" + else + # standard packaging + dirList="$dirList $prefixDir/${WM_PROJECT:-OpenFOAM}-$version/etc" + fi + ;; +esac +set -- $dirList # diff --git a/bin/foamExec b/bin/foamExec index 17589810..1e1d438d 100755 --- a/bin/foamExec +++ b/bin/foamExec @@ -1,11 +1,11 @@ #!/bin/sh -#---------------------------------*- sh -*------------------------------------- +#------------------------------------------------------------------------------ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. # \\/ M anipulation | -#------------------------------------------------------------------------------ +#------------------------------------------------------------------------------- # License # This file is part of OpenFOAM. # @@ -35,20 +35,19 @@ # mpirun -np \ # foamExec -v ... -parallel # -# Note: - not consistent with foamEtcFiles - does not search 'site' -# directories -# - version switch -v will not work with the debian naming -# openfoamXXX +# SeeAlso +# foamEtcFile #------------------------------------------------------------------------------ usage() { while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat< ... +Usage: ${0##*/} [OPTION] ... options: - -v ver specify OpenFOAM version - -help this usage + -version specify an alternative OpenFOAM version + pass through to foamEtcFile + -help this usage * run a particular OpenFOAM version of @@ -56,43 +55,14 @@ USAGE exit 1 } - -# This script should exist in /OpenFOAM-/bin/ +# +# This script must exist in /OpenFOAM-/bin/ # or /openfoam/bin/ (for the debian version) -# extract the and elements -# using a function preserves the command args -getDefaults() { - set -- $(echo $0 | sed -e 's@/OpenFOAM-\([^/]*\)/bin/[^/]*$@ \1@') - foamInstall=$1 - foamName='OpenFOAM-' - versionFile=$2 - versionString=$2 - - if [ -z "$versionFile" ] - then - # Try debian package name - #echo "Assuming debian naming convention 'openfoam'" - set -- $(echo $0 | sed -e 's@/openfoam\([0-9]*\)/bin/[^/]*$@ \1@') - foamInstall=$1 - foamName='openfoam' - versionFile=$2 - versionString=$WM_PROJECT_VERSION - #echo "foamInstall=$foamInstall" - #echo "foamName=$foamName" - #echo "versionFile=$versionFile" - #echo "versionString=$versionString" - fi -} - - -foamInstall='' # path before OpenFOAM-1.7.0 -foamName='' # OpenFOAM- or openfoam -versionFile='' # 170 so what the WM_PROJECT_INST_DIR exists as -versionString='' # 1.7.0 - -# Get above settings from $0 -getDefaults +# +# foamEtcFile is found in the same directory +#------------------------------------------------------------------------------- +unset etcOpts # parse options while [ "$#" -gt 0 ] do @@ -100,10 +70,9 @@ do -h | -help) usage ;; - -v) - shift - versionString=$1 - versionFile=$1 + -v | -version) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + etcOpts="-version $2" shift ;; --) @@ -117,46 +86,22 @@ do break ;; esac + shift done -#echo "Detected version $versionString with path name $foamName$versionFile" +[ "$#" -ge 1 ] || usage "no application specified" -if [ "$#" -lt 1 ] -then - usage "no application specified" -fi +# find OpenFOAM settings (bashrc) +foamDotFile="$(${0%/*}/foamEtcFile $etcOpts bashrc)" || { + echo "Error : bashrc file could not be found for OpenFOAM-$version" 1>&2 + exit 1 +} -unset foamDotFile +# preserve arguments (can otherwise get lost when sourcing the foamDotFile) args="$*" +. $foamDotFile -# Check user-specific OpenFOAM bashrc file -foamDotFile="$HOME/.OpenFOAM/$versionString/bashrc" -if [ -f $foamDotFile ] -then - . $foamDotFile - foamDotFile=okay -else - # Use the FOAM_INST_DIR variable for locating the installed version - for FOAM_INST_DIR in $foamInstall $WM_PROJECT_INST_DIR - do - foamDotFile="$FOAM_INST_DIR/$foamName$versionFile/etc/bashrc" - if [ -f $foamDotFile ] - then - . $foamDotFile - foamDotFile=okay - break - fi - done -fi - - -if [ "$foamDotFile" != okay ] -then - echo "Error : bashrc file could not be found for OpenFOAM-$versionString" 1>&2 - exit 1 -fi - -# Pass on the rest of the arguments +# execute exec $args #------------------------------------------------------------------------------ From d0293d79eb9c1c22e93dd19845e04e2cb0a144db Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 27 Jul 2010 12:09:14 +0100 Subject: [PATCH 02/13] STYLE: doc update --- doc/changes/debianPackage.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/changes/debianPackage.txt b/doc/changes/debianPackage.txt index aeb94a11..a2912b99 100644 --- a/doc/changes/debianPackage.txt +++ b/doc/changes/debianPackage.txt @@ -48,7 +48,19 @@ or in one go: (does a dpdg-buildpackage -rfakeroot) This will build e.g. a ../openfoam170_0-1ubuntu1_i386.deb -- build rpm: + + +Building rpm +------------ cd .. alien -r openfoam170_0-1ubuntu1_i386.deb +Installing it: + - ignore the dependency on /usr/xpg4/bin/sh + (comes from the bin/tools/replaceAllShellSun script) + - On Suse11.3 : default openmpi-1.2.8 does not work? + install newer mpi e.g. from science repo. + (e.g. http://software.opensuse.org : search for openmpi) + - find a repository for scotch (decomposition library) + or remove $FOAM_LIBBIN/libscotchDecomp.so + (so the $FOAM_LIBBIN/dummy/libscotchDecomp.so is picked up instead) ------------------------------------------------------- From 8f191f6c6fb049575829fbfc4fe225f9eccaf7ac Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 28 Jul 2010 12:41:15 +0100 Subject: [PATCH 03/13] COMP: moved file --- doc/changes/debianPackage.txt | 66 ----------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 doc/changes/debianPackage.txt diff --git a/doc/changes/debianPackage.txt b/doc/changes/debianPackage.txt deleted file mode 100644 index a2912b99..00000000 --- a/doc/changes/debianPackage.txt +++ /dev/null @@ -1,66 +0,0 @@ -Debian package. - -- install OpenFOAM as usual -(I installed the 1.7.0 git version: - cd ~/OpenFOAM - git clone ssh://.../OpenFOAM-1.7.0.git -) -- compile: ./Allwmake - -Get all your dependencies: - -Package building: - sudo apt-get install dh-make - sudo apt-get install dpkg - sudo apt-get install lintian # contains package checking - sudo apt-get install devscripts # contains debuild package building - -OpenFOAM building: - - sudo apt-get install binutils-dev - sudo apt-get install flex - sudo apt-get install libscotch-dev - sudo apt-get install libparmetis-dev - sudo apt-get install libopenmpi-dev - sudo apt-get install libxt-dev (tecplot360 converter) - -Compile all. -- metis will not compile -- parmetis will not compile -- mgridgen will not compile - - -Packaging: -(- install OpenFOAM-dev) -- mkdir debian; cd debian; ln -s ../OpenFOAM-dev/debian/* debian -- make sure openfoamdev is replaced with openfoam170 -- add changes to changelog: - dch --increment 'some change' -- build package: - # Clean build - fakeroot debian/rules clean - # Build : does Allwmake - fakeroot debian/rules build - # Create .deb from build results - fakeroot debian/rules binary -or in one go: - debuild -uc -us - (does a dpdg-buildpackage -rfakeroot) -This will build e.g. a ../openfoam170_0-1ubuntu1_i386.deb - - - -Building rpm ------------- - cd .. - alien -r openfoam170_0-1ubuntu1_i386.deb -Installing it: - - ignore the dependency on /usr/xpg4/bin/sh - (comes from the bin/tools/replaceAllShellSun script) - - On Suse11.3 : default openmpi-1.2.8 does not work? - install newer mpi e.g. from science repo. - (e.g. http://software.opensuse.org : search for openmpi) - - find a repository for scotch (decomposition library) - or remove $FOAM_LIBBIN/libscotchDecomp.so - (so the $FOAM_LIBBIN/dummy/libscotchDecomp.so is picked up instead) -------------------------------------------------------- From ff0e781d293e9b093f634d94d65bd2bdc9042025 Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 29 Jul 2010 11:07:47 +0100 Subject: [PATCH 04/13] SKA: Added fileName expansion to "timeDataFileName" See request for enhancement: http://www.cfd-online.com/Forums/openfoam-bugs/78643-ska-c-reads-filename-read-dynamicmeshdict-without-expanding.html --- .../solidBodyMotionFvMesh/solidBodyMotionFunctions/SKA/SKA.C | 5 ++++- .../ras/sloshingTank3D6DoF/constant/dynamicMeshDict | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SKA/SKA.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SKA/SKA.C index 44cba2e3..9a7cc8e3 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SKA/SKA.C +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SKA/SKA.C @@ -118,7 +118,10 @@ bool Foam::solidBodyMotionFunctions::SKA::read(const dictionary& SBMFCoeffs) // If the timeDataFileName has changed read the file - fileName newTimeDataFileName(SBMFCoeffs_.lookup("timeDataFileName")); + fileName newTimeDataFileName + ( + fileName(SBMFCoeffs_.lookup("timeDataFileName")).expand() + ); if (newTimeDataFileName != timeDataFileName_) { diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/constant/dynamicMeshDict b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/constant/dynamicMeshDict index fb809835..68af7d2d 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/constant/dynamicMeshDict +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/constant/dynamicMeshDict @@ -23,7 +23,7 @@ solidBodyMotionFvMeshCoeffs SKACoeffs { CofG ( 0 0 0 ); - timeDataFileName "constant/6DoF.dat"; + timeDataFileName "$FOAM_CASE/constant/6DoF.dat"; } } From 3efa9214487d67d10837c7d860cdc135eedb259d Mon Sep 17 00:00:00 2001 From: Henry Date: Sun, 1 Aug 2010 10:36:02 +0100 Subject: [PATCH 05/13] MRFInterFoam: Corrected location of executable --- .../solvers/multiphase/interFoam/MRFInterFoam/Make/files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/files b/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/files index 70685844..9610e63e 100644 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/files +++ b/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/files @@ -1,3 +1,3 @@ MRFInterFoam.C -EXE = $(FOAM_USER_APPBIN)/MRFInterFoam +EXE = $(FOAM_APPBIN)/MRFInterFoam From db501695375196e1714c7055da1ddcf5d31f729f Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 2 Aug 2010 12:29:19 +0100 Subject: [PATCH 06/13] STYLE: WM_MPLIB removed gamma --- etc/bashrc | 2 +- etc/cshrc | 2 +- etc/settings.csh | 5 ----- etc/settings.sh | 5 ----- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/etc/bashrc b/etc/bashrc index e507d448..666de588 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -131,7 +131,7 @@ unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH # WM_COMPILE_OPTION = Opt | Debug | Prof : ${WM_COMPILE_OPTION:=Opt}; export WM_COMPILE_OPTION -# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI +# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI | MPI | QSMPI : ${WM_MPLIB:=OPENMPI}; export WM_MPLIB diff --git a/etc/cshrc b/etc/cshrc index 87701df1..e6991d44 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -119,7 +119,7 @@ if ( ! $?WM_PRECISION_OPTION ) setenv WM_PRECISION_OPTION DP # WM_COMPILE_OPTION = Opt | Debug | Prof if ( ! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION Opt -# WM_MPLIB = | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI +# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI | MPI | QSMPI if ( ! $?WM_MPLIB ) setenv WM_MPLIB OPENMPI diff --git a/etc/settings.csh b/etc/settings.csh index 8b51bb7b..2c182ab4 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -281,11 +281,6 @@ case HPMPI: setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/hpmpi breaksw -case GAMMA: - setenv MPI_ARCH_PATH /usr - setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/gamma - breaksw - case MPI: setenv MPI_ARCH_PATH /opt/mpi setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpi diff --git a/etc/settings.sh b/etc/settings.sh index aae19a76..52b30443 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -307,11 +307,6 @@ HPMPI) export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/hpmpi ;; -GAMMA) - export MPI_ARCH_PATH=/usr - export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/gamma - ;; - MPI) export MPI_ARCH_PATH=/opt/mpi export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpi From f7f31972fe9e75db7bd1ec62539ea63000ed7dd0 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 3 Aug 2010 13:59:03 +0100 Subject: [PATCH 07/13] STYLE: motionSmootherTemplates : removed trailing spaces --- src/dynamicMesh/motionSmoother/motionSmootherTemplates.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dynamicMesh/motionSmoother/motionSmootherTemplates.C b/src/dynamicMesh/motionSmoother/motionSmootherTemplates.C index c5e53416..57c3ee4b 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherTemplates.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherTemplates.C @@ -245,7 +245,7 @@ Foam::tmp > else { res[pointI] /= sumWeight[pointI]; - } + } } res.correctBoundaryConditions(); From eb5049726d31c768f7f176c7e834b359efef0664 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 3 Aug 2010 13:59:24 +0100 Subject: [PATCH 08/13] ENH: maxWellSlip : proper restart --- .../rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C | 8 ++++---- .../compressible/rhoCentralFoam/biconic25-55Run35/0/U | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C index 186abb2c..a6e64bae 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C @@ -107,6 +107,8 @@ maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField ( vectorField("value", dict, p.size()) ); + refValue() = vectorField("refValue", dict, p.size()); + valueFraction() = scalarField("valueFraction", dict, p.size()); } else { @@ -190,10 +192,8 @@ void maxwellSlipUFvPatchVectorField::write(Ostream& os) const << thermalCreep_ << token::END_STATEMENT << nl; os.writeKeyword("curvature") << curvature_ << token::END_STATEMENT << nl; - os.writeKeyword("refValue") - << refValue() << token::END_STATEMENT << nl; - os.writeKeyword("valueFraction") - << valueFraction() << token::END_STATEMENT << nl; + refValue().writeEntry("refValue", os); + valueFraction().writeEntry("valueFraction", os); writeEntry("value", os); } diff --git a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/0/U b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/0/U index 612a7209..0b632e54 100644 --- a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/0/U +++ b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/0/U @@ -32416,7 +32416,7 @@ boundaryField Uwall uniform (0 0 0); thermalCreep on; curvature on; - refValue + refValue nonuniform List 255 ( (3.37115877925426 1.5719971556227 1.63068197702874e-10) @@ -32676,7 +32676,7 @@ boundaryField (0.103666873607679 0 -6.64100738660639e-16) ) ; - valueFraction + valueFraction nonuniform List 255 ( 0.00388739013936794 From 3652ab963c70264733468013c8b6359cbeda739f Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 6 Aug 2010 11:20:44 +0100 Subject: [PATCH 09/13] ENH: checkMesh : do not print bb for zero-sized patch --- .../utilities/mesh/manipulation/checkMesh/checkTopology.C | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C index f0998af7..e7908cf8 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C @@ -331,20 +331,18 @@ Foam::label Foam::checkTopology const pointField& pts = pp.points(); const labelList& mp = pp.meshPoints(); - boundBox bb; // zero-sized if (returnReduce(mp.size(), sumOp