Merge branch 'master' into feature/overlapGgi
This commit is contained in:
commit
e5a96484f3
45 changed files with 439 additions and 236 deletions
6
Allwmake
6
Allwmake
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
if [ "$PWD" != "$WM_PROJECT_DIR" ]
|
if [ "$PWD" != "$WM_PROJECT_DIR" ]
|
||||||
|
@ -16,6 +16,10 @@ fi
|
||||||
#( cd $WM_THIRD_PARTY_DIR && ./Allwmake )
|
#( cd $WM_THIRD_PARTY_DIR && ./Allwmake )
|
||||||
# ( cd $WM_THIRD_PARTY_DIR && ./AllMake )
|
# ( cd $WM_THIRD_PARTY_DIR && ./AllMake )
|
||||||
|
|
||||||
|
# We make sure the ThirdParty packages environment variables are up-to-date
|
||||||
|
# before compiling the rest of OpenFOAM
|
||||||
|
. $WM_PROJECT_DIR/etc/settings.sh
|
||||||
|
|
||||||
# build OpenFOAM libraries and applications
|
# build OpenFOAM libraries and applications
|
||||||
src/Allwmake
|
src/Allwmake
|
||||||
applications/Allwmake
|
applications/Allwmake
|
||||||
|
|
25
ThirdParty/AllMake.stage3
vendored
25
ThirdParty/AllMake.stage3
vendored
|
@ -56,7 +56,6 @@ echo Starting ThirdParty AllMake: Stage3
|
||||||
echo ========================================
|
echo ========================================
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
||||||
# Metis
|
# Metis
|
||||||
( rpm_make metis-5.0pre2 http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.0pre2.tar.gz )
|
( rpm_make metis-5.0pre2 http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.0pre2.tar.gz )
|
||||||
|
|
||||||
|
@ -69,25 +68,17 @@ echo
|
||||||
# Mesquite
|
# Mesquite
|
||||||
( rpm_make mesquite-2.1.2 http://software.sandia.gov/~jakraft/mesquite-2.1.2.tar.gz )
|
( rpm_make mesquite-2.1.2 http://software.sandia.gov/~jakraft/mesquite-2.1.2.tar.gz )
|
||||||
|
|
||||||
|
# The following two packages depends on the availability of OpenMPI
|
||||||
|
# The macro rpm_make() will make sure to update the ThirdParty environment variables before starting
|
||||||
|
# the compilation.
|
||||||
|
# Just make sure the OpenMPI environment variables are properly initialized, or that
|
||||||
|
# the AllMake.stage2 script completed correctly
|
||||||
|
#
|
||||||
# Scotch
|
# Scotch
|
||||||
if [ -d "$OPENMPI_DIR" ]; then
|
( rpm_make scotch-5.1.10b https://gforge.inria.fr/frs/download.php/27583/scotch-5.1.10b.tar.gz )
|
||||||
( rpm_make scotch-5.1.10b https://gforge.inria.fr/frs/download.php/27583/scotch-5.1.10b.tar.gz )
|
|
||||||
else
|
|
||||||
echo "WARNING: The OPENMPI_DIR environment variable is not set."
|
|
||||||
echo "WARNING: Please make sure your environment is properly set up for openmpi. This is necessary for compiling scotch-5.1.10b"
|
|
||||||
echo "WARNING: Skipping the compilation of scotch-5.1.10b"
|
|
||||||
echo ""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ParMetis
|
# ParMetis
|
||||||
if [ -d "$OPENMPI_DIR" ]; then
|
( rpm_make ParMetis-3.1.1 http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/ParMetis-3.1.1.tar.gz )
|
||||||
( rpm_make ParMetis-3.1.1 http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/ParMetis-3.1.1.tar.gz )
|
|
||||||
else
|
|
||||||
echo "WARNING: The OPENMPI_DIR environment variable is not set."
|
|
||||||
echo "WARNING: Please make sure your environment is properly set up for openmpi. This is necessary for compiling ParMetis-3.1.1"
|
|
||||||
echo "WARNING: Skipping the compilation of ParMetis-3.1.1"
|
|
||||||
echo ""
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ========================================
|
echo ========================================
|
||||||
echo Done ThirdParty AllMake: Stage3
|
echo Done ThirdParty AllMake: Stage3
|
||||||
|
|
2
ThirdParty/AllMake.stage4
vendored
2
ThirdParty/AllMake.stage4
vendored
|
@ -68,7 +68,7 @@ then
|
||||||
else
|
else
|
||||||
echo "WARNING: Skipping the installation of ParaView-3.8.1."
|
echo "WARNING: Skipping the installation of ParaView-3.8.1."
|
||||||
echo "WARNING: Please initialize the QT_DIR environment variable to your QT installation directory."
|
echo "WARNING: Please initialize the QT_DIR environment variable to your QT installation directory."
|
||||||
echo "WARNING: The command $QT_DIR/bin/qmake needs to be valid"
|
echo "WARNING: The command \$QT_DIR/bin/qmake needs to be valid"
|
||||||
echo "WARNING: "
|
echo "WARNING: "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,6 @@ Group: Development/Tools
|
||||||
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
|
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
|
||||||
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
|
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
|
||||||
|
|
||||||
GMP_VERSION=gmp-5.0.1
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=%{_installPrefix} \
|
--prefix=%{_installPrefix} \
|
||||||
--enable-release \
|
--enable-release \
|
||||||
|
@ -104,6 +103,10 @@ Group: Development/Tools
|
||||||
--enable-trap-fpe \
|
--enable-trap-fpe \
|
||||||
--disable-function-timers
|
--disable-function-timers
|
||||||
|
|
||||||
|
# Remove the file include/Mesquite_all_headers.hpp
|
||||||
|
# This file will be regenerated during the compilation process
|
||||||
|
[ -e include/Mesquite_all_headers.hpp ] && rm -f include/Mesquite_all_headers.hpp
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
|
10
ThirdParty/tools/makeThirdPartyFunctionsForRPM
vendored
10
ThirdParty/tools/makeThirdPartyFunctionsForRPM
vendored
|
@ -50,6 +50,11 @@ echo ""
|
||||||
rpm_make()
|
rpm_make()
|
||||||
{
|
{
|
||||||
package="$1"
|
package="$1"
|
||||||
|
|
||||||
|
# Make sure the ThirdParty environment is up-to-date
|
||||||
|
echo "Updating the ThirdParty environment variables before building package $package"
|
||||||
|
. $WM_PROJECT_DIR/etc/settings.sh
|
||||||
|
|
||||||
rpmName=$package-$WM_OPTIONS.$architecture
|
rpmName=$package-$WM_OPTIONS.$architecture
|
||||||
rpmFile=$buildBase/RPMS/$architecture/$rpmName.rpm
|
rpmFile=$buildBase/RPMS/$architecture/$rpmName.rpm
|
||||||
|
|
||||||
|
@ -121,7 +126,10 @@ rpm_build()
|
||||||
|
|
||||||
#Build RPM package
|
#Build RPM package
|
||||||
echo "Building package $package"
|
echo "Building package $package"
|
||||||
rpmbuild --define "_topdir $buildBase" --dbpath $buildBase/rpmDB --clean -bb ./SPECS/$specFile "$@"
|
#rpmbuild --define "_topdir $buildBase" --dbpath $buildBase/rpmDB --clean -bb ./SPECS/$specFile "$@"
|
||||||
|
#
|
||||||
|
# Let's keep the compilation directory alive for now in order to facilitate postmortems of failed compilations
|
||||||
|
rpmbuild --define "_topdir $buildBase" --dbpath $buildBase/rpmDB -bb ./SPECS/$specFile "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -102,6 +102,8 @@ int main(int argc, char *argv[])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
turbulence->correct();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
|
|
|
@ -78,11 +78,7 @@ Foam::ellipticCylindricalCS Foam::ellipseEdge::calcCS()
|
||||||
Info << "p = " << p << " q = " << q << " n = " << normal << endl;
|
Info << "p = " << p << " q = " << q << " n = " << normal << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
tensor A;
|
tensor A(p, normal ^ p, normal);
|
||||||
A.x() = p;
|
|
||||||
A.z() = normal;
|
|
||||||
A.y() = normal ^ p;
|
|
||||||
|
|
||||||
|
|
||||||
vector2D p2D(1.0, 0.0);
|
vector2D p2D(1.0, 0.0);
|
||||||
vector qTmp = (A & q);
|
vector qTmp = (A & q);
|
||||||
|
|
|
@ -55,6 +55,19 @@ _foamAddLib()
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Source files, possibly with some verbosity
|
||||||
|
# Yes, this is the same definition as in the file etc/bash
|
||||||
|
# We need that definition available for scripts sourcing
|
||||||
|
# settings.sh directly.
|
||||||
|
_foamSource()
|
||||||
|
{
|
||||||
|
while [ $# -ge 1 ]
|
||||||
|
do
|
||||||
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "Sourcing: $1"
|
||||||
|
. $1
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# location of the jobControl directory
|
# location of the jobControl directory
|
||||||
export FOAM_JOB_DIR=$HOME/$WM_PROJECT/jobControl
|
export FOAM_JOB_DIR=$HOME/$WM_PROJECT/jobControl
|
||||||
|
|
|
@ -67,27 +67,23 @@ void Foam::coordinateRotation::calcTransform
|
||||||
switch (order)
|
switch (order)
|
||||||
{
|
{
|
||||||
case e1e2:
|
case e1e2:
|
||||||
Rtr.x() = a;
|
Rtr = tensor(a, b, c);
|
||||||
Rtr.y() = b;
|
|
||||||
Rtr.z() = c;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case e2e3:
|
case e2e3:
|
||||||
Rtr.x() = c;
|
Rtr = tensor(c, a, b);
|
||||||
Rtr.y() = a;
|
|
||||||
Rtr.z() = b;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case e3e1:
|
case e3e1:
|
||||||
Rtr.x() = b;
|
Rtr = tensor(b, c, a);
|
||||||
Rtr.y() = c;
|
|
||||||
Rtr.z() = a;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
FatalErrorIn("coordinateRotation::calcTransform()")
|
FatalErrorIn("coordinateRotation::calcTransform()")
|
||||||
<< "programmer error" << endl
|
<< "programmer error" << endl
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
|
// To satisfy compiler warnings
|
||||||
|
Rtr = tensor::zero;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,7 +183,8 @@ Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
|
||||||
(
|
(
|
||||||
"coordinateRotation::New(const dictionary&)",
|
"coordinateRotation::New(const dictionary&)",
|
||||||
dict
|
dict
|
||||||
) << "Unknown coordinateRotation type " << rotType << nl << nl
|
) << "Unknown coordinateRotation type "
|
||||||
|
<< rotType << nl << nl
|
||||||
<< "Valid coordinateRotation types are :" << nl
|
<< "Valid coordinateRotation types are :" << nl
|
||||||
<< "[default: axes " << typeName_() << "]"
|
<< "[default: axes " << typeName_() << "]"
|
||||||
<< dictionaryConstructorTablePtr_->toc()
|
<< dictionaryConstructorTablePtr_->toc()
|
||||||
|
|
|
@ -185,19 +185,19 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return local Cartesian x-axis
|
//- Return local Cartesian x-axis
|
||||||
vector& e1() const
|
vector e1() const
|
||||||
{
|
{
|
||||||
return tensor::T().x();
|
return tensor::T().x();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return local Cartesian y-axis
|
//- Return local Cartesian y-axis
|
||||||
vector& e2() const
|
vector e2() const
|
||||||
{
|
{
|
||||||
return tensor::T().y();
|
return tensor::T().y();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return local Cartesian z-axis
|
//- Return local Cartesian z-axis
|
||||||
vector& e3() const
|
vector e3() const
|
||||||
{
|
{
|
||||||
return tensor::T().z();
|
return tensor::T().z();
|
||||||
}
|
}
|
||||||
|
|
|
@ -348,33 +348,33 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return local Cartesian x-axis
|
//- Return local Cartesian x-axis
|
||||||
const vector& e1() const
|
vector e1() const
|
||||||
{
|
{
|
||||||
return Rtr_.x();
|
return Rtr_.x();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return local Cartesian y-axis
|
//- Return local Cartesian y-axis
|
||||||
const vector& e2() const
|
vector e2() const
|
||||||
{
|
{
|
||||||
return Rtr_.y();
|
return Rtr_.y();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return local Cartesian z-axis
|
//- Return local Cartesian z-axis
|
||||||
const vector& e3() const
|
vector e3() const
|
||||||
{
|
{
|
||||||
return Rtr_.z();
|
return Rtr_.z();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return axis (e3: local Cartesian z-axis)
|
//- Return axis (e3: local Cartesian z-axis)
|
||||||
// @deprecated method e3 is preferred
|
// @deprecated method e3 is preferred
|
||||||
const vector& axis() const
|
vector axis() const
|
||||||
{
|
{
|
||||||
return Rtr_.z();
|
return Rtr_.z();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return direction (e1: local Cartesian x-axis)
|
//- Return direction (e1: local Cartesian x-axis)
|
||||||
// @deprecated method e1 is preferred
|
// @deprecated method e1 is preferred
|
||||||
const vector& direction() const
|
const vector direction() const
|
||||||
{
|
{
|
||||||
return Rtr_.x();
|
return Rtr_.x();
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ template<class Type>
|
||||||
Field<Type>::Field
|
Field<Type>::Field
|
||||||
(
|
(
|
||||||
const UList<Type>& mapF,
|
const UList<Type>& mapF,
|
||||||
const labelList& mapAddressing
|
const unallocLabelList& mapAddressing
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
List<Type>(mapAddressing.size())
|
List<Type>(mapAddressing.size())
|
||||||
|
@ -79,7 +79,7 @@ template<class Type>
|
||||||
Field<Type>::Field
|
Field<Type>::Field
|
||||||
(
|
(
|
||||||
const tmp<Field<Type> >& tmapF,
|
const tmp<Field<Type> >& tmapF,
|
||||||
const labelList& mapAddressing
|
const unallocLabelList& mapAddressing
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
List<Type>(mapAddressing.size())
|
List<Type>(mapAddressing.size())
|
||||||
|
@ -298,7 +298,7 @@ template<class Type>
|
||||||
void Field<Type>::map
|
void Field<Type>::map
|
||||||
(
|
(
|
||||||
const UList<Type>& mapF,
|
const UList<Type>& mapF,
|
||||||
const labelList& mapAddressing
|
const unallocLabelList& mapAddressing
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Field<Type>& f = *this;
|
Field<Type>& f = *this;
|
||||||
|
@ -327,7 +327,7 @@ template<class Type>
|
||||||
void Field<Type>::map
|
void Field<Type>::map
|
||||||
(
|
(
|
||||||
const tmp<Field<Type> >& tmapF,
|
const tmp<Field<Type> >& tmapF,
|
||||||
const labelList& mapAddressing
|
const unallocLabelList& mapAddressing
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
map(tmapF(), mapAddressing);
|
map(tmapF(), mapAddressing);
|
||||||
|
@ -469,7 +469,7 @@ template<class Type>
|
||||||
void Field<Type>::rmap
|
void Field<Type>::rmap
|
||||||
(
|
(
|
||||||
const UList<Type>& mapF,
|
const UList<Type>& mapF,
|
||||||
const labelList& mapAddressing
|
const unallocLabelList& mapAddressing
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Field<Type>& f = *this;
|
Field<Type>& f = *this;
|
||||||
|
@ -489,7 +489,7 @@ template<class Type>
|
||||||
void Field<Type>::rmap
|
void Field<Type>::rmap
|
||||||
(
|
(
|
||||||
const tmp<Field<Type> >& tmapF,
|
const tmp<Field<Type> >& tmapF,
|
||||||
const labelList& mapAddressing
|
const unallocLabelList& mapAddressing
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
rmap(tmapF(), mapAddressing);
|
rmap(tmapF(), mapAddressing);
|
||||||
|
@ -501,7 +501,7 @@ template<class Type>
|
||||||
void Field<Type>::rmap
|
void Field<Type>::rmap
|
||||||
(
|
(
|
||||||
const UList<Type>& mapF,
|
const UList<Type>& mapF,
|
||||||
const labelList& mapAddressing,
|
const unallocLabelList& mapAddressing,
|
||||||
const scalarList& mapWeights
|
const scalarList& mapWeights
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -519,7 +519,7 @@ template<class Type>
|
||||||
void Field<Type>::rmap
|
void Field<Type>::rmap
|
||||||
(
|
(
|
||||||
const tmp<Field<Type> >& tmapF,
|
const tmp<Field<Type> >& tmapF,
|
||||||
const labelList& mapAddressing,
|
const unallocLabelList& mapAddressing,
|
||||||
const scalarList& mapWeights
|
const scalarList& mapWeights
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
|
@ -128,14 +128,14 @@ public:
|
||||||
Field
|
Field
|
||||||
(
|
(
|
||||||
const UList<Type>& mapF,
|
const UList<Type>& mapF,
|
||||||
const labelList& mapAddressing
|
const unallocLabelList& mapAddressing
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by 1 to 1 mapping from the given tmp field
|
//- Construct by 1 to 1 mapping from the given tmp field
|
||||||
Field
|
Field
|
||||||
(
|
(
|
||||||
const tmp<Field<Type> >& tmapF,
|
const tmp<Field<Type> >& tmapF,
|
||||||
const labelList& mapAddressing
|
const unallocLabelList& mapAddressing
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by interpolative mapping from the given field
|
//- Construct by interpolative mapping from the given field
|
||||||
|
@ -215,14 +215,14 @@ public:
|
||||||
void map
|
void map
|
||||||
(
|
(
|
||||||
const UList<Type>& mapF,
|
const UList<Type>& mapF,
|
||||||
const labelList& mapAddressing
|
const unallocLabelList& mapAddressing
|
||||||
);
|
);
|
||||||
|
|
||||||
//- 1 to 1 map from the given tmp field
|
//- 1 to 1 map from the given tmp field
|
||||||
void map
|
void map
|
||||||
(
|
(
|
||||||
const tmp<Field<Type> >& tmapF,
|
const tmp<Field<Type> >& tmapF,
|
||||||
const labelList& mapAddressing
|
const unallocLabelList& mapAddressing
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Interpolative map from the given field
|
//- Interpolative map from the given field
|
||||||
|
@ -265,21 +265,21 @@ public:
|
||||||
void rmap
|
void rmap
|
||||||
(
|
(
|
||||||
const UList<Type>& mapF,
|
const UList<Type>& mapF,
|
||||||
const labelList& mapAddressing
|
const unallocLabelList& mapAddressing
|
||||||
);
|
);
|
||||||
|
|
||||||
//- 1 to 1 reverse-map from the given tmp field
|
//- 1 to 1 reverse-map from the given tmp field
|
||||||
void rmap
|
void rmap
|
||||||
(
|
(
|
||||||
const tmp<Field<Type> >& tmapF,
|
const tmp<Field<Type> >& tmapF,
|
||||||
const labelList& mapAddressing
|
const unallocLabelList& mapAddressing
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Interpolative reverse map from the given field
|
//- Interpolative reverse map from the given field
|
||||||
void rmap
|
void rmap
|
||||||
(
|
(
|
||||||
const UList<Type>& mapF,
|
const UList<Type>& mapF,
|
||||||
const labelList& mapAddressing,
|
const unallocLabelList& mapAddressing,
|
||||||
const scalarList& weights
|
const scalarList& weights
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ public:
|
||||||
void rmap
|
void rmap
|
||||||
(
|
(
|
||||||
const tmp<Field<Type> >& tmapF,
|
const tmp<Field<Type> >& tmapF,
|
||||||
const labelList& mapAddressing,
|
const unallocLabelList& mapAddressing,
|
||||||
const scalarList& weights
|
const scalarList& weights
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ class objectMap;
|
||||||
inline bool operator==(const objectMap& a, const objectMap& b);
|
inline bool operator==(const objectMap& a, const objectMap& b);
|
||||||
inline bool operator!=(const objectMap& a, const objectMap& b);
|
inline bool operator!=(const objectMap& a, const objectMap& b);
|
||||||
inline Ostream& operator<<(Ostream&, const objectMap&);
|
inline Ostream& operator<<(Ostream&, const objectMap&);
|
||||||
|
inline Istream& operator>>(Istream&, objectMap&);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
|
@ -101,6 +102,8 @@ public:
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
friend Ostream& operator<<(Ostream&, const objectMap&);
|
friend Ostream& operator<<(Ostream&, const objectMap&);
|
||||||
|
|
||||||
|
friend Istream& operator>>(Istream&, objectMap&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,18 @@ inline Ostream& operator<<(Ostream& os, const objectMap& a)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Istream& operator>>(Istream& is, objectMap& a)
|
||||||
|
{
|
||||||
|
is.readBegin("objectMap");
|
||||||
|
is >> a.index_ >> a.masterObjects_;
|
||||||
|
is.readEnd("objectMap");
|
||||||
|
|
||||||
|
// Check state of Istream
|
||||||
|
is.check("Istream& operator>>(Istream&, objectMap&)");
|
||||||
|
|
||||||
|
return is;
|
||||||
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // Master namespace Foam
|
} // Master namespace Foam
|
||||||
|
|
|
@ -101,6 +101,14 @@ public:
|
||||||
//- Construct given SymmTensor
|
//- Construct given SymmTensor
|
||||||
inline Tensor(const SymmTensor<Cmpt>&);
|
inline Tensor(const SymmTensor<Cmpt>&);
|
||||||
|
|
||||||
|
//- Construct given the three vectors
|
||||||
|
inline Tensor
|
||||||
|
(
|
||||||
|
const Vector<Cmpt>& x,
|
||||||
|
const Vector<Cmpt>& y,
|
||||||
|
const Vector<Cmpt>& z
|
||||||
|
);
|
||||||
|
|
||||||
//- Construct given the nine components
|
//- Construct given the nine components
|
||||||
inline Tensor
|
inline Tensor
|
||||||
(
|
(
|
||||||
|
@ -117,14 +125,6 @@ public:
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
inline const Vector<Cmpt>& x() const;
|
|
||||||
inline const Vector<Cmpt>& y() const;
|
|
||||||
inline const Vector<Cmpt>& z() const;
|
|
||||||
|
|
||||||
inline Vector<Cmpt>& x();
|
|
||||||
inline Vector<Cmpt>& y();
|
|
||||||
inline Vector<Cmpt>& z();
|
|
||||||
|
|
||||||
inline const Cmpt& xx() const;
|
inline const Cmpt& xx() const;
|
||||||
inline const Cmpt& xy() const;
|
inline const Cmpt& xy() const;
|
||||||
inline const Cmpt& xz() const;
|
inline const Cmpt& xz() const;
|
||||||
|
@ -145,6 +145,13 @@ public:
|
||||||
inline Cmpt& zy();
|
inline Cmpt& zy();
|
||||||
inline Cmpt& zz();
|
inline Cmpt& zz();
|
||||||
|
|
||||||
|
// Access vector components.
|
||||||
|
// Note: returning const only to find out lhs usage
|
||||||
|
|
||||||
|
inline const Vector<Cmpt> x() const;
|
||||||
|
inline const Vector<Cmpt> y() const;
|
||||||
|
inline const Vector<Cmpt> z() const;
|
||||||
|
|
||||||
//- Transpose
|
//- Transpose
|
||||||
inline Tensor<Cmpt> T() const;
|
inline Tensor<Cmpt> T() const;
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,21 @@ inline Tensor<Cmpt>::Tensor(const SymmTensor<Cmpt>& st)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Construct given the three vector components
|
||||||
|
template <class Cmpt>
|
||||||
|
inline Tensor<Cmpt>::Tensor
|
||||||
|
(
|
||||||
|
const Vector<Cmpt>& x,
|
||||||
|
const Vector<Cmpt>& y,
|
||||||
|
const Vector<Cmpt>& z
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this->v_[XX] = x.x(); this->v_[XY] = x.y(); this->v_[XZ] = x.z();
|
||||||
|
this->v_[YX] = y.x(); this->v_[YY] = y.y(); this->v_[YZ] = y.z();
|
||||||
|
this->v_[ZX] = z.x(); this->v_[ZY] = z.y(); this->v_[ZZ] = z.z();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
template <class Cmpt>
|
template <class Cmpt>
|
||||||
inline Tensor<Cmpt>::Tensor
|
inline Tensor<Cmpt>::Tensor
|
||||||
|
@ -91,40 +106,21 @@ inline Tensor<Cmpt>::Tensor(Istream& is)
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template <class Cmpt>
|
template <class Cmpt>
|
||||||
inline const Vector<Cmpt>& Tensor<Cmpt>::x() const
|
inline const Vector<Cmpt> Tensor<Cmpt>::x() const
|
||||||
{
|
{
|
||||||
return reinterpret_cast<const Vector<Cmpt>&>(this->v_[XX]);
|
return Vector<Cmpt>(this->v_[XX], this->v_[XY], this->v_[XZ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Cmpt>
|
template <class Cmpt>
|
||||||
inline const Vector<Cmpt>& Tensor<Cmpt>::y() const
|
inline const Vector<Cmpt> Tensor<Cmpt>::y() const
|
||||||
{
|
{
|
||||||
return reinterpret_cast<const Vector<Cmpt>&>(this->v_[YX]);
|
return Vector<Cmpt>(this->v_[YX], this->v_[YY], this->v_[YZ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Cmpt>
|
template <class Cmpt>
|
||||||
inline const Vector<Cmpt>& Tensor<Cmpt>::z() const
|
inline const Vector<Cmpt> Tensor<Cmpt>::z() const
|
||||||
{
|
{
|
||||||
return reinterpret_cast<const Vector<Cmpt>&>(this->v_[ZX]);
|
return Vector<Cmpt>(this->v_[ZX], this->v_[ZY], this->v_[ZZ]);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template <class Cmpt>
|
|
||||||
inline Vector<Cmpt>& Tensor<Cmpt>::x()
|
|
||||||
{
|
|
||||||
return reinterpret_cast<Vector<Cmpt>&>(this->v_[XX]);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class Cmpt>
|
|
||||||
inline Vector<Cmpt>& Tensor<Cmpt>::y()
|
|
||||||
{
|
|
||||||
return reinterpret_cast<Vector<Cmpt>&>(this->v_[YX]);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class Cmpt>
|
|
||||||
inline Vector<Cmpt>& Tensor<Cmpt>::z()
|
|
||||||
{
|
|
||||||
return reinterpret_cast<Vector<Cmpt>&>(this->v_[ZX]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -267,36 +267,17 @@ tensor eigenVectors(const tensor& t)
|
||||||
{
|
{
|
||||||
vector evals(eigenValues(t));
|
vector evals(eigenValues(t));
|
||||||
|
|
||||||
tensor evs;
|
// Modification for strict-aliasing compliance.
|
||||||
|
// Sandeep Menon, 01/Dec/2010
|
||||||
|
|
||||||
// Test for null eigen values to return a not null eigen vector
|
// Test for null eigen values to return a not null eigen vector
|
||||||
// Jovani Favero, 18/Nov/2009
|
// Jovani Favero, 18/Nov/2009
|
||||||
if (mag(evals.x()) < SMALL)
|
tensor evs
|
||||||
{
|
(
|
||||||
evs.x() = vector(0, 0, 1);
|
(mag(evals.x()) < SMALL) ? vector(0, 0, 1) : eigenVector(t, evals.x()),
|
||||||
}
|
(mag(evals.y()) < SMALL) ? vector(0, 1, 0) : eigenVector(t, evals.y()),
|
||||||
else
|
(mag(evals.z()) < SMALL) ? vector(1, 0, 0) : eigenVector(t, evals.z())
|
||||||
{
|
);
|
||||||
evs.x() = eigenVector(t, evals.x());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mag(evals.y()) < SMALL)
|
|
||||||
{
|
|
||||||
evs.y() = vector(0, 1, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
evs.y() = eigenVector(t, evals.y());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mag(evals.z()) < SMALL)
|
|
||||||
{
|
|
||||||
evs.z() = vector(1, 0, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
evs.z() = eigenVector(t, evals.z());
|
|
||||||
}
|
|
||||||
|
|
||||||
return evs;
|
return evs;
|
||||||
}
|
}
|
||||||
|
@ -490,8 +471,16 @@ tensor eigenVectors(const symmTensor& t)
|
||||||
{
|
{
|
||||||
vector evals(eigenValues(t));
|
vector evals(eigenValues(t));
|
||||||
|
|
||||||
tensor evs;
|
// Modification for strict-aliasing compliance.
|
||||||
|
// Sandeep Menon, 01/Dec/2010
|
||||||
|
tensor evs
|
||||||
|
(
|
||||||
|
(mag(evals.x()) < SMALL) ? vector(0, 0, 1) : eigenVector(t, evals.x()),
|
||||||
|
(mag(evals.y()) < SMALL) ? vector(0, 1, 0) : eigenVector(t, evals.y()),
|
||||||
|
(mag(evals.z()) < SMALL) ? vector(1, 0, 0) : eigenVector(t, evals.z())
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
// Test for null eigen values to return a not null eigen vector.
|
// Test for null eigen values to return a not null eigen vector.
|
||||||
// Jovani Favero, 18/Nov/2009
|
// Jovani Favero, 18/Nov/2009
|
||||||
if (mag(evals.x()) < SMALL)
|
if (mag(evals.x()) < SMALL)
|
||||||
|
@ -520,6 +509,7 @@ tensor eigenVectors(const symmTensor& t)
|
||||||
{
|
{
|
||||||
evs.z() = eigenVector(t, evals.z());
|
evs.z() = eigenVector(t, evals.z());
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
return evs;
|
return evs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,14 @@ public:
|
||||||
//- Construct given SphericalTensor2D
|
//- Construct given SphericalTensor2D
|
||||||
inline Tensor2D(const SphericalTensor2D<Cmpt>&);
|
inline Tensor2D(const SphericalTensor2D<Cmpt>&);
|
||||||
|
|
||||||
//- Construct given the nine components
|
//- Construct given the two vectors
|
||||||
|
inline Tensor2D
|
||||||
|
(
|
||||||
|
const Vector2D<Cmpt>& x,
|
||||||
|
const Vector2D<Cmpt>& y
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct given the four components
|
||||||
inline Tensor2D
|
inline Tensor2D
|
||||||
(
|
(
|
||||||
const Cmpt txx, const Cmpt txy,
|
const Cmpt txx, const Cmpt txy,
|
||||||
|
@ -108,12 +115,6 @@ public:
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
inline const Vector2D<Cmpt>& x() const;
|
|
||||||
inline const Vector2D<Cmpt>& y() const;
|
|
||||||
|
|
||||||
inline Vector2D<Cmpt>& x();
|
|
||||||
inline Vector2D<Cmpt>& y();
|
|
||||||
|
|
||||||
inline const Cmpt& xx() const;
|
inline const Cmpt& xx() const;
|
||||||
inline const Cmpt& xy() const;
|
inline const Cmpt& xy() const;
|
||||||
inline const Cmpt& yx() const;
|
inline const Cmpt& yx() const;
|
||||||
|
@ -124,6 +125,11 @@ public:
|
||||||
inline Cmpt& yx();
|
inline Cmpt& yx();
|
||||||
inline Cmpt& yy();
|
inline Cmpt& yy();
|
||||||
|
|
||||||
|
// Access vector components.
|
||||||
|
|
||||||
|
inline Vector2D<Cmpt> x() const;
|
||||||
|
inline Vector2D<Cmpt> y() const;
|
||||||
|
|
||||||
//- Transpose
|
//- Transpose
|
||||||
inline Tensor2D<Cmpt> T() const;
|
inline Tensor2D<Cmpt> T() const;
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,18 @@ inline Tensor2D<Cmpt>::Tensor2D(const SphericalTensor2D<Cmpt>& st)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <class Cmpt>
|
||||||
|
inline Tensor2D<Cmpt>::Tensor2D
|
||||||
|
(
|
||||||
|
const Vector2D<Cmpt>& x,
|
||||||
|
const Vector2D<Cmpt>& y
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this->v_[XX] = x.x(); this->v_[XY] = x.y();
|
||||||
|
this->v_[YX] = y.x(); this->v_[YY] = y.y();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template <class Cmpt>
|
template <class Cmpt>
|
||||||
inline Tensor2D<Cmpt>::Tensor2D
|
inline Tensor2D<Cmpt>::Tensor2D
|
||||||
(
|
(
|
||||||
|
@ -73,28 +85,15 @@ inline Tensor2D<Cmpt>::Tensor2D(Istream& is)
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template <class Cmpt>
|
template <class Cmpt>
|
||||||
inline const Vector2D<Cmpt>& Tensor2D<Cmpt>::x() const
|
inline Vector2D<Cmpt> Tensor2D<Cmpt>::x() const
|
||||||
{
|
{
|
||||||
return reinterpret_cast<const Vector2D<Cmpt>&>(this->v_[XX]);
|
return Vector2D<Cmpt>(this->v_[XX], this->v_[XY]);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Cmpt>
|
template <class Cmpt>
|
||||||
inline const Vector2D<Cmpt>& Tensor2D<Cmpt>::y() const
|
inline Vector2D<Cmpt> Tensor2D<Cmpt>::y() const
|
||||||
{
|
{
|
||||||
return reinterpret_cast<const Vector2D<Cmpt>&>(this->v_[YX]);
|
return Vector2D<Cmpt>(this->v_[YX], this->v_[YY]);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template <class Cmpt>
|
|
||||||
inline Vector2D<Cmpt>& Tensor2D<Cmpt>::x()
|
|
||||||
{
|
|
||||||
return reinterpret_cast<Vector2D<Cmpt>&>(this->v_[XX]);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class Cmpt>
|
|
||||||
inline Vector2D<Cmpt>& Tensor2D<Cmpt>::y()
|
|
||||||
{
|
|
||||||
return reinterpret_cast<Vector2D<Cmpt>&>(this->v_[YX]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -160,9 +160,11 @@ tensor2D eigenVectors(const tensor2D& t)
|
||||||
{
|
{
|
||||||
vector2D evals(eigenValues(t));
|
vector2D evals(eigenValues(t));
|
||||||
|
|
||||||
tensor2D evs;
|
tensor2D evs
|
||||||
evs.x() = eigenVector(t, evals.x());
|
(
|
||||||
evs.y() = eigenVector(t, evals.y());
|
eigenVector(t, evals.x()),
|
||||||
|
eigenVector(t, evals.y())
|
||||||
|
);
|
||||||
|
|
||||||
return evs;
|
return evs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by the
|
under the terms of the GNU General Public License as published by
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
@ -19,8 +19,7 @@ License
|
||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
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, write to the Free Software Foundation,
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Read token and binary block from IPstream
|
Read token and binary block from IPstream
|
||||||
|
@ -30,15 +29,7 @@ Description
|
||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
|
|
||||||
#include "IPstream.H"
|
#include "IPstream.H"
|
||||||
|
#include "PstreamGlobals.H"
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
// Outstanding non-blocking operations.
|
|
||||||
//! @cond fileScope
|
|
||||||
Foam::DynamicList<MPI_Request> IPstream_outstandingRequests_;
|
|
||||||
//! @endcond fileScope
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -171,7 +162,7 @@ Foam::label Foam::IPstream::read
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
IPstream_outstandingRequests_.append(request);
|
PstreamGlobals::IPstream_outstandingRequests_.append(request);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -191,14 +182,14 @@ Foam::label Foam::IPstream::read
|
||||||
|
|
||||||
void Foam::IPstream::waitRequests()
|
void Foam::IPstream::waitRequests()
|
||||||
{
|
{
|
||||||
if (IPstream_outstandingRequests_.size())
|
if (PstreamGlobals::IPstream_outstandingRequests_.size())
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
MPI_Waitall
|
MPI_Waitall
|
||||||
(
|
(
|
||||||
IPstream_outstandingRequests_.size(),
|
PstreamGlobals::IPstream_outstandingRequests_.size(),
|
||||||
IPstream_outstandingRequests_.begin(),
|
PstreamGlobals::IPstream_outstandingRequests_.begin(),
|
||||||
MPI_STATUSES_IGNORE
|
MPI_STATUSES_IGNORE
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -209,19 +200,20 @@ void Foam::IPstream::waitRequests()
|
||||||
) << "MPI_Waitall returned with error" << endl;
|
) << "MPI_Waitall returned with error" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
IPstream_outstandingRequests_.clear();
|
PstreamGlobals::IPstream_outstandingRequests_.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::IPstream::finishedRequest(const label i)
|
bool Foam::IPstream::finishedRequest(const label i)
|
||||||
{
|
{
|
||||||
if (i >= IPstream_outstandingRequests_.size())
|
if (i >= PstreamGlobals::IPstream_outstandingRequests_.size())
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"IPstream::finishedRequest(const label)"
|
"IPstream::finishedRequest(const label)"
|
||||||
) << "There are " << IPstream_outstandingRequests_.size()
|
) << "There are "
|
||||||
|
<< PstreamGlobals::IPstream_outstandingRequests_.size()
|
||||||
<< " outstanding send requests and you are asking for i=" << i
|
<< " outstanding send requests and you are asking for i=" << i
|
||||||
<< nl
|
<< nl
|
||||||
<< "Maybe you are mixing blocking/non-blocking comms?"
|
<< "Maybe you are mixing blocking/non-blocking comms?"
|
||||||
|
@ -229,7 +221,12 @@ bool Foam::IPstream::finishedRequest(const label i)
|
||||||
}
|
}
|
||||||
|
|
||||||
int flag;
|
int flag;
|
||||||
MPI_Test(&IPstream_outstandingRequests_[i], &flag, MPI_STATUS_IGNORE);
|
MPI_Test
|
||||||
|
(
|
||||||
|
&PstreamGlobals::IPstream_outstandingRequests_[i],
|
||||||
|
&flag,
|
||||||
|
MPI_STATUS_IGNORE
|
||||||
|
);
|
||||||
|
|
||||||
return flag != 0;
|
return flag != 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
OPwrite.C
|
OPwrite.C
|
||||||
IPread.C
|
IPread.C
|
||||||
Pstream.C
|
Pstream.C
|
||||||
|
PstreamGlobals.C
|
||||||
|
|
||||||
LIB = $(FOAM_MPI_LIBBIN)/libPstream
|
LIB = $(FOAM_MPI_LIBBIN)/libPstream
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by the
|
under the terms of the GNU General Public License as published by
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
@ -19,8 +19,7 @@ License
|
||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
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, write to the Free Software Foundation,
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Write primitive and binary block from OPstream
|
Write primitive and binary block from OPstream
|
||||||
|
@ -30,13 +29,7 @@ Description
|
||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
|
|
||||||
#include "OPstream.H"
|
#include "OPstream.H"
|
||||||
|
#include "PstreamGlobals.H"
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
// Outstanding non-blocking operations.
|
|
||||||
//! @cond fileScope
|
|
||||||
Foam::DynamicList<MPI_Request> OPstream_outstandingRequests_;
|
|
||||||
//! @endcond fileScope
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -111,7 +104,7 @@ bool Foam::OPstream::write
|
||||||
&request
|
&request
|
||||||
);
|
);
|
||||||
|
|
||||||
OPstream_outstandingRequests_.append(request);
|
PstreamGlobals::OPstream_outstandingRequests_.append(request);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -129,14 +122,14 @@ bool Foam::OPstream::write
|
||||||
|
|
||||||
void Foam::OPstream::waitRequests()
|
void Foam::OPstream::waitRequests()
|
||||||
{
|
{
|
||||||
if (OPstream_outstandingRequests_.size())
|
if (PstreamGlobals::OPstream_outstandingRequests_.size())
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
MPI_Waitall
|
MPI_Waitall
|
||||||
(
|
(
|
||||||
OPstream_outstandingRequests_.size(),
|
PstreamGlobals::OPstream_outstandingRequests_.size(),
|
||||||
OPstream_outstandingRequests_.begin(),
|
PstreamGlobals::OPstream_outstandingRequests_.begin(),
|
||||||
MPI_STATUSES_IGNORE
|
MPI_STATUSES_IGNORE
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -147,19 +140,20 @@ void Foam::OPstream::waitRequests()
|
||||||
) << "MPI_Waitall returned with error" << Foam::endl;
|
) << "MPI_Waitall returned with error" << Foam::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
OPstream_outstandingRequests_.clear();
|
PstreamGlobals::OPstream_outstandingRequests_.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::OPstream::finishedRequest(const label i)
|
bool Foam::OPstream::finishedRequest(const label i)
|
||||||
{
|
{
|
||||||
if (i >= OPstream_outstandingRequests_.size())
|
if (i >= PstreamGlobals::OPstream_outstandingRequests_.size())
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"OPstream::finishedRequest(const label)"
|
"OPstream::finishedRequest(const label)"
|
||||||
) << "There are " << OPstream_outstandingRequests_.size()
|
) << "There are "
|
||||||
|
<< PstreamGlobals::OPstream_outstandingRequests_.size()
|
||||||
<< " outstanding send requests and you are asking for i=" << i
|
<< " outstanding send requests and you are asking for i=" << i
|
||||||
<< nl
|
<< nl
|
||||||
<< "Maybe you are mixing blocking/non-blocking comms?"
|
<< "Maybe you are mixing blocking/non-blocking comms?"
|
||||||
|
@ -167,7 +161,12 @@ bool Foam::OPstream::finishedRequest(const label i)
|
||||||
}
|
}
|
||||||
|
|
||||||
int flag;
|
int flag;
|
||||||
MPI_Test(&OPstream_outstandingRequests_[i], &flag, MPI_STATUS_IGNORE);
|
MPI_Test
|
||||||
|
(
|
||||||
|
&PstreamGlobals::OPstream_outstandingRequests_[i],
|
||||||
|
&flag,
|
||||||
|
MPI_STATUS_IGNORE
|
||||||
|
);
|
||||||
|
|
||||||
return flag != 0;
|
return flag != 0;
|
||||||
}
|
}
|
||||||
|
|
45
src/Pstream/mpi/PstreamGlobals.C
Normal file
45
src/Pstream/mpi/PstreamGlobals.C
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright held by original author
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM 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.
|
||||||
|
|
||||||
|
OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "PstreamGlobals.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
// Outstanding non-blocking operations.
|
||||||
|
//! @cond fileScope
|
||||||
|
DynamicList<MPI_Request> PstreamGlobals::IPstream_outstandingRequests_;
|
||||||
|
DynamicList<MPI_Request> PstreamGlobals::OPstream_outstandingRequests_;
|
||||||
|
//! @endcond
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
69
src/Pstream/mpi/PstreamGlobals.H
Normal file
69
src/Pstream/mpi/PstreamGlobals.H
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright held by original author
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM 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.
|
||||||
|
|
||||||
|
OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Namespace
|
||||||
|
Foam::PstreamGlobals
|
||||||
|
|
||||||
|
Description
|
||||||
|
Global functions and variables for working with parallel streams,
|
||||||
|
but principally for gamma/mpi
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
PstreamGlobals.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef PstreamGlobals_H
|
||||||
|
#define PstreamGlobals_H
|
||||||
|
|
||||||
|
#include "mpi.h"
|
||||||
|
|
||||||
|
#include "DynamicList.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class PstreamGlobals Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
namespace PstreamGlobals
|
||||||
|
{
|
||||||
|
|
||||||
|
extern DynamicList<MPI_Request> IPstream_outstandingRequests_;
|
||||||
|
extern DynamicList<MPI_Request> OPstream_outstandingRequests_;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
|
@ -242,6 +242,8 @@ void lengthScaleEstimator::writeLengthScaleInfo
|
||||||
// Clear existing buffers
|
// Clear existing buffers
|
||||||
sendLblBuffer_.clear();
|
sendLblBuffer_.clear();
|
||||||
recvLblBuffer_.clear();
|
recvLblBuffer_.clear();
|
||||||
|
sendLvlBuffer_.clear();
|
||||||
|
recvLvlBuffer_.clear();
|
||||||
sendSclBuffer_.clear();
|
sendSclBuffer_.clear();
|
||||||
recvSclBuffer_.clear();
|
recvSclBuffer_.clear();
|
||||||
|
|
||||||
|
@ -251,7 +253,9 @@ void lengthScaleEstimator::writeLengthScaleInfo
|
||||||
|
|
||||||
// Corresponding face labels
|
// Corresponding face labels
|
||||||
sendLblBuffer_.setSize(boundary.size());
|
sendLblBuffer_.setSize(boundary.size());
|
||||||
|
sendLvlBuffer_.setSize(boundary.size());
|
||||||
recvLblBuffer_.setSize(boundary.size());
|
recvLblBuffer_.setSize(boundary.size());
|
||||||
|
recvLvlBuffer_.setSize(boundary.size());
|
||||||
|
|
||||||
// Length-scales corresponding to face-labels
|
// Length-scales corresponding to face-labels
|
||||||
sendSclBuffer_.setSize(boundary.size());
|
sendSclBuffer_.setSize(boundary.size());
|
||||||
|
@ -266,6 +270,7 @@ void lengthScaleEstimator::writeLengthScaleInfo
|
||||||
|
|
||||||
// Set the initial buffer size
|
// Set the initial buffer size
|
||||||
sendLblBuffer_[pI].setSize(boundary[pI].size(), 0);
|
sendLblBuffer_[pI].setSize(boundary[pI].size(), 0);
|
||||||
|
sendLvlBuffer_[pI].setSize(boundary[pI].size(), 0);
|
||||||
sendSclBuffer_[pI].setSize(boundary[pI].size(), 0.0);
|
sendSclBuffer_[pI].setSize(boundary[pI].size(), 0.0);
|
||||||
|
|
||||||
forAll(fCells, faceI)
|
forAll(fCells, faceI)
|
||||||
|
@ -277,6 +282,7 @@ void lengthScaleEstimator::writeLengthScaleInfo
|
||||||
{
|
{
|
||||||
// Fill the send buffer.
|
// Fill the send buffer.
|
||||||
sendLblBuffer_[pI][nSendFaces[pI]] = faceI;
|
sendLblBuffer_[pI][nSendFaces[pI]] = faceI;
|
||||||
|
sendLvlBuffer_[pI][nSendFaces[pI]] = cellLevels[cI];
|
||||||
sendSclBuffer_[pI][nSendFaces[pI]] = lengthScale[cI];
|
sendSclBuffer_[pI][nSendFaces[pI]] = lengthScale[cI];
|
||||||
|
|
||||||
nSendFaces[pI]++;
|
nSendFaces[pI]++;
|
||||||
|
@ -285,6 +291,7 @@ void lengthScaleEstimator::writeLengthScaleInfo
|
||||||
|
|
||||||
// Resize to actual value
|
// Resize to actual value
|
||||||
sendLblBuffer_[pI].setSize(nSendFaces[pI]);
|
sendLblBuffer_[pI].setSize(nSendFaces[pI]);
|
||||||
|
sendLvlBuffer_[pI].setSize(nSendFaces[pI]);
|
||||||
sendSclBuffer_[pI].setSize(nSendFaces[pI]);
|
sendSclBuffer_[pI].setSize(nSendFaces[pI]);
|
||||||
|
|
||||||
const processorPolyPatch& pp =
|
const processorPolyPatch& pp =
|
||||||
|
@ -330,6 +337,7 @@ void lengthScaleEstimator::writeLengthScaleInfo
|
||||||
Pout << " Processor patch " << patchI << ' ' << pp.name()
|
Pout << " Processor patch " << patchI << ' ' << pp.name()
|
||||||
<< " communicating with " << neiProcNo
|
<< " communicating with " << neiProcNo
|
||||||
<< " Sending: " << nSendFaces[patchI]
|
<< " Sending: " << nSendFaces[patchI]
|
||||||
|
<< " Recving: " << nRecvFaces[patchI]
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,6 +353,14 @@ void lengthScaleEstimator::writeLengthScaleInfo
|
||||||
sendLblBuffer_[patchI].size()*sizeof(label)
|
sendLblBuffer_[patchI].size()*sizeof(label)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
OPstream::write
|
||||||
|
(
|
||||||
|
Pstream::nonBlocking,
|
||||||
|
neiProcNo,
|
||||||
|
reinterpret_cast<const char*>(&(sendLvlBuffer_[patchI][0])),
|
||||||
|
sendLblBuffer_[patchI].size()*sizeof(label)
|
||||||
|
);
|
||||||
|
|
||||||
OPstream::write
|
OPstream::write
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::nonBlocking,
|
||||||
|
@ -358,6 +374,7 @@ void lengthScaleEstimator::writeLengthScaleInfo
|
||||||
{
|
{
|
||||||
// Size the receive buffers
|
// Size the receive buffers
|
||||||
recvLblBuffer_[patchI].setSize(nRecvFaces[patchI], 0);
|
recvLblBuffer_[patchI].setSize(nRecvFaces[patchI], 0);
|
||||||
|
recvLvlBuffer_[patchI].setSize(nRecvFaces[patchI], 0);
|
||||||
recvSclBuffer_[patchI].setSize(nRecvFaces[patchI], 0.0);
|
recvSclBuffer_[patchI].setSize(nRecvFaces[patchI], 0.0);
|
||||||
|
|
||||||
IPstream::read
|
IPstream::read
|
||||||
|
@ -372,9 +389,17 @@ void lengthScaleEstimator::writeLengthScaleInfo
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::nonBlocking,
|
||||||
neiProcNo,
|
neiProcNo,
|
||||||
reinterpret_cast<char*>(&(recvSclBuffer_[patchI][0])),
|
reinterpret_cast<char*>(&(recvLvlBuffer_[patchI][0])),
|
||||||
nRecvFaces[patchI]*sizeof(label)
|
nRecvFaces[patchI]*sizeof(label)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
IPstream::read
|
||||||
|
(
|
||||||
|
Pstream::nonBlocking,
|
||||||
|
neiProcNo,
|
||||||
|
reinterpret_cast<char*>(&(recvSclBuffer_[patchI][0])),
|
||||||
|
nRecvFaces[patchI]*sizeof(scalar)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -410,17 +435,19 @@ void lengthScaleEstimator::readLengthScaleInfo
|
||||||
forAll(recvLblBuffer_[patchI], i)
|
forAll(recvLblBuffer_[patchI], i)
|
||||||
{
|
{
|
||||||
label nLabel = recvLblBuffer_[patchI][i];
|
label nLabel = recvLblBuffer_[patchI][i];
|
||||||
|
label pLevel = recvLvlBuffer_[patchI][i];
|
||||||
|
|
||||||
label cI = fCells[nLabel];
|
label cI = fCells[nLabel];
|
||||||
|
|
||||||
label& ngbLevel = cellLevels[cI];
|
label& ngbLevel = cellLevels[cI];
|
||||||
|
|
||||||
// For an unvisited cell, update the level
|
// For an unvisited cell, update the level
|
||||||
|
bool unvisited = false;
|
||||||
|
|
||||||
if (ngbLevel == 0)
|
if (ngbLevel == 0)
|
||||||
{
|
{
|
||||||
ngbLevel = level + 1;
|
ngbLevel = pLevel + 1;
|
||||||
levelCells.insert(cI);
|
unvisited = true;
|
||||||
visitedCells++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Visit all neighbours and re-calculate length-scale
|
// Visit all neighbours and re-calculate length-scale
|
||||||
|
@ -459,27 +486,34 @@ void lengthScaleEstimator::readLengthScaleInfo
|
||||||
if (isA<processorPolyPatch>(boundary[pF]))
|
if (isA<processorPolyPatch>(boundary[pF]))
|
||||||
{
|
{
|
||||||
// Determine the local index.
|
// Determine the local index.
|
||||||
label local = boundary[pF].whichFace(cellCheck[faceI]);
|
label local =
|
||||||
|
(
|
||||||
|
boundary[pF].whichFace(cellCheck[faceI])
|
||||||
|
);
|
||||||
|
|
||||||
// Is this label present in the list?
|
// Is this label present in the list?
|
||||||
forAll(recvLblBuffer_[pF], j)
|
label j = -1;
|
||||||
|
|
||||||
|
if ((j = findIndex(recvLblBuffer_[pF], local)) > -1)
|
||||||
{
|
{
|
||||||
if (recvLblBuffer_[pF][j] == local)
|
if
|
||||||
|
(
|
||||||
|
(recvLvlBuffer_[pF][j] < ngbLevel) &&
|
||||||
|
(recvLvlBuffer_[pF][j] > 0)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
sumLength += recvSclBuffer_[pF][j];
|
sumLength += recvSclBuffer_[pF][j];
|
||||||
|
|
||||||
nTouchedNgb++;
|
nTouchedNgb++;
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (fixedPatches_.found(boundary[pF].name()))
|
if (!isFreePatch(pF))
|
||||||
{
|
{
|
||||||
sumLength +=
|
sumLength +=
|
||||||
(
|
(
|
||||||
fixedPatches_[boundary[pF].name()][0].scalarToken()
|
fixedLengthScale(cellCheck[faceI], pF, true)
|
||||||
);
|
);
|
||||||
|
|
||||||
nTouchedNgb++;
|
nTouchedNgb++;
|
||||||
|
@ -489,9 +523,26 @@ void lengthScaleEstimator::readLengthScaleInfo
|
||||||
sumLength /= nTouchedNgb;
|
sumLength /= nTouchedNgb;
|
||||||
|
|
||||||
// Scale the length and assign to this cell
|
// Scale the length and assign to this cell
|
||||||
scalar sLength = sumLength*growthFactor_;
|
if (level < maxRefineLevel_)
|
||||||
|
{
|
||||||
|
sumLength *= growthFactor_;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (meanScale_ > 0.0)
|
||||||
|
{
|
||||||
|
// If a mean scale has been specified,
|
||||||
|
// override the value
|
||||||
|
sumLength = meanScale_;
|
||||||
|
}
|
||||||
|
|
||||||
lengthScale[cI] = sLength;
|
lengthScale[cI] = sumLength;
|
||||||
|
|
||||||
|
if (unvisited)
|
||||||
|
{
|
||||||
|
levelCells.insert(cI);
|
||||||
|
|
||||||
|
visitedCells++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,6 +84,8 @@ class lengthScaleEstimator
|
||||||
// Buffers for parallel length-scale calculations
|
// Buffers for parallel length-scale calculations
|
||||||
labelListList sendLblBuffer_;
|
labelListList sendLblBuffer_;
|
||||||
labelListList recvLblBuffer_;
|
labelListList recvLblBuffer_;
|
||||||
|
labelListList sendLvlBuffer_;
|
||||||
|
labelListList recvLvlBuffer_;
|
||||||
scalarListList sendSclBuffer_;
|
scalarListList sendSclBuffer_;
|
||||||
scalarListList recvSclBuffer_;
|
scalarListList recvSclBuffer_;
|
||||||
|
|
||||||
|
|
|
@ -159,9 +159,11 @@ void wedgeFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > wedgeFaPatchField<Type>::snGradTransformDiag() const
|
tmp<Field<Type> > wedgeFaPatchField<Type>::snGradTransformDiag() const
|
||||||
{
|
{
|
||||||
diagTensor diagT =
|
const diagTensor diagT =
|
||||||
0.5*diag(I - refCast<const wedgeFaPatch>(this->patch()).faceT());
|
0.5*diag(I - refCast<const wedgeFaPatch>(this->patch()).faceT());
|
||||||
|
|
||||||
|
const vector diagV(diagT.xx(), diagT.yy(), diagT.zz());
|
||||||
|
|
||||||
return tmp<Field<Type> >
|
return tmp<Field<Type> >
|
||||||
(
|
(
|
||||||
new Field<Type>
|
new Field<Type>
|
||||||
|
@ -171,7 +173,7 @@ tmp<Field<Type> > wedgeFaPatchField<Type>::snGradTransformDiag() const
|
||||||
(
|
(
|
||||||
pow
|
pow
|
||||||
(
|
(
|
||||||
reinterpret_cast<const vector&>(diagT),
|
diagV,
|
||||||
pTraits<typename powProduct<vector, pTraits<Type>::rank>
|
pTraits<typename powProduct<vector, pTraits<Type>::rank>
|
||||||
::type>::zero
|
::type>::zero
|
||||||
)
|
)
|
||||||
|
|
|
@ -388,9 +388,12 @@ tmp<areaTensorField> faceLimitedGrad<vector>::grad
|
||||||
|
|
||||||
forAll(gIf, celli)
|
forAll(gIf, celli)
|
||||||
{
|
{
|
||||||
gIf[celli].x() = cmptMultiply(limiter[celli], gIf[celli].x());
|
gIf[celli] = tensor
|
||||||
gIf[celli].y() = cmptMultiply(limiter[celli], gIf[celli].y());
|
(
|
||||||
gIf[celli].z() = cmptMultiply(limiter[celli], gIf[celli].z());
|
cmptMultiply(limiter[celli], gIf[celli].x()),
|
||||||
|
cmptMultiply(limiter[celli], gIf[celli].y()),
|
||||||
|
cmptMultiply(limiter[celli], gIf[celli].z())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
g.correctBoundaryConditions();
|
g.correctBoundaryConditions();
|
||||||
|
|
|
@ -267,7 +267,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return axis
|
//- Return axis
|
||||||
const vector& axis() const
|
vector axis() const
|
||||||
{
|
{
|
||||||
return coordSys_.axis();
|
return coordSys_.axis();
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,9 +169,11 @@ void wedgeFvPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > wedgeFvPatchField<Type>::snGradTransformDiag() const
|
tmp<Field<Type> > wedgeFvPatchField<Type>::snGradTransformDiag() const
|
||||||
{
|
{
|
||||||
diagTensor diagT =
|
const diagTensor diagT =
|
||||||
0.5*diag(I - refCast<const wedgeFvPatch>(this->patch()).cellT());
|
0.5*diag(I - refCast<const wedgeFvPatch>(this->patch()).cellT());
|
||||||
|
|
||||||
|
const vector diagV(diagT.xx(), diagT.yy(), diagT.zz());
|
||||||
|
|
||||||
return tmp<Field<Type> >
|
return tmp<Field<Type> >
|
||||||
(
|
(
|
||||||
new Field<Type>
|
new Field<Type>
|
||||||
|
@ -181,7 +183,7 @@ tmp<Field<Type> > wedgeFvPatchField<Type>::snGradTransformDiag() const
|
||||||
(
|
(
|
||||||
pow
|
pow
|
||||||
(
|
(
|
||||||
reinterpret_cast<const vector&>(diagT),
|
diagV,
|
||||||
pTraits<typename powProduct<vector, pTraits<Type>::rank>
|
pTraits<typename powProduct<vector, pTraits<Type>::rank>
|
||||||
::type>::zero
|
::type>::zero
|
||||||
)
|
)
|
||||||
|
|
|
@ -390,9 +390,12 @@ tmp<volTensorField> cellLimitedGrad<vector>::grad
|
||||||
|
|
||||||
forAll(gIf, celli)
|
forAll(gIf, celli)
|
||||||
{
|
{
|
||||||
gIf[celli].x() = cmptMultiply(limiter[celli], gIf[celli].x());
|
gIf[celli] = tensor
|
||||||
gIf[celli].y() = cmptMultiply(limiter[celli], gIf[celli].y());
|
(
|
||||||
gIf[celli].z() = cmptMultiply(limiter[celli], gIf[celli].z());
|
cmptMultiply(limiter[celli], gIf[celli].x()),
|
||||||
|
cmptMultiply(limiter[celli], gIf[celli].y()),
|
||||||
|
cmptMultiply(limiter[celli], gIf[celli].z())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
g.correctBoundaryConditions();
|
g.correctBoundaryConditions();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.SUFFIXES: .C .cxx .cc .cpp
|
.SUFFIXES: .C .cxx .cc .cpp
|
||||||
|
|
||||||
c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast
|
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
|
||||||
|
|
||||||
CC = g++ -mabi=64
|
CC = g++ -mabi=64
|
||||||
#CC = scg++ -mabi=64
|
#CC = scg++ -mabi=64
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.SUFFIXES: .C .cxx .cc .cpp
|
.SUFFIXES: .C .cxx .cc .cpp
|
||||||
|
|
||||||
c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast
|
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
|
||||||
|
|
||||||
CC = g++ -m64
|
CC = g++ -m64
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.SUFFIXES: .C .cxx .cc .cpp
|
.SUFFIXES: .C .cxx .cc .cpp
|
||||||
|
|
||||||
c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast
|
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
|
||||||
|
|
||||||
CC = g++ $(WM_CXXFLAGS)
|
CC = g++ $(WM_CXXFLAGS)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.SUFFIXES: .C .cxx .cc .cpp
|
.SUFFIXES: .C .cxx .cc .cpp
|
||||||
|
|
||||||
c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast
|
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
|
||||||
|
|
||||||
CC = g++ $(WM_CXXFLAGS)
|
CC = g++ $(WM_CXXFLAGS)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.SUFFIXES: .C .cxx .cc .cpp
|
.SUFFIXES: .C .cxx .cc .cpp
|
||||||
|
|
||||||
c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast
|
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
|
||||||
|
|
||||||
CC = g++ $(WM_CXXFLAGS)
|
CC = g++ $(WM_CXXFLAGS)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.SUFFIXES: .C .cxx .cc .cpp
|
.SUFFIXES: .C .cxx .cc .cpp
|
||||||
|
|
||||||
c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor
|
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor
|
||||||
|
|
||||||
CC = g++ -m64
|
CC = g++ -m64
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
CPP = cpp $(GFLAGS)
|
CPP = cpp -P $(GFLAGS)
|
||||||
LD = ld
|
LD = ld
|
||||||
|
|
||||||
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.SUFFIXES: .C .cxx .cc .cpp
|
.SUFFIXES: .C .cxx .cc .cpp
|
||||||
|
|
||||||
c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast
|
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
|
||||||
|
|
||||||
CC = g++ -m32
|
CC = g++ -m32
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
.SUFFIXES: .C .cxx .cc .cpp
|
.SUFFIXES: .C .cxx .cc .cpp
|
||||||
|
|
||||||
c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast
|
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
|
||||||
|
|
||||||
CC = g++
|
CC = g++
|
||||||
|
|
||||||
include $(RULES)/c++$(WM_COMPILE_OPTION)
|
include $(RULES)/c++$(WM_COMPILE_OPTION)
|
||||||
|
|
||||||
ptFLAGS = -DNoRepository -ftemplate-depth-30
|
ptFLAGS = -DNoRepository -ftemplate-depth-40
|
||||||
|
|
||||||
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
|
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.SUFFIXES: .C .cxx .cc .cpp
|
.SUFFIXES: .C .cxx .cc .cpp
|
||||||
|
|
||||||
c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast
|
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
|
||||||
|
|
||||||
CC = g++ -m64 -mcpu=power5+
|
CC = g++ -m64 -mcpu=power5+
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.SUFFIXES: .C .cxx .cc .cpp
|
.SUFFIXES: .C .cxx .cc .cpp
|
||||||
|
|
||||||
c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter
|
c++WARN = -Wall -Wextra -Wno-unused-parameter
|
||||||
|
|
||||||
CC = g++
|
CC = g++
|
||||||
|
|
||||||
|
|
Reference in a new issue