mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop
This commit is contained in:
@ -20,8 +20,8 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
|
||||
|
||||
set -x
|
||||
|
||||
wmake -all utilities $*
|
||||
wmake -all solvers $*
|
||||
wmake -all utilities $*
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 \
|
||||
|
||||
@ -43,7 +43,7 @@ Description
|
||||
#include "SortableList.H"
|
||||
#include "cellSet.H"
|
||||
|
||||
#include <ccmio.h>
|
||||
#include "libccmio/ccmio.h"
|
||||
#include <vector>
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
@ -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 $*
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -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.
|
||||
@ -36,6 +36,7 @@ Description
|
||||
#include "triSurface.H"
|
||||
#include "triSurfaceSearch.H"
|
||||
#include "cellSet.H"
|
||||
#include "globalMeshData.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
@ -51,7 +52,6 @@ int main(int argc, char *argv[])
|
||||
"Surface must be closed and singly connected."
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("surfaceFile");
|
||||
argList::validArgs.append("cellSet");
|
||||
|
||||
@ -84,7 +84,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
|
||||
|
||||
@ -1101,6 +1101,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
|
||||
|
||||
@ -78,6 +78,8 @@ Note
|
||||
#include "cellSet.H"
|
||||
#include "fvMeshSubset.H"
|
||||
|
||||
#include "memInfo.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -153,6 +155,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);
|
||||
@ -743,6 +750,10 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "Wrote in "
|
||||
<< timer.cpuTimeIncrement() << " s, "
|
||||
<< mem.update().size() << " kB" << endl;
|
||||
}
|
||||
|
||||
#include "ensightCaseTail.H"
|
||||
@ -752,7 +763,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;
|
||||
}
|
||||
|
||||
@ -71,6 +71,8 @@ Note
|
||||
#include "ensightParts.H"
|
||||
#include "ensightOutputFunctions.H"
|
||||
|
||||
#include "memInfo.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -132,6 +134,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
|
||||
@ -468,11 +476,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;
|
||||
}
|
||||
|
||||
@ -160,6 +160,7 @@ Note
|
||||
#include "surfaceMeshWriter.H"
|
||||
#include "writeSurfFields.H"
|
||||
|
||||
#include "memInfo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -319,6 +320,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");
|
||||
@ -429,10 +436,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;
|
||||
@ -1242,6 +1252,10 @@ int main(int argc, char *argv[])
|
||||
writer.writeParcelHeader(0);
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "Wrote in "
|
||||
<< timer.cpuTimeIncrement() << " s, "
|
||||
<< mem.update().size() << " kB" << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -1302,7 +1316,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;
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -6,4 +6,7 @@ wclean libso vtkPVReaders
|
||||
PVblockMeshReader/Allwclean
|
||||
PVFoamReader/Allwclean
|
||||
|
||||
# remove dummy directory (see Allwmake)
|
||||
rmdir Make 2>/dev/null
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 \
|
||||
|
||||
@ -62,7 +62,7 @@ foamInstall=$HOME/$WM_PROJECT
|
||||
export WM_COMPILER_TYPE=system
|
||||
|
||||
#- Compiler:
|
||||
# WM_COMPILER = Gcc | Gcc45 | Gcc46 | Gcc47 | Gcc48 | Gcc49| Clang | Icc
|
||||
# WM_COMPILER = Gcc | Gcc4[5-9] | Gcc5[1-4] | Gcc61 | Clang | Icc
|
||||
export WM_COMPILER=Gcc
|
||||
unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
@ -22,33 +22,60 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# config.csh/CGAL
|
||||
# etc/config.csh/CGAL
|
||||
#
|
||||
# Description
|
||||
# Setup file for CGAL (& boost) include/libraries.
|
||||
# Sourced from OpenFOAM-<VERSION>/etc/cshrc
|
||||
##------------------------------------------------------------------------------
|
||||
#
|
||||
# If using system-wide installations, use the following settings:
|
||||
#
|
||||
# boost_version=boost-system
|
||||
# cgal_version=cgal-system
|
||||
#
|
||||
# If the system boost/cgal is unusable (eg, too old) and you don't
|
||||
# have or want a ThirdParty installation:
|
||||
#
|
||||
# boost_version=boost-none
|
||||
# cgal_version=cgal-none
|
||||
#
|
||||
# If using a central installation, but not located under ThirdParty:
|
||||
# - specify boost-system / cgal-system
|
||||
# - provide full paths for BOOST_ARCH_PATH / CGAL_ARCH_PATH
|
||||
#
|
||||
# Note
|
||||
# When building OpenFOAM, any changes made here MUST be made in the
|
||||
# equivalent config.sh version too, since that is the one which will
|
||||
# be used during the build process.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
set boost_version=boost-system
|
||||
set cgal_version=CGAL-4.7
|
||||
set cgal_version=CGAL-4.8
|
||||
|
||||
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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
if ($?FOAM_VERBOSE && $?prompt) then
|
||||
echo "Using CGAL and boost"
|
||||
echo " $cgal_version at $CGAL_ARCH_PATH"
|
||||
echo " $boost_version at $BOOST_ARCH_PATH"
|
||||
echo "Using boost ($boost_version) -> $BOOST_ARCH_PATH"
|
||||
echo "Using CGAL ($cgal_version) -> $CGAL_ARCH_PATH"
|
||||
endif
|
||||
|
||||
if ( -d "$CGAL_ARCH_PATH" ) then
|
||||
_foamAddLib $CGAL_ARCH_PATH/lib
|
||||
endif
|
||||
# If BOOST_ARCH_PATH, CGAL_ARCH_PATH do not end with '-system' or '-none',
|
||||
# they are either located within ThirdParty, or a central installation
|
||||
# outside of ThirdParty and must be added to the lib-path.
|
||||
|
||||
if ( -d "$BOOST_ARCH_PATH" ) then
|
||||
set ending="${BOOST_ARCH_PATH:t}"
|
||||
if ( "$ending" != "boost-none" && "$ending" != "boost-system" ) then
|
||||
_foamAddLib $BOOST_ARCH_PATH/lib
|
||||
endif
|
||||
|
||||
unset boost_version cgal_version
|
||||
set ending="${CGAL_ARCH_PATH:t}"
|
||||
if ( "$ending" != "cgal-none" && "$ending" != "cgal-system" ) then
|
||||
_foamAddLib $CGAL_ARCH_PATH/lib
|
||||
endif
|
||||
|
||||
unset boost_version cgal_version ending
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
90
etc/config.csh/compiler
Normal file
90
etc/config.csh/compiler
Normal file
@ -0,0 +1,90 @@
|
||||
#----------------------------------*-sh-*--------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# etc/config.csh/compiler
|
||||
#
|
||||
# Description
|
||||
# Startup file for custom compiler versions for OpenFOAM
|
||||
# Sourced from OpenFOAM-<VERSION>/etc/config.csh/settings
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
switch ("$WM_COMPILER_TYPE")
|
||||
case OpenFOAM:
|
||||
case ThirdParty:
|
||||
# Default versions of GMP, MPFR and MPC, override as necessary
|
||||
set gmp_version=gmp-system
|
||||
set mpfr_version=mpfr-system
|
||||
set mpc_version=mpc-system
|
||||
|
||||
switch ("$WM_COMPILER")
|
||||
case Gcc:
|
||||
case Gcc48:
|
||||
set gcc_version=gcc-4.8.5
|
||||
breaksw
|
||||
case Gcc45:
|
||||
set gcc_version=gcc-4.5.4
|
||||
breaksw
|
||||
case Gcc46:
|
||||
set gcc_version=gcc-4.6.4
|
||||
breaksw
|
||||
case Gcc47:
|
||||
set gcc_version=gcc-4.7.4
|
||||
breaksw
|
||||
case Gcc49:
|
||||
set gcc_version=gcc-4.9.3
|
||||
breaksw
|
||||
case Gcc51:
|
||||
set gcc_version=gcc-5.1.0
|
||||
breaksw
|
||||
case Gcc52:
|
||||
set gcc_version=gcc-5.2.0
|
||||
breaksw
|
||||
case Gcc53:
|
||||
set gcc_version=gcc-5.3.0
|
||||
breaksw
|
||||
case Gcc54:
|
||||
set gcc_version=gcc-5.4.0
|
||||
breaksw
|
||||
case Gcc61:
|
||||
set gcc_version=gcc-6.1.0
|
||||
breaksw
|
||||
case Clang:
|
||||
# Using clang - not gcc
|
||||
setenv WM_CC 'clang'
|
||||
setenv WM_CXX 'clang++'
|
||||
set clang_version=llvm-3.7.0
|
||||
# set clang_version=llvm-3.8.0
|
||||
breaksw
|
||||
default:
|
||||
echo
|
||||
echo "Warning in $WM_PROJECT_DIR/etc/config.csh/compiler:"
|
||||
echo " Unknown OpenFOAM compiler type '$WM_COMPILER'"
|
||||
echo " Please check your settings"
|
||||
echo
|
||||
breaksw
|
||||
endsw
|
||||
endsw
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -61,11 +61,7 @@ case OPENMPI:
|
||||
setenv OPAL_PREFIX $MPI_ARCH_PATH
|
||||
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
|
||||
# 64-bit on OpenSuSE 12.1 uses lib64 others use lib
|
||||
_foamAddLib $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
|
||||
_foamAddMan $MPI_ARCH_PATH/share/man
|
||||
breaksw
|
||||
|
||||
@ -261,7 +257,6 @@ if ( "$FOAM_MPI" != dummy ) then
|
||||
endif
|
||||
|
||||
|
||||
|
||||
# Set the minimum MPI buffer size (used by all platforms except SGI MPI)
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
if ( ! $?minBufferSize ) set minBufferSize=20000000
|
||||
@ -274,4 +269,8 @@ else
|
||||
setenv MPI_BUFFER_SIZE $minBufferSize
|
||||
endif
|
||||
|
||||
# Cleanup environment:
|
||||
# ~~~~~~~~~~~~~~~~~~~~
|
||||
unset minBufferSize
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
# config.csh/paraview
|
||||
#
|
||||
# Description
|
||||
# Setup file for paraview-[3-5].x
|
||||
# Setup file for paraview
|
||||
# Sourced from OpenFOAM-<VERSION>/etc/cshrc or from foamPV alias
|
||||
#
|
||||
# Note
|
||||
@ -49,12 +49,8 @@ foreach cmake ( cmake-3.2.1 cmake-2.8.12.1 cmake-2.8.8 cmake-2.8.4 cmake-2.8.3 c
|
||||
end
|
||||
|
||||
#- ParaView version, automatically determine major version:
|
||||
#setenv ParaView_VERSION 3.12.0
|
||||
#setenv ParaView_VERSION 4.0.1
|
||||
#setenv ParaView_VERSION 4.1.0
|
||||
#setenv ParaView_VERSION 4.3.1
|
||||
#setenv ParaView_VERSION 4.4.0
|
||||
setenv ParaView_VERSION 5.0.0
|
||||
setenv ParaView_VERSION 5.0.1
|
||||
setenv ParaView_MAJOR detect
|
||||
|
||||
|
||||
|
||||
@ -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.
|
||||
@ -202,7 +202,7 @@ _foamAddLib ${FOAM_USER_LIBBIN}:${FOAM_SITE_LIBBIN}:${FOAM_LIBBIN}:${FOAM_EXT_L
|
||||
# Compiler settings
|
||||
# ~~~~~~~~~~~~~~~~~
|
||||
unset gcc_version gmp_version mpfr_version mpc_version
|
||||
unsetenv MPFR_ARCH_PATH GMP_ARCH_PATH
|
||||
unsetenv GMP_ARCH_PATH MPFR_ARCH_PATH
|
||||
|
||||
|
||||
# Location of compiler installation
|
||||
@ -213,64 +213,25 @@ if ( ! $?WM_COMPILER_TYPE ) then
|
||||
echo " WM_COMPILER_TYPE not set, using '$WM_COMPILER_TYPE'"
|
||||
endif
|
||||
|
||||
# Load configured compiler versions, regardless of the compiler type
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/compiler`
|
||||
|
||||
switch ("$WM_COMPILER_TYPE")
|
||||
case system:
|
||||
# Use system compiler
|
||||
breaksw
|
||||
|
||||
case OpenFOAM:
|
||||
case ThirdParty:
|
||||
# Default versions of GMP, MPFR and MPC, overide as necessary
|
||||
set gmp_version=gmp-5.1.2
|
||||
set mpfr_version=mpfr-3.1.2
|
||||
set mpc_version=mpc-1.0.1
|
||||
switch ("$WM_COMPILER")
|
||||
case Gcc:
|
||||
case Gcc48:
|
||||
set gcc_version=gcc-4.8.5
|
||||
breaksw
|
||||
case Gcc45:
|
||||
set gcc_version=gcc-4.5.4
|
||||
breaksw
|
||||
case Gcc46:
|
||||
set gcc_version=gcc-4.6.4
|
||||
breaksw
|
||||
case Gcc47:
|
||||
set gcc_version=gcc-4.7.4
|
||||
breaksw
|
||||
case Gcc49:
|
||||
set gcc_version=gcc-4.9.3
|
||||
breaksw
|
||||
case Gcc51:
|
||||
set gcc_version=gcc-5.1.0
|
||||
breaksw
|
||||
case Gcc52:
|
||||
set gcc_version=gcc-5.2.0
|
||||
breaksw
|
||||
case Gcc53:
|
||||
set gcc_version=gcc-5.3.0
|
||||
breaksw
|
||||
case Clang:
|
||||
# Using clang - not gcc
|
||||
setenv WM_CC 'clang'
|
||||
setenv WM_CXX 'clang++'
|
||||
set clang_version=llvm-3.7.0
|
||||
breaksw
|
||||
default:
|
||||
echo
|
||||
echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
|
||||
echo " Unknown OpenFOAM compiler type '$WM_COMPILER'"
|
||||
echo " Please check your settings"
|
||||
echo
|
||||
breaksw
|
||||
endsw
|
||||
|
||||
# Optional configuration tweaks:
|
||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/compiler`
|
||||
|
||||
if ( $?gcc_version ) then
|
||||
if ( ! $?gmp_version ) set gmp_version=gmp-system
|
||||
if ( ! $?mpfr_version ) set mpfr_version=mpfr-system
|
||||
if ( ! $?mpc_version ) set mpc_version=mpc-system
|
||||
set gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version
|
||||
set gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version
|
||||
set mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version
|
||||
if ( $?mpc_version ) then
|
||||
set mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version
|
||||
endif
|
||||
set mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version
|
||||
|
||||
# Check that the compiler directory can be found
|
||||
if ( ! -d "$gccDir" ) then
|
||||
@ -286,21 +247,28 @@ case ThirdParty:
|
||||
_foamAddMan $gccDir/man
|
||||
_foamAddPath $gccDir/bin
|
||||
|
||||
# Add compiler libraries to run-time environment
|
||||
# Add ThirdParty compiler libraries to run-time environment
|
||||
_foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH
|
||||
|
||||
# Add gmp/mpfr libraries to run-time environment
|
||||
_foamAddLib $gmpDir/lib
|
||||
_foamAddLib $mpfrDir/lib
|
||||
|
||||
# Add mpc libraries (not need for older gcc) to run-time environment
|
||||
if ( $?mpc_version ) then
|
||||
_foamAddLib $mpcDir/lib
|
||||
# Add ThirdParty gmp/mpfr/mpc libraries to run-time environment
|
||||
if ( "${gmpDir:t}" != "gmp-system" ) then
|
||||
_foamAddLib $gmpDir/lib$WM_COMPILER_LIB_ARCH
|
||||
endif
|
||||
if ( "${mpfrDir:t}" != "mpfr-system" ) then
|
||||
_foamAddLib $mpfrDir/lib$WM_COMPILER_LIB_ARCH
|
||||
endif
|
||||
if ( "${mpcDir:t}" != "mpc-system" ) then
|
||||
_foamAddLib $mpcDir/lib$WM_COMPILER_LIB_ARCH
|
||||
endif
|
||||
|
||||
# Used by boost/CGAL:
|
||||
setenv MPFR_ARCH_PATH $mpfrDir
|
||||
setenv GMP_ARCH_PATH $gmpDir
|
||||
setenv MPFR_ARCH_PATH $mpfrDir
|
||||
|
||||
if ($?FOAM_VERBOSE && $?prompt) then
|
||||
echo "Using ThirdParty compiler"
|
||||
echo " ${gccDir:t} (${gmpDir:t} ${mpfrDir:t} ${mpcDir:t})"
|
||||
endif
|
||||
endif
|
||||
unset gcc_version gccDir
|
||||
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
|
||||
@ -321,13 +289,13 @@ case ThirdParty:
|
||||
|
||||
_foamAddMan $clangDir/man
|
||||
_foamAddPath $clangDir/bin
|
||||
|
||||
if ($?FOAM_VERBOSE && $?prompt) then
|
||||
echo "Using ThirdParty compiler"
|
||||
echo " ${clangDir:t}"
|
||||
endif
|
||||
endif
|
||||
unset clang_version clangDir
|
||||
|
||||
breaksw
|
||||
|
||||
case system:
|
||||
# Use system compiler
|
||||
breaksw
|
||||
|
||||
default:
|
||||
@ -340,7 +308,6 @@ endsw
|
||||
# Cleanup environment:
|
||||
# ~~~~~~~~~~~~~~~~~~~~
|
||||
#- keep _foamAddPath _foamAddLib _foamAddMan
|
||||
unset minBufferSize
|
||||
unsetenv WM_COMPILER_TYPE
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -166,6 +166,7 @@ unalias wm32
|
||||
unalias wmSP
|
||||
unalias wmDP
|
||||
|
||||
unalias wmREFRESH
|
||||
unalias wmUNSET
|
||||
|
||||
unalias wmSchedON
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
@ -28,42 +28,60 @@
|
||||
# Setup file for CGAL (& boost) include/libraries.
|
||||
# Sourced from OpenFOAM-<VERSION>/etc/bashrc
|
||||
#
|
||||
# If using system-wide installations for either one, use the following
|
||||
# version settings:
|
||||
# If using system-wide installations, use the following settings:
|
||||
#
|
||||
# boost_version=boost-system
|
||||
# cgal_version=cgal-system
|
||||
#
|
||||
# If the system boost/cgal is unusable (eg, too old) and you don't
|
||||
# have or want a ThirdParty installation:
|
||||
#
|
||||
# boost_version=boost-none
|
||||
# cgal_version=cgal-none
|
||||
#
|
||||
# If using a central installation, but not located under ThirdParty:
|
||||
# - specify boost-system / cgal-system
|
||||
# - provide full paths for BOOST_ARCH_PATH / CGAL_ARCH_PATH
|
||||
#
|
||||
# Note
|
||||
# When _foamAddLib is unset (eg, called from makeCGAL):
|
||||
# - boost_version / cgal_version variables are retained.
|
||||
# - the LD_LIBRARY_PATH is not adjusted.
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
boost_version=boost-system
|
||||
cgal_version=CGAL-4.7
|
||||
cgal_version=CGAL-4.8
|
||||
|
||||
if [ -z "$SOURCE_CGAL_VERSIONS_ONLY" ]
|
||||
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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
echo "Using boost ($boost_version) -> $BOOST_ARCH_PATH" 1>&2
|
||||
echo "Using CGAL ($cgal_version) -> $CGAL_ARCH_PATH" 1>&2
|
||||
fi
|
||||
|
||||
if type _foamAddLib > /dev/null 2>&1 # normal sourcing
|
||||
then
|
||||
|
||||
common_path=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER
|
||||
# If BOOST_ARCH_PATH, CGAL_ARCH_PATH do not end with '-system' or '-none',
|
||||
# they are either located within ThirdParty, or a central installation
|
||||
# outside of ThirdParty and must be added to the lib-path.
|
||||
|
||||
export BOOST_ARCH_PATH=$common_path/$boost_version
|
||||
export CGAL_ARCH_PATH=$common_path/$cgal_version
|
||||
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
echo "Using CGAL and boost" 1>&2
|
||||
echo " $cgal_version at $CGAL_ARCH_PATH" 1>&2
|
||||
echo " $boost_version at $BOOST_ARCH_PATH" 1>&2
|
||||
fi
|
||||
|
||||
if [ -d "$CGAL_ARCH_PATH" -a "$cgal_version" != "cgal-system" ]
|
||||
then
|
||||
_foamAddLib $CGAL_ARCH_PATH/lib
|
||||
fi
|
||||
|
||||
if [ -d "$BOOST_ARCH_PATH" -a "$boost_version" != "boost-system" ]
|
||||
ending="${BOOST_ARCH_PATH##*-}"
|
||||
if [ "$ending" != none -a "$ending" != system ]
|
||||
then
|
||||
_foamAddLib $BOOST_ARCH_PATH/lib
|
||||
fi
|
||||
|
||||
unset boost_version cgal_version common_path
|
||||
ending="${CGAL_ARCH_PATH##*-}"
|
||||
if [ "$ending" != none -a "$ending" != system ]
|
||||
then
|
||||
_foamAddLib $CGAL_ARCH_PATH/lib
|
||||
fi
|
||||
|
||||
unset boost_version cgal_version ending
|
||||
|
||||
fi
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ alias wmSchedOFF='unset WM_SCHEDULER'
|
||||
unset foamPV
|
||||
foamPV()
|
||||
{
|
||||
. $WM_PROJECT_DIR/etc/config.sh/paraview ParaView_VERSION=$1
|
||||
. $WM_PROJECT_DIR/etc/config.sh/paraview ParaView_VERSION=${1:-none}
|
||||
echo "paraview-$ParaView_VERSION (major: $ParaView_MAJOR)" 1>&2
|
||||
}
|
||||
|
||||
|
||||
@ -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.
|
||||
@ -32,11 +32,10 @@
|
||||
|
||||
case "$WM_COMPILER_TYPE" in
|
||||
OpenFOAM | ThirdParty)
|
||||
|
||||
# Default versions of GMP, MPFR and MPC, override as necessary
|
||||
gmp_version=gmp-5.1.2
|
||||
mpfr_version=mpfr-3.1.2
|
||||
mpc_version=mpc-1.0.1
|
||||
gmp_version=gmp-system
|
||||
mpfr_version=mpfr-system
|
||||
mpc_version=mpc-system
|
||||
|
||||
case "$WM_COMPILER" in
|
||||
Gcc | Gcc48)
|
||||
@ -63,11 +62,18 @@ OpenFOAM | ThirdParty)
|
||||
Gcc53)
|
||||
gcc_version=gcc-5.3.0
|
||||
;;
|
||||
Gcc54)
|
||||
gcc_version=gcc-5.4.0
|
||||
;;
|
||||
Gcc61)
|
||||
gcc_version=gcc-6.1.0
|
||||
;;
|
||||
Clang)
|
||||
# Using clang - not gcc
|
||||
export WM_CC='clang'
|
||||
export WM_CXX='clang++'
|
||||
clang_version=llvm-3.7.0
|
||||
# clang_version=llvm-3.8.0
|
||||
;;
|
||||
*)
|
||||
echo 1>&2
|
||||
@ -80,3 +86,5 @@ OpenFOAM | ThirdParty)
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
42
etc/config.sh/libccmio
Normal file
42
etc/config.sh/libccmio
Normal file
@ -0,0 +1,42 @@
|
||||
#----------------------------------*-sh-*--------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# etc/config.sh/libccmio
|
||||
#
|
||||
# Description
|
||||
# Setup file for libccmio include/libraries.
|
||||
# Sourced during wmake process only.
|
||||
#
|
||||
# Dynamic libraries are found under the FOAM_EXT_LIBBIN path.
|
||||
# Static libraries are found under the CCMIO_ARCH_PATH/lib path.
|
||||
#
|
||||
# Note
|
||||
# A csh version is not needed, since the values here are only sourced
|
||||
# during the wmake process
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
ccmio_version=libccmio-2.6.1
|
||||
export CCMIO_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$ccmio_version
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -58,11 +58,7 @@ OPENMPI)
|
||||
export OPAL_PREFIX=$MPI_ARCH_PATH
|
||||
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
|
||||
# 64-bit on OpenSuSE 12.1 uses lib64 others use lib
|
||||
_foamAddLib $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
|
||||
_foamAddMan $MPI_ARCH_PATH/share/man
|
||||
;;
|
||||
|
||||
@ -256,7 +252,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Set the minimum MPI buffer size (used by all platforms except SGI MPI)
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
: ${minBufferSize:=20000000}
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
# etc/config.sh/paraview
|
||||
#
|
||||
# Description
|
||||
# Setup file for paraview-[3-5].x
|
||||
# Setup file for paraview
|
||||
# Sourced from OpenFOAM-<VERSION>/etc/bashrc or from foamPV alias
|
||||
#
|
||||
# Note
|
||||
@ -57,12 +57,8 @@ done
|
||||
|
||||
|
||||
#- ParaView version, automatically determine major version
|
||||
#export ParaView_VERSION=3.12.0
|
||||
#export ParaView_VERSION=4.0.1
|
||||
#export ParaView_VERSION=4.1.0
|
||||
#export ParaView_VERSION=4.3.1
|
||||
#export ParaView_VERSION=4.4.0
|
||||
export ParaView_VERSION=5.0.0
|
||||
export ParaView_VERSION=5.0.1
|
||||
export ParaView_MAJOR=detect
|
||||
|
||||
|
||||
|
||||
@ -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.
|
||||
@ -198,7 +198,7 @@ _foamAddLib $FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN:$FOAM_LIBBIN:$FOAM_EXT_LIBBIN:$
|
||||
# Compiler settings
|
||||
# ~~~~~~~~~~~~~~~~~
|
||||
unset gcc_version gmp_version mpfr_version mpc_version
|
||||
unset MPFR_ARCH_PATH GMP_ARCH_PATH
|
||||
unset GMP_ARCH_PATH MPFR_ARCH_PATH
|
||||
|
||||
# Location of compiler installation
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -214,14 +214,16 @@ fi
|
||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/compiler`
|
||||
|
||||
case "$WM_COMPILER_TYPE" in
|
||||
system)
|
||||
# Use system compiler
|
||||
;;
|
||||
OpenFOAM | ThirdParty)
|
||||
|
||||
if [ -n "$gcc_version" ]
|
||||
then
|
||||
gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version
|
||||
gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version
|
||||
mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version
|
||||
mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version
|
||||
gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/${gmp_version:-gmp-system}
|
||||
mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/${mpfr_version:-mpfr-system}
|
||||
mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/${mpc_version:-mpc-system}
|
||||
|
||||
# Check that the compiler directory can be found
|
||||
[ -d "$gccDir" ] || {
|
||||
@ -237,22 +239,32 @@ OpenFOAM | ThirdParty)
|
||||
_foamAddMan $gccDir/man
|
||||
_foamAddPath $gccDir/bin
|
||||
|
||||
# Add compiler libraries to run-time environment
|
||||
# Add ThirdParty compiler libraries to run-time environment
|
||||
_foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH
|
||||
|
||||
# Add gmp/mpfr libraries to run-time environment
|
||||
_foamAddLib $gmpDir/lib
|
||||
_foamAddLib $mpfrDir/lib
|
||||
|
||||
# Add mpc libraries (not need for older gcc) to run-time environment
|
||||
if [ -n "$mpc_version" ]
|
||||
# Add ThirdParty gmp/mpfr/mpc libraries to run-time environment
|
||||
if [ "${gmpDir##*-}" != system ]
|
||||
then
|
||||
_foamAddLib $mpcDir/lib
|
||||
_foamAddLib $gmpDir/lib$WM_COMPILER_LIB_ARCH
|
||||
fi
|
||||
if [ "${mpfrDir##*-}" != system ]
|
||||
then
|
||||
_foamAddLib $mpfrDir/lib$WM_COMPILER_LIB_ARCH
|
||||
fi
|
||||
if [ "${mpcDir##*-}" != system ]
|
||||
then
|
||||
_foamAddLib $mpcDir/lib$WM_COMPILER_LIB_ARCH
|
||||
fi
|
||||
|
||||
# Used by boost/CGAL:
|
||||
export MPFR_ARCH_PATH=$mpfrDir
|
||||
export GMP_ARCH_PATH=$gmpDir
|
||||
export MPFR_ARCH_PATH=$mpfrDir
|
||||
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
echo "Using ThirdParty compiler"
|
||||
echo " ${gccDir##*/} (${gmpDir##*/} $${mpfrDir##*/} ${mpcDir##*/})"
|
||||
fi
|
||||
fi
|
||||
unset gcc_version gccDir
|
||||
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
|
||||
@ -274,12 +286,15 @@ OpenFOAM | ThirdParty)
|
||||
|
||||
_foamAddMan $clangDir/share/man
|
||||
_foamAddPath $clangDir/bin
|
||||
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
echo "Using ThirdParty compiler"
|
||||
echo " ${clangDir##*/}"
|
||||
fi
|
||||
fi
|
||||
unset clang_version clangDir
|
||||
;;
|
||||
system)
|
||||
# Use system compiler
|
||||
;;
|
||||
*)
|
||||
echo "Warn: WM_COMPILER_TYPE='$WM_COMPILER_TYPE' is unsupported" 1>&2
|
||||
echo " treating as 'system' instead" 1>&2
|
||||
|
||||
@ -145,6 +145,7 @@ unalias wm32
|
||||
unalias wmSP
|
||||
unalias wmDP
|
||||
|
||||
unalias wmREFRESH
|
||||
unalias wmUNSET
|
||||
|
||||
unalias wmSchedON
|
||||
|
||||
@ -61,7 +61,7 @@ if ( ! $?FOAM_INST_DIR ) setenv FOAM_INST_DIR $foamInstall
|
||||
setenv WM_COMPILER_TYPE system
|
||||
|
||||
#- Compiler:
|
||||
# WM_COMPILER = Gcc | Gcc45 | Gcc46 | Gcc47 | Gcc48 | Gcc49 | Clang | Icc
|
||||
# WM_COMPILER = Gcc | Gcc4[5-9] | Gcc5[1-4] | Gcc61 | Clang | Icc
|
||||
setenv WM_COMPILER Gcc
|
||||
setenv WM_COMPILER_ARCH # defined but empty
|
||||
unsetenv WM_COMPILER_LIB_ARCH
|
||||
|
||||
@ -73,12 +73,23 @@ bool Foam::profiling::active()
|
||||
}
|
||||
|
||||
|
||||
bool Foam::profiling::print(Ostream& os)
|
||||
{
|
||||
if (pool_)
|
||||
{
|
||||
return pool_->writeData(os);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool Foam::profiling::writeNow()
|
||||
{
|
||||
if (pool_)
|
||||
{
|
||||
Info<<"profiling::writeNow() at time = "
|
||||
<< pool_->owner().timeName() << endl;
|
||||
return pool_->write();
|
||||
}
|
||||
else
|
||||
@ -94,12 +105,7 @@ void Foam::profiling::initialize
|
||||
const Time& owner
|
||||
)
|
||||
{
|
||||
if (pool_)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Already initialized" << endl;
|
||||
}
|
||||
else
|
||||
if (!pool_)
|
||||
{
|
||||
pool_ = new profiling(ioObj, owner);
|
||||
|
||||
@ -111,6 +117,9 @@ void Foam::profiling::initialize
|
||||
pool_->push(info, pool_->clockTime_);
|
||||
Info<< "profiling initialized" << nl;
|
||||
}
|
||||
|
||||
// silently ignore multiple initialization
|
||||
// eg, decomposePar use multiple simultaneous Times
|
||||
}
|
||||
|
||||
|
||||
@ -121,12 +130,7 @@ void Foam::profiling::initialize
|
||||
const Time& owner
|
||||
)
|
||||
{
|
||||
if (pool_)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Already initialized" << endl;
|
||||
}
|
||||
else
|
||||
if (!pool_)
|
||||
{
|
||||
pool_ = new profiling(dict, ioObj, owner);
|
||||
|
||||
@ -138,6 +142,9 @@ void Foam::profiling::initialize
|
||||
pool_->push(info, pool_->clockTime_);
|
||||
Info<< "profiling initialized" << nl;
|
||||
}
|
||||
|
||||
// silently ignore multiple initialization
|
||||
// eg, decomposePar use multiple simultaneous Times
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -190,14 +190,21 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
// Member Functions
|
||||
// Static Member Functions
|
||||
|
||||
//- True if profiling is active
|
||||
static bool active();
|
||||
|
||||
//- Print profiling information to specified output
|
||||
// Forwards to writeData member of top-level object
|
||||
static bool print(Ostream&);
|
||||
|
||||
//- Write profiling information now
|
||||
static bool writeNow();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- The owner of the profiling
|
||||
const Time& owner() const;
|
||||
|
||||
@ -248,7 +255,7 @@ class profiling::Information
|
||||
Information* parent_;
|
||||
|
||||
//- Nr of times this was called
|
||||
label calls_;
|
||||
long calls_;
|
||||
|
||||
//- Total time spent
|
||||
scalar totalTime_;
|
||||
|
||||
@ -678,12 +678,14 @@ private:
|
||||
) const;
|
||||
|
||||
//- Finds zone per cell. Uses topological walk with all faces
|
||||
// marked in namedSurfaceIndex regarded as blocked.
|
||||
// marked in unnamedSurfaceRegion (intersections with unnamed
|
||||
// surfaces) and namedSurfaceIndex (intersections with named
|
||||
// surfaces) regarded as blocked.
|
||||
void findCellZoneTopo
|
||||
(
|
||||
const label backgroundZoneID,
|
||||
const pointField& locationsInMesh,
|
||||
const labelList& allSurfaceIndex,
|
||||
const labelList& unnamedSurfaceRegion,
|
||||
const labelList& namedSurfaceIndex,
|
||||
const labelList& surfaceToCellZone,
|
||||
labelList& cellToZone
|
||||
|
||||
@ -1833,7 +1833,15 @@ bool Foam::meshRefinement::calcRegionToZone
|
||||
|
||||
if (regionToCellZone[ownRegion] == -2)
|
||||
{
|
||||
if (regionToCellZone[neiRegion] == surfZoneI)
|
||||
if (surfZoneI == -1)
|
||||
{
|
||||
// Special: face is -on faceZone -not real boundary
|
||||
// -not on cellZone
|
||||
// so make regions same on either side
|
||||
regionToCellZone[ownRegion] = regionToCellZone[neiRegion];
|
||||
changed = true;
|
||||
}
|
||||
else if (regionToCellZone[neiRegion] == surfZoneI)
|
||||
{
|
||||
// Face between unset and my region. Put unset
|
||||
// region into keepRegion
|
||||
@ -1854,7 +1862,15 @@ bool Foam::meshRefinement::calcRegionToZone
|
||||
}
|
||||
else if (regionToCellZone[neiRegion] == -2)
|
||||
{
|
||||
if (regionToCellZone[ownRegion] == surfZoneI)
|
||||
if (surfZoneI == -1)
|
||||
{
|
||||
// Special: face is -on faceZone -not real boundary
|
||||
// -not on cellZone
|
||||
// so make regions same on either side
|
||||
regionToCellZone[neiRegion] = regionToCellZone[ownRegion];
|
||||
changed = true;
|
||||
}
|
||||
else if (regionToCellZone[ownRegion] == surfZoneI)
|
||||
{
|
||||
// Face between unset and my region. Put unset
|
||||
// region into keepRegion
|
||||
@ -1881,7 +1897,7 @@ void Foam::meshRefinement::findCellZoneTopo
|
||||
(
|
||||
const label backgroundZoneID,
|
||||
const pointField& locationsInMesh,
|
||||
const labelList& allSurfaceIndex,
|
||||
const labelList& unnamedSurfaceRegion,
|
||||
const labelList& namedSurfaceIndex,
|
||||
const labelList& surfaceToCellZone,
|
||||
labelList& cellToZone
|
||||
@ -1914,9 +1930,9 @@ void Foam::meshRefinement::findCellZoneTopo
|
||||
// Analyse regions. Reuse regionsplit
|
||||
boolList blockedFace(mesh_.nFaces());
|
||||
|
||||
forAll(allSurfaceIndex, faceI)
|
||||
forAll(unnamedSurfaceRegion, faceI)
|
||||
{
|
||||
if (allSurfaceIndex[faceI] == -1)
|
||||
if (unnamedSurfaceRegion[faceI] == -1 && namedSurfaceIndex[faceI] == -1)
|
||||
{
|
||||
blockedFace[faceI] = false;
|
||||
}
|
||||
@ -2018,7 +2034,7 @@ void Foam::meshRefinement::findCellZoneTopo
|
||||
label surfI = namedSurfaceIndex[faceI];
|
||||
|
||||
// Connected even if no cellZone defined for surface
|
||||
if (surfI != -1)
|
||||
if (unnamedSurfaceRegion[faceI] == -1 && surfI != -1)
|
||||
{
|
||||
// Calculate region to zone from cellRegions on either side
|
||||
// of internal face.
|
||||
@ -2058,7 +2074,7 @@ void Foam::meshRefinement::findCellZoneTopo
|
||||
label surfI = namedSurfaceIndex[faceI];
|
||||
|
||||
// Connected even if no cellZone defined for surface
|
||||
if (surfI != -1)
|
||||
if (unnamedSurfaceRegion[faceI] == -1 && surfI != -1)
|
||||
{
|
||||
bool changedCell = calcRegionToZone
|
||||
(
|
||||
@ -2353,6 +2369,7 @@ void Foam::meshRefinement::zonify
|
||||
|
||||
|
||||
labelList namedSurfaces(surfaceZonesInfo::getNamedSurfaces(surfZones));
|
||||
labelList unnamedSurfaces(surfaceZonesInfo::getUnnamedSurfaces(surfZones));
|
||||
|
||||
// Get map from surface to cellZone (or -1)
|
||||
labelList surfaceToCellZone;
|
||||
@ -2379,15 +2396,17 @@ void Foam::meshRefinement::zonify
|
||||
// 1. Test all (unnamed & named) surfaces
|
||||
|
||||
labelList globalRegion1;
|
||||
labelList globalRegion2;
|
||||
getIntersections
|
||||
(
|
||||
identity(surfaces_.surfaces().size()), // surfacesToTest,
|
||||
neiCc,
|
||||
intersectedFaces(), // testFaces
|
||||
globalRegion1,
|
||||
globalRegion2
|
||||
);
|
||||
{
|
||||
labelList globalRegion2;
|
||||
getIntersections
|
||||
(
|
||||
identity(surfaces_.surfaces().size()), // surfacesToTest,
|
||||
neiCc,
|
||||
intersectedFaces(), // testFaces
|
||||
globalRegion1,
|
||||
globalRegion2
|
||||
);
|
||||
}
|
||||
|
||||
if (namedSurfaces.size())
|
||||
{
|
||||
@ -2555,12 +2574,25 @@ void Foam::meshRefinement::zonify
|
||||
Info<< "Walking from known cellZones; crossing a faceZone "
|
||||
<< "face changes cellZone" << nl << endl;
|
||||
|
||||
labelList unnamedRegion1;
|
||||
{
|
||||
labelList unnamedRegion2;
|
||||
getIntersections
|
||||
(
|
||||
unnamedSurfaces,
|
||||
neiCc,
|
||||
intersectedFaces(),
|
||||
unnamedRegion1,
|
||||
unnamedRegion2
|
||||
);
|
||||
}
|
||||
|
||||
findCellZoneTopo
|
||||
(
|
||||
backgroundZoneID,
|
||||
pointField(0),
|
||||
globalRegion1, // To split up cells
|
||||
namedSurfaceIndex, // Step across named surfaces to propagate
|
||||
unnamedRegion1, // Intersections with unnamed surfaces
|
||||
namedSurfaceIndex, // Intersections with named surfaces
|
||||
surfaceToCellZone,
|
||||
cellToZone
|
||||
);
|
||||
|
||||
@ -4,9 +4,8 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Source the wmake functions
|
||||
. $WM_DIR/scripts/wmakeFunctions
|
||||
|
||||
(
|
||||
# Where are the generated files stored?
|
||||
findObjectDir dummy.C
|
||||
depDir="$objectsDir"
|
||||
rm -rf "$depDir" > /dev/null 2>&1
|
||||
)
|
||||
# Where are the generated files stored?
|
||||
findObjectDir $PWD
|
||||
rm -rf "$objectsDir" > /dev/null 2>&1
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -4,25 +4,45 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Source the wmake functions
|
||||
. $WM_DIR/scripts/wmakeFunctions
|
||||
|
||||
# Store current directory
|
||||
# The source directory
|
||||
sourceDir=$PWD
|
||||
|
||||
# Where are any generated files stored?
|
||||
findObjectDir dummy.C
|
||||
findObjectDir $sourceDir
|
||||
depDir="$objectsDir"
|
||||
|
||||
if [ -d "$VTK_DIR" -o -d "$ParaView_DIR" ]
|
||||
echo
|
||||
echo "======================================================================"
|
||||
echo "${PWD##*/} : $PWD"
|
||||
echo
|
||||
|
||||
if [ -d "$VTK_DIR" -o -d "$ParaView_DIR" ]
|
||||
then
|
||||
# ensure CMake gets the correct C++ compiler
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
|
||||
(mkdir -p $depDir && cd $depDir && cmake $sourceDir && make)
|
||||
if type cmake > /dev/null 2>&1
|
||||
then
|
||||
(
|
||||
mkdir -p $depDir \
|
||||
&& cd $depDir \
|
||||
&& cmake $sourceDir \
|
||||
&& make
|
||||
) || {
|
||||
echo
|
||||
echo "WARNING: incomplete build of VTK-based post-processing"
|
||||
}
|
||||
else
|
||||
echo "WARNING: skipped - needs cmake"
|
||||
fi
|
||||
else
|
||||
echo "ERROR: Build of $PWD requires a valid VTK installation which"
|
||||
echo " can be supplied either by ParaView by VTK. In case of"
|
||||
echo " - ParaView : export the ParaView_DIR environment variable"
|
||||
echo " - VTK : export the VTK_DIR variable"
|
||||
echo "WARNING: skipped - needs a VTK or a ParaView installation"
|
||||
echo " - For ParaView : export the 'ParaView_DIR' variable"
|
||||
echo " - For VTK : export the 'VTK_DIR' variable"
|
||||
fi
|
||||
|
||||
echo "======================================================================"
|
||||
echo
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -244,7 +244,8 @@ void Foam::fieldVisualisationBase::setField
|
||||
const scalar position,
|
||||
const word& colourFieldName,
|
||||
vtkPolyDataMapper* mapper,
|
||||
vtkRenderer* renderer
|
||||
vtkRenderer* renderer,
|
||||
vtkPolyData* pData
|
||||
) const
|
||||
{
|
||||
mapper->InterpolateScalarsBeforeMappingOn();
|
||||
@ -269,7 +270,6 @@ void Foam::fieldVisualisationBase::setField
|
||||
mapper->SetScalarRange(range_.first(), range_.second());
|
||||
|
||||
// Set to use either cell or point data
|
||||
vtkPolyData* pData = mapper->GetInput();
|
||||
const char* fieldName = colourFieldName.c_str();
|
||||
if (pData->GetCellData()->HasArray(fieldName) == 1)
|
||||
{
|
||||
@ -439,7 +439,7 @@ void Foam::fieldVisualisationBase::addGlyphs
|
||||
{
|
||||
glyph->Update();
|
||||
|
||||
setField(position, colourFieldName, glyphMapper, renderer);
|
||||
setField(position, colourFieldName, glyphMapper, renderer, data);
|
||||
|
||||
glyphMapper->Update();
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -158,7 +158,8 @@ protected:
|
||||
const scalar position,
|
||||
const word& colourFieldName,
|
||||
vtkPolyDataMapper* mapper,
|
||||
vtkRenderer* renderer
|
||||
vtkRenderer* renderer,
|
||||
vtkPolyData* pData
|
||||
) const;
|
||||
|
||||
//- Add glyphs
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -110,7 +110,7 @@ void Foam::functionObjectLine::addGeometryToScene
|
||||
|
||||
vtkSmartPointer<vtkPolyDataMapper> mapper =
|
||||
vtkSmartPointer<vtkPolyDataMapper>::New();
|
||||
setField(position, fieldName_, mapper, renderer);
|
||||
setField(position, fieldName_, mapper, renderer, lines->GetOutput());
|
||||
|
||||
actor_->SetMapper(mapper);
|
||||
|
||||
|
||||
@ -137,7 +137,7 @@ void Foam::functionObjectSurface::addGeometryToScene
|
||||
vtkSmartPointer<vtkPolyDataMapper>::New();
|
||||
mapper->SetInputConnection(surf->GetOutputPort());
|
||||
|
||||
setField(position, fieldName_, mapper, renderer);
|
||||
setField(position, fieldName_, mapper, renderer, surf->GetOutput());
|
||||
|
||||
surfaceActor_->SetMapper(mapper);
|
||||
|
||||
|
||||
@ -5,11 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
targetType=libso
|
||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
# Get CGAL and scotch versions
|
||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
||||
_foamEval SOURCE_CGAL_VERSIONS_ONLY=yes \
|
||||
$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL)
|
||||
|
||||
## Get ZOLTAN_ARCH_PATH
|
||||
#if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/zoltan`
|
||||
#then
|
||||
@ -21,22 +16,21 @@ _foamEval SOURCE_CGAL_VERSIONS_ONLY=yes \
|
||||
# echo
|
||||
#fi
|
||||
|
||||
|
||||
set -x
|
||||
|
||||
wmake $targetType renumberMethods
|
||||
|
||||
if [ -n "$BOOST_ARCH_PATH" -o "$boost_version" = "boost-system" ]
|
||||
if [ -d "$BOOST_ARCH_PATH/include/boost" ] || \
|
||||
[ "${BOOST_ARCH_PATH##*-}" = system -a -d /usr/include/boost ]
|
||||
then
|
||||
wmake $targetType SloanRenumber
|
||||
else
|
||||
echo
|
||||
echo "Skipping SloanRenumber"
|
||||
echo "Skipping SloanRenumber (no boost)"
|
||||
echo
|
||||
fi
|
||||
|
||||
|
||||
if [ -n "$ZOLTAN_ARCH_PATH" ]
|
||||
if [ -d "$ZOLTAN_ARCH_PATH" ]
|
||||
then
|
||||
wmake $targetType zoltanRenumber
|
||||
else
|
||||
|
||||
@ -157,8 +157,15 @@ then
|
||||
# For all the sub-directories containing a 'Make' directory
|
||||
for dir in `find . \( -type d -a -name Make \)`
|
||||
do
|
||||
dir=${dir%/Make} # Parent directory - trim /Make from the end
|
||||
echo $dir
|
||||
$0 ${dir%/Make} # Parent directory - trim /Make from the end
|
||||
# If Allwclean exists execute otherwise wclean
|
||||
if [ -e "$dir/Allwclean" ]
|
||||
then
|
||||
$dir/Allwclean
|
||||
else
|
||||
$0 $dir
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user