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:
@ -204,15 +204,15 @@ fileName="${1#~OpenFOAM/}"
|
|||||||
unset dirList
|
unset dirList
|
||||||
case "$mode" in
|
case "$mode" in
|
||||||
*u*) # user
|
*u*) # user
|
||||||
dirList="$dirList $HOME/.${WM_PROJECT:-OpenFOAM}/$version"
|
userDir="$HOME/.${WM_PROJECT:-OpenFOAM}"
|
||||||
dirList="$dirList $HOME/.${WM_PROJECT:-OpenFOAM}"
|
dirList="$dirList $userDir/$version $userDir"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$mode" in
|
case "$mode" in
|
||||||
*g*) # group
|
*g*) # group (site)
|
||||||
dirList="$dirList $prefixDir/site/$version"
|
siteDir="${WM_PROJECT_SITE:-$prefixDir/site}"
|
||||||
dirList="$dirList $prefixDir/site"
|
dirList="$dirList $siteDir/$version $siteDir"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
10
bin/foamLog
10
bin/foamLog
@ -33,6 +33,8 @@
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
Script=${0##*/}
|
Script=${0##*/}
|
||||||
toolsDir=${0%/*}/tools
|
toolsDir=${0%/*}/tools
|
||||||
|
siteDir=${WM_PROJECT_SITE:-${WM_PROJECT_INST_DIR:-<unknown>}/site}
|
||||||
|
userDir=$HOME/.OpenFOAM
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
@ -84,10 +86,10 @@ The value taken will be the first (non-space)word after this column.
|
|||||||
The database ($Script.db) will taken from these locations:
|
The database ($Script.db) will taken from these locations:
|
||||||
|
|
||||||
.
|
.
|
||||||
$HOME/.OpenFOAM/$WM_PROJECT_VERSION
|
$userDir/$WM_PROJECT_VERSION
|
||||||
$HOME/.OpenFOAM
|
$userDir
|
||||||
$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION
|
$siteDir/$WM_PROJECT_VERSION
|
||||||
$WM_PROJECT_INST_DIR/site
|
$siteDir
|
||||||
$WM_PROJECT_DIR/etc
|
$WM_PROJECT_DIR/etc
|
||||||
$toolsDir
|
$toolsDir
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
# - requires rsync
|
# - requires rsync
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
siteDir=${WM_PROJECT_INST_DIR:-unknown}/site
|
siteDir=${WM_PROJECT_SITE:-${WM_PROJECT_INST_DIR:-<unknown>}/site}
|
||||||
userDir=$HOME/.OpenFOAM
|
userDir=$HOME/.OpenFOAM
|
||||||
version=${WM_PROJECT_VERSION:-unknown}
|
version=${WM_PROJECT_VERSION:-unknown}
|
||||||
templateDir="appTemplates"
|
templateDir="appTemplates"
|
||||||
|
|||||||
@ -67,6 +67,11 @@ alias foamSol 'cd $FOAM_SOLVERS'
|
|||||||
alias foamTuts 'cd $FOAM_TUTORIALS'
|
alias foamTuts 'cd $FOAM_TUTORIALS'
|
||||||
alias foamUtils 'cd $FOAM_UTILITIES'
|
alias foamUtils 'cd $FOAM_UTILITIES'
|
||||||
alias foam3rdParty 'cd $WM_THIRD_PARTY_DIR'
|
alias foam3rdParty 'cd $WM_THIRD_PARTY_DIR'
|
||||||
alias foamSite 'cd $WM_PROJECT_INST_DIR/site'
|
|
||||||
|
if ( $?WM_PROJECT_SITE ) then
|
||||||
|
alias foamSite 'cd $WM_PROJECT_SITE'
|
||||||
|
else
|
||||||
|
alias foamSite 'cd $WM_PROJECT_INST_DIR/site'
|
||||||
|
endif
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|||||||
@ -72,6 +72,12 @@ alias foamSol='cd $FOAM_SOLVERS'
|
|||||||
alias foamTuts='cd $FOAM_TUTORIALS'
|
alias foamTuts='cd $FOAM_TUTORIALS'
|
||||||
alias foamUtils='cd $FOAM_UTILITIES'
|
alias foamUtils='cd $FOAM_UTILITIES'
|
||||||
alias foam3rdParty='cd $WM_THIRD_PARTY_DIR'
|
alias foam3rdParty='cd $WM_THIRD_PARTY_DIR'
|
||||||
alias foamSite='cd $WM_PROJECT_INST_DIR/site'
|
|
||||||
|
if [ -n "$WM_PROJECT_SITE" ]
|
||||||
|
then
|
||||||
|
alias foamSite='cd $WM_PROJECT_SITE'
|
||||||
|
else
|
||||||
|
alias foamSite='cd $WM_PROJECT_INST_DIR/site'
|
||||||
|
fi
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|||||||
107
etc/bashrc
107
etc/bashrc
@ -108,16 +108,24 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Location of site/user files
|
# Location of installation
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
export WM_PROJECT_INST_DIR=$FOAM_INST_DIR
|
export WM_PROJECT_INST_DIR=$FOAM_INST_DIR
|
||||||
export WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
|
export WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
|
||||||
export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION
|
|
||||||
|
|
||||||
# Location of third-party software
|
# Location of third-party software
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
|
export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
|
||||||
|
|
||||||
|
# Location of site-specific templates etc
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
# unset is equivalent to $WM_PROJECT_INST_DIR/site
|
||||||
|
unset WM_PROJECT_SITE
|
||||||
|
|
||||||
|
# Location of user files
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION
|
||||||
|
|
||||||
|
|
||||||
# Source files, possibly with some verbosity
|
# Source files, possibly with some verbosity
|
||||||
_foamSource()
|
_foamSource()
|
||||||
@ -169,99 +177,6 @@ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh`
|
|||||||
export FOAM_SETTINGS="$@"
|
export FOAM_SETTINGS="$@"
|
||||||
_foamEval $@
|
_foamEval $@
|
||||||
|
|
||||||
|
|
||||||
# Detect system type and set environment variables appropriately
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
export WM_ARCH=`uname -s`
|
|
||||||
|
|
||||||
case $WM_ARCH in
|
|
||||||
Linux)
|
|
||||||
WM_ARCH=linux
|
|
||||||
|
|
||||||
# compiler specifics
|
|
||||||
case `uname -m` in
|
|
||||||
i686)
|
|
||||||
;;
|
|
||||||
|
|
||||||
x86_64)
|
|
||||||
case "$WM_ARCH_OPTION" in
|
|
||||||
32)
|
|
||||||
export WM_COMPILER_ARCH='-64'
|
|
||||||
export WM_CC='gcc'
|
|
||||||
export WM_CXX='g++'
|
|
||||||
export WM_CFLAGS='-m32 -fPIC'
|
|
||||||
export WM_CXXFLAGS='-m32 -fPIC'
|
|
||||||
export WM_LDFLAGS='-m32'
|
|
||||||
;;
|
|
||||||
64)
|
|
||||||
WM_ARCH=linux64
|
|
||||||
export WM_COMPILER_LIB_ARCH=64
|
|
||||||
export WM_CC='gcc'
|
|
||||||
export WM_CXX='g++'
|
|
||||||
export WM_CFLAGS='-m64 -fPIC'
|
|
||||||
export WM_CXXFLAGS='-m64 -fPIC'
|
|
||||||
export WM_LDFLAGS='-m64'
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32 or 64"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
|
|
||||||
ia64)
|
|
||||||
WM_ARCH=linuxIA64
|
|
||||||
export WM_COMPILER=I64
|
|
||||||
;;
|
|
||||||
|
|
||||||
mips64)
|
|
||||||
WM_ARCH=SiCortex64
|
|
||||||
WM_MPLIB=MPI
|
|
||||||
export WM_COMPILER_LIB_ARCH=64
|
|
||||||
export WM_CC='gcc'
|
|
||||||
export WM_CXX='g++'
|
|
||||||
export WM_CFLAGS='-mabi=64 -fPIC'
|
|
||||||
export WM_CXXFLAGS='-mabi=64 -fPIC'
|
|
||||||
export WM_LDFLAGS='-mabi=64 -G0'
|
|
||||||
;;
|
|
||||||
|
|
||||||
ppc64)
|
|
||||||
WM_ARCH=linuxPPC64
|
|
||||||
export WM_COMPILER_LIB_ARCH=64
|
|
||||||
export WM_CC='gcc'
|
|
||||||
export WM_CXX='g++'
|
|
||||||
export WM_CFLAGS='-m64 -fPIC'
|
|
||||||
export WM_CXXFLAGS='-m64 -fPIC'
|
|
||||||
export WM_LDFLAGS='-m64'
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo Unknown processor type `uname -m` for Linux
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
|
|
||||||
SunOS)
|
|
||||||
WM_ARCH=SunOS64
|
|
||||||
WM_MPLIB=FJMPI
|
|
||||||
export WM_COMPILER_LIB_ARCH=64
|
|
||||||
export WM_CC='gcc'
|
|
||||||
export WM_CXX='g++'
|
|
||||||
export WM_CFLAGS='-mabi=64 -fPIC'
|
|
||||||
export WM_CXXFLAGS='-mabi=64 -fPIC'
|
|
||||||
export WM_LDFLAGS='-mabi=64 -G0'
|
|
||||||
;;
|
|
||||||
|
|
||||||
*) # an unsupported operating system
|
|
||||||
cat <<USAGE
|
|
||||||
|
|
||||||
Your "$WM_ARCH" operating system is not supported by this release
|
|
||||||
of OpenFOAM. For further assistance, please contact www.OpenFOAM.com
|
|
||||||
|
|
||||||
USAGE
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
# Clean standard environment variables (PATH, LD_LIBRARY_PATH, MANPATH)
|
# Clean standard environment variables (PATH, LD_LIBRARY_PATH, MANPATH)
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
foamClean=$WM_PROJECT_DIR/bin/foamCleanPath
|
foamClean=$WM_PROJECT_DIR/bin/foamCleanPath
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fixedValueFvPatchScalarFieldTemplate.H"
|
#include "fixedValueFvPatchFieldTemplate.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "fvPatchFieldMapper.H"
|
#include "fvPatchFieldMapper.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
@ -71,24 +71,25 @@ extern "C"
|
|||||||
|
|
||||||
makeRemovablePatchTypeField
|
makeRemovablePatchTypeField
|
||||||
(
|
(
|
||||||
fvPatchScalarField,
|
fvPatch${FieldType},
|
||||||
${typeName}FixedValueFvPatchScalarField
|
${typeName}FixedValueFvPatch${FieldType}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
const char* ${typeName}FixedValueFvPatchScalarField::SHA1sum = "${SHA1sum}";
|
const char* const ${typeName}FixedValueFvPatch${FieldType}::SHA1sum =
|
||||||
|
"${SHA1sum}";
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
${typeName}FixedValueFvPatchScalarField::
|
${typeName}FixedValueFvPatch${FieldType}::
|
||||||
${typeName}FixedValueFvPatchScalarField
|
${typeName}FixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<scalar, volMesh>& iF
|
const DimensionedField<${TemplateType}, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(p, iF)
|
fixedValueFvPatchField<${TemplateType}>(p, iF)
|
||||||
{
|
{
|
||||||
if (${verbose:-false})
|
if (${verbose:-false})
|
||||||
{
|
{
|
||||||
@ -98,16 +99,16 @@ ${typeName}FixedValueFvPatchScalarField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
${typeName}FixedValueFvPatchScalarField::
|
${typeName}FixedValueFvPatch${FieldType}::
|
||||||
${typeName}FixedValueFvPatchScalarField
|
${typeName}FixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const ${typeName}FixedValueFvPatchScalarField& ptf,
|
const ${typeName}FixedValueFvPatch${FieldType}& ptf,
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<scalar, volMesh>& iF,
|
const DimensionedField<${TemplateType}, volMesh>& iF,
|
||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper)
|
fixedValueFvPatchField<${TemplateType}>(ptf, p, iF, mapper)
|
||||||
{
|
{
|
||||||
if (${verbose:-false})
|
if (${verbose:-false})
|
||||||
{
|
{
|
||||||
@ -117,15 +118,15 @@ ${typeName}FixedValueFvPatchScalarField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
${typeName}FixedValueFvPatchScalarField::
|
${typeName}FixedValueFvPatch${FieldType}::
|
||||||
${typeName}FixedValueFvPatchScalarField
|
${typeName}FixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<scalar, volMesh>& iF,
|
const DimensionedField<${TemplateType}, volMesh>& iF,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(p, iF, dict)
|
fixedValueFvPatchField<${TemplateType}>(p, iF, dict)
|
||||||
{
|
{
|
||||||
if (${verbose:-false})
|
if (${verbose:-false})
|
||||||
{
|
{
|
||||||
@ -135,13 +136,13 @@ ${typeName}FixedValueFvPatchScalarField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
${typeName}FixedValueFvPatchScalarField::
|
${typeName}FixedValueFvPatch${FieldType}::
|
||||||
${typeName}FixedValueFvPatchScalarField
|
${typeName}FixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const ${typeName}FixedValueFvPatchScalarField& ptf
|
const ${typeName}FixedValueFvPatch${FieldType}& ptf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(ptf)
|
fixedValueFvPatchField<${TemplateType}>(ptf)
|
||||||
{
|
{
|
||||||
if (${verbose:-false})
|
if (${verbose:-false})
|
||||||
{
|
{
|
||||||
@ -151,14 +152,14 @@ ${typeName}FixedValueFvPatchScalarField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
${typeName}FixedValueFvPatchScalarField::
|
${typeName}FixedValueFvPatch${FieldType}::
|
||||||
${typeName}FixedValueFvPatchScalarField
|
${typeName}FixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const ${typeName}FixedValueFvPatchScalarField& ptf,
|
const ${typeName}FixedValueFvPatch${FieldType}& ptf,
|
||||||
const DimensionedField<scalar, volMesh>& iF
|
const DimensionedField<${TemplateType}, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(ptf, iF)
|
fixedValueFvPatchField<${TemplateType}>(ptf, iF)
|
||||||
{
|
{
|
||||||
if (${verbose:-false})
|
if (${verbose:-false})
|
||||||
{
|
{
|
||||||
@ -170,8 +171,8 @@ ${typeName}FixedValueFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
${typeName}FixedValueFvPatchScalarField::
|
${typeName}FixedValueFvPatch${FieldType}::
|
||||||
~${typeName}FixedValueFvPatchScalarField()
|
~${typeName}FixedValueFvPatch${FieldType}()
|
||||||
{
|
{
|
||||||
if (${verbose:-false})
|
if (${verbose:-false})
|
||||||
{
|
{
|
||||||
@ -182,7 +183,7 @@ ${typeName}FixedValueFvPatchScalarField::
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void ${typeName}FixedValueFvPatchScalarField::updateCoeffs()
|
void ${typeName}FixedValueFvPatch${FieldType}::updateCoeffs()
|
||||||
{
|
{
|
||||||
if (this->updated())
|
if (this->updated())
|
||||||
{
|
{
|
||||||
@ -198,7 +199,7 @@ void ${typeName}FixedValueFvPatchScalarField::updateCoeffs()
|
|||||||
${code}
|
${code}
|
||||||
//}}} end code
|
//}}} end code
|
||||||
|
|
||||||
fixedValueFvPatchScalarField::updateCoeffs();
|
this->fixedValueFvPatchField<${TemplateType}>::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -21,21 +21,19 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::fixedValueFvPatchScalarFieldTemplate
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Template for use with onTheFlyFixedValue.
|
Template for use with dynamic code generation of a
|
||||||
- fixedValueFvPatchScalarField
|
fixedValue fvPatchField.
|
||||||
|
|
||||||
- without state
|
- without state
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
fixedValueFvPatchScalarFieldTemplate.C
|
fixedValueFvPatchFieldTemplate.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef fixedValueFvPatchScalarFieldTemplate_H
|
#ifndef fixedValueFvPatchTemplate${FieldType}_H
|
||||||
#define fixedValueFvPatchScalarFieldTemplate_H
|
#define fixedValueFvPatchTemplate${FieldType}_H
|
||||||
|
|
||||||
#include "fixedValueFvPatchFields.H"
|
#include "fixedValueFvPatchFields.H"
|
||||||
|
|
||||||
@ -45,18 +43,17 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class fixedValueFvPatchScalarField Declaration
|
A templated FixedValueFvPatch
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class ${typeName}FixedValueFvPatchScalarField
|
class ${typeName}FixedValueFvPatch${FieldType}
|
||||||
:
|
:
|
||||||
public fixedValueFvPatchScalarField
|
public fixedValueFvPatchField<${TemplateType}>
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Information about the SHA1 of the code itself
|
//- Information about the SHA1 of the code itself
|
||||||
static const char* SHA1sum;
|
static const char* const SHA1sum;
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("${typeName}");
|
TypeName("${typeName}");
|
||||||
@ -65,73 +62,70 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from patch and internal field
|
//- Construct from patch and internal field
|
||||||
${typeName}FixedValueFvPatchScalarField
|
${typeName}FixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<scalar, volMesh>&
|
const DimensionedField<${TemplateType}, volMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from patch, internal field and dictionary
|
//- Construct from patch, internal field and dictionary
|
||||||
${typeName}FixedValueFvPatchScalarField
|
${typeName}FixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<scalar, volMesh>&,
|
const DimensionedField<${TemplateType}, volMesh>&,
|
||||||
const dictionary&
|
const dictionary&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping given
|
//- Construct by mapping a copy onto a new patch
|
||||||
// ${typeName}FixedValueFvPatchScalarField
|
${typeName}FixedValueFvPatch${FieldType}
|
||||||
// onto a new patch
|
|
||||||
${typeName}FixedValueFvPatchScalarField
|
|
||||||
(
|
(
|
||||||
const ${typeName}FixedValueFvPatchScalarField&,
|
const ${typeName}FixedValueFvPatch${FieldType}&,
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<scalar, volMesh>&,
|
const DimensionedField<${TemplateType}, volMesh>&,
|
||||||
const fvPatchFieldMapper&
|
const fvPatchFieldMapper&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct as copy
|
//- Construct as copy
|
||||||
${typeName}FixedValueFvPatchScalarField
|
${typeName}FixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const ${typeName}FixedValueFvPatchScalarField&
|
const ${typeName}FixedValueFvPatch${FieldType}&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
virtual tmp<fvPatchScalarField> clone() const
|
virtual tmp< fvPatch${FieldType} > clone() const
|
||||||
{
|
{
|
||||||
return tmp<fvPatchScalarField>
|
return tmp< fvPatch${FieldType} >
|
||||||
(
|
(
|
||||||
new ${typeName}FixedValueFvPatchScalarField(*this)
|
new ${typeName}FixedValueFvPatch${FieldType}(*this)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct as copy setting internal field reference
|
//- Construct as copy setting internal field reference
|
||||||
${typeName}FixedValueFvPatchScalarField
|
${typeName}FixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const ${typeName}FixedValueFvPatchScalarField&,
|
const ${typeName}FixedValueFvPatch${FieldType}&,
|
||||||
const DimensionedField<scalar, volMesh>&
|
const DimensionedField<${TemplateType}, volMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone setting internal field reference
|
//- Construct and return a clone setting internal field reference
|
||||||
virtual tmp<fvPatchScalarField> clone
|
virtual tmp< fvPatch${FieldType} > clone
|
||||||
(
|
(
|
||||||
const DimensionedField<scalar, volMesh>& iF
|
const DimensionedField<${TemplateType}, volMesh>& iF
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<fvPatchScalarField>
|
return tmp< fvPatch${FieldType} >
|
||||||
(
|
(
|
||||||
new ${typeName}FixedValueFvPatchScalarField(*this, iF)
|
new ${typeName}FixedValueFvPatch${FieldType}(*this, iF)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~${typeName}FixedValueFvPatchScalarField();
|
virtual ~${typeName}FixedValueFvPatch${FieldType}();
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
// Evaluation functions
|
|
||||||
|
|
||||||
//- Update the coefficients associated with the patch field
|
//- Update the coefficients associated with the patch field
|
||||||
virtual void updateCoeffs();
|
virtual void updateCoeffs();
|
||||||
};
|
};
|
||||||
116
etc/cshrc
116
etc/cshrc
@ -102,17 +102,31 @@ setenv FOAM_SIGFPE
|
|||||||
# - remove anything under top-level directory.
|
# - remove anything under top-level directory.
|
||||||
# NB: the WM_PROJECT_INST_DIR might not be identical between versions
|
# NB: the WM_PROJECT_INST_DIR might not be identical between versions
|
||||||
set foamOldDirs="$FOAM_INST_DIR $HOME/$WM_PROJECT/$LOGNAME"
|
set foamOldDirs="$FOAM_INST_DIR $HOME/$WM_PROJECT/$LOGNAME"
|
||||||
|
if ( $?WM_PROJECT_INST_DIR ) then
|
||||||
|
if ( "$WM_PROJECT_INST_DIR" != "$FOAM_INST_DIR" ) then
|
||||||
|
set foamOldDirs="$WM_PROJECT_INST_DIR $foamOldDirs"
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# Location of site/user files
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# Location of installation
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
setenv WM_PROJECT_INST_DIR $FOAM_INST_DIR
|
setenv WM_PROJECT_INST_DIR $FOAM_INST_DIR
|
||||||
setenv WM_PROJECT_DIR $WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
|
setenv WM_PROJECT_DIR $WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
|
||||||
setenv WM_PROJECT_USER_DIR $HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION
|
|
||||||
|
|
||||||
# Location of third-party software
|
# Location of third-party software
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
|
setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
|
||||||
|
|
||||||
|
# Location of site-specific templates etc
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
# unset is equivalent to $WM_PROJECT_INST_DIR/site
|
||||||
|
unsetenv WM_PROJECT_SITE
|
||||||
|
|
||||||
|
# Location of user files
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
setenv WM_PROJECT_USER_DIR $HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION
|
||||||
|
|
||||||
|
|
||||||
# Source files, possibly with some verbosity
|
# Source files, possibly with some verbosity
|
||||||
alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Sourcing: \!*"; if (\!* != "") source \!*'
|
alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Sourcing: \!*"; if (\!* != "") source \!*'
|
||||||
@ -127,10 +141,12 @@ while ( $#argv > 0 )
|
|||||||
switch ($argv[1])
|
switch ($argv[1])
|
||||||
case *=:
|
case *=:
|
||||||
# name= -> unsetenv name
|
# name= -> unsetenv name
|
||||||
|
if ($?FOAM_VERBOSE && $?prompt) echo "unsetenv $argv[1]:s/=//"
|
||||||
eval "unsetenv $argv[1]:s/=//"
|
eval "unsetenv $argv[1]:s/=//"
|
||||||
breaksw
|
breaksw
|
||||||
case *=*:
|
case *=*:
|
||||||
# name=value -> setenv name value
|
# name=value -> setenv name value
|
||||||
|
if ($?FOAM_VERBOSE && $?prompt) echo "setenv $argv[1]:s/=/ /"
|
||||||
eval "setenv $argv[1]:s/=/ /"
|
eval "setenv $argv[1]:s/=/ /"
|
||||||
breaksw
|
breaksw
|
||||||
default:
|
default:
|
||||||
@ -146,100 +162,6 @@ while ( $#argv > 0 )
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Detect system type and set environment variables
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
setenv WM_ARCH `uname -s`
|
|
||||||
|
|
||||||
switch ($WM_ARCH)
|
|
||||||
case Linux:
|
|
||||||
setenv WM_ARCH linux
|
|
||||||
|
|
||||||
switch (`uname -m`)
|
|
||||||
case i686:
|
|
||||||
breaksw
|
|
||||||
|
|
||||||
case x86_64:
|
|
||||||
switch ($WM_ARCH_OPTION)
|
|
||||||
case 32:
|
|
||||||
setenv WM_COMPILER_ARCH '-64'
|
|
||||||
setenv WM_CC 'gcc'
|
|
||||||
setenv WM_CXX 'g++'
|
|
||||||
setenv WM_CFLAGS '-m32 -fPIC'
|
|
||||||
setenv WM_CXXFLAGS '-m32 -fPIC'
|
|
||||||
setenv WM_LDFLAGS '-m32'
|
|
||||||
breaksw
|
|
||||||
|
|
||||||
case 64:
|
|
||||||
setenv WM_ARCH linux64
|
|
||||||
setenv WM_COMPILER_LIB_ARCH 64
|
|
||||||
setenv WM_CC 'gcc'
|
|
||||||
setenv WM_CXX 'g++'
|
|
||||||
setenv WM_CFLAGS '-m64 -fPIC'
|
|
||||||
setenv WM_CXXFLAGS '-m64 -fPIC'
|
|
||||||
setenv WM_LDFLAGS '-m64'
|
|
||||||
breaksw
|
|
||||||
|
|
||||||
default:
|
|
||||||
echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32 or 64"
|
|
||||||
breaksw
|
|
||||||
|
|
||||||
endsw
|
|
||||||
breaksw
|
|
||||||
|
|
||||||
case ia64:
|
|
||||||
setenv WM_ARCH linuxIA64
|
|
||||||
setenv WM_COMPILER I64
|
|
||||||
breaksw
|
|
||||||
|
|
||||||
case mips64:
|
|
||||||
setenv WM_ARCH SiCortex64
|
|
||||||
setenv WM_MPLIB MPI
|
|
||||||
setenv WM_COMPILER_LIB_ARCH 64
|
|
||||||
setenv WM_CC 'gcc'
|
|
||||||
setenv WM_CXX 'g++'
|
|
||||||
setenv WM_CFLAGS '-mabi=64 -fPIC'
|
|
||||||
setenv WM_CXXFLAGS '-mabi=64 -fPIC'
|
|
||||||
setenv WM_LDFLAGS '-mabi=64 -G0'
|
|
||||||
breaksw
|
|
||||||
|
|
||||||
case ppc64:
|
|
||||||
setenv WM_ARCH linuxPPC64
|
|
||||||
setenv WM_COMPILER_LIB_ARCH 64
|
|
||||||
setenv WM_CC 'gcc'
|
|
||||||
setenv WM_CXX 'g++'
|
|
||||||
setenv WM_CFLAGS '-m64 -fPIC'
|
|
||||||
setenv WM_CXXFLAGS '-m64 -fPIC'
|
|
||||||
setenv WM_LDFLAGS '-m64'
|
|
||||||
breaksw
|
|
||||||
|
|
||||||
default:
|
|
||||||
echo Unknown processor type `uname -m` for Linux
|
|
||||||
breaksw
|
|
||||||
|
|
||||||
endsw
|
|
||||||
breaksw
|
|
||||||
|
|
||||||
case SunOS:
|
|
||||||
setenv WM_ARCH SunOS64
|
|
||||||
setenv WM_MPLIB FJMPI
|
|
||||||
setenv WM_COMPILER_LIB_ARCH 64
|
|
||||||
setenv WM_CC 'gcc'
|
|
||||||
setenv WM_CXX 'g++'
|
|
||||||
setenv WM_CFLAGS '-mabi=64 -fPIC'
|
|
||||||
setenv WM_CXXFLAGS '-mabi=64 -fPIC'
|
|
||||||
setenv WM_LDFLAGS '-mabi=64 -G0'
|
|
||||||
breaksw
|
|
||||||
|
|
||||||
default:
|
|
||||||
echo
|
|
||||||
echo "Your '$WM_ARCH' operating system is not supported by this release"
|
|
||||||
echo "of OpenFOAM. For further assistance, please contact www.OpenFOAM.com"
|
|
||||||
echo
|
|
||||||
breaksw
|
|
||||||
|
|
||||||
endsw
|
|
||||||
|
|
||||||
|
|
||||||
# Clean standard environment variables (PATH, LD_LIBRARY_PATH, MANPATH)
|
# Clean standard environment variables (PATH, LD_LIBRARY_PATH, MANPATH)
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
set foamClean=$WM_PROJECT_DIR/bin/foamCleanPath
|
set foamClean=$WM_PROJECT_DIR/bin/foamCleanPath
|
||||||
|
|||||||
103
etc/settings.csh
103
etc/settings.csh
@ -37,6 +37,100 @@ alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}'
|
|||||||
# prefix to MANPATH
|
# prefix to MANPATH
|
||||||
alias _foamAddMan 'setenv MANPATH \!*\:${MANPATH}'
|
alias _foamAddMan 'setenv MANPATH \!*\:${MANPATH}'
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Set environment variables according to system type
|
||||||
|
setenv WM_ARCH `uname -s`
|
||||||
|
|
||||||
|
switch ($WM_ARCH)
|
||||||
|
case Linux:
|
||||||
|
setenv WM_ARCH linux
|
||||||
|
|
||||||
|
switch (`uname -m`)
|
||||||
|
case i686:
|
||||||
|
breaksw
|
||||||
|
|
||||||
|
case x86_64:
|
||||||
|
switch ($WM_ARCH_OPTION)
|
||||||
|
case 32:
|
||||||
|
setenv WM_COMPILER_ARCH '-64'
|
||||||
|
setenv WM_CC 'gcc'
|
||||||
|
setenv WM_CXX 'g++'
|
||||||
|
setenv WM_CFLAGS '-m32 -fPIC'
|
||||||
|
setenv WM_CXXFLAGS '-m32 -fPIC'
|
||||||
|
setenv WM_LDFLAGS '-m32'
|
||||||
|
breaksw
|
||||||
|
|
||||||
|
case 64:
|
||||||
|
setenv WM_ARCH linux64
|
||||||
|
setenv WM_COMPILER_LIB_ARCH 64
|
||||||
|
setenv WM_CC 'gcc'
|
||||||
|
setenv WM_CXX 'g++'
|
||||||
|
setenv WM_CFLAGS '-m64 -fPIC'
|
||||||
|
setenv WM_CXXFLAGS '-m64 -fPIC'
|
||||||
|
setenv WM_LDFLAGS '-m64'
|
||||||
|
breaksw
|
||||||
|
|
||||||
|
default:
|
||||||
|
echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32 or 64"
|
||||||
|
breaksw
|
||||||
|
|
||||||
|
endsw
|
||||||
|
breaksw
|
||||||
|
|
||||||
|
case ia64:
|
||||||
|
setenv WM_ARCH linuxIA64
|
||||||
|
setenv WM_COMPILER I64
|
||||||
|
breaksw
|
||||||
|
|
||||||
|
case mips64:
|
||||||
|
setenv WM_ARCH SiCortex64
|
||||||
|
setenv WM_MPLIB MPI
|
||||||
|
setenv WM_COMPILER_LIB_ARCH 64
|
||||||
|
setenv WM_CC 'gcc'
|
||||||
|
setenv WM_CXX 'g++'
|
||||||
|
setenv WM_CFLAGS '-mabi=64 -fPIC'
|
||||||
|
setenv WM_CXXFLAGS '-mabi=64 -fPIC'
|
||||||
|
setenv WM_LDFLAGS '-mabi=64 -G0'
|
||||||
|
breaksw
|
||||||
|
|
||||||
|
case ppc64:
|
||||||
|
setenv WM_ARCH linuxPPC64
|
||||||
|
setenv WM_COMPILER_LIB_ARCH 64
|
||||||
|
setenv WM_CC 'gcc'
|
||||||
|
setenv WM_CXX 'g++'
|
||||||
|
setenv WM_CFLAGS '-m64 -fPIC'
|
||||||
|
setenv WM_CXXFLAGS '-m64 -fPIC'
|
||||||
|
setenv WM_LDFLAGS '-m64'
|
||||||
|
breaksw
|
||||||
|
|
||||||
|
default:
|
||||||
|
echo Unknown processor type `uname -m` for Linux
|
||||||
|
breaksw
|
||||||
|
|
||||||
|
endsw
|
||||||
|
breaksw
|
||||||
|
|
||||||
|
case SunOS:
|
||||||
|
setenv WM_ARCH SunOS64
|
||||||
|
setenv WM_MPLIB FJMPI
|
||||||
|
setenv WM_COMPILER_LIB_ARCH 64
|
||||||
|
setenv WM_CC 'gcc'
|
||||||
|
setenv WM_CXX 'g++'
|
||||||
|
setenv WM_CFLAGS '-mabi=64 -fPIC'
|
||||||
|
setenv WM_CXXFLAGS '-mabi=64 -fPIC'
|
||||||
|
setenv WM_LDFLAGS '-mabi=64 -G0'
|
||||||
|
breaksw
|
||||||
|
|
||||||
|
default:
|
||||||
|
echo
|
||||||
|
echo "Your '$WM_ARCH' operating system is not supported by this release"
|
||||||
|
echo "of OpenFOAM. For further assistance, please contact www.OpenFOAM.com"
|
||||||
|
echo
|
||||||
|
breaksw
|
||||||
|
|
||||||
|
endsw
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# location of the jobControl directory
|
# location of the jobControl directory
|
||||||
@ -56,8 +150,13 @@ setenv FOAM_EXT_LIBBIN $WM_THIRD_PARTY_DIR/platforms/$WM_OPTIONS/lib
|
|||||||
|
|
||||||
# shared site executables/libraries
|
# shared site executables/libraries
|
||||||
# similar naming convention as ~OpenFOAM expansion
|
# similar naming convention as ~OpenFOAM expansion
|
||||||
setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
|
if ( $?WM_PROJECT_SITE ) then
|
||||||
setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
|
setenv FOAM_SITE_APPBIN $WM_PROJECT_SITE/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
|
||||||
|
setenv FOAM_SITE_LIBBIN $WM_PROJECT_SITE/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
|
||||||
|
else
|
||||||
|
setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
|
||||||
|
setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
|
||||||
|
endif
|
||||||
|
|
||||||
# user executables/libraries
|
# user executables/libraries
|
||||||
setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin
|
setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin
|
||||||
|
|||||||
102
etc/settings.sh
102
etc/settings.sh
@ -60,6 +60,98 @@ _foamAddMan()
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Set environment variables according to system type
|
||||||
|
export WM_ARCH=`uname -s`
|
||||||
|
|
||||||
|
case "$WM_ARCH" in
|
||||||
|
Linux)
|
||||||
|
WM_ARCH=linux
|
||||||
|
|
||||||
|
# compiler specifics
|
||||||
|
case `uname -m` in
|
||||||
|
i686)
|
||||||
|
;;
|
||||||
|
|
||||||
|
x86_64)
|
||||||
|
case "$WM_ARCH_OPTION" in
|
||||||
|
32)
|
||||||
|
export WM_COMPILER_ARCH='-64'
|
||||||
|
export WM_CC='gcc'
|
||||||
|
export WM_CXX='g++'
|
||||||
|
export WM_CFLAGS='-m32 -fPIC'
|
||||||
|
export WM_CXXFLAGS='-m32 -fPIC'
|
||||||
|
export WM_LDFLAGS='-m32'
|
||||||
|
;;
|
||||||
|
64)
|
||||||
|
WM_ARCH=linux64
|
||||||
|
export WM_COMPILER_LIB_ARCH=64
|
||||||
|
export WM_CC='gcc'
|
||||||
|
export WM_CXX='g++'
|
||||||
|
export WM_CFLAGS='-m64 -fPIC'
|
||||||
|
export WM_CXXFLAGS='-m64 -fPIC'
|
||||||
|
export WM_LDFLAGS='-m64'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32 or 64"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
|
ia64)
|
||||||
|
WM_ARCH=linuxIA64
|
||||||
|
export WM_COMPILER=I64
|
||||||
|
;;
|
||||||
|
|
||||||
|
mips64)
|
||||||
|
WM_ARCH=SiCortex64
|
||||||
|
WM_MPLIB=MPI
|
||||||
|
export WM_COMPILER_LIB_ARCH=64
|
||||||
|
export WM_CC='gcc'
|
||||||
|
export WM_CXX='g++'
|
||||||
|
export WM_CFLAGS='-mabi=64 -fPIC'
|
||||||
|
export WM_CXXFLAGS='-mabi=64 -fPIC'
|
||||||
|
export WM_LDFLAGS='-mabi=64 -G0'
|
||||||
|
;;
|
||||||
|
|
||||||
|
ppc64)
|
||||||
|
WM_ARCH=linuxPPC64
|
||||||
|
export WM_COMPILER_LIB_ARCH=64
|
||||||
|
export WM_CC='gcc'
|
||||||
|
export WM_CXX='g++'
|
||||||
|
export WM_CFLAGS='-m64 -fPIC'
|
||||||
|
export WM_CXXFLAGS='-m64 -fPIC'
|
||||||
|
export WM_LDFLAGS='-m64'
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo Unknown processor type `uname -m` for Linux
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
|
SunOS)
|
||||||
|
WM_ARCH=SunOS64
|
||||||
|
WM_MPLIB=FJMPI
|
||||||
|
export WM_COMPILER_LIB_ARCH=64
|
||||||
|
export WM_CC='gcc'
|
||||||
|
export WM_CXX='g++'
|
||||||
|
export WM_CFLAGS='-mabi=64 -fPIC'
|
||||||
|
export WM_CXXFLAGS='-mabi=64 -fPIC'
|
||||||
|
export WM_LDFLAGS='-mabi=64 -G0'
|
||||||
|
;;
|
||||||
|
|
||||||
|
*) # an unsupported operating system
|
||||||
|
cat <<USAGE
|
||||||
|
|
||||||
|
Your "$WM_ARCH" operating system is not supported by this release
|
||||||
|
of OpenFOAM. For further assistance, please contact www.OpenFOAM.com
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# location of the jobControl directory
|
# location of the jobControl directory
|
||||||
@ -79,8 +171,14 @@ export FOAM_EXT_LIBBIN=$WM_THIRD_PARTY_DIR/platforms/$WM_OPTIONS/lib
|
|||||||
|
|
||||||
# shared site executables/libraries
|
# shared site executables/libraries
|
||||||
# similar naming convention as ~OpenFOAM expansion
|
# similar naming convention as ~OpenFOAM expansion
|
||||||
export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
|
if [ -n "$WM_PROJECT_SITE" ]
|
||||||
export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
|
then
|
||||||
|
export FOAM_SITE_APPBIN=$WM_PROJECT_SITE/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
|
||||||
|
export FOAM_SITE_LIBBIN=$WM_PROJECT_SITE/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
|
||||||
|
else
|
||||||
|
export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
|
||||||
|
export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
|
||||||
|
fi
|
||||||
|
|
||||||
# user executables/libraries
|
# user executables/libraries
|
||||||
export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin
|
export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin
|
||||||
|
|||||||
@ -253,19 +253,20 @@ bool Foam::chDir(const fileName& dir)
|
|||||||
|
|
||||||
Foam::fileName Foam::findEtcFile(const fileName& name, bool mandatory)
|
Foam::fileName Foam::findEtcFile(const fileName& name, bool mandatory)
|
||||||
{
|
{
|
||||||
// Search user files:
|
//
|
||||||
// ~~~~~~~~~~~~~~~~~~
|
// search for user files in
|
||||||
|
// * ~/.OpenFOAM/VERSION
|
||||||
|
// * ~/.OpenFOAM
|
||||||
|
//
|
||||||
fileName searchDir = home()/".OpenFOAM";
|
fileName searchDir = home()/".OpenFOAM";
|
||||||
if (isDir(searchDir))
|
if (isDir(searchDir))
|
||||||
{
|
{
|
||||||
// Check for user file in ~/.OpenFOAM/VERSION
|
|
||||||
fileName fullName = searchDir/FOAMversion/name;
|
fileName fullName = searchDir/FOAMversion/name;
|
||||||
if (isFile(fullName))
|
if (isFile(fullName))
|
||||||
{
|
{
|
||||||
return fullName;
|
return fullName;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for version-independent user file in ~/.OpenFOAM
|
|
||||||
fullName = searchDir/name;
|
fullName = searchDir/name;
|
||||||
if (isFile(fullName))
|
if (isFile(fullName))
|
||||||
{
|
{
|
||||||
@ -274,32 +275,61 @@ Foam::fileName Foam::findEtcFile(const fileName& name, bool mandatory)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Search site files:
|
//
|
||||||
// ~~~~~~~~~~~~~~~~~~
|
// search for group (site) files in
|
||||||
|
// * $WM_PROJECT_SITE/VERSION
|
||||||
|
// * $WM_PROJECT_SITE
|
||||||
|
//
|
||||||
|
searchDir = getEnv("WM_PROJECT_SITE");
|
||||||
|
if (searchDir.size())
|
||||||
|
{
|
||||||
|
if (isDir(searchDir))
|
||||||
|
{
|
||||||
|
fileName fullName = searchDir/FOAMversion/name;
|
||||||
|
if (isFile(fullName))
|
||||||
|
{
|
||||||
|
return fullName;
|
||||||
|
}
|
||||||
|
|
||||||
|
fullName = searchDir/name;
|
||||||
|
if (isFile(fullName))
|
||||||
|
{
|
||||||
|
return fullName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// OR search for group (site) files in
|
||||||
|
// * $WM_PROJECT_INST_DIR/site/VERSION
|
||||||
|
// * $WM_PROJECT_INST_DIR/site
|
||||||
|
//
|
||||||
searchDir = getEnv("WM_PROJECT_INST_DIR");
|
searchDir = getEnv("WM_PROJECT_INST_DIR");
|
||||||
if (isDir(searchDir))
|
if (isDir(searchDir))
|
||||||
{
|
{
|
||||||
// Check for site file in $WM_PROJECT_INST_DIR/site/VERSION
|
|
||||||
fileName fullName = searchDir/"site"/FOAMversion/name;
|
fileName fullName = searchDir/"site"/FOAMversion/name;
|
||||||
if (isFile(fullName))
|
if (isFile(fullName))
|
||||||
{
|
{
|
||||||
return fullName;
|
return fullName;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for version-independent site file in $WM_PROJECT_INST_DIR/site
|
|
||||||
fullName = searchDir/"site"/name;
|
fullName = searchDir/"site"/name;
|
||||||
if (isFile(fullName))
|
if (isFile(fullName))
|
||||||
{
|
{
|
||||||
return fullName;
|
return fullName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Search installation files:
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
//
|
||||||
|
// search for other (shipped) files in
|
||||||
|
// * $WM_PROJECT_DIR/etc
|
||||||
|
//
|
||||||
searchDir = getEnv("WM_PROJECT_DIR");
|
searchDir = getEnv("WM_PROJECT_DIR");
|
||||||
if (isDir(searchDir))
|
if (isDir(searchDir))
|
||||||
{
|
{
|
||||||
// Check for shipped OpenFOAM file in $WM_PROJECT_DIR/etc
|
|
||||||
fileName fullName = searchDir/"etc"/name;
|
fileName fullName = searchDir/"etc"/name;
|
||||||
if (isFile(fullName))
|
if (isFile(fullName))
|
||||||
{
|
{
|
||||||
@ -311,7 +341,8 @@ Foam::fileName Foam::findEtcFile(const fileName& name, bool mandatory)
|
|||||||
// abort if the file is mandatory, otherwise return null
|
// abort if the file is mandatory, otherwise return null
|
||||||
if (mandatory)
|
if (mandatory)
|
||||||
{
|
{
|
||||||
std::cerr<< "--> FOAM FATAL ERROR in Foam::findEtcFile() :"
|
std::cerr
|
||||||
|
<< "--> FOAM FATAL ERROR in Foam::findEtcFile() :"
|
||||||
" could not find mandatory file\n '"
|
" could not find mandatory file\n '"
|
||||||
<< name.c_str() << "'\n\n" << std::endl;
|
<< name.c_str() << "'\n\n" << std::endl;
|
||||||
::exit(1);
|
::exit(1);
|
||||||
|
|||||||
@ -48,10 +48,10 @@ const Foam::word Foam::dynamicCode::codeTemplateEnvName
|
|||||||
const Foam::fileName Foam::dynamicCode::codeTemplateDirName
|
const Foam::fileName Foam::dynamicCode::codeTemplateDirName
|
||||||
= "codeTemplates/dynamicCode";
|
= "codeTemplates/dynamicCode";
|
||||||
|
|
||||||
const char* Foam::dynamicCode::libTargetRoot =
|
const char* const Foam::dynamicCode::libTargetRoot =
|
||||||
"LIB = $(PWD)/../platforms/$(WM_OPTIONS)/lib/lib";
|
"LIB = $(PWD)/../platforms/$(WM_OPTIONS)/lib/lib";
|
||||||
|
|
||||||
const char* Foam::dynamicCode::topDirName = "dynamicCode";
|
const char* const Foam::dynamicCode::topDirName = "dynamicCode";
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -106,10 +106,10 @@ protected:
|
|||||||
// Static data members
|
// Static data members
|
||||||
|
|
||||||
//- Root of the LIB target for Make/files
|
//- Root of the LIB target for Make/files
|
||||||
static const char* libTargetRoot;
|
static const char* const libTargetRoot;
|
||||||
|
|
||||||
//- Top-level directory name for copy/compiling
|
//- Top-level directory name for copy/compiling
|
||||||
static const char* topDirName;
|
static const char* const topDirName;
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,7 +32,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const char* Foam::constant::atomic::group = "atomic";
|
const char* const Foam::constant::atomic::group = "atomic";
|
||||||
|
|
||||||
|
|
||||||
const Foam::dimensionedScalar Foam::constant::atomic::alpha
|
const Foam::dimensionedScalar Foam::constant::atomic::alpha
|
||||||
@ -129,6 +129,3 @@ const Foam::dimensionedScalar Foam::constant::atomic::Eh
|
|||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -46,7 +46,7 @@ namespace atomic
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//- Group name for atomic constants
|
//- Group name for atomic constants
|
||||||
extern const char* group;
|
extern const char* const group;
|
||||||
|
|
||||||
//- Fine-structure constant: default SI units: []
|
//- Fine-structure constant: default SI units: []
|
||||||
extern const dimensionedScalar alpha;
|
extern const dimensionedScalar alpha;
|
||||||
@ -75,6 +75,3 @@ namespace atomic
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,7 +32,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const char* Foam::constant::electromagnetic::group = "electromagnetic";
|
const char* const Foam::constant::electromagnetic::group = "electromagnetic";
|
||||||
|
|
||||||
|
|
||||||
const Foam::dimensionedScalar Foam::constant::electromagnetic::mu0
|
const Foam::dimensionedScalar Foam::constant::electromagnetic::mu0
|
||||||
@ -164,5 +164,3 @@ const Foam::dimensionedScalar Foam::constant::electromagnetic::RK
|
|||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -46,7 +46,7 @@ namespace electromagnetic
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//- Group name for electromagnetic constants
|
//- Group name for electromagnetic constants
|
||||||
extern const char* group;
|
extern const char* const group;
|
||||||
|
|
||||||
//- Magnetic constant/permeability of free space: default SI units: [H/m]
|
//- Magnetic constant/permeability of free space: default SI units: [H/m]
|
||||||
extern const dimensionedScalar mu0;
|
extern const dimensionedScalar mu0;
|
||||||
@ -84,5 +84,3 @@ namespace electromagnetic
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -45,7 +45,7 @@ namespace mathematical
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
static word group = "mathematical";
|
static const char* const group = "mathematical";
|
||||||
|
|
||||||
const scalar e(M_E);
|
const scalar e(M_E);
|
||||||
const scalar pi(M_PI);
|
const scalar pi(M_PI);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,7 +32,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const char* Foam::constant::physicoChemical::group = "physicoChemical";
|
const char* const Foam::constant::physicoChemical::group = "physicoChemical";
|
||||||
|
|
||||||
|
|
||||||
const Foam::dimensionedScalar Foam::constant::physicoChemical::R
|
const Foam::dimensionedScalar Foam::constant::physicoChemical::R
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -46,7 +46,7 @@ namespace physicoChemical
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//- Group name for physico-chemical constants
|
//- Group name for physico-chemical constants
|
||||||
extern const char* group;
|
extern const char* const group;
|
||||||
|
|
||||||
//- Universal gas constant: default SI units: [J/mol/K]
|
//- Universal gas constant: default SI units: [J/mol/K]
|
||||||
extern const dimensionedScalar R;
|
extern const dimensionedScalar R;
|
||||||
@ -78,7 +78,3 @@ namespace physicoChemical
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -30,7 +30,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const char* Foam::constant::universal::group = "universal";
|
const char* const Foam::constant::universal::group = "universal";
|
||||||
|
|
||||||
|
|
||||||
const Foam::dimensionedScalar Foam::constant::universal::hr
|
const Foam::dimensionedScalar Foam::constant::universal::hr
|
||||||
@ -49,4 +49,3 @@ const Foam::dimensionedScalar Foam::constant::universal::hr
|
|||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -46,7 +46,7 @@ namespace universal
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//- Group name for universal constants
|
//- Group name for universal constants
|
||||||
extern const char* group;
|
extern const char* const group;
|
||||||
|
|
||||||
//- Reduced Planck constant: default SI units: [J/s]
|
//- Reduced Planck constant: default SI units: [J/s]
|
||||||
extern const dimensionedScalar hr;
|
extern const dimensionedScalar hr;
|
||||||
@ -62,4 +62,3 @@ namespace universal
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -93,22 +93,22 @@ fileName cwd();
|
|||||||
// else return false
|
// else return false
|
||||||
bool chDir(const fileName& dir);
|
bool chDir(const fileName& dir);
|
||||||
|
|
||||||
//- Search for \em name
|
//- Search for a file from user/group/shipped directories.
|
||||||
// in the following hierarchy:
|
// The search scheme allows for version-specific and
|
||||||
// -# personal settings:
|
// version-independent files using the following hierarchy:
|
||||||
// - ~/.OpenFOAM/\<VERSION\>/
|
// - \b user settings:
|
||||||
// <em>for version-specific files</em>
|
// - ~/.OpenFOAM/\<VERSION\>
|
||||||
// - ~/.OpenFOAM/
|
// - ~/.OpenFOAM/
|
||||||
// <em>for version-independent files</em>
|
// - \b group (site) settings (when $WM_PROJECT_SITE is set):
|
||||||
// -# site-wide settings:
|
// - $WM_PROJECT_SITE/\<VERSION\>
|
||||||
|
// - $WM_PROJECT_SITE
|
||||||
|
// - \b group (site) settings (when $WM_PROJECT_SITE is not set):
|
||||||
// - $WM_PROJECT_INST_DIR/site/\<VERSION\>
|
// - $WM_PROJECT_INST_DIR/site/\<VERSION\>
|
||||||
// <em>for version-specific files</em>
|
|
||||||
// - $WM_PROJECT_INST_DIR/site/
|
// - $WM_PROJECT_INST_DIR/site/
|
||||||
// <em>for version-independent files</em>
|
// - \b other (shipped) settings:
|
||||||
// -# shipped settings:
|
|
||||||
// - $WM_PROJECT_DIR/etc/
|
// - $WM_PROJECT_DIR/etc/
|
||||||
//
|
//
|
||||||
// \return the full path name or fileName() if the name cannot be found
|
// \return The full path name or fileName() if the name cannot be found
|
||||||
// Optionally abort if the file cannot be found
|
// Optionally abort if the file cannot be found
|
||||||
fileName findEtcFile(const fileName&, bool mandatory=false);
|
fileName findEtcFile(const fileName&, bool mandatory=false);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -35,10 +35,10 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const char* Foam::meshReaders::STARCD::defaultBoundaryName =
|
const char* const Foam::meshReaders::STARCD::defaultBoundaryName =
|
||||||
"Default_Boundary_Region";
|
"Default_Boundary_Region";
|
||||||
|
|
||||||
const char* Foam::meshReaders::STARCD::defaultSolidBoundaryName =
|
const char* const Foam::meshReaders::STARCD::defaultSolidBoundaryName =
|
||||||
"Default_Boundary_Solid";
|
"Default_Boundary_Solid";
|
||||||
|
|
||||||
bool Foam::meshReaders::STARCD::keepSolids = false;
|
bool Foam::meshReaders::STARCD::keepSolids = false;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -68,8 +68,8 @@ protected:
|
|||||||
|
|
||||||
// Protected Data
|
// Protected Data
|
||||||
|
|
||||||
static const char* defaultBoundaryName;
|
static const char* const defaultBoundaryName;
|
||||||
static const char* defaultSolidBoundaryName;
|
static const char* const defaultSolidBoundaryName;
|
||||||
|
|
||||||
//- Face addressing from pro-STAR faces -> OpenFOAM faces
|
//- Face addressing from pro-STAR faces -> OpenFOAM faces
|
||||||
static const int starToFoamFaceAddr[4][6];
|
static const int starToFoamFaceAddr[4][6];
|
||||||
|
|||||||
@ -36,14 +36,16 @@ License
|
|||||||
#include "dynamicCode.H"
|
#include "dynamicCode.H"
|
||||||
#include "dynamicCodeContext.H"
|
#include "dynamicCodeContext.H"
|
||||||
#include "stringOps.H"
|
#include "stringOps.H"
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const Foam::word Foam::codedFixedValueFvPatchScalarField::codeTemplateC
|
const Foam::word Foam::codedFixedValueFvPatchScalarField::codeTemplateC
|
||||||
= "fixedValueFvPatchScalarFieldTemplate.C";
|
= "fixedValueFvPatchFieldTemplate.C";
|
||||||
|
|
||||||
const Foam::word Foam::codedFixedValueFvPatchScalarField::codeTemplateH
|
const Foam::word Foam::codedFixedValueFvPatchScalarField::codeTemplateH
|
||||||
= "fixedValueFvPatchScalarFieldTemplate.H";
|
= "fixedValueFvPatchFieldTemplate.H";
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||||
@ -172,6 +174,24 @@ void Foam::codedFixedValueFvPatchScalarField::unloadLibrary
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void Foam::codedFixedValueFvPatchScalarField::setFieldTemplates
|
||||||
|
(
|
||||||
|
dynamicCode& dynCode
|
||||||
|
)
|
||||||
|
{
|
||||||
|
word fieldType(pTraits<Type>::typeName);
|
||||||
|
|
||||||
|
// template type for fvPatchField
|
||||||
|
dynCode.setFilterVariable("TemplateType", fieldType);
|
||||||
|
|
||||||
|
// Name for fvPatchField - eg, ScalarField, VectorField, ...
|
||||||
|
fieldType[0] = toupper(fieldType[0]);
|
||||||
|
dynCode.setFilterVariable("FieldType", fieldType + "Field");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
const Foam::IOdictionary& Foam::codedFixedValueFvPatchScalarField::dict() const
|
const Foam::IOdictionary& Foam::codedFixedValueFvPatchScalarField::dict() const
|
||||||
@ -216,14 +236,19 @@ void Foam::codedFixedValueFvPatchScalarField::createLibrary
|
|||||||
// filter with this context
|
// filter with this context
|
||||||
dynCode.reset(context);
|
dynCode.reset(context);
|
||||||
|
|
||||||
|
// take no chances - typeName must be identical to redirectType_
|
||||||
|
dynCode.setFilterVariable("typeName", redirectType_);
|
||||||
|
|
||||||
|
// set TemplateType and FieldType filter variables
|
||||||
|
// (for fvPatchField)
|
||||||
|
setFieldTemplates<scalar>(dynCode);
|
||||||
|
|
||||||
// compile filtered C template
|
// compile filtered C template
|
||||||
dynCode.addCompileFile(codeTemplateC);
|
dynCode.addCompileFile(codeTemplateC);
|
||||||
|
|
||||||
// copy filtered H template
|
// copy filtered H template
|
||||||
dynCode.addCopyFile(codeTemplateH);
|
dynCode.addCopyFile(codeTemplateH);
|
||||||
|
|
||||||
// take no chances - typeName must be identical to redirectType_
|
|
||||||
dynCode.setFilterVariable("typeName", redirectType_);
|
|
||||||
|
|
||||||
// debugging: make BC verbose
|
// debugging: make BC verbose
|
||||||
// dynCode.setFilterVariable("verbose", "true");
|
// dynCode.setFilterVariable("verbose", "true");
|
||||||
|
|||||||
@ -136,6 +136,11 @@ class codedFixedValueFvPatchScalarField
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Set TemplateType and FieldType filter variables
|
||||||
|
template<class Type>
|
||||||
|
static void setFieldTemplates(dynamicCode&);
|
||||||
|
|
||||||
|
|
||||||
//- Create library based on the dynamicCodeContext
|
//- Create library based on the dynamicCodeContext
|
||||||
void createLibrary(dynamicCode&, const dynamicCodeContext&) const;
|
void createLibrary(dynamicCode&, const dynamicCodeContext&) const;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
Reference in New Issue
Block a user