diff --git a/etc/bashrc b/etc/bashrc index e9f9c6f9cf..ce10b39e78 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -77,12 +77,6 @@ export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty -# Operating System/Platform from Unix or MSWindows -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# WM_OS = Unix | MSWindows -: ${WM_OS:=Unix}; export WM_OS - - # Compiler: set to Gcc, Gcc43 or Icc (for Intel's icc) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ : ${WM_COMPILER:=Gcc}; export WM_COMPILER @@ -105,7 +99,7 @@ export WM_COMPILER_LIB_ARCH= # WM_JAVAC_OPTION = Opt | Debug : ${WM_JAVAC_OPTION:=Opt}; export WM_JAVAC_OPTION -# WM_MPLIB = | OPENMPI | LAM | MPICH | MPICH-GM | HPMPI | GAMMA | MPI +# WM_MPLIB = | OPENMPI | LAM | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI : ${WM_MPLIB:=OPENMPI}; export WM_MPLIB diff --git a/etc/cshrc b/etc/cshrc index bcda5b6318..a46cf3ee47 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -71,12 +71,6 @@ setenv WM_PROJECT_USER_DIR $HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty -# Operating System/Platform from Unix or MSWindows -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# WM_OS = Unix | MSWindows -if ( ! $?WM_OS ) setenv WM_OS Unix - - # Compiler: set to Gcc, Gcc43 or Icc (for Intel's icc) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if ( ! $?WM_COMPILER ) setenv WM_COMPILER Gcc @@ -99,7 +93,7 @@ if ( ! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION Opt # WM_JAVAC_OPTION = Opt | Debug if ( ! $?WM_JAVAC_OPTION ) setenv WM_JAVAC_OPTION Opt -# WM_MPLIB = | OPENMPI | LAM | MPICH | MPICH-GM | HPMPI | GAMMA | MPI +# WM_MPLIB = | OPENMPI | LAM | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI if ( ! $?WM_MPLIB ) setenv WM_MPLIB OPENMPI diff --git a/etc/settings.csh b/etc/settings.csh index 688ade5408..d36a91ad5b 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -231,6 +231,15 @@ case FJMPI: _foamAddLib /opt/FJSVpnidt/lib breaksw +case QSMPI: + setenv MPI_ARCH_PATH /usr/lib/mpi + setenv FOAM_MPI_LIBBIN FOAM_LIBBIN/qsmpi + + _foamAddPath $MPI_ARCH_PATH/bin + _foamAddLib $MPI_ARCH_PATH/lib + + breaksw + default: setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/dummy breaksw diff --git a/etc/settings.sh b/etc/settings.sh index 240b0036a0..046f624cde 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -259,6 +259,15 @@ FJMPI) _foamAddLib /opt/FJSVpnidt/lib ;; +QSMPI) + export MPI_ARCH_PATH=/usr/lib/mpi + export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/qsmpi + + _foamAddPath $MPI_ARCH_PATH/bin + _foamAddLib $MPI_ARCH_PATH/lib + + ;; + *) export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/dummy ;; diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index 2134420ead..0fcf2e626d 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -1168,7 +1168,7 @@ void Foam::fvMatrix::operator*= } -// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * // template void Foam::checkMethod @@ -1297,7 +1297,27 @@ Foam::lduMatrix::solverPerformance Foam::solve(const tmp >& tfvm) } -// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // +template +Foam::tmp > Foam::correction +( + const fvMatrix& A +) +{ + return A - (A & A.psi()); +} + + +template +Foam::tmp > Foam::correction +( + const tmp >& tA +) +{ + return tA - (tA() & tA().psi()); +} + + +// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // template Foam::tmp > Foam::operator== diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H index e14c0fe497..8ae502cb57 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H @@ -547,6 +547,18 @@ template lduMatrix::solverPerformance solve(const tmp >&); +//- Return the correction form of the given matrix +// by subtracting the matrix multiplied by the current field +template +tmp > correction(const fvMatrix&); + + +//- Return the correction form of the given temporary matrix +// by subtracting the matrix multiplied by the current field +template +tmp > correction(const tmp >&); + + // * * * * * * * * * * * * * * * Global operators * * * * * * * * * * * * * // template diff --git a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C index aea3123f89..f3c95afc91 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C @@ -45,37 +45,20 @@ void Foam::coordinateRotation::calcTransform const axisOrder& order ) { - const scalar orthogonalityError = 1.0e-8; - vector a = axis1 / mag(axis1); vector b = axis2; // Absorb minor nonorthogonality into axis2 b = b - (b & a)*a; - if (mag(b) < orthogonalityError) + if (mag(b) < SMALL) { - FatalErrorIn - ( - "coordinateRotation::calcTransform()" - ) + FatalErrorIn("coordinateRotation::calcTransform()") << "axis1, axis2 appear co-linear: " << axis1 << ", " << axis2 << endl << abort(FatalError); } - // this error check is probably no longer required - if (mag(a & b)/(mag(a)*mag(b)) >= orthogonalityError) - { - FatalErrorIn - ( - "coordinateRotation::calcTransform()" - ) - << "coordinate system nonorthogonality " << nl - << "mag(axis1 & axis2) = " << mag(a & b) - << abort(FatalError); - } - b = b / mag(b); vector c = a ^ b; @@ -102,10 +85,7 @@ void Foam::coordinateRotation::calcTransform break; default: - FatalErrorIn - ( - "coordinateRotation::calcTransform()" - ) + FatalErrorIn("coordinateRotation::calcTransform()") << "programmer error" << endl << abort(FatalError); break; @@ -241,4 +221,5 @@ void Foam::coordinateRotation::operator=(const dictionary& rhs) calcTransform(axis1, axis2, order); } + // ************************************************************************* // diff --git a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C index 27443c98ee..7655455a73 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C +++ b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C @@ -218,7 +218,7 @@ Foam::laminarFlameSpeedModels::Gulders::operator()() const dimensionedScalar ( hhuCombustionThermo_.lookup("stoichiometricAirFuelMassRatio") - )*ft/(scalar(1) - ft) + )*ft/((1 + SMALL) - ft) ); } else diff --git a/wmake/rules/linux64Gcc/mplibQSMPI b/wmake/rules/linux64Gcc/mplibQSMPI new file mode 100644 index 0000000000..95ea327379 --- /dev/null +++ b/wmake/rules/linux64Gcc/mplibQSMPI @@ -0,0 +1,4 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi +