mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'olesenm'
This commit is contained in:
@ -33,10 +33,20 @@ writeInterval #codeStream
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
#};
|
||||
|
||||
localCode
|
||||
#{
|
||||
static int someCode()
|
||||
{
|
||||
Info<<"called someCode\n";
|
||||
return 10;
|
||||
}
|
||||
#};
|
||||
|
||||
code
|
||||
#{
|
||||
label interval = ($endIter - $begIter);
|
||||
label nDumps = $nDumps;
|
||||
// label nDumps = $nDumps;
|
||||
label nDumps = someCode();
|
||||
os << (interval / nDumps);
|
||||
#};
|
||||
};
|
||||
|
||||
@ -8,4 +8,3 @@ EXE_LIBS = \
|
||||
-ldynamicMesh \
|
||||
-lfiniteVolume \
|
||||
-lcompressibleRASModels
|
||||
|
||||
|
||||
@ -34,26 +34,37 @@ Description
|
||||
${codeInclude}
|
||||
//}}} end codeInclude
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
|
||||
|
||||
//{{{ begin localCode
|
||||
${localCode}
|
||||
//}}} end localCode
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||
|
||||
extern "C"
|
||||
{
|
||||
void ${typeName}
|
||||
(
|
||||
Ostream& os,
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
void ${typeName}
|
||||
(
|
||||
Ostream& os,
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
//{{{ begin code
|
||||
${code};
|
||||
${code}
|
||||
//}}} end code
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -38,6 +38,13 @@ ${codeInclude}
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
|
||||
|
||||
//{{{ begin localCode
|
||||
${localCode}
|
||||
//}}} end localCode
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||
|
||||
extern "C"
|
||||
@ -60,6 +67,17 @@ extern "C"
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
makeRemovablePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
${typeName}FixedValueFvPatchScalarField
|
||||
);
|
||||
|
||||
|
||||
const char* ${typeName}FixedValueFvPatchScalarField::SHA1sum = "${SHA1sum}";
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -177,22 +195,13 @@ void ${typeName}FixedValueFvPatchScalarField::updateCoeffs()
|
||||
}
|
||||
|
||||
//{{{ begin code
|
||||
${code};
|
||||
${code}
|
||||
//}}} end code
|
||||
|
||||
fixedValueFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeRemovablePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
${typeName}FixedValueFvPatchScalarField
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -55,6 +55,9 @@ class ${typeName}FixedValueFvPatchScalarField
|
||||
|
||||
public:
|
||||
|
||||
//- Information about the SHA1 of the code itself
|
||||
static const char* SHA1sum;
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("${typeName}");
|
||||
|
||||
|
||||
@ -64,8 +64,8 @@ set foamCompiler=system
|
||||
# WM_COMPILER = Gcc | Gcc43 | Gcc44 | Gcc45 | Clang | Icc (Intel icc)
|
||||
setenv WM_COMPILER Gcc
|
||||
setenv WM_COMPILER_ARCH # defined but empty
|
||||
setenv WM_COMPILER_LIB_ARCH # defined but empty
|
||||
#
|
||||
unsetenv WM_COMPILER_LIB_ARCH
|
||||
|
||||
#- Architecture:
|
||||
# WM_ARCH_OPTION = 32 | 64
|
||||
setenv WM_ARCH_OPTION 64
|
||||
|
||||
@ -164,18 +164,19 @@ case ThirdParty:
|
||||
_foamAddMan $gccDir/man
|
||||
_foamAddPath $gccDir/bin
|
||||
|
||||
# add compiler libraries to run-time environment
|
||||
# 64-bit needs lib64, but 32-bit needs lib (not lib32)
|
||||
if ($WM_ARCH_OPTION == 64) then
|
||||
if ($WM_ARCH_OPTION == 64 && $?WM_COMPILER_LIB_ARCH) then
|
||||
_foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH
|
||||
else
|
||||
_foamAddLib $gccDir/lib
|
||||
endif
|
||||
|
||||
# add in gmp/mpfr libraries
|
||||
# add gmp/mpfr libraries to run-time environment
|
||||
_foamAddLib $gmpDir/lib
|
||||
_foamAddLib $mpfrDir/lib
|
||||
|
||||
# add in mpc libraries (not need for older gcc)
|
||||
# add mpc libraries (not need for older gcc) to run-time environment
|
||||
if ( $?mpc_version ) then
|
||||
_foamAddLib $mpcDir/lib
|
||||
endif
|
||||
|
||||
@ -182,6 +182,7 @@ OpenFOAM | ThirdParty)
|
||||
_foamAddMan $gccDir/man
|
||||
_foamAddPath $gccDir/bin
|
||||
|
||||
# add compiler libraries to run-time environment
|
||||
# 64-bit needs lib64, but 32-bit needs lib (not lib32)
|
||||
if [ "$WM_ARCH_OPTION" = 64 ]
|
||||
then
|
||||
@ -190,11 +191,12 @@ OpenFOAM | ThirdParty)
|
||||
_foamAddLib $gccDir/lib
|
||||
fi
|
||||
|
||||
# add in gmp/mpfr libraries
|
||||
|
||||
# add gmp/mpfr libraries to run-time environment
|
||||
_foamAddLib $gmpDir/lib
|
||||
_foamAddLib $mpfrDir/lib
|
||||
|
||||
# add in mpc libraries (not need for older gcc)
|
||||
# add mpc libraries (not need for older gcc) to run-time environment
|
||||
if [ -n "$mpc_version" ]
|
||||
then
|
||||
_foamAddLib $mpcDir/lib
|
||||
|
||||
42
src/Allwmake
42
src/Allwmake
@ -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
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
{
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
10
src/dummyThirdParty/Allwmake
vendored
10
src/dummyThirdParty/Allwmake
vendored
@ -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
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 $*
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 $*
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -82,4 +82,5 @@ fluxRequired
|
||||
default no;
|
||||
p;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#-------------------------------*- makefile -*---------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
CPP = cpp -traditional-cpp $(GFLAGS)
|
||||
|
||||
PROJECT_LIBS = -l$(WM_PROJECT) -ldl
|
||||
|
||||
include $(GENERAL_RULES)/standard
|
||||
|
||||
41
wmake/wclean
41
wmake/wclean
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -40,6 +40,7 @@ Usage: $Script [OPTION] [dir]
|
||||
$Script [OPTION] target [dir [MakeDir]]
|
||||
|
||||
options:
|
||||
-s | -silent ignored - for compatibility with wmake
|
||||
-help print the usage
|
||||
|
||||
Clean up the wmake control directory Make/\$WM_OPTIONS and remove the
|
||||
@ -52,21 +53,35 @@ The targets correspond to a subset of the 'wmake' special targets:
|
||||
clean Make, any *.dep files and lnInclude directories
|
||||
|
||||
USAGE
|
||||
exit 1
|
||||
exit 1
|
||||
}
|
||||
|
||||
# provide immediate help
|
||||
if [ "$1" = "-h" -o "$1" = "-help" ]
|
||||
then
|
||||
usage
|
||||
fi
|
||||
|
||||
# parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-h | -help)
|
||||
usage
|
||||
;;
|
||||
-s | -silent) # ignored - for compatibility with wmake
|
||||
shift
|
||||
;;
|
||||
-*)
|
||||
usage "unknown option: '$*'"
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# check arguments and change to the directory in which to run wmake
|
||||
# check arguments and change to the directory in which to run wclean
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
unset dir makeOption
|
||||
unset dir makeType
|
||||
MakeDir=Make
|
||||
|
||||
if [ $# -ge 1 ]
|
||||
@ -76,7 +91,7 @@ then
|
||||
then
|
||||
dir=$1
|
||||
else
|
||||
makeOption=$1
|
||||
makeType=$1
|
||||
fi
|
||||
|
||||
# specified directory name:
|
||||
@ -101,7 +116,7 @@ fi
|
||||
# Recurse the directories tree
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if [ "$makeOption" = all ]
|
||||
if [ "$makeType" = all ]
|
||||
then
|
||||
if [ -e Allwclean ] # consistent with Allwmake
|
||||
then
|
||||
@ -121,8 +136,8 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
# makeOption is not needed beyond this point
|
||||
unset makeOption
|
||||
# makeType is not needed beyond this point
|
||||
unset makeType
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
49
wmake/wmake
49
wmake/wmake
@ -40,8 +40,10 @@ Usage: $Script [OPTION] [dir]
|
||||
$Script [OPTION] target [dir [MakeDir]]
|
||||
|
||||
options:
|
||||
-s | -silent invoke make in 'silent' mode (do not echo commands)
|
||||
-help print the usage
|
||||
|
||||
|
||||
A general, easy-to-use make system for multi-platform development
|
||||
|
||||
The 'target' is a Makefile target:
|
||||
@ -59,12 +61,28 @@ USAGE
|
||||
exit 1
|
||||
}
|
||||
|
||||
# provide immediate help, even if environment is not set
|
||||
if [ "$1" = "-h" -o "$1" = "-help" ]
|
||||
then
|
||||
usage
|
||||
fi
|
||||
# normally use "make"
|
||||
make="make"
|
||||
|
||||
# parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-h | -help)
|
||||
usage
|
||||
;;
|
||||
-s | -silent)
|
||||
make="$make -s"
|
||||
shift
|
||||
;;
|
||||
-*)
|
||||
usage "unknown option: '$*'"
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
#
|
||||
# check environment variables
|
||||
@ -77,6 +95,7 @@ do
|
||||
}
|
||||
done
|
||||
|
||||
|
||||
# when compiling anything but a standalone exe:
|
||||
# WM_PROJECT and WM_PROJECT_DIR must be set
|
||||
[ "$1" = exe -o \( "$WM_PROJECT" -a "$WM_PROJECT_DIR" \) ] || {
|
||||
@ -91,8 +110,6 @@ done
|
||||
# Select the version of make to be used
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
make="make"
|
||||
|
||||
# set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set
|
||||
if [ -z "$WM_NCOMPPROCS" -a -n "$WM_HOSTS" -a -n "$WM_SCHEDULER" ]
|
||||
then
|
||||
@ -113,7 +130,7 @@ then
|
||||
mkdir -p $lockDir
|
||||
fi
|
||||
|
||||
make="make --no-print-directory -j "$WM_NCOMPPROCS
|
||||
make="$make --no-print-directory -j "$WM_NCOMPPROCS
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -122,7 +139,7 @@ fi
|
||||
# check arguments and change to the directory in which to run wmake
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
unset dir makeOption
|
||||
unset dir makeType
|
||||
MakeDir=Make
|
||||
|
||||
if [ $# -ge 1 ]
|
||||
@ -131,7 +148,7 @@ then
|
||||
then
|
||||
dir=$1
|
||||
else
|
||||
makeOption=$1
|
||||
makeType=$1
|
||||
fi
|
||||
|
||||
# specified directory name:
|
||||
@ -154,7 +171,7 @@ fi
|
||||
# Recurse the application directories tree
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if [ "$makeOption" = all ]
|
||||
if [ "$makeType" = all ]
|
||||
then
|
||||
if [ -e Allwmake ]
|
||||
then
|
||||
@ -187,12 +204,12 @@ fi
|
||||
|
||||
# transform "all" option to "libso" if that looks appropriate or remove it
|
||||
# so that the call to make builds the application
|
||||
if [ "$makeOption" = all ]
|
||||
if [ "$makeType" = all ]
|
||||
then
|
||||
unset makeOption
|
||||
unset makeType
|
||||
if grep -e '^ *LIB *=' "$MakeDir/files" >/dev/null 2>&1
|
||||
then
|
||||
makeOption=libso
|
||||
makeType=libso
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -226,7 +243,7 @@ OBJECTS_DIR=$MakeDir/$WM_OPTIONS
|
||||
|
||||
touch $OBJECTS_DIR/dontIncludeDeps
|
||||
|
||||
case "$makeOption" in
|
||||
case "$makeType" in
|
||||
lib | libo | libso )
|
||||
$make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/dontIncludeDeps lnInclude/uptodate
|
||||
;;
|
||||
@ -241,7 +258,7 @@ rc=$?
|
||||
# make the object files and link
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cmd="$make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/includeDeps $makeOption"
|
||||
cmd="$make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/includeDeps $makeType"
|
||||
# echo "cmd=$cmd"
|
||||
exec $cmd
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -40,10 +40,16 @@
|
||||
Script=${0##*/}
|
||||
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
usage: $Script [-f] <dir>
|
||||
Usage: $Script [OPTION] dir
|
||||
|
||||
options:
|
||||
-f | -force force update
|
||||
-s | -silent use 'silent' mode (do not echo command)
|
||||
-help print the usage
|
||||
|
||||
Link all the source files in the <dir> into <dir>/lnInclude
|
||||
|
||||
@ -63,7 +69,7 @@ unset findOpt
|
||||
# default 'ln' option
|
||||
lnOpt="-s"
|
||||
|
||||
unset forceUpdate
|
||||
unset forceUpdate silentOpt
|
||||
|
||||
# simple parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
@ -72,10 +78,14 @@ do
|
||||
-h | -help) # provide immediate help
|
||||
usage
|
||||
;;
|
||||
-f)
|
||||
shift
|
||||
-f | -force)
|
||||
forceUpdate=true
|
||||
lnOpt="-sf"
|
||||
shift
|
||||
;;
|
||||
-s | -silent)
|
||||
silentOpt=true
|
||||
shift
|
||||
;;
|
||||
-*)
|
||||
usage "unknown option: '$*'"
|
||||
@ -128,10 +138,12 @@ fi
|
||||
|
||||
cd $incDir || exit 1
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Link include files
|
||||
# ~~~~~~~~~~~~~~~~~~
|
||||
echo "$Script: linking include files to $incDir"
|
||||
if [ "$silentOpt" != true ]
|
||||
then
|
||||
echo "$Script: linking include files to $incDir" 1>&2
|
||||
fi
|
||||
|
||||
#
|
||||
# remove any broken links first (this helps when file locations have moved)
|
||||
|
||||
Reference in New Issue
Block a user