mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote branch 'OpenCFD/master' into olesenm
Conflicts: bin/foamExec
This commit is contained in:
@ -430,6 +430,59 @@ int main(int argc, char *argv[])
|
||||
<< "Band before renumbering: "
|
||||
<< returnReduce(band, maxOp<label>()) << nl << endl;
|
||||
|
||||
|
||||
// Read parallel reconstruct maps
|
||||
labelIOList cellProcAddressing
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"cellProcAddressing",
|
||||
mesh.facesInstance(),
|
||||
polyMesh::meshSubDir,
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT
|
||||
),
|
||||
labelList(0)
|
||||
);
|
||||
|
||||
labelIOList faceProcAddressing
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"faceProcAddressing",
|
||||
mesh.facesInstance(),
|
||||
polyMesh::meshSubDir,
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT
|
||||
),
|
||||
labelList(0)
|
||||
);
|
||||
labelIOList pointProcAddressing
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"pointProcAddressing",
|
||||
mesh.pointsInstance(),
|
||||
polyMesh::meshSubDir,
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT
|
||||
),
|
||||
labelList(0)
|
||||
);
|
||||
labelIOList boundaryProcAddressing
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"boundaryProcAddressing",
|
||||
mesh.pointsInstance(),
|
||||
polyMesh::meshSubDir,
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT
|
||||
),
|
||||
labelList(0)
|
||||
);
|
||||
|
||||
|
||||
// Read objects in time directory
|
||||
IOobjectList objects(mesh, runTime.timeName());
|
||||
|
||||
@ -579,6 +632,39 @@ int main(int argc, char *argv[])
|
||||
// Update fields
|
||||
mesh.updateMesh(map);
|
||||
|
||||
// Update proc maps
|
||||
if (cellProcAddressing.headerOk())
|
||||
{
|
||||
Info<< "Renumbering processor cell decomposition map "
|
||||
<< cellProcAddressing.name() << endl;
|
||||
|
||||
cellProcAddressing = labelList
|
||||
(
|
||||
UIndirectList<label>(cellProcAddressing, map().cellMap())
|
||||
);
|
||||
}
|
||||
if (faceProcAddressing.headerOk())
|
||||
{
|
||||
Info<< "Renumbering processor face decomposition map "
|
||||
<< faceProcAddressing.name() << endl;
|
||||
|
||||
faceProcAddressing = labelList
|
||||
(
|
||||
UIndirectList<label>(faceProcAddressing, map().faceMap())
|
||||
);
|
||||
}
|
||||
if (pointProcAddressing.headerOk())
|
||||
{
|
||||
Info<< "Renumbering processor point decomposition map "
|
||||
<< pointProcAddressing.name() << endl;
|
||||
|
||||
pointProcAddressing = labelList
|
||||
(
|
||||
UIndirectList<label>(pointProcAddressing, map().pointMap())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Move mesh (since morphing might not do this)
|
||||
if (map().hasMotionPoints())
|
||||
{
|
||||
@ -652,7 +738,8 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
mesh.setInstance(oldInstance);
|
||||
}
|
||||
Info<< "Writing mesh to " << runTime.timeName() << endl;
|
||||
|
||||
Info<< "Writing mesh to " << mesh.facesInstance() << endl;
|
||||
|
||||
mesh.write();
|
||||
|
||||
|
||||
@ -31,6 +31,7 @@ License
|
||||
#include "cellModeller.H"
|
||||
#include "vtkOpenFOAMPoints.H"
|
||||
#include "Swap.H"
|
||||
#include "longLong.H"
|
||||
|
||||
// VTK includes
|
||||
#include "vtkCellArray.h"
|
||||
|
||||
@ -195,7 +195,15 @@ void Foam::vtkPV3Foam::convertPointField
|
||||
|
||||
// Note: using the name of the original volField
|
||||
// not the name generated by the interpolation "volPointInterpolate(<name>)"
|
||||
|
||||
if (&tf != &GeometricField<Type, fvPatchField, volMesh>::null())
|
||||
{
|
||||
pointData->SetName(tf.name().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
pointData->SetName(ptf.name().c_str());
|
||||
}
|
||||
|
||||
if (debug)
|
||||
{
|
||||
|
||||
@ -82,6 +82,9 @@ mode=ugo
|
||||
prefix="$WM_PROJECT_INST_DIR"
|
||||
version="$WM_PROJECT_VERSION"
|
||||
|
||||
# default naming convention is "OpenFOAM-<VERSION>"
|
||||
projectNamePrefix="${WM_PROJECT:-OpenFOAM}-"
|
||||
|
||||
|
||||
unset listOpt quietOpt
|
||||
# parse options
|
||||
@ -132,6 +135,23 @@ do
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
#
|
||||
# handle standard and debian naming convention
|
||||
#
|
||||
case "$version" in
|
||||
OpenFOAM-*) # standard naming convention OpenFOAM-<VERSION>
|
||||
projectNamePrefix="OpenFOAM-"
|
||||
version="${version##OpenFOAM-}"
|
||||
;;
|
||||
|
||||
openfoam[0-9]*) # debian naming convention 'openfoam<VERSION>'
|
||||
projectNamePrefix="openfoam"
|
||||
version="${version##openfoam}"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
# Save the essential bits of information:
|
||||
nArgs=$#
|
||||
fileName="$1"
|
||||
@ -154,7 +174,7 @@ esac
|
||||
|
||||
case "$mode" in
|
||||
*o*) # other (shipped)
|
||||
dirList="$dirList $prefix/${WM_PROJECT:-OpenFOAM}-$version/etc"
|
||||
dirList="$dirList $prefix/$projectNamePrefix$version/etc"
|
||||
;;
|
||||
esac
|
||||
set -- $dirList
|
||||
|
||||
32
bin/foamExec
32
bin/foamExec
@ -35,6 +35,10 @@
|
||||
# mpirun -np <nProcs> \
|
||||
# foamExec -v <foamVersion> <foamCommand> ... -parallel
|
||||
#
|
||||
# Note: - not consistent with foamEtcFiles - does not search 'site'
|
||||
# directories
|
||||
# - version switch -v will not work with the debian naming
|
||||
# openfoamXXX
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
@ -54,7 +58,7 @@ USAGE
|
||||
}
|
||||
|
||||
# This script must exist in <foamInstall>/OpenFOAM-<VERSION>/bin/
|
||||
# or <foamInstall>/openfoamVERSION/bin/
|
||||
# or <foamInstall>/openfoam<VERSION>/bin/ (for the debian version)
|
||||
#
|
||||
|
||||
# the bindir:
|
||||
@ -71,12 +75,31 @@ foamInstall="$prefixDir"
|
||||
# the name used for the project directory
|
||||
projectDirName="${projectDir##*/}"
|
||||
|
||||
# version from OpenFOAM-VERSION (normal) or openfoamVERSION (debian)
|
||||
version=$(echo $projectDirName | sed -e 's@^openfoam-*@@i')
|
||||
#
|
||||
# handle standard and debian naming convention
|
||||
#
|
||||
case "$projectDirName" in
|
||||
OpenFOAM-*) # standard naming convention OpenFOAM-<VERSION>
|
||||
projectNamePrefix="OpenFOAM-"
|
||||
version="${projectDirName##OpenFOAM-}"
|
||||
versionNum=$version
|
||||
;;
|
||||
|
||||
openfoam[0-9]*) # debian naming convention 'openfoam<VERSION>'
|
||||
projectNamePrefix="openfoam"
|
||||
versionNum="${projectDirName##openfoam}"
|
||||
version=$WM_PROJECT_DIR
|
||||
;;
|
||||
*)
|
||||
echo "Error : unknown/unsupported naming convention"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
# debugging:
|
||||
# echo "Installed locations:"
|
||||
# for i in projectDir prefixDir foamInstall projectDirName version
|
||||
# for i in projectDir prefixDir foamInstall projectDirName version versionNum
|
||||
# do
|
||||
# eval echo "$i=\$$i"
|
||||
# done
|
||||
@ -92,6 +115,7 @@ do
|
||||
-v | version)
|
||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||
version=$2
|
||||
versionNum=$version
|
||||
shift 2
|
||||
;;
|
||||
--)
|
||||
|
||||
@ -51,7 +51,7 @@ done
|
||||
|
||||
|
||||
# set VERSION and MAJOR (version) variables if not already set
|
||||
[ -n "$ParaView_VERSION" ] || ParaView_VERSION=3.6.1
|
||||
[ -n "$ParaView_VERSION" ] || ParaView_VERSION=3.8.0
|
||||
[ -n "$ParaView_MAJOR" ] || ParaView_MAJOR=unknown
|
||||
|
||||
# if needed, set MAJOR version to correspond to VERSION
|
||||
@ -75,6 +75,7 @@ export ParaView_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-
|
||||
if [ -r $ParaView_DIR -o -r $paraviewInstDir ]
|
||||
then
|
||||
export PATH=$ParaView_DIR/bin:$PATH
|
||||
export LD_LIBRARY_PATH=$ParaView_DIR/lib/paraview-$ParaView_MAJOR:$LD_LIBRARY_PATH
|
||||
export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-$ParaView_MAJOR
|
||||
|
||||
# add in python libraries if required
|
||||
|
||||
@ -49,7 +49,7 @@ foreach cmake ( cmake-2.8.1 cmake-2.8.0 cmake-2.6.4 )
|
||||
end
|
||||
|
||||
# set VERSION and MAJOR (version) variables if not already set
|
||||
if ( ! $?ParaView_VERSION ) setenv ParaView_VERSION 3.6.1
|
||||
if ( ! $?ParaView_VERSION ) setenv ParaView_VERSION 3.8.0
|
||||
if ( ! $?ParaView_MAJOR ) setenv ParaView_MAJOR unknown
|
||||
|
||||
# if needed, set MAJOR version to correspond to VERSION
|
||||
@ -73,6 +73,7 @@ setenv ParaView_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-
|
||||
# set paths if binaries or source are present
|
||||
if ( -r $ParaView_DIR || -r $paraviewInstDir ) then
|
||||
setenv PATH ${ParaView_DIR}/bin:${PATH}
|
||||
setenv LD_LIBRARY_PATH "${ParaView_DIR}/lib/paraview-${ParaView_MAJOR}:${LD_LIBRARY_PATH}"
|
||||
setenv PV_PLUGIN_PATH $FOAM_LIBBIN/paraview-${ParaView_MAJOR}
|
||||
|
||||
# add in python libraries if required
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
export WM_PROJECT=OpenFOAM
|
||||
[ -z "$WM_PROJECT_VERSION" ] && export WM_PROJECT_VERSION=1.6
|
||||
[ -z "$WM_PROJECT_VERSION" ] && export WM_PROJECT_VERSION=dev
|
||||
|
||||
################################################################################
|
||||
# USER EDITABLE PART. Note changes made here may be lost with the next upgrade
|
||||
@ -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 = | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI
|
||||
# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI
|
||||
: ${WM_MPLIB:=OPENMPI}; export WM_MPLIB
|
||||
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
setenv WM_PROJECT OpenFOAM
|
||||
if ( ! $?WM_PROJECT_VERSION ) setenv WM_PROJECT_VERSION 1.6
|
||||
if ( ! $?WM_PROJECT_VERSION ) setenv WM_PROJECT_VERSION dev
|
||||
|
||||
################################################################################
|
||||
# USER EDITABLE PART. Note changes made here may be lost with the next upgrade
|
||||
@ -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 | GAMMA | MPI | QSMPI
|
||||
if ( ! $?WM_MPLIB ) setenv WM_MPLIB OPENMPI
|
||||
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ unsetenv MPFR_ARCH_PATH
|
||||
# Select compiler installation
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# compilerInstall = OpenFOAM | system
|
||||
if ( ! $?compilerInstall ) set compilerInstall=OpenFOAM
|
||||
if ( ! $?compilerInstall ) set compilerInstall=system
|
||||
|
||||
switch ("$compilerInstall")
|
||||
case OpenFOAM:
|
||||
@ -209,14 +209,20 @@ case OPENMPI:
|
||||
breaksw
|
||||
|
||||
case SYSTEMOPENMPI:
|
||||
# use the system installed openmpi, get library directory via mpicc
|
||||
|
||||
# This uses the installed openmpi. It needs mpicc installed!
|
||||
|
||||
set mpi_version=openmpi-system
|
||||
set libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
|
||||
|
||||
# Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
|
||||
setenv PINC "`mpicc --showme:compile`"
|
||||
setenv PLIBS "`mpicc --showme:link`"
|
||||
set libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
|
||||
|
||||
if ($?FOAM_VERBOSE && $?prompt) then
|
||||
echo "Using system installed OpenMPI:"
|
||||
echo " compile flags : `mpicc --showme:compile`"
|
||||
echo " link flags : `mpicc --showme:link`"
|
||||
echo "Using system installed MPI:"
|
||||
echo " compile flags : $PINC"
|
||||
echo " link flags : $PLIBS"
|
||||
echo " libmpi dir : $libDir"
|
||||
endif
|
||||
|
||||
|
||||
@ -105,7 +105,7 @@ unset MPFR_ARCH_PATH
|
||||
# Select compiler installation
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# compilerInstall = OpenFOAM | system
|
||||
: ${compilerInstall:=OpenFOAM}
|
||||
: ${compilerInstall:=system}
|
||||
|
||||
case "${compilerInstall:-OpenFOAM}" in
|
||||
OpenFOAM)
|
||||
@ -237,13 +237,17 @@ OPENMPI)
|
||||
SYSTEMOPENMPI)
|
||||
# use the system installed openmpi, get library directory via mpicc
|
||||
mpi_version=openmpi-system
|
||||
libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
|
||||
|
||||
# Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
|
||||
export PINC="`mpicc --showme:compile`"
|
||||
export PLIBS="`mpicc --showme:link`"
|
||||
libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
|
||||
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
echo "Using system installed OpenMPI:"
|
||||
echo " compile flags : `mpicc --showme:compile`"
|
||||
echo " link flags : `mpicc --showme:link`"
|
||||
echo "Using system installed MPI:"
|
||||
echo " compile flags : $PINC"
|
||||
echo " link flags : $PLIBS"
|
||||
echo " libmpi dir : $libDir"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user