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

This commit is contained in:
Andrew Heather
2016-06-27 23:22:54 +01:00
45 changed files with 659 additions and 277 deletions

View File

@ -20,8 +20,8 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
set -x
wmake -all utilities $*
wmake -all solvers $*
wmake -all utilities $*
#------------------------------------------------------------------------------

View File

@ -6,13 +6,17 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for compilation (at least for error catching)
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
# Get version info and arch-path
. $WM_PROJECT_DIR/etc/config.sh/functions
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/libccmio)
set -x
# build libccmio and create lnInclude directory
$WM_THIRD_PARTY_DIR/AllwmakeLibccmio
# Build libccmio (.so)
$WM_THIRD_PARTY_DIR/makeCCMIO
# if the library built properly, the headers should exist too
if [ -e $FOAM_EXT_LIBBIN/libccmio.so ]
if [ -e $CCMIO_ARCH_PATH/include/libccmio/ccmio.h \
-a -e $FOAM_EXT_LIBBIN/libccmio.so ]
then
wmake ccm26ToFoam
fi

View File

@ -1,10 +1,7 @@
LIBCCMIO_DIR = $(WM_THIRD_PARTY_DIR)/libccmio-2.6.1
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIBCCMIO_DIR) \
-I$(LIBCCMIO_DIR)/lnInclude
-I$(CCMIO_ARCH_PATH)/include
EXE_LIBS = \
-lfiniteVolume \

View File

@ -49,7 +49,7 @@ Description
#include "SortableList.H"
#include "cellSet.H"
#include <ccmio.h>
#include "libccmio/ccmio.h"
#include <vector>
using namespace Foam;

View File

@ -3,12 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for compilation (at least for error catching)
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
# Get CGAL and boost versions
. $WM_PROJECT_DIR/etc/config.sh/functions
_foamEval SOURCE_CGAL_VERSIONS_ONLY=yes \
$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL)
set -x
wmake -all blockMesh
@ -16,10 +10,6 @@ wmake -all extrude
wmake -all extrude2DMesh
wmake -all snappyHexMesh
if [ -n "$CGAL_ARCH_PATH" -o "$cgal_version" = "cgal-system" ]
then
foamyMesh/Allwmake $*
fi
foamyMesh/Allwmake $*
#------------------------------------------------------------------------------

View File

@ -4,15 +4,21 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmake $targetType conformalVoronoiMesh
wmake $targetType conformalVoronoi2DMesh
wmake foamyQuadMesh
wmake foamyHexMesh
#wmake foamyHexMeshBackgroundMesh
#(cd foamyHexMeshSurfaceSimplify && ./Allwmake)
#wmake cellSizeAndAlignmentGrid
if [ -d "$CGAL_ARCH_PATH/include/CGAL" ] || \
[ "${CGAL_ARCH_PATH##*-}" = system -a -d /usr/include/CGAL ]
then
set -x
wmake $targetType conformalVoronoiMesh
wmake $targetType conformalVoronoi2DMesh
wmake foamyQuadMesh
wmake foamyHexMesh
# wmake foamyHexMeshBackgroundMesh
# (cd foamyHexMeshSurfaceSimplify && ./Allwmake)
# wmake cellSizeAndAlignmentGrid
else
echo "WARNING: cannot build ${PWD##*/} without CGAL"
fi
#------------------------------------------------------------------------------

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -39,6 +39,7 @@ Description
#include "triSurface.H"
#include "triSurfaceSearch.H"
#include "cellSet.H"
#include "globalMeshData.H"
using namespace Foam;
@ -54,7 +55,6 @@ int main(int argc, char *argv[])
"Surface must be closed and singly connected."
);
argList::noParallel();
argList::validArgs.append("surfaceFile");
argList::validArgs.append("cellSet");
@ -87,7 +87,8 @@ int main(int argc, char *argv[])
}
Info<< "Selected " << insideCells.size() << " of " << mesh.nCells()
Info<< "Selected " << returnReduce(insideCells.size(), sumOp<label>())
<< " of " << mesh.globalData().nTotalCells()
<< " cells" << nl << nl
<< "Writing selected cells to cellSet " << insideCells.name()
<< nl << nl

View File

@ -1104,6 +1104,10 @@ int main(int argc, char *argv[])
{
const fileName timePath = processorDb.timePath();
// If no fields have been decomposed the destination
// directory will not have been created so make sure.
mkDir(timePath);
if (copyUniform || mesh.distributed())
{
cp

View File

@ -81,6 +81,8 @@ Note
#include "cellSet.H"
#include "fvMeshSubset.H"
#include "memInfo.H"
using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -156,6 +158,11 @@ int main(int argc, char *argv[])
const bool binary = !args.optionFound("ascii");
const bool nodeValues = args.optionFound("nodeValues");
cpuTime timer;
memInfo mem;
Info<< "Initial memory "
<< mem.update().size() << " kB" << endl;
#include "createTime.H"
instantList Times = timeSelector::select0(runTime, args);
@ -746,6 +753,10 @@ int main(int argc, char *argv[])
}
}
}
Info<< "Wrote in "
<< timer.cpuTimeIncrement() << " s, "
<< mem.update().size() << " kB" << endl;
}
#include "ensightCaseTail.H"
@ -755,7 +766,9 @@ int main(int argc, char *argv[])
delete ensightCaseFilePtr;
}
Info<< "End\n" << endl;
Info<< "\nEnd: "
<< timer.elapsedCpuTime() << " s, "
<< mem.update().peak() << " kB (peak)\n" << endl;
return 0;
}

View File

@ -74,6 +74,8 @@ Note
#include "ensightParts.H"
#include "ensightOutputFunctions.H"
#include "memInfo.H"
using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -135,6 +137,12 @@ int main(int argc, char *argv[])
const char* geometryName = "geometry";
#include "setRootCase.H"
cpuTime timer;
memInfo mem;
Info<< "Initial memory "
<< mem.update().size() << " kB" << endl;
#include "createTime.H"
// get times list
@ -471,11 +479,17 @@ int main(int argc, char *argv[])
// remember the time index
cloudTimesUsed[cloudName].append(timeIndex);
}
Info<< "Wrote in "
<< timer.cpuTimeIncrement() << " s, "
<< mem.update().size() << " kB" << endl;
}
#include "ensightOutputCase.H"
Info<< "\nEnd\n"<< endl;
Info<< "\nEnd: "
<< timer.elapsedCpuTime() << " s, "
<< mem.update().peak() << " kB (peak)\n" << endl;
return 0;
}

View File

@ -163,6 +163,7 @@ Note
#include "surfaceMeshWriter.H"
#include "writeSurfFields.H"
#include "memInfo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -322,6 +323,12 @@ int main(int argc, char *argv[])
);
#include "setRootCase.H"
cpuTime timer;
memInfo mem;
Info<< "Initial memory "
<< mem.update().size() << " kB" << endl;
#include "createTime.H"
const bool doWriteInternal = !args.optionFound("noInternal");
@ -432,10 +439,13 @@ int main(int argc, char *argv[])
mkDir(fvPath);
// Mesh wrapper; does subsetting and decomposition
vtkMesh vMesh(mesh, cellSetName);
Info<< "VTK mesh topology: "
<< timer.cpuTimeIncrement() << " s, "
<< mem.update().size() << " kB" << endl;
// Scan for all possible lagrangian clouds
HashSet<fileName> allCloudDirs;
@ -1245,6 +1255,10 @@ int main(int argc, char *argv[])
writer.writeParcelHeader(0);
}
}
Info<< "Wrote in "
<< timer.cpuTimeIncrement() << " s, "
<< mem.update().size() << " kB" << endl;
}
@ -1305,7 +1319,9 @@ int main(int argc, char *argv[])
}
}
Info<< "End\n" << endl;
Info<< "\nEnd: "
<< timer.elapsedCpuTime() << " s, "
<< mem.update().peak() << " kB (peak)\n" << endl;
return 0;
}

View File

@ -1,32 +1,66 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Optional unit: continue-on-error
export WM_CONTINUE_ON_ERROR=true
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
#set -x
#
# There are several prerequisites for building a plugin
#
#set -x
canBuildPlugin()
{
[ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] || {
echo
echo "WARNING: cannot build ParaView plugin(s) without paraview directory"
echo " ParaView_DIR=$ParaView_DIR"
echo
return 1
}
[ -n "$PV_PLUGIN_PATH" ] || {
echo
echo "${PWD##*/} : invalid PV_PLUGIN_PATH for building ParaView plugin(s)"
echo " PV_PLUGIN_PATH=${PV_PLUGIN_PATH:-unset}"
echo
return 1
}
type cmake > /dev/null 2>&1 || {
echo
echo "WARNING: cannot build ParaView plugin(s) without cmake"
echo
return 1
}
return 0 # success
}
# -----------------------------------------------------------------------------
case "$ParaView_VERSION" in
3*)
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
if canBuildPlugin
then
[ -n "$PV_PLUGIN_PATH" ] || {
echo "$0 : PV_PLUGIN_PATH not valid - it is unset"
exit 1
}
# ensure CMake gets the correct C++ compiler
(
# C++ compiler for CMake
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
wmake $targetType vtkPV3Readers
PV3blockMeshReader/Allwmake $*
PV3FoamReader/Allwmake $*
else
echo "ERROR: ParaView not found in $ParaView_DIR"
)
fi
;;
*)
echo "WARN: PV3 readers not building: ParaView_VERSION=$ParaView_VERSION"
echo
echo "NOTE: skipping build of ParaView V3 plugin(s)"
echo " different version: ParaView_VERSION=$ParaView_VERSION"
echo
;;
esac

View File

@ -6,4 +6,7 @@ wclean libso vtkPVReaders
PVblockMeshReader/Allwclean
PVFoamReader/Allwclean
# remove dummy directory (see Allwmake)
rmdir Make 2>/dev/null
#------------------------------------------------------------------------------

View File

@ -1,32 +1,70 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Optional unit: continue-on-error
export WM_CONTINUE_ON_ERROR=true
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
#set -x
#
# There are several prerequisites for building a plugin
#
#set -x
canBuildPlugin()
{
[ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] || {
echo
echo "WARNING: cannot build ParaView plugin(s) without paraview directory"
echo " ParaView_DIR=$ParaView_DIR"
echo
return 1
}
[ -n "$PV_PLUGIN_PATH" ] || {
echo
echo "${PWD##*/} : invalid PV_PLUGIN_PATH for building ParaView plugin(s)"
echo " PV_PLUGIN_PATH=${PV_PLUGIN_PATH:-unset}"
echo
return 1
}
type cmake > /dev/null 2>&1 || {
echo
echo "WARNING: cannot build ParaView plugin(s) without cmake"
echo
return 1
}
return 0 # success
}
# -----------------------------------------------------------------------------
case "$ParaView_VERSION" in
4* | 5*)
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
if canBuildPlugin
then
[ -n "$PV_PLUGIN_PATH" ] || {
echo "$0 : PV_PLUGIN_PATH not valid - it is unset"
exit 1
}
# ensure CMake gets the correct C++ compiler
(
# C++ compiler for CMake
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
wmake $targetType vtkPVReaders
PVblockMeshReader/Allwmake $*
PVFoamReader/Allwmake $*
else
echo "ERROR: ParaView not found in $ParaView_DIR"
# dummy directory to trigger proper 'wclean all' behaviour
# - the Allwclean will otherwise not be used
mkdir -p Make
)
fi
;;
*)
echo "WARN: PV readers not building: ParaView_VERSION=$ParaView_VERSION"
echo
echo "NOTE: skipping build of ParaView plugin(s)"
echo " different version: ParaView_VERSION=$ParaView_VERSION"
echo
;;
esac

View File

@ -1,11 +1,19 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source the wmake functions
. $WM_DIR/scripts/wmakeFunctions
set -x
# deal with client/server vs combined plugins
rm -f $FOAM_LIBBIN/libPVFoamReader* 2>/dev/null
rm -rf PVFoamReader/Make
rm -rf PVFoamReader/Make # safety: old build location
wclean libso vtkPVFoam
# Where are the generated files stored?
findObjectDir $PWD # remove entire top-level
rm -rf "$objectsDir" > /dev/null 2>&1
#------------------------------------------------------------------------------

View File

@ -4,18 +4,30 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
# Source the wmake functions
. $WM_DIR/scripts/wmakeFunctions
# C++ compiler for CMake
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
set -x
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
then
wmake $targetType vtkPVFoam
sourceDir=$PWD/PVFoamReader
# Where are any generated files stored?
findObjectDir $sourceDir
(
cd PVFoamReader
mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
cd Make/$WM_OPTIONS
cmake ../..
make
)
mkdir -p $objectsDir \
&& cd $objectsDir \
&& cmake $sourceDir \
&& make
) || {
echo
echo "WARNING: incomplete build of ParaView OpenFOAM plugin"
}
fi
#------------------------------------------------------------------------------

View File

@ -1,11 +1,19 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source the wmake functions
. $WM_DIR/scripts/wmakeFunctions
set -x
# deal with client/server vs combined plugins
rm -f $FOAM_LIBBIN/libPVblockMeshReader* 2>/dev/null
rm -f $FOAM_LIBBIN/libPVblockMeshReader* 2>/dev/null
rm -rf PVblockMeshReader/Make
rm -rf PVblockMeshReader/Make # safety: old build location
wclean libso vtkPVblockMesh
# Where are the generated files stored?
findObjectDir $PWD # remove entire top-level
rm -rf "$objectsDir" > /dev/null 2>&1
#------------------------------------------------------------------------------

View File

@ -4,18 +4,30 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
# Source the wmake functions
. $WM_DIR/scripts/wmakeFunctions
# C++ compiler for CMake
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
set -x
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
then
wmake $targetType vtkPVblockMesh
sourceDir=$PWD/PVblockMeshReader
# Where are any generated files stored?
findObjectDir $sourceDir
(
cd PVblockMeshReader
mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
cd Make/$WM_OPTIONS
cmake ../..
make
)
mkdir -p $objectsDir \
&& cd $objectsDir \
&& cmake $sourceDir \
&& make
) || {
echo
echo "WARNING: incomplete build of ParaView BlockMesh plugin"
}
fi
#------------------------------------------------------------------------------

View File

@ -2,14 +2,18 @@
cd ${0%/*} || exit 1 # Run from this directory
set -x
if [ -z "$CGAL_ARCH_PATH" ]
unset COMPILE_FLAGS LINK_FLAGS
if [ -d "$CGAL_ARCH_PATH/include/CGAL" ] || \
[ "${CGAL_ARCH_PATH##*-}" = system -a -d /usr/include/CGAL ]
then
export COMPILE_FLAGS="-DNO_CGAL"
else
wmake PolyhedronReader
export COMPILE_FLAGS='-IPolyhedronReader'
export LINK_FLAGS='${CGAL_LIBS} -lPolyhedronReader'
else
export COMPILE_FLAGS="-DNO_CGAL"
fi
wmake
# ----------------------------------------------------------------- end-of-file

View File

@ -15,7 +15,6 @@ EXE_INC = \
${CGAL_INC} \
${c++CGALWARN} \
$(COMPILE_FLAGS) \
-IPolyhedronReader \
-I$(FOAM_SRC)/surfMesh/lnInclude \
-I$(FOAM_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \