FEATURE: Several minor feature improvements, including turbulent viscosity limiters, mesh flux check, 2nd order correction on symmetry plane. Author: Hrvoje Jasak.

This commit is contained in:
Dominik Christ 2015-04-22 10:56:30 +01:00
commit 4ef5a2ad65
82 changed files with 984 additions and 32 deletions

View file

@ -0,0 +1,274 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | foam-extend: Open Source CFD
# \\ / O peration |
# \\ / A nd | For copyright notice see file Copyright
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of foam-extend.
#
# foam-extend is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# foam-extend is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
#
# Script
# RPM spec file for ParaView-4.3.1
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Authors:
# Martin Beaudoin, Hydro-Quebec, (2010)
# Andreas Feymark, Chalmers University of Technology, (2013)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# Disable the generation of debuginfo packages
%define debug_package %{nil}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in this file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name ParaView
%define release %{_WM_OPTIONS}
%define version 4.3.1
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: ParaView
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://www.paraview.org/files/v4.3/
Source: %url/%{name}-v%{version}-source.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
Patch0: paraview-4.3.1.patch_darwin
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
#--------------------------------------------------------------------------
#
# Here, we define default compiling options for cmake
#
# One can override the option on the commande line : --define='MACRO EXPR'
#
%{!?_withVerbose: %define _withVerbose false}
%{!?_withMesa: %define _withMesa false}
%{!?_withMPI: %define _withMPI false}
%{!?_withPython: %define _withPython false}
%{!?_withQt: %define _withQt true}
%{!?_qmakePath: %define _qmakePath Undefined}
%{!?_mesaIncludePath: %define _mesaIncludePath Undefined}
%{!?_mesaLibPath: %define _mesaLibPath Undefined}
%{!?_pythonLibPath: %define _pythonLibPath Undefined}
#--------------------------------------------------------------------------
%description
%{summary}
%prep
%setup -q -n %{name}-v%{version}-source
%ifos darwin
%patch0 -p1
%endif
%build
#
# set CMake cache variables
#
addCMakeVariable()
{
while [ -n "$1" ]
do
CMAKE_VARIABLES="$CMAKE_VARIABLES -D$1"
shift
done
}
# export WM settings in a form that GNU configure recognizes
[ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
set +x
echo ""
echo "Compilation options:"
echo " _withVerbose : %{_withVerbose}"
echo " _withMesa : %{_withMesa}"
echo " _withMPI : %{_withMPI}"
echo " _withPython : %{_withPython}"
echo " _withQt : %{_withQt}"
echo " _qmakePath : %{_qmakePath}"
echo " _mesaIncludePath : %{_mesaIncludePath}"
echo " _mesaLibPath : %{_mesaLibPath}"
echo " _pythonLibPath : %{_pythonLibPath}"
echo ""
set -x
# start with these general settings
addCMakeVariable VTK_USE_TK:BOOL=OFF
addCMakeVariable BUILD_SHARED_LIBS:BOOL=ON VTK_USE_RPATH:BOOL=OFF
addCMakeVariable CMAKE_BUILD_TYPE:STRING=Release
# include development files in "make install"
addCMakeVariable PARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON
# new alternative to "make HTMLDocumentation"
addCMakeVariable PARAVIEW_GENERATE_PROXY_DOCUMENTATION:BOOL=ON
%ifos darwin
# Additional installation rules for Mac OS X
addCMakeVariable PARAVIEW_EXTRA_INSTALL_RULES_FILE:FILEPATH=%{_topdir}/BUILD/%{name}-%{version}/Applications/ParaView-3.8.1_extra_install_Darwin.cmake
%endif
# Add the value of _qmakePath for QT_QMAKE_EXECUTABLE
addCMakeVariable QT_QMAKE_EXECUTABLE:FILEPATH=%{_qmakePath}
echo "CMAKE_VARIABLES: $CMAKE_VARIABLES"
mkdir -p ./buildObj
cd ./buildObj
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=%{_installPrefix} \
$CMAKE_VARIABLES \
..
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
make -j $WM_NCOMPPROCS
%install
# On OpenSUSE, rpmbuild, will choke when detecting unreferenced symlinks
# created during installation.
# Qt version 4.6.3 will generate some unreferenced symlinks when
# ParaView is compiled and installed. By enabling the following
# environment variable, the command brp-symlink will still complain
# about missing link targets, but it won't stop rpmbuild from generating
# the final rpm.
# For all other Unix distros, this is a no-op.
export NO_BRP_STALE_LINK_ERROR=yes
cd buildObj
make install DESTDIR=$RPM_BUILD_ROOT
# Creation of foam-extend specific .csh and .sh files"
echo ""
echo "Generating foam-extend specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for foam-extend
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export PARAVIEW_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
export PARAVIEW_BIN_DIR=\$PARAVIEW_DIR/bin
export PARAVIEW_LIB_DIR=\$PARAVIEW_DIR/lib
export PARAVIEW_INCLUDE_DIR=\$PARAVIEW_DIR/include/paraview-4.2
export PARAVIEW_VERSION=%{version}
# NB: It is important to set the PV_PLUGIN_PATH location to a directory containing only the ParaView plugins.
# Otherwise, paraview will try to automatically autoload each and every dynamic library it can find in the
# specified directory to see if a given library is a paraview plugin.
# In the case of \$FOAM_LIBBIN, with over 80 libraries, this is a total waste of time that will slow down the
# startup of paraview or even make paraview crash on startup.
export PV_PLUGIN_PATH=\$FOAM_LIBBIN/paraview_plugins
[ -d \$PARAVIEW_LIB_DIR/paraview-4.2 ] && _foamAddLib \$PARAVIEW_LIB_DIR/paraview-4.2
# Enable access to the package applications if present
[ -d \$PARAVIEW_BIN_DIR ] && _foamAddPath \$PARAVIEW_BIN_DIR
# Additional binary path if running on Mac OS X
[ -d \$PARAVIEW_BIN_DIR/paraview.app/Contents/MacOS ] && _foamAddPath \$PARAVIEW_BIN_DIR/paraview.app/Contents/MacOS
DOT_SH_EOF
#
# Generate package specific .csh file for foam-extend
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv PARAVIEW_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
setenv PARAVIEW_BIN_DIR \$PARAVIEW_DIR/bin
setenv PARAVIEW_LIB_DIR \$PARAVIEW_DIR/lib
setenv PARAVIEW_INCLUDE_DIR \$PARAVIEW_DIR/include/paraview-4.2
setenv PARAVIEW_VERSION %{version}
# NB: It is important to set the PV_PLUGIN_PATH location to a directory containing only the ParaView plugins.
# Otherwise, paraview will try to automatically autoload each and every dynamic library it can find in the
# specified directory to see if a given library is a paraview plugin.
# In the case of \$FOAM_LIBBIN, with over 80 libraries, this is a total waste of time that will slow down the
# startup of paraview or even make paraview crash on startup.
setenv PV_PLUGIN_PATH \$FOAM_LIBBIN/paraview_plugins
if ( -e \$PARAVIEW_BIN_DIR ) then
_foamAddPath \$PARAVIEW_BIN_DIR
endif
if ( -e \$PARAVIEW_LIB_DIR/paraview-4.2 ) then
_foamAddLib \$PARAVIEW_LIB_DIR/paraview-4.2
endif
# Additional binary path if running on Mac OS X
if ( -e \$PARAVIEW_BIN_DIR/paraview.app/Contents/MacOS ) then
_foamAddPath \$PARAVIEW_BIN_DIR/paraview.app/Contents/MacOS
endif
DOT_CSH_EOF
#finally, generate a .tgz file for systems where using rpm for installing packages
# as a non-root user might be a problem.
(mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
%clean
%files
%defattr(-,root,root)
%{_installPrefix}

View file

@ -67,6 +67,22 @@ int main(int argc, char *argv[])
if (runTime.timeIndex() % checkFrequency == 0)
{
mesh.checkMesh(true);
volScalarField magMeshCo
(
"magMeshCo",
fvc::surfaceSum
(
mag
(
mesh.phi()*
mesh.surfaceInterpolation::deltaCoeffs()/
mesh.magSf()
)
)
);
magMeshCo.write();
}
runTime.write();

View file

@ -536,6 +536,9 @@ endif
# PARAVIEW
# ~~~~~
#if ( $?PARAVIEW_SYSTEM == 0 && -e "$WM_THIRD_PARTY_DIR"/packages/ParaView-4.3.1/platforms/$WM_OPTIONS ) then
# _foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-4.3.1/platforms/$WM_OPTIONS/etc/ParaView-4.3.1.csh
if ( $?PARAVIEW_SYSTEM == 0 && -e "$WM_THIRD_PARTY_DIR"/packages/ParaView-4.0.1/platforms/$WM_OPTIONS ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-4.0.1/platforms/$WM_OPTIONS/etc/ParaView-4.0.1.csh

View file

@ -649,6 +649,8 @@ export MPI_BUFFER_SIZE
# Load ParaView
# ~~~~~~~~~~~~~
#[ -z "$PARAVIEW_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/ParaView-4.3.1/platforms/$WM_OPTIONS ] && {
# _foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-4.3.1/platforms/$WM_OPTIONS/etc/ParaView-4.3.1.sh
[ -z "$PARAVIEW_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/ParaView-4.0.1/platforms/$WM_OPTIONS ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-4.0.1/platforms/$WM_OPTIONS/etc/ParaView-4.0.1.sh
#[ -z "$PARAVIEW_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/ParaView-3.14.1/platforms/$WM_OPTIONS ] && {

View file

@ -178,7 +178,7 @@ void Foam::linearValveFvMesh::addZonesAndModifiers()
}
void Foam::linearValveFvMesh::makeSlidersDead()
void Foam::linearValveFvMesh::deactivateSliders()
{
const polyTopoChanger& topoChanges = topoChanger_;
@ -191,7 +191,7 @@ void Foam::linearValveFvMesh::makeSlidersDead()
}
else
{
FatalErrorIn("void Foam::linearValveFvMesh::makeSlidersDead()")
FatalErrorIn("void Foam::linearValveFvMesh::deactivateSliders()")
<< "Don't know what to do with mesh modifier "
<< modI << " of type " << topoChanges[modI].type()
<< abort(FatalError);
@ -200,7 +200,7 @@ void Foam::linearValveFvMesh::makeSlidersDead()
}
void Foam::linearValveFvMesh::makeSlidersLive()
void Foam::linearValveFvMesh::activateSliders()
{
const polyTopoChanger& topoChanges = topoChanger_;
@ -213,7 +213,7 @@ void Foam::linearValveFvMesh::makeSlidersLive()
}
else
{
FatalErrorIn("void Foam::linearValveFvMesh::makeLayersLive()")
FatalErrorIn("void Foam::linearValveFvMesh::activateSliders()")
<< "Don't know what to do with mesh modifier "
<< modI << " of type " << topoChanges[modI].type()
<< abort(FatalError);
@ -250,7 +250,8 @@ bool Foam::linearValveFvMesh::attached() const
)
{
FatalErrorIn("bool linearValveFvMesh::attached() const")
<< "Slider " << modI << " named " << topoChanges[modI].name()
<< "Slider " << modI << " named "
<< topoChanges[modI].name()
<< " out of sync: Should be" << result
<< abort(FatalError);
}
@ -310,7 +311,7 @@ bool Foam::linearValveFvMesh::update()
if (attached())
{
Info << "Decoupling sliding interfaces" << endl;
makeSlidersLive();
activateSliders();
// Changing topology by hand
autoPtr<mapPolyMesh> topoChangeMap1 = topoChanger_.changeMesh();
@ -326,7 +327,7 @@ bool Foam::linearValveFvMesh::update()
}
// Perform mesh motion
makeSlidersDead();
deactivateSliders();
// Changing topology by hand
{
@ -351,7 +352,7 @@ bool Foam::linearValveFvMesh::update()
// Attach the interface
Info << "Coupling sliding interfaces" << endl;
makeSlidersLive();
activateSliders();
// Changing topology by hand
{

View file

@ -72,11 +72,11 @@ class linearValveFvMesh
//- Add linearValve zones and modifiers
void addZonesAndModifiers();
//- Make sliding modifiers live
void makeSlidersDead();
//- Make sliding modifiers inactive
void deactivateSliders();
//- Make sliding modifiers live
void makeSlidersLive();
//- Make sliding modifiers active
void activateSliders();
//- Return true if sliders are attached
bool attached() const;

View file

@ -40,7 +40,9 @@ basicSymmetryFvPatchField<Type>::basicSymmetryFvPatchField
const DimensionedField<Type, volMesh>& iF
)
:
transformFvPatchField<Type>(p, iF)
transformFvPatchField<Type>(p, iF),
skewCorrected_(false),
secondOrder_(false)
{}
@ -53,7 +55,9 @@ basicSymmetryFvPatchField<Type>::basicSymmetryFvPatchField
const fvPatchFieldMapper& mapper
)
:
transformFvPatchField<Type>(ptf, p, iF, mapper)
transformFvPatchField<Type>(ptf, p, iF, mapper),
skewCorrected_(ptf.skewCorrected_),
secondOrder_(ptf.secondOrder_)
{}
@ -65,9 +69,22 @@ basicSymmetryFvPatchField<Type>::basicSymmetryFvPatchField
const dictionary& dict
)
:
transformFvPatchField<Type>(p, iF, dict)
transformFvPatchField<Type>(p, iF, dict),
skewCorrected_(dict.lookupOrDefault<Switch>("skewCorrected", false)),
secondOrder_(dict.lookupOrDefault<Switch>("secondOrder", false))
{
this->evaluate();
// Read the value if present
if (dict.found("value"))
{
fvPatchField<Type>::operator==
(
Field<Type>("value", dict, p.size())
);
}
else
{
this->evaluate();
}
}
@ -77,7 +94,9 @@ basicSymmetryFvPatchField<Type>::basicSymmetryFvPatchField
const basicSymmetryFvPatchField<Type>& ptf
)
:
transformFvPatchField<Type>(ptf)
transformFvPatchField<Type>(ptf),
skewCorrected_(ptf.skewCorrected_),
secondOrder_(ptf.secondOrder_)
{}
@ -88,26 +107,34 @@ basicSymmetryFvPatchField<Type>::basicSymmetryFvPatchField
const DimensionedField<Type, volMesh>& iF
)
:
transformFvPatchField<Type>(ptf, iF)
transformFvPatchField<Type>(ptf, iF),
skewCorrected_(ptf.skewCorrected_),
secondOrder_(ptf.secondOrder_)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// return gradient at boundary
// Return gradient at boundary
// Note: see template specialisations for second order behaviour
// HJ, 18/Mar/2015
template<class Type>
tmp<Field<Type> > basicSymmetryFvPatchField<Type>::snGrad() const
{
vectorField nHat = this->patch().nf();
const Field<Type> pif = this->patchInternalField();
return
(
transform(I - 2.0*sqr(nHat), this->patchInternalField())
- this->patchInternalField()
transform(I - 2.0*sqr(nHat), pif) - pif
)*(this->patch().deltaCoeffs()/2.0);
}
// Evaluate the field on the patch
// Note: see template specialisations for second order behaviour
// HJ, 18/Mar/2015
template<class Type>
void basicSymmetryFvPatchField<Type>::evaluate(const Pstream::commsTypes)
{
@ -119,6 +146,7 @@ void basicSymmetryFvPatchField<Type>::evaluate(const Pstream::commsTypes)
vectorField nHat = this->patch().nf();
Field<Type> pif = this->patchInternalField();
Field<Type>::operator=
(
0.5*(pif + transform(I - 2.0*sqr(nHat), pif))
@ -143,6 +171,32 @@ tmp<Field<Type> > basicSymmetryFvPatchField<Type>::snGradTransformDiag() const
}
template<class Type>
void basicSymmetryFvPatchField<Type>::write(Ostream& os) const
{
fvPatchField<Type>::write(os);
this->writeEntryIfDifferent
(
os,
"skewCorrected",
Switch(false),
skewCorrected_
);
this->writeEntryIfDifferent
(
os,
"secondOrder",
Switch(false),
secondOrder_
);
// Write values. HJ, 18/Mar/2015
this->writeEntry("value", os);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam

View file

@ -52,6 +52,14 @@ class basicSymmetryFvPatchField
:
public transformFvPatchField<Type>
{
// Private Data
//- Skew correction
Switch skewCorrected_;
//- Second order accuracy correction
Switch secondOrder_;
public:
@ -76,7 +84,8 @@ public:
const dictionary&
);
//- Construct by mapping given basicSymmetryFvPatchField onto a new patch
//- Construct by mapping given basicSymmetryFvPatchField onto a
// new patch
basicSymmetryFvPatchField
(
const basicSymmetryFvPatchField<Type>&,
@ -137,13 +146,19 @@ public:
//- Return face-gradient transform diagonal
virtual tmp<Field<Type> > snGradTransformDiag() const;
// I-O
//- Write
virtual void write(Ostream& os) const;
};
// * * * * * * * * * * * Template Specialisations * * * * * * * * * * * * * //
template<>
tmp<scalarField > basicSymmetryFvPatchField<scalar>::snGrad() const;
tmp<scalarField> basicSymmetryFvPatchField<scalar>::snGrad() const;
template<>
void basicSymmetryFvPatchField<scalar>::evaluate
@ -151,6 +166,15 @@ void basicSymmetryFvPatchField<scalar>::evaluate
const Pstream::commsTypes commsType
);
template<>
tmp<vectorField> basicSymmetryFvPatchField<vector>::snGrad() const;
template<>
void basicSymmetryFvPatchField<vector>::evaluate
(
const Pstream::commsTypes commsType
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View file

@ -36,20 +36,270 @@ namespace Foam
template<>
tmp<scalarField > basicSymmetryFvPatchField<scalar>::snGrad() const
{
return tmp<scalarField >(new scalarField(size(), 0.0));
return tmp<scalarField>(new scalarField(size(), scalar(0)));
}
// Note:
// Skew correction and second order is currently handled in template
// specialisations because
// Note 2: Currently repeated code in evaluate after typedefs.
// Refactor. HJ, 18/Mar/2015
template<>
void basicSymmetryFvPatchField<scalar>::evaluate(const Pstream::commsTypes)
{
// Local typedefs
typedef scalar Type;
typedef typename outerProduct<vector, Type>::type gradType;
typedef GeometricField<gradType, fvPatchField, volMesh> gradFieldType;
if (!updated())
{
updateCoeffs();
}
scalarField::operator=(patchInternalField());
transformFvPatchField<scalar>::evaluate();
vectorField nHat = this->patch().nf();
// Get patch internal field
Field<Type> pif = this->patchInternalField();
// Skew corrected treatment
if (skewCorrected_)
{
// Access the gradient
const word DName = this->dimensionedInternalField().name();
const word gradDName("grad(" + DName + ")");
if (!this->db().foundObject<gradFieldType>(gradDName))
{
InfoIn
(
"void basicSymmetryFvPatchField<Type>::"
"evaluate(const Pstream::commsTypes)"
) << "Cannot access " << gradDName << " field for field "
<< DName << " for patch "<< this->patch().name()
<< ". Evaluating without skew correction"
<< endl;
}
else
{
// Calculate skew correction vector k
vectorField delta = patch().delta();
vectorField k = delta - nHat*(nHat&delta);
// Get gradient
const fvPatchField<gradType>& gradD =
patch().lookupPatchField<gradFieldType, gradType>(gradDName);
// Correct cell value for k
pif += (k & gradD.patchInternalField());
if (secondOrder_)
{
Field<Type> nGradD = (nHat & gradD.patchInternalField());
Field<Type>::operator=
(
transform
(
I - sqr(nHat),
pif + 0.5*nGradD/this->patch().deltaCoeffs()
)
);
// Return, skew corrected, second order
transformFvPatchField<Type>::evaluate();
return;
}
else
{
Field<Type>::operator=
(
0.5*(pif + transform(I - 2.0*sqr(nHat), pif))
);
// Return, skew corrected without second order correction
transformFvPatchField<Type>::evaluate();
return;
}
}
}
// Without skew correction
Field<Type>::operator=
(
0.5*(pif + transform(I - 2.0*sqr(nHat), pif))
);
transformFvPatchField<Type>::evaluate();
}
template<>
tmp<vectorField> basicSymmetryFvPatchField<vector>::snGrad() const
{
// Local typedefs
typedef vector Type;
typedef typename outerProduct<vector, Type>::type gradType;
typedef GeometricField<gradType, fvPatchField, volMesh> gradFieldType;
vectorField nHat = this->patch().nf();
// Get patch internal field
Field<Type> pif = this->patchInternalField();
// Skew corrected treatment
if (skewCorrected_)
{
// Access the gradient
const word DName = this->dimensionedInternalField().name();
const word gradDName("grad(" + DName + ")");
if (!this->db().foundObject<gradFieldType>(gradDName))
{
InfoIn
(
"void basicSymmetryFvPatchField<Type>::snGrad() const"
) << "Cannot access " << gradDName << " field for field "
<< DName << " for patch "<< this->patch().name()
<< ". Evaluating without skew correction"
<< endl;
}
else
{
// Calculate skew correction vector k
vectorField delta = patch().delta();
vectorField k = delta - nHat*(nHat&delta);
// Get gradient
const fvPatchField<gradType>& gradD =
patch().lookupPatchField<gradFieldType, gradType>(gradDName);
// Correct cell value for k
pif += (k & gradD.patchInternalField());
if (secondOrder_)
{
Field<Type> nGradD = (nHat & gradD.patchInternalField());
// Return, skew corrected, second order
return 2*
(
transform(I - 2.0*sqr(nHat), pif) - pif
)*(this->patch().deltaCoeffs()/2.0)
- transform(sqr(nHat), nGradD);
}
else
{
// Return, skew corrected, without second order correction
return
(
transform(I - 2.0*sqr(nHat), pif) - pif
)*(this->patch().deltaCoeffs()/2.0);
}
}
}
// Without skew correction
return
(
transform(I - 2.0*sqr(nHat), pif) - pif
)*(this->patch().deltaCoeffs()/2.0);
}
template<>
void basicSymmetryFvPatchField<vector>::evaluate(const Pstream::commsTypes)
{
// Local typedefs
typedef vector Type;
typedef typename outerProduct<vector, Type>::type gradType;
typedef GeometricField<gradType, fvPatchField, volMesh> gradFieldType;
if (!updated())
{
updateCoeffs();
}
if (!updated())
{
updateCoeffs();
}
vectorField nHat = this->patch().nf();
// Get patch internal field
Field<Type> pif = this->patchInternalField();
// Skew corrected treatment
if (skewCorrected_)
{
// Access the gradient
const word DName = this->dimensionedInternalField().name();
const word gradDName("grad(" + DName + ")");
if (!this->db().foundObject<gradFieldType>(gradDName))
{
InfoIn
(
"void basicSymmetryFvPatchField<Type>::"
"evaluate(const Pstream::commsTypes)"
) << "Cannot access " << gradDName << " field for field "
<< DName << " for patch "<< this->patch().name()
<< ". Evaluating without skew correction"
<< endl;
}
else
{
// Calculate skew correction vector k
vectorField delta = patch().delta();
vectorField k = delta - nHat*(nHat&delta);
// Get gradient
const fvPatchField<gradType>& gradD =
patch().lookupPatchField<gradFieldType, gradType>(gradDName);
// Correct cell value for k
pif += (k & gradD.patchInternalField());
if (secondOrder_)
{
Field<Type> nGradD = (nHat & gradD.patchInternalField());
Field<Type>::operator=
(
transform
(
I - sqr(nHat),
pif + 0.5*nGradD/this->patch().deltaCoeffs()
)
);
// Return, skew corrected, second order
transformFvPatchField<Type>::evaluate();
return;
}
else
{
Field<Type>::operator=
(
0.5*(pif + transform(I - 2.0*sqr(nHat), pif))
);
// Return, skew corrected without second order correction
transformFvPatchField<Type>::evaluate();
return;
}
}
}
// Without skew correction
Field<Type>::operator=
(
0.5*(pif + transform(I - 2.0*sqr(nHat), pif))
);
transformFvPatchField<Type>::evaluate();
}

View file

@ -123,6 +123,17 @@ symmetryFvsPatchField<Type>::symmetryFvsPatchField
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// Write
template<class Type>
void symmetryFvsPatchField<Type>::write(Ostream& os) const
{
fvsPatchField<Type>::write(os);
this->writeEntry("value", os);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam

View file

@ -118,6 +118,12 @@ public:
new symmetryFvsPatchField<Type>(*this, iF)
);
}
// I-O
//- Write
virtual void write(Ostream&) const;
};

View file

@ -123,6 +123,17 @@ wedgeFvsPatchField<Type>::wedgeFvsPatchField
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// Write
template<class Type>
void wedgeFvsPatchField<Type>::write(Ostream& os) const
{
fvsPatchField<Type>::write(os);
this->writeEntry("value", os);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam

View file

@ -118,6 +118,12 @@ public:
new wedgeFvsPatchField<Type>(*this, iF)
);
}
// I-O
//- Write
virtual void write(Ostream&) const;
};

View file

@ -208,6 +208,9 @@ void Foam::coarseAmgLevel::solve
return;
}
// Switch of debug in top-level direct solve
label oldDebug = lduMatrix::debug;
if (matrixPtr_->matrix().symmetric())
{
topLevelDict.add("preconditioner", "Cholesky");
@ -237,6 +240,9 @@ void Foam::coarseAmgLevel::solve
).solve(x, b, cmpt);
}
// Restore debug
lduMatrix::debug = oldDebug;
// Escape cases of top-level solver divergence
if
(

View file

@ -188,7 +188,7 @@ Foam::lduSolverPerformance Foam::deflationSolver::solve
scalarFieldField Q(2);
forAll (Q, i)
{
Q.set(i, new scalarField(x.size()));
Q.set(i, new scalarField(x.size(), 0));
}
// Create stable (q) and unstable (p) solution

View file

@ -106,11 +106,16 @@ void Foam::fixedEnthalpyFvPatchScalarField::updateCoeffs()
if
(
dimensionedInternalField().name() == db().mangleFileName("h")
|| dimensionedInternalField().name() == db().mangleFileName("i")
)
{
operator==(thermo.h(Tw, patchi));
}
else if
(
dimensionedInternalField().name() == db().mangleFileName("i")
)
{
}
else
{
operator==(thermo.hs(Tw, patchi));

View file

@ -107,7 +107,6 @@ void Foam::gradientEnthalpyFvPatchScalarField::updateCoeffs()
if
(
dimensionedInternalField().name() == db().mangleFileName("h")
|| dimensionedInternalField().name() == db().mangleFileName("i")
)
{
gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad()
@ -117,6 +116,12 @@ void Foam::gradientEnthalpyFvPatchScalarField::updateCoeffs()
- thermo.h(Tw, patch().faceCells())
);
}
else if
(
dimensionedInternalField().name() == db().mangleFileName("i")
)
{
}
else
{
gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad()

View file

@ -115,7 +115,6 @@ void Foam::mixedEnthalpyFvPatchScalarField::updateCoeffs()
if
(
dimensionedInternalField().name() == db().mangleFileName("h")
|| dimensionedInternalField().name() == db().mangleFileName("i")
)
{
refValue() = thermo.h(Tw.refValue(), patchi);
@ -126,6 +125,12 @@ void Foam::mixedEnthalpyFvPatchScalarField::updateCoeffs()
- thermo.h(Tw, patch().faceCells())
);
}
else if
(
dimensionedInternalField().name() == db().mangleFileName("i")
)
{
}
else
{
refValue() = thermo.hs(Tw.refValue(), patchi);

View file

@ -228,6 +228,7 @@ LRR::LRR
}
mut_ = Cmu_*rho_*sqr(k_)/(epsilon_ + epsilonSmall_);
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
alphat_ = mut_/Prt_;
@ -331,6 +332,7 @@ void LRR::correct()
{
// Re-calculate viscosity
mut_ = rho_*Cmu_*sqr(k_)/(epsilon_ + epsilonSmall_);
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
// Re-calculate thermal diffusivity
@ -432,6 +434,7 @@ void LRR::correct()
// Re-calculate viscosity
mut_ = rho_*Cmu_*sqr(k_)/epsilon_;
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
// Re-calculate thermal diffusivity

View file

@ -257,6 +257,7 @@ LaunderGibsonRSTM::LaunderGibsonRSTM
}
mut_ = Cmu_*rho_*sqr(k_)/(epsilon_ + epsilonSmall_);
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
alphat_ = mut_/Prt_;
@ -364,6 +365,7 @@ void LaunderGibsonRSTM::correct()
{
// Re-calculate viscosity
mut_ = rho_*Cmu_*sqr(k_)/(epsilon_ + epsilonSmall_);
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
// Re-calculate thermal diffusivity
@ -479,6 +481,7 @@ void LaunderGibsonRSTM::correct()
// Re-calculate turbulent viscosity
mut_ = Cmu_*rho_*sqr(k_)/epsilon_;
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
// Re-calculate thermal diffusivity

View file

@ -187,6 +187,7 @@ LaunderSharmaKE::LaunderSharmaKE
)
{
mut_ = rho_*Cmu_*fMu()*sqr(k_)/(epsilon_ + epsilonSmall_);
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
alphat_ = mut_/Prt_;
@ -283,6 +284,7 @@ void LaunderSharmaKE::correct()
{
// Re-calculate viscosity
mut_ == rho_*Cmu_*fMu()*sqr(k_)/(epsilon_ + epsilonSmall_);
mut_ == min(mut_, muRatio()*mu());
// Re-calculate thermal diffusivity
alphat_ = mut_/Prt_;
@ -350,6 +352,7 @@ void LaunderSharmaKE::correct()
// Re-calculate viscosity
mut_ == Cmu_*fMu()*rho_*sqr(k_)/(epsilon_ + epsilonSmall_);
mut_ == min(mut_, muRatio()*mu());
// Re-calculate thermal diffusivity

View file

@ -168,10 +168,16 @@ scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const
tmp<volScalarField> RASModel::muEff() const
{
return tmp<volScalarField>
tmp<volScalarField> tmuEff
(
new volScalarField("muEff", mut() + mu())
);
// Apply mut limiter
tmuEff().internalField() =
Foam::min(tmuEff().internalField(), muRatio_*mu().internalField());
return tmuEff;
}

View file

@ -186,6 +186,7 @@ RNGkEpsilon::RNGkEpsilon
)
{
mut_ = Cmu_*rho_*sqr(k_)/(epsilon_ + epsilonSmall_);
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
alphat_ = mut_/Prt_;
@ -284,6 +285,7 @@ void RNGkEpsilon::correct()
{
// Re-calculate viscosity
mut_ = rho_*Cmu_*sqr(k_)/(epsilon_ + epsilonSmall_);
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
// Re-calculate thermal diffusivity
@ -358,6 +360,7 @@ void RNGkEpsilon::correct()
// Re-calculate viscosity
mut_ = rho_*Cmu_*sqr(k_)/epsilon_;
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
// Re-calculate thermal diffusivity

View file

@ -168,6 +168,7 @@ kEpsilon::kEpsilon
)
{
mut_ = Cmu_*rho_*sqr(k_)/(epsilon_ + epsilonSmall_);
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
alphat_ = mut_/Prt_;
@ -265,6 +266,7 @@ void kEpsilon::correct()
{
// Re-calculate viscosity
mut_ = rho_*Cmu_*sqr(k_)/(epsilon_ + epsilonSmall_);
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
// Re-calculate thermal diffusivity
@ -332,6 +334,7 @@ void kEpsilon::correct()
// Re-calculate viscosity
mut_ = rho_*Cmu_*sqr(k_)/epsilon_;
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
// Re-calculate thermal diffusivity

View file

@ -268,6 +268,7 @@ kOmegaSST::kOmegaSST
F2()*sqrt(2*magSqr(symm(fvc::grad(U_))))
)
);
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
alphat_ = mut_/Prt_;
@ -371,6 +372,7 @@ void kOmegaSST::correct()
mut_ =
a1_*rho_*k_
/max(a1_*omega_, F2()*sqrt(2*magSqr(symm(fvc::grad(U_)))));
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
// Re-calculate thermal diffusivity
@ -454,6 +456,7 @@ void kOmegaSST::correct()
// Re-calculate viscosity
mut_ = a1_*rho_*k_/max(a1_*omega_, F2()*sqrt(2*S2));
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
// Re-calculate thermal diffusivity

View file

@ -203,6 +203,7 @@ realizableKE::realizableKE
bound(epsilon_, epsilon0_);
mut_ = rCmu(fvc::grad(U_))*rho_*sqr(k_)/(epsilon_ + epsilonSmall_);
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
alphat_ = mut_/Prt_;
@ -298,6 +299,7 @@ void realizableKE::correct()
{
// Re-calculate viscosity
mut_ = rCmu(fvc::grad(U_))*rho_*sqr(k_)/epsilon_;
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
// Re-calculate thermal diffusivity
@ -371,6 +373,7 @@ void realizableKE::correct()
// Re-calculate viscosity
mut_ = rCmu(gradU, S2, magS)*rho_*sqr(k_)/epsilon_;
mut_ = min(mut_, muRatio()*mu());
mut_.correctBoundaryConditions();
// Re-calculate thermal diffusivity

View file

@ -185,6 +185,7 @@ LRR::LRR
)
{
nut_ = Cmu_*sqr(k_)/(epsilon_ + epsilonSmall_);
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0)
@ -394,6 +395,7 @@ void LRR::correct()
// Re-calculate viscosity
nut_ = Cmu_*sqr(k_)/epsilon_;
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();

View file

@ -140,6 +140,7 @@ LamBremhorstKE::LamBremhorstKE
)
{
nut_ = Cmu_*fMu_*sqr(k_)/(epsilon_ + epsilonSmall_);
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
printCoeffs();
@ -290,6 +291,7 @@ void LamBremhorstKE::correct()
// Re-calculate viscosity
nut_ == Cmu_*fMu_*sqr(k_)/epsilon_;
nut_ == min(nut_, nuRatio()*nu());
}

View file

@ -223,6 +223,7 @@ LaunderGibsonRSTM::LaunderGibsonRSTM
)
{
nut_ = Cmu_*sqr(k_)/(epsilon_ + epsilonSmall_);
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0)
@ -443,6 +444,7 @@ void LaunderGibsonRSTM::correct()
// Re-calculate turbulent viscosity
nut_ = Cmu_*sqr(k_)/epsilon_;
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();

View file

@ -146,6 +146,7 @@ LaunderSharmaKE::LaunderSharmaKE
)
{
nut_ = Cmu_*fMu()*sqr(k_)/(epsilonTilda_ + epsilonSmall_);
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
printCoeffs();
@ -286,6 +287,7 @@ void LaunderSharmaKE::correct()
// Re-calculate viscosity
nut_ == Cmu_*fMu()*sqr(k_)/epsilonTilda_;
nut_ == min(nut_, nuRatio()*nu());
}

View file

@ -292,6 +292,7 @@ LienCubicKELowRe::LienCubicKELowRe
dimensionedScalar("0", C5viscosity_.dimensions(), 0.0)
);
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
printCoeffs();
@ -482,6 +483,8 @@ void LienCubicKELowRe::correct()
C5viscosity_,
dimensionedScalar("0", C5viscosity_.dimensions(), 0.0)
);
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
nonlinearStress_ = symm
(

View file

@ -182,6 +182,7 @@ LienLeschzinerLowRe::LienLeschzinerLowRe
nut_ = Cmu_*(scalar(1) - exp(-Am_*yStar_))
/(scalar(1) - exp(-Aepsilon_*yStar_) + SMALL)*sqr(k_)
/(epsilon_ + epsilonSmall_);
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
printCoeffs();
@ -353,6 +354,8 @@ void LienLeschzinerLowRe::correct()
// Re-calculate viscosity
nut_ = Cmu_*fMu*sqr(k_)/epsilon_;
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
}

View file

@ -163,10 +163,16 @@ scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const
tmp<volScalarField> RASModel::nuEff() const
{
return tmp<volScalarField>
tmp<volScalarField> tnuEff
(
new volScalarField("nuEff", nut() + nu())
);
// Apply nut limiter
tnuEff().internalField() =
Foam::min(tnuEff().internalField(), nuRatio_*nu().internalField());
return tnuEff;
}

View file

@ -155,6 +155,7 @@ RNGkEpsilon::RNGkEpsilon
)
{
nut_ = Cmu_*sqr(k_)/(epsilon_ + epsilonSmall_);
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
printCoeffs();
@ -306,6 +307,7 @@ void RNGkEpsilon::correct()
// Re-calculate viscosity
nut_ = Cmu_*sqr(k_)/epsilon_;
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
}

View file

@ -390,6 +390,7 @@ void SpalartAllmaras::correct()
nuTilda_.correctBoundaryConditions();
nut_.internalField() = fv1*nuTilda_.internalField();
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
}

View file

@ -128,6 +128,7 @@ kEpsilon::kEpsilon
)
{
nut_ = Cmu_*sqr(k_)/(epsilon_ + epsilonSmall_);
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
printCoeffs();
@ -268,6 +269,7 @@ void kEpsilon::correct()
// Re-calculate viscosity
nut_ = Cmu_*sqr(k_)/epsilon_;
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
}

View file

@ -137,6 +137,7 @@ kOmega::kOmega
)
{
nut_ = k_/(omega_ + omegaSmall_);
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
printCoeffs();
@ -277,6 +278,7 @@ void kOmega::correct()
// Re-calculate viscosity
nut_ = k_/(omega_ + omegaSmall_);
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
}

View file

@ -238,6 +238,7 @@ kOmegaSST::kOmegaSST
bound(omega_, omega0_);
nut_ = a1_*k_/max(a1_*omega_, F2()*sqrt(2.0)*mag(symm(fvc::grad(U_))));
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
printCoeffs();

View file

@ -193,6 +193,7 @@ qZeta::qZeta
)
{
nut_ = Cmu_*fMu()*sqr(k_)/(epsilon_ + epsilonSmall_);
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
printCoeffs();
@ -340,6 +341,7 @@ void qZeta::correct()
// Re-calculate viscosity
nut_ = Cmu_*fMu()*sqr(k_)/epsilon_;
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
}

View file

@ -181,6 +181,7 @@ realizableKE::realizableKE
bound(epsilon_, epsilon0_);
nut_ = rCmu(fvc::grad(U_))*sqr(k_)/(epsilon_ + epsilonSmall_);
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
printCoeffs();
@ -333,6 +334,7 @@ void realizableKE::correct()
// Re-calculate viscosity
nut_ = rCmu(gradU, S2, magS)*sqr(k_)/epsilon_;
nut_ = min(nut_, nuRatio()*nu());
nut_.correctBoundaryConditions();
}

View file

@ -0,0 +1,2 @@
by bgschaid. 2010-10-06 on Centos 5.5 with gcc 4.1

View file

@ -0,0 +1,3 @@
XFLAGS =
XINC = $(XFLAGS) -I/usr/X11R6/include
XLIBS = -L/usr/X11R6/lib64 -lXext -lX11

View file

@ -0,0 +1,16 @@
.SUFFIXES: .c .h
cWARN = -Wall
cc = gcc -m64
include $(RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
LINK_LIBS = $(cDBUG)
LINKLIBSO = $(cc) -shared
LINKEXE = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs

View file

@ -0,0 +1,21 @@
.SUFFIXES: .C .cxx .cc .cpp
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor
CC = g++ -m64
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-200
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
cxxtoo = $(Ctoo)
cctoo = $(Ctoo)
cpptoo = $(Ctoo)
LINK_LIBS = $(c++DBUG) -lrt
LINKLIBSO = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed
LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed

View file

@ -0,0 +1,2 @@
c++DBUG = -ggdb3 -DFULLDEBUG
c++OPT = -O0 -fdefault-inline

View file

@ -0,0 +1,4 @@
c++DBUG =
c++OPT = -O3
#c++OPT = -march=nocona -O3
# -ftree-vectorize -ftree-vectorizer-verbose=3

View file

@ -0,0 +1,2 @@
c++DBUG = -pg
c++OPT = -O2

View file

@ -0,0 +1,2 @@
cDBUG = -ggdb -DFULLDEBUG
cOPT = -O1 -fdefault-inline -finline-functions

View file

@ -0,0 +1,2 @@
cDBUG =
cOPT = -O3

View file

@ -0,0 +1,2 @@
cDBUG = -pg
cOPT = -O2

View file

@ -0,0 +1,11 @@
CPP = cpp -traditional-cpp
LD = ld
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
include $(GENERAL_RULES)/standard
include $(RULES)/X
include $(RULES)/c
include $(RULES)/c++
include $(RULES)/nvcc

View file

@ -0,0 +1,3 @@
PFLAGS =
PINC =
PLIBS =

View file

@ -0,0 +1,3 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma

View file

@ -0,0 +1,3 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H
PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_amd64 -lmpi

View file

@ -0,0 +1,3 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich

View file

@ -0,0 +1,3 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -L$(GM_LIB_PATH) -lgm

View file

View file

@ -0,0 +1,3 @@
PFLAGS = -DOMPI_SKIP_MPICXX
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi

View file

@ -0,0 +1,4 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi

View file

@ -0,0 +1 @@
PFLAGS = -DOMPI_SKIP_MPICXX

View file

@ -0,0 +1,17 @@
.SUFFIXES: .cu
NVCC = nvcc -m64 -arch $(CUDA_ARCH)
NVCC_ptFLAGS = -DNoRepository
NVCC_FLAGS = $(NVCC_ptFLAGS) -Xcompiler -fPIC $(LIB_HEADER_DIRS) $(GFLAGS) $(c++OPT) $(c++DBUG)
cutoo = $(WM_SCHEDULER) $(NVCC) $(NVCC_FLAGS) -c $$SOURCE -o $@
LINK_LIBS = $(c++DBUG)
LINKLIBSO = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed
LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed
.cu.dep:
$(MAKE_DEP)

View file

@ -0,0 +1,2 @@
by bgschaid. 2010-10-06 on Centos 5.5 with gcc 4.1

View file

@ -0,0 +1,3 @@
XFLAGS =
XINC = $(XFLAGS) -I/usr/X11R6/include
XLIBS = -L/usr/X11R6/lib64 -lXext -lX11

View file

@ -0,0 +1,16 @@
.SUFFIXES: .c .h
cWARN = -Wall
cc = gcc -m64
include $(RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
LINK_LIBS = $(cDBUG)
LINKLIBSO = $(cc) -shared
LINKEXE = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs

View file

@ -0,0 +1,21 @@
.SUFFIXES: .C .cxx .cc .cpp
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor
CC = g++ -m64
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-200
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
cxxtoo = $(Ctoo)
cctoo = $(Ctoo)
cpptoo = $(Ctoo)
LINK_LIBS = $(c++DBUG) -lrt
LINKLIBSO = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed
LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed

View file

@ -0,0 +1,2 @@
c++DBUG = -ggdb3 -DFULLDEBUG
c++OPT = -O0 -fdefault-inline

View file

@ -0,0 +1,4 @@
c++DBUG =
c++OPT = -O3
#c++OPT = -march=nocona -O3
# -ftree-vectorize -ftree-vectorizer-verbose=3

View file

@ -0,0 +1,2 @@
c++DBUG = -pg
c++OPT = -O2

View file

@ -0,0 +1,2 @@
cDBUG = -ggdb -DFULLDEBUG
cOPT = -O1 -fdefault-inline -finline-functions

View file

@ -0,0 +1,2 @@
cDBUG =
cOPT = -O3

View file

@ -0,0 +1,2 @@
cDBUG = -pg
cOPT = -O2

View file

@ -0,0 +1,11 @@
CPP = cpp -traditional-cpp
LD = ld
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
include $(GENERAL_RULES)/standard
include $(RULES)/X
include $(RULES)/c
include $(RULES)/c++
include $(RULES)/nvcc

View file

@ -0,0 +1,3 @@
PFLAGS =
PINC =
PLIBS =

View file

@ -0,0 +1,3 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma

View file

@ -0,0 +1,3 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H
PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_amd64 -lmpi

View file

@ -0,0 +1,3 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich

View file

@ -0,0 +1,3 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -L$(GM_LIB_PATH) -lgm

View file

View file

@ -0,0 +1,3 @@
PFLAGS = -DOMPI_SKIP_MPICXX
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi

View file

@ -0,0 +1,4 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi

View file

@ -0,0 +1 @@
PFLAGS = -DOMPI_SKIP_MPICXX

View file

@ -0,0 +1,17 @@
.SUFFIXES: .cu
NVCC = nvcc -m64 -arch $(CUDA_ARCH)
NVCC_ptFLAGS = -DNoRepository
NVCC_FLAGS = $(NVCC_ptFLAGS) -Xcompiler -fPIC $(LIB_HEADER_DIRS) $(GFLAGS) $(c++OPT) $(c++DBUG)
cutoo = $(WM_SCHEDULER) $(NVCC) $(NVCC_FLAGS) -c $$SOURCE -o $@
LINK_LIBS = $(c++DBUG)
LINKLIBSO = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed
LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed
.cu.dep:
$(MAKE_DEP)