Merge branch 'olesenm'

This commit is contained in:
andy
2011-03-08 13:59:37 +00:00
43 changed files with 285 additions and 195 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
wmakeCheckPwd "$WM_PROJECT_DIR/src" || {
echo "Error: Current directory is not \$WM_PROJECT_DIR/src"
@ -25,49 +25,49 @@ wmakeLnInclude OSspecific/${WM_OSTYPE:-POSIX}
Pstream/Allwmake $*
OSspecific/${WM_OSTYPE:-POSIX}/Allwmake
wmake $makeOption OpenFOAM
wmake $makeType OpenFOAM
wmake $makeOption fileFormats
wmake $makeOption triSurface
wmake $makeOption meshTools
wmake $makeOption edgeMesh
wmake $makeOption surfMesh
wmake $makeType fileFormats
wmake $makeType triSurface
wmake $makeType meshTools
wmake $makeType edgeMesh
wmake $makeType surfMesh
# Decomposition methods needed by dummyThirdParty
parallel/decompose/AllwmakeLnInclude
# dummyThirdParty (dummy metisDecomp, scotchDecomp etc) needed by e.g. meshTools
dummyThirdParty/Allwmake $*
wmake $makeOption finiteVolume
wmake $makeOption lagrangian/basic
wmake $makeOption lagrangian/distributionModels
wmake $makeOption genericPatchFields
wmake $makeType finiteVolume
wmake $makeType lagrangian/basic
wmake $makeType lagrangian/distributionModels
wmake $makeType genericPatchFields
# Build the proper scotchDecomp, metisDecomp etc.
parallel/Allwmake $*
wmake $makeOption conversion
wmake $makeType conversion
wmake $makeOption sampling
wmake $makeType sampling
wmake $makeOption dynamicMesh
wmake $makeOption dynamicFvMesh
wmake $makeOption topoChangerFvMesh
wmake $makeType dynamicMesh
wmake $makeType dynamicFvMesh
wmake $makeType topoChangerFvMesh
wmake $makeOption ODE
wmake $makeOption randomProcesses
wmake $makeType ODE
wmake $makeType randomProcesses
thermophysicalModels/Allwmake $*
transportModels/Allwmake $*
turbulenceModels/Allwmake $*
wmake $makeOption surfaceFilmModels
wmake $makeType surfaceFilmModels
lagrangian/Allwmake $*
postProcessing/Allwmake $*
mesh/Allwmake $*
fvAgglomerationMethods/Allwmake $*
wmake $makeOption fvMotionSolver
wmake $makeOption engine
wmake $makeType fvMotionSolver
wmake $makeType engine
# ----------------------------------------------------------------- end-of-file

View File

@ -373,6 +373,7 @@ void Foam::dynamicCode::setFilterContext
const dynamicCodeContext& context
)
{
filterVars_.set("localCode", context.localCode());
filterVars_.set("code", context.code());
filterVars_.set("codeInclude", context.include());
filterVars_.set("SHA1sum", context.sha1().str());
@ -523,7 +524,7 @@ bool Foam::dynamicCode::copyOrCreateFiles(const bool verbose) const
bool Foam::dynamicCode::wmakeLibso() const
{
const Foam::string wmakeCmd("wmake libso " + this->codeRelPath());
const Foam::string wmakeCmd("wmake -s libso " + this->codeRelPath());
Info<< "Invoking " << wmakeCmd << endl;
if (Foam::system(wmakeCmd))

View File

@ -35,6 +35,7 @@ Foam::dynamicCodeContext::dynamicCodeContext(const dictionary& dict)
:
dict_(dict),
code_(stringOps::trim(dict["code"])),
localCode_(),
include_(),
options_()
{
@ -45,6 +46,13 @@ Foam::dynamicCodeContext::dynamicCodeContext(const dictionary& dict)
// - necessary for compilation options, convenient for includes
// and body.
// optional
if (dict.found("localCode"))
{
localCode_ = stringOps::trim(dict["localCode"]);
stringOps::inplaceExpand(localCode_, dict);
}
// optional
if (dict.found("codeInclude"))
{
@ -59,9 +67,9 @@ Foam::dynamicCodeContext::dynamicCodeContext(const dictionary& dict)
stringOps::inplaceExpand(options_, dict);
}
// calculate SHA1 digest from include, options, code
// calculate SHA1 digest from include, options, localCode, code
OSHA1stream os;
os << include_ << options_ << code_;
os << include_ << options_ << localCode_ << code_;
sha1_ = os.digest();
}

View File

@ -57,6 +57,9 @@ class dynamicCodeContext
//- Mandatory "code" entry
string code_;
//- Optional "localCode" entry
string localCode_;
//- Optional "codeInclude" entry
string include_;
@ -99,6 +102,12 @@ public:
return code_;
}
//- Return the local (file-scope) code
const string& localCode() const
{
return localCode_;
}
//- Return SHA1 digest calculated from include, options, code
const SHA1Digest& sha1() const
{

View File

@ -1,9 +1,9 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
set -x
wmake $makeOption dummy
wmake $makeType dummy
case "$WM_MPLIB" in
*MPI*)
@ -13,11 +13,11 @@ case "$WM_MPLIB" in
echo
set -x
# force compilation into qualified directory
WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB wmake $makeOption mpi
WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB wmake $makeType mpi
;;
#GAMMA)
# wmake $makeOption gamma
# wmake $makeType gamma
# ;;
esac

View File

@ -1,8 +1,8 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
set -x
wmake $makeOption
wmake $makeType
# ----------------------------------------------------------------- end-of-file

View File

@ -1,12 +1,12 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
set -x
wmake $makeOption scotchDecomp
wmake $makeOption ptscotchDecomp
wmake $makeOption metisDecomp
wmake $makeOption MGridGen
wmake $makeType scotchDecomp
wmake $makeType ptscotchDecomp
wmake $makeType metisDecomp
wmake $makeType MGridGen
# ----------------------------------------------------------------- end-of-file

View File

@ -45,6 +45,7 @@ const Foam::word Foam::codedFixedValueFvPatchScalarField::codeTemplateC
const Foam::word Foam::codedFixedValueFvPatchScalarField::codeTemplateH
= "fixedValueFvPatchScalarFieldTemplate.H";
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
void* Foam::codedFixedValueFvPatchScalarField::loadLibrary
@ -352,7 +353,7 @@ codedFixedValueFvPatchScalarField
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper),
dict_(ptf.dict_),
redirectType_(ptf.redirectType_),
oldLibPath_(),
oldLibPath_(ptf.oldLibPath_),
redirectPatchFieldPtr_()
{}
@ -384,7 +385,7 @@ codedFixedValueFvPatchScalarField
fixedValueFvPatchField<scalar>(ptf),
dict_(ptf.dict_),
redirectType_(ptf.redirectType_),
oldLibPath_(),
oldLibPath_(ptf.oldLibPath_),
redirectPatchFieldPtr_()
{}
@ -399,7 +400,7 @@ codedFixedValueFvPatchScalarField
fixedValueFvPatchField<scalar>(ptf, iF),
dict_(ptf.dict_),
redirectType_(ptf.redirectType_),
oldLibPath_(),
oldLibPath_(ptf.oldLibPath_),
redirectPatchFieldPtr_()
{}
@ -412,7 +413,7 @@ Foam::codedFixedValueFvPatchScalarField::redirectPatchField() const
if (!redirectPatchFieldPtr_.valid())
{
// Construct a patch
// Make sure to construct the patchfield with uptodate value.
// Make sure to construct the patchfield with up-to-date value
OStringStream os;
os.writeKeyword("type") << redirectType_ << token::END_STATEMENT
@ -420,19 +421,6 @@ Foam::codedFixedValueFvPatchScalarField::redirectPatchField() const
static_cast<const scalarField&>(*this).writeEntry("value", os);
IStringStream is(os.str());
dictionary dict(is);
// Info<< "constructing patchField from :" << dict << endl;
// if (fvPatchScalarField::dictionaryConstructorTablePtr_)
// {
// fvPatchScalarField::dictionaryConstructorPtr funcPtr =
// (
// fvPatchScalarField::dictionaryConstructorTablePtr_->
// find(redirectType_)()
// );
//
// Info<< redirectType_ << " FunctionPtr => "
// << long(funcPtr) << endl;
// }
redirectPatchFieldPtr_.set
(
@ -455,7 +443,7 @@ void Foam::codedFixedValueFvPatchScalarField::updateCoeffs()
return;
}
// Make sure library containing user-defined fvPatchField is uptodate
// Make sure library containing user-defined fvPatchField is up-to-date
updateLibrary();
const fvPatchScalarField& fvp = redirectPatchField();
@ -474,7 +462,7 @@ void Foam::codedFixedValueFvPatchScalarField::evaluate
const Pstream::commsTypes commsType
)
{
// Make sure library containing user-defined fvPatchField is uptodate
// Make sure library containing user-defined fvPatchField is up-to-date
updateLibrary();
const fvPatchScalarField& fvp = redirectPatchField();

View File

@ -119,6 +119,7 @@ class codedFixedValueFvPatchScalarField
//- Global loader/unloader function type
typedef void (*loaderFunctionType)(bool);
//- Load specified library and execute globalFuncName(true)
static void* loadLibrary
(
const fileName& libPath,
@ -126,6 +127,7 @@ class codedFixedValueFvPatchScalarField
const dictionary& contextDict
);
//- Execute globalFuncName(false) and unload specified library
static void unloadLibrary
(
const fileName& libPath,
@ -134,6 +136,7 @@ class codedFixedValueFvPatchScalarField
);
//- Create library based on the dynamicCodeContext
void createLibrary(dynamicCode&, const dynamicCodeContext&) const;
//- Update library as required

View File

@ -1,13 +1,13 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
set -x
export ParMGridGen=$WM_THIRD_PARTY_DIR/ParMGridGen-1.0
if [ -d "$ParMGridGen/MGridGen/Lib" ]
then
wmake $makeOption MGridGenGamgAgglomeration
wmake $makeType MGridGenGamgAgglomeration
fi
wmake libso pairPatchAgglomeration

View File

@ -1,15 +1,15 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
set -x
wmake $makeOption distributionModels
wmake $makeOption basic
wmake $makeOption solidParticle
wmake $makeOption intermediate
wmake $makeOption dieselSpray
wmake $makeOption dsmc
wmake $makeOption coalCombustion
wmake $makeType distributionModels
wmake $makeType basic
wmake $makeType solidParticle
wmake $makeType intermediate
wmake $makeType dieselSpray
wmake $makeType dsmc
wmake $makeType coalCombustion
molecularDynamics/Allwmake $*

View File

@ -1,10 +1,10 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
set -x
wmake $makeOption potential
wmake $makeOption molecularMeasurements
wmake $makeOption molecule
wmake $makeType potential
wmake $makeType molecularMeasurements
wmake $makeType molecule
# ----------------------------------------------------------------- end-of-file

View File

@ -1,9 +1,9 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
set -x
wmake $makeOption autoMesh
wmake $makeOption blockMesh
wmake $makeType autoMesh
wmake $makeType blockMesh
# ----------------------------------------------------------------- end-of-file

View File

@ -1,11 +1,11 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
set -x
decompose/Allwmake $*
reconstruct/Allwmake $*
wmake $makeOption distributed
wmake $makeType distributed
# ----------------------------------------------------------------- end-of-file

View File

@ -1,6 +1,6 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
# get SCOTCH_VERSION, SCOTCH_ARCH_PATH
settings=`$WM_PROJECT_DIR/bin/foamEtcFile apps/scotch/bashrc`
@ -17,17 +17,17 @@ set -x
wmakeLnInclude decompositionMethods
wmake $makeOption scotchDecomp
wmake $makeType scotchDecomp
if [ -d "$FOAM_LIBBIN/$FOAM_MPI" ]
then
(
WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB
wmake $makeOption ptscotchDecomp
wmake $makeType ptscotchDecomp
)
fi
wmake $makeOption decompositionMethods
wmake $makeType decompositionMethods
# ----------------------------------------------------------------- end-of-file

View File

@ -1,8 +1,8 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
set -x
wmake $makeOption reconstruct
wmake $makeType reconstruct
# ----------------------------------------------------------------- end-of-file

View File

@ -1,10 +1,10 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
set -x
wmake libo postCalc
wmake $makeOption foamCalcFunctions
wmake $makeType foamCalcFunctions
functionObjects/Allwmake $*

View File

@ -1,13 +1,13 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
set -x
wmake $makeOption field
wmake $makeOption forces
wmake $makeOption IO
wmake $makeOption utilities
wmake $makeOption jobControl
wmake $makeOption systemCall
wmake $makeType field
wmake $makeType forces
wmake $makeType IO
wmake $makeType utilities
wmake $makeType jobControl
wmake $makeType systemCall
# ----------------------------------------------------------------- end-of-file

View File

@ -1,24 +1,24 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
set -x
wmake $makeOption specie
wmake $makeOption solid
wmake $makeOption thermophysicalFunctions
wmake $makeType specie
wmake $makeType solid
wmake $makeType thermophysicalFunctions
./properties/Allwmake $*
wmake $makeOption basic
wmake $makeOption reactionThermo
wmake $makeOption laminarFlameSpeed
wmake $makeOption chemistryModel
wmake $makeOption barotropicCompressibilityModel
wmake $makeOption thermalPorousZone
wmake $makeOption SLGThermo
wmake $makeType basic
wmake $makeType reactionThermo
wmake $makeType laminarFlameSpeed
wmake $makeType chemistryModel
wmake $makeType barotropicCompressibilityModel
wmake $makeType thermalPorousZone
wmake $makeType SLGThermo
# Should be combined with solids&solidMixture
wmake $makeOption basicSolidThermo
wmake $makeType basicSolidThermo
wmake $makeOption radiationModels
wmake $makeType radiationModels
# ----------------------------------------------------------------- end-of-file

View File

@ -1,12 +1,12 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
set -x
wmake $makeOption liquidProperties
wmake $makeOption liquidMixtureProperties
wmake $makeOption solidProperties
wmake $makeOption solidMixtureProperties
wmake $makeType liquidProperties
wmake $makeType liquidMixtureProperties
wmake $makeType solidProperties
wmake $makeType solidMixtureProperties
# ----------------------------------------------------------------- end-of-file

View File

@ -1,11 +1,11 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
set -x
wmake $makeOption incompressible
wmake $makeOption interfaceProperties
wmake $makeOption twoPhaseInterfaceProperties
# wmake $makeOption compressible
wmake $makeType incompressible
wmake $makeType interfaceProperties
wmake $makeType twoPhaseInterfaceProperties
# wmake $makeType compressible
# ----------------------------------------------------------------- end-of-file

View File

@ -1,11 +1,11 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
set -x
wmakeLnInclude ../incompressible/LES
wmake $makeOption LESfilters
wmake $makeOption LESdeltas
wmake $makeType LESfilters
wmake $makeType LESdeltas
# ----------------------------------------------------------------- end-of-file

View File

@ -1,10 +1,10 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
set -x
wmake $makeOption turbulenceModel
wmake $makeOption RAS
wmake $makeOption LES
wmake $makeType turbulenceModel
wmake $makeType RAS
wmake $makeType LES
# ----------------------------------------------------------------- end-of-file

View File

@ -1,10 +1,10 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
makeType=${1:-libso}
set -x
wmake $makeOption turbulenceModel
wmake $makeOption RAS
wmake $makeOption LES
wmake $makeType turbulenceModel
wmake $makeType RAS
wmake $makeType LES
# ----------------------------------------------------------------- end-of-file