Commit 038356cd authored by Andrew Heather's avatar Andrew Heather
Browse files

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

parents 208de6b3 45198c58
......@@ -2582,7 +2582,7 @@ int main(int argc, char *argv[])
|| procStat == fvMesh::TOPO_PATCH_CHANGE
)
{
Info<< " Detected topology change; reconstructing addressing"
Info<< " Detected topology change; reconstructing addressing"
<< nl << endl;
if (baseMeshPtr.valid())
......
......@@ -180,16 +180,29 @@ cloneCase()
fi
}
# Overwrite 0/ with the contents of 0.org/ if it exists
# Overwrite 0/ with the contents of 0.org/ if it exists.
# The -processor option to do the processor directories instead
#
restore0Dir()
{
echo "Restore 0/ from 0.org/"
if [ -d 0.org ]
if [ "$1" = "-processor" ]
then
\rm -rf 0
\cp -r 0.org 0 > /dev/null 2>&1
echo "Restore 0/ from 0.org/ for processor directories"
[ -d 0.org ] || echo " Warning: no 0.org/ found"
# do nonetheless
\ls -d processor* | xargs -I {} \rm -rf ./{}/0
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0 > /dev/null 2>&1
else
echo " Warning: no 0.org/ found"
echo "Restore 0/ from 0.org/"
if [ -d 0.org ]
then
\rm -rf 0
\cp -r 0.org 0 > /dev/null 2>&1
else
echo " Warning: no 0.org/ found"
fi
fi
}
......
......@@ -71,9 +71,6 @@ case ThirdParty:
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
......@@ -87,4 +84,13 @@ case ThirdParty:
endsw
endsw
# common settings (system or ThirdParty)
switch ("$WM_COMPILER")
case Clang:
# Using clang - not gcc
setenv WM_CC 'clang'
setenv WM_CXX 'clang++'
breaksw
endsw
#------------------------------------------------------------------------------
......@@ -253,26 +253,21 @@ case ThirdParty:
# Add ThirdParty gmp/mpfr/mpc libraries to run-time environment
if ( "${gmpDir:t}" != "gmp-system" ) then
_foamAddLib $gmpDir/lib$WM_COMPILER_LIB_ARCH
setenv GMP_ARCH_PATH $gmpDir # For ThirdParty CGAL
endif
if ( "${mpfrDir:t}" != "mpfr-system" ) then
_foamAddLib $mpfrDir/lib$WM_COMPILER_LIB_ARCH
setenv MPFR_ARCH_PATH $mpfrDir # For ThirdParty CGAL
endif
if ( "${mpcDir:t}" != "mpc-system" ) then
_foamAddLib $mpcDir/lib$WM_COMPILER_LIB_ARCH
endif
# Used by boost/CGAL:
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
if ( $?clang_version ) then
set clangDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$clang_version
......@@ -295,6 +290,9 @@ case ThirdParty:
echo " ${clangDir:t}"
endif
endif
unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
unset clang_version clangDir
breaksw
......@@ -308,6 +306,5 @@ endsw
# Cleanup environment:
# ~~~~~~~~~~~~~~~~~~~~
#- keep _foamAddPath _foamAddLib _foamAddMan
unsetenv WM_COMPILER_TYPE
#------------------------------------------------------------------------------
......@@ -64,6 +64,7 @@ unsetenv WM_ARCH_OPTION
unsetenv WM_CC
unsetenv WM_CFLAGS
unsetenv WM_COMPILER
unsetenv WM_COMPILER_ARCH
unsetenv WM_COMPILER_LIB_ARCH
unsetenv WM_COMPILE_OPTION
unsetenv WM_CXX
......@@ -128,6 +129,16 @@ unsetenv ParaView_DIR
unsetenv ParaView_INCLUDE_DIR
unsetenv PV_PLUGIN_PATH
#------------------------------------------------------------------------------
# unset other ThirdParty environment variables
unsetenv BOOST_ARCH_PATH
unsetenv CCMIO_ARCH_PATH
unsetenv CGAL_ARCH_PATH
unsetenv FFTW_ARCH_PATH
unsetenv GMP_ARCH_PATH
unsetenv MPFR_ARCH_PATH
unsetenv SCOTCH_ARCH_PATH
#------------------------------------------------------------------------------
# cleanup environment
......
......@@ -69,9 +69,6 @@ OpenFOAM | ThirdParty)
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
;;
......@@ -84,7 +81,15 @@ OpenFOAM | ThirdParty)
;;
esac
;;
esac
# common settings (system or ThirdParty)
case "$WM_COMPILER" in
Clang)
# Using clang - not gcc
export WM_CC='clang'
export WM_CXX='clang++'
;;
esac
#------------------------------------------------------------------------------
......@@ -246,28 +246,24 @@ OpenFOAM | ThirdParty)
if [ "${gmpDir##*-}" != system ]
then
_foamAddLib $gmpDir/lib$WM_COMPILER_LIB_ARCH
export GMP_ARCH_PATH=$gmpDir # For ThirdParty CGAL
fi
if [ "${mpfrDir##*-}" != system ]
then
_foamAddLib $mpfrDir/lib$WM_COMPILER_LIB_ARCH
export MPFR_ARCH_PATH=$mpfrDir # For ThirdParty CGAL
fi
if [ "${mpcDir##*-}" != system ]
then
_foamAddLib $mpcDir/lib$WM_COMPILER_LIB_ARCH
fi
# Used by boost/CGAL:
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
if [ -n "$clang_version" ]
then
......@@ -293,6 +289,9 @@ OpenFOAM | ThirdParty)
echo " ${clangDir##*/}"
fi
fi
unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
unset clang_version clangDir
;;
*)
......
......@@ -51,6 +51,7 @@ unset WM_ARCH_OPTION
unset WM_CC
unset WM_CFLAGS
unset WM_COMPILER
unset WM_COMPILER_ARCH
unset WM_COMPILER_LIB_ARCH
unset WM_COMPILE_OPTION
unset WM_CXX
......@@ -115,6 +116,16 @@ unset ParaView_DIR
unset ParaView_INCLUDE_DIR
unset PV_PLUGIN_PATH
#------------------------------------------------------------------------------
# unset other ThirdParty environment variables
unset BOOST_ARCH_PATH
unset CCMIO_ARCH_PATH
unset CGAL_ARCH_PATH
unset FFTW_ARCH_PATH
unset GMP_ARCH_PATH
unset MPFR_ARCH_PATH
unset SCOTCH_ARCH_PATH
#------------------------------------------------------------------------------
# cleanup environment
......
......@@ -182,7 +182,6 @@ Foam::Ostream& Foam::ensightFile::write(const char* value)
}
return *this;
}
......
......@@ -144,7 +144,7 @@ public:
using Ostream::write;
//- Binary write
virtual Ostream& write(const char* buf, std::streamsize count);
virtual Ostream& write(const char*, std::streamsize count);
//- Write element keyword with trailing newline, optionally with undef
virtual Ostream& writeKeyword(const keyType&);
......@@ -156,19 +156,19 @@ public:
Ostream& writeUndef();
//- Write C-string as "%79s" or as binary (max 80 chars)
Ostream& write(const char* value);
Ostream& write(const char*);
//- Write string as "%79s" or as binary (max 80 chars)
Ostream& write(const string& value);
Ostream& write(const string&);
//- Write integer as "%10d" or as binary
Ostream& write(const label value);
Ostream& write(const label);
//- Write integer with specified width or as binary
Ostream& write(const label value, const label fieldWidth);
Ostream& write(const label, const label fieldWidth);
//- Write float as "%12.5e" or as binary
Ostream& write(const scalar value);
Ostream& write(const scalar);
//- Add carriage return to ascii stream
void newline();
......
......@@ -25,6 +25,8 @@ License
#include "ensightGeoFile.H"
#include "IOstreams.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::ensightGeoFile::initialize()
......@@ -74,7 +76,10 @@ Foam::ensightGeoFile::~ensightGeoFile()
Foam::Ostream& Foam::ensightGeoFile::writeKeyword(const keyType& key)
{
write(key); newline();
// Note: make sure to hit ensightFile::write(const string&)
write(string(key));
newline();
return *this;
}
......
......@@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
rm -rf 0 > /dev/null 2>&1
\rm -rf 0 > /dev/null 2>&1
cleanCase
......
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 1;
boundaryField
{
sides
{
type zeroGradient;
}
empty
{
type empty;
}
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
sides
{
type zeroGradient;
}
empty
{
type empty;
}
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
sides
{
type zeroGradient;
}
empty
{
type empty;
}
}
// ************************************************************************* //
......@@ -4,8 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
# Remove 0.org/ copy
\rm -rf 0
\cp -r 0.org 0
cleanCase
cleanSamples
......
......@@ -4,6 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
restore0Dir
runApplication blockMesh
runApplication setFields
runApplication $(getApplication)
......
......@@ -46,8 +46,8 @@ boundaryField
outlet
{
type inletOutlet;
value $internalField;
inletValue $internalField;
value $internalField;
}
}
......
......@@ -35,19 +35,19 @@ boundaryField
porosityWall
{
type slip;
value uniform (0 0 0);
value $internalField;
}
inlet
{
type flowRateInletVelocity;
massFlowRate constant 0.1;
value uniform (0 0 0);
value $internalField;
}
outlet
{
type inletOutlet;
value uniform (0 0 0);
inletValue uniform (0 0 0);
inletValue $internalField;
value $internalField;
}
}
......
......@@ -24,32 +24,32 @@ boundaryField
front
{
type compressible::alphatWallFunction;
value uniform 0;
value $internalField;
}
back
{
type compressible::alphatWallFunction;
value uniform 0;
value $internalField;
}
walls
{
type compressible::alphatWallFunction;
value uniform 0;
value $internalField;
}
porosityWall
{
type compressible::alphatWallFunction;
value uniform 0;
value $internalField;
}
inlet
{
type calculated;
value uniform 0;
value $internalField;
}
outlet
{
type calculated;
value uniform 0;
value $internalField;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment