Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop

This commit is contained in:
mattijs
2016-11-28 09:33:23 +00:00
43 changed files with 170 additions and 83 deletions

View File

@ -901,33 +901,42 @@ int main(int argc, char *argv[])
// Read decomposePar dictionary
dictionary decomposeDict;
if (Pstream::parRun())
{
if (Pstream::parRun())
{
fileName decompDictFile;
args.optionReadIfPresent("decomposeParDict", decompDictFile);
fileName decompDictFile;
args.optionReadIfPresent("decomposeParDict", decompDictFile);
decomposeDict = IOdictionary
// A demand-driven decompositionMethod can have issues finding
// an alternative decomposeParDict location.
IOdictionary* dictPtr = new IOdictionary
(
decompositionModel::selectIO
(
decompositionModel::selectIO
IOobject
(
IOobject
(
"decomposeParDict",
runTime.system(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
),
decompDictFile
)
);
}
else
{
decomposeDict.add("method", "none");
decomposeDict.add("numberOfSubdomains", 1);
}
"decomposeParDict",
runTime.system(),
runTime,
IOobject::MUST_READ,
IOobject::NO_WRITE
),
decompDictFile
)
);
// Store it on the object registry, but to be found it must also
// have the expected "decomposeParDict" name.
dictPtr->rename("decomposeParDict");
runTime.store(dictPtr);
decomposeDict = *dictPtr;
}
else
{
decomposeDict.add("method", "none");
decomposeDict.add("numberOfSubdomains", 1);
}

View File

@ -347,7 +347,7 @@ int main(int argc, char *argv[])
runTime.time().system(),
regionDir, // use region if non-standard
runTime,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
),

View File

@ -69,7 +69,7 @@ int readNumProcs
dictName,
runTime.system(),
runTime,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
),

View File

@ -20,5 +20,6 @@ EXE_INC = \
-I/usr/include/Qt
LIB_LIBS = \
-L$(CGAL_ARCH_PATH)/lib \
-L$(CGAL_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-ltriSurface

View File

@ -161,7 +161,10 @@ int main(int argc, char *argv[])
fileName decompDictFile;
args.optionReadIfPresent("decomposeParDict", decompDictFile);
IOdictionary* dict = new IOdictionary
// A demand-driven decompositionMethod can have issues finding
// an alternative decomposeParDict location.
IOdictionary* dictPtr = new IOdictionary
(
decompositionModel::selectIO
(
@ -170,18 +173,18 @@ int main(int argc, char *argv[])
"decomposeParDict",
runTime.system(),
runTime,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::MUST_READ,
IOobject::NO_WRITE
),
decompDictFile
)
);
// The object must have the expected "decomposeParDict" name.
// This also implies that it cannot be changed during the run.
dict->rename("decomposeParDict");
// Store it on the object registry, but to be found it must also
// have the expected "decomposeParDict" name.
runTime.store(dict);
dictPtr->rename("decomposeParDict");
runTime.store(dictPtr);
}
// Determine mesh bounding boxes:

View File

@ -56,15 +56,17 @@ isTest()
#
getNumberOfProcessors()
{
local dict="${1:-system/decomposeParDict}"
# Re-use positional parameters for automatic whitespace elimination
set -- $(foamDictionary -entry numberOfSubdomains -value "${1:-system/decomposeParDict}")
set -- $(foamDictionary -entry numberOfSubdomains -value "$dict" 2>/dev/null)
if [ "$#" -eq 1 ]
then
echo "$1"
else
echo "Error retrieving 'numberOfSubdomains' from decomposeParDict" 1>&2
echo 1
echo "Warning no 'numberOfSubdomains' in '$dict'" 1>&2
echo 1 # serial as fallback
return 1
fi
}

View File

@ -50,8 +50,8 @@
#
#------------------------------------------------------------------------------
set boost_version=boost_1_61_0
set cgal_version=CGAL-4.8
set boost_version=boost_1_62_0
set cgal_version=CGAL-4.9
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

View File

@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# File
# etc/config.sh/FFTW
# etc/config.csh/FFTW
#
# Description
# Setup file for FFTW include/libraries.
@ -48,7 +48,7 @@
#
#------------------------------------------------------------------------------
set fftw_version=fftw-3.3.4
set fftw_version=fftw-3.3.5
setenv FFTW_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$fftw_version

View File

@ -51,7 +51,7 @@ case SYSTEMOPENMPI:
breaksw
case OPENMPI:
setenv FOAM_MPI openmpi-1.10.2
setenv FOAM_MPI openmpi-1.10.4
# Optional configuration tweaks:
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/openmpi`

View File

@ -51,7 +51,7 @@
#
#------------------------------------------------------------------------------
setenv ParaView_VERSION 5.1.2
setenv ParaView_VERSION 5.2.0
setenv ParaView_MAJOR detect # Automatically determine major version
set cmake_version=cmake-system
@ -63,12 +63,10 @@ if ( ! $?ParaView_DIR ) setenv ParaView_DIR
set cleaned=`$WM_PROJECT_DIR/bin/foamCleanPath "$PATH" "$ParaView_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/cmake- $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-"`
if ( $status == 0 ) setenv PATH $cleaned
# Environment for ThirdParty cmake
unsetenv CMAKE_HOME
# ThirdParty cmake
set cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake_version
if ( -r $cmake ) then
setenv CMAKE_HOME $cmake
setenv PATH ${CMAKE_HOME}/bin:${PATH}
if ( -r $cmake/bin/cmake ) then
_foamAddPath $cmake/bin
endif
# Evaluate command-line parameters for ParaView
@ -112,9 +110,9 @@ if ( $?ParaView_VERSION ) then
set pvLibDir=${ParaView_DIR}/lib/$pvMajor
set pvPython=$ParaView_DIR/Utilities/VTKPythonWrapping
setenv PATH ${ParaView_DIR}/bin:${PATH}
setenv ParaView_INCLUDE_DIR $ParaView_DIR/include/$pvMajor
setenv PV_PLUGIN_PATH $FOAM_LIBBIN/$pvMajor
setenv PATH ${ParaView_DIR}/bin:${PATH}
setenv LD_LIBRARY_PATH "${pvLibDir}:${LD_LIBRARY_PATH}"
# Add in python libraries if required

View File

@ -3,7 +3,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation |
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
@ -119,7 +119,6 @@ unsetenv OPAL_PREFIX
# Unset Ensight/ParaView-related environment variables
unsetenv ENSIGHT9_READER
unsetenv CMAKE_HOME
unsetenv ParaView_DIR
unsetenv ParaView_INCLUDE_DIR
unsetenv ParaView_MAJOR
@ -129,12 +128,15 @@ unsetenv PV_PLUGIN_PATH
#------------------------------------------------------------------------------
# unset other ThirdParty environment variables
unsetenv ADIOS_ARCH_PATH
unsetenv BOOST_ARCH_PATH
unsetenv CCMIO_ARCH_PATH
unsetenv CGAL_ARCH_PATH
unsetenv FFTW_ARCH_PATH
unsetenv GPERFTOOLS_ARCH_PATH
unsetenv GMP_ARCH_PATH
unsetenv MPFR_ARCH_PATH
unsetenv METIS_ARCH_PATH
unsetenv SCOTCH_ARCH_PATH
#------------------------------------------------------------------------------
@ -174,7 +176,6 @@ unalias wm32
unalias wmSP
unalias wmDP
unalias wmRefresh
unalias wmUnset
unalias wmSchedOn
@ -191,6 +192,7 @@ unalias util
unalias tut
unalias run
unalias wmRefresh
unalias foamVersion
unalias foamPV

View File

@ -49,8 +49,8 @@
# - the LD_LIBRARY_PATH is not adjusted.
#------------------------------------------------------------------------------
boost_version=boost_1_61_0
cgal_version=CGAL-4.8
boost_version=boost_1_62_0
cgal_version=CGAL-4.9
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

View File

@ -47,7 +47,7 @@
# - the LD_LIBRARY_PATH is not adjusted.
#------------------------------------------------------------------------------
fftw_version=fftw-3.3.4
fftw_version=fftw-3.3.5
export FFTW_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$fftw_version

View File

@ -3,7 +3,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
# \\/ M anipulation |
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
@ -25,17 +25,54 @@
# etc/config.sh/gperftools
#
# Description
# Setup file for gperftools binaries libraries.
# Setup file for gperftools binaries and libraries.
# Sourced from OpenFOAM-<VERSION>/etc/bashrc
#
# If using system-wide installations, use the following settings:
#
# gperftools_version=gperftools-system
#
# If the system gperftools is unusable (eg, too old) and you don't
# have or want a ThirdParty installation:
#
# gperftools_version=gperftools-none
#
# If using a central installation, but not located under ThirdParty:
# - specify gperftools-system
# - provide full paths for GPERFTOOLS_ARCH_PATH
#
# Note
# When _foamAddLib is unset (eg, called from makeGperftools):
# - gperftools_version variable are retained.
# - the LD_LIBRARY_PATH and PATH are not adjusted.
#------------------------------------------------------------------------------
version=svn
gperftools_install=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER
gperftools_version=gperftools-2.5
GPERFTOOLS_VERSION=gperftools-$version
GPERFTOOLS_ARCH_PATH=$gperftools_install/$GPERFTOOLS_VERSION
export PATH=$GPERFTOOLS_ARCH_PATH/bin:$PATH
export LD_LIBRARY_PATH=$GPERFTOOLS_ARCH_PATH/lib:$LD_LIBRARY_PATH
GPERFTOOLS_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$gperftools_version
#------------------------------------------------------------------------------
if [ "$FOAM_VERBOSE" -a "$PS1" ]
then
echo "Using gperftools ($gperftools_version) -> $GPERFTOOLS_ARCH_PATH" 1>&2
fi
if type _foamAddLib > /dev/null 2>&1 # normal sourcing
then
# If GPERFTOOLS_ARCH_PATH does not end with '-system' or '-none',
# it is located within ThirdParty, or a central installation
# outside of ThirdParty and must be added to the lib-path.
ending="${GPERFTOOLS_ARCH_PATH##*-}"
if [ "$ending" != none -a "$ending" != system ]
then
_foamAddLib $GPERFTOOLS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
_foamAddPath $GPERFTOOLS_ARCH_PATH/bin
fi
unset gperftools_version ending
fi
#------------------------------------------------------------------------------

View File

@ -54,7 +54,7 @@ SYSTEMOPENMPI)
;;
OPENMPI)
export FOAM_MPI=openmpi-1.10.2
export FOAM_MPI=openmpi-1.10.4
# Optional configuration tweaks:
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/openmpi`

View File

@ -51,7 +51,7 @@
#
#------------------------------------------------------------------------------
ParaView_VERSION=5.1.2
ParaView_VERSION=5.2.0
ParaView_MAJOR=detect # Automatically determine major version
cmake_version=cmake-system
@ -66,14 +66,11 @@ cleaned=$($WM_PROJECT_DIR/bin/foamCleanPath "$PATH" \
) \
&& PATH="$cleaned"
# Environment for ThirdParty cmake
unset CMAKE_HOME
# ThirdParty cmake
cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake_version
if [ -r $cmake ]
if [ -r $cmake/bin/cmake ]
then
export CMAKE_HOME=$cmake
export CMAKE_ROOT=$cmake
export PATH=$CMAKE_HOME/bin:$PATH
_foamAddPath $cmake/bin
fi
# Evaluate command-line parameters for ParaView
@ -125,9 +122,9 @@ then
pvLibDir=$ParaView_DIR/lib/$pvMajor
pvPython=$ParaView_DIR/Utilities/VTKPythonWrapping
export PATH=$ParaView_DIR/bin:$PATH
export ParaView_INCLUDE_DIR=$ParaView_DIR/include/$pvMajor
export PV_PLUGIN_PATH=$FOAM_LIBBIN/$pvMajor
export PATH=$ParaView_DIR/bin:$PATH
export LD_LIBRARY_PATH=$pvLibDir:$LD_LIBRARY_PATH
# Add in python libraries if required

View File

@ -3,7 +3,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation |
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
@ -115,7 +115,6 @@ fi
# Unset Ensight/ParaView-related environment variables
unset ENSIGHT9_READER
unset CMAKE_HOME
unset ParaView_DIR
unset ParaView_INCLUDE_DIR
unset ParaView_MAJOR
@ -125,12 +124,15 @@ unset PV_PLUGIN_PATH
#------------------------------------------------------------------------------
# unset other ThirdParty environment variables
unset ADIOS_ARCH_PATH
unset BOOST_ARCH_PATH
unset CCMIO_ARCH_PATH
unset CGAL_ARCH_PATH
unset FFTW_ARCH_PATH
unset GPERFTOOLS_ARCH_PATH
unset GMP_ARCH_PATH
unset MPFR_ARCH_PATH
unset METIS_ARCH_PATH
unset SCOTCH_ARCH_PATH
#------------------------------------------------------------------------------

View File

@ -847,7 +847,7 @@ Foam::distributedTriSurfaceMesh::independentlyDistributedBbs
"decomposeParDict",
searchableSurface::time().system(),
searchableSurface::time(),
IOobject::MUST_READ_IF_MODIFIED,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
)

View File

@ -5,6 +5,8 @@ EXE_INC = \
-I$(LIB_SRC)/surfMesh/lnInclude
LIB_LIBS = \
-L$(FFTW_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) -lfftw3 \
-L$(FFTW_ARCH_PATH)/lib \
-L$(FFTW_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-lfftw3 \
-lfiniteVolume \
-lsampling

View File

@ -5,7 +5,9 @@ EXE_INC = \
-I$(LIB_SRC)/renumber/renumberMethods/lnInclude
LIB_LIBS = \
-L$(BOOST_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) -lboost_system \
-L$(BOOST_ARCH_PATH)/lib \
-L$(BOOST_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-lboost_system \
-lmeshTools \
-ldecompositionMethods \
-lrenumberMethods

View File

@ -4,7 +4,10 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Alternative decomposeParDict name:
decompDict="-decomposeParDict system/decomposeParDict.6"
## Standard decomposeParDict name:
# unset decompDict
# copy motorbike surface from resources directory
\cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
@ -13,6 +16,14 @@ runApplication surfaceFeatureExtract
runApplication blockMesh
runApplication decomposePar $decompDict
# Using distributedTriSurfaceMesh?
if foamDictionary -entry geometry -value system/snappyHexMeshDict | \
grep -q distributedTriSurfaceMesh
then
runParallel $decompDict surfaceRedistributePar motorBike.obj independent
fi
runParallel $decompDict snappyHexMesh -overwrite
#- For non-parallel running: - set the initial fields

View File

@ -15,20 +15,20 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
numberOfSubdomains 6;
method hierarchical;
// method ptscotch;
simpleCoeffs
{
n (4 1 1);
n (6 1 1);
delta 0.001;
}
hierarchicalCoeffs
{
n (2 2 1);
n (3 2 1);
delta 0.001;
order xyz;
}

View File

@ -40,7 +40,7 @@ boundaryField
wall2
{
type copiedFixedValue;
sourceFieldName T.liquid;
sourceField T.liquid;
value uniform 368;
}
defaultFaces

View File

@ -40,7 +40,7 @@ boundaryField
wall2
{
type copiedFixedValue;
sourceFieldName T.liquid;
sourceField T.liquid;
value uniform 368;
}
defaultFaces

19
wmake/rules/General/ADIOS Normal file
View File

@ -0,0 +1,19 @@
#-------------------------------*- makefile -*---------------------------------
# ADIOS includes/libraries
sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB)
sinclude $(RULES)/mplib$(WM_MPLIB)
ADIOS_INC = -I$(ADIOS_ARCH_PATH)/include
ADIOS_LIBS := \
-L$(ADIOS_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-ladios_$(FOAM_MPI)
# ADIOS dependent libraries. Eg, after -L/usr/lib64 ...
# Query as sequential to reduce mpi-dependencies
ADIOS_LIBS +=
$(shell $(ADIOS_ARCH_PATH)/bin/adios_config -s -l | sed -e 's@^.*-L/usr/lib[^ ]*@@')
#------------------------------------------------------------------------------

View File

@ -1,13 +1,15 @@
CGAL_INC = \
-I$(CGAL_ARCH_PATH)/include \
-I$(MPFR_ARCH_PATH)/include \
-I$(GMP_ARCH_PATH)/include \
-I$(MPFR_ARCH_PATH)/include \
-I$(BOOST_ARCH_PATH)/include \
-I$(CGAL_ARCH_PATH)/include \
-I/usr/include
CGAL_LIBS = \
-L$(MPFR_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-L$(GMP_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-L$(MPFR_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-L$(BOOST_ARCH_PATH)/lib \
-L$(BOOST_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-L$(CGAL_ARCH_PATH)/lib \
-L$(CGAL_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-lCGAL