diff --git a/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneField.H b/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneField.H index f592ebb7e1..05f1c28b42 100644 --- a/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneField.H +++ b/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,6 +75,19 @@ public: }; +inline const geometricOneField& operator* +( + const geometricOneField&, + const geometricOneField& +); + +inline const geometricOneField& operator/ +( + const geometricOneField&, + const geometricOneField& +); + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneFieldI.H b/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneFieldI.H index ed6fd198cb..2b8a3989bc 100644 --- a/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneFieldI.H +++ b/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneFieldI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,4 +48,23 @@ inline Foam::oneFieldField Foam::geometricOneField::boundaryField() const } +inline const Foam::geometricOneField& Foam::operator* +( + const geometricOneField& gof, + const geometricOneField& +) +{ + return gof; +} + +inline const Foam::geometricOneField& Foam::operator/ +( + const geometricOneField& gof, + const geometricOneField& +) +{ + return gof; +} + + // ************************************************************************* // diff --git a/src/OpenFOAM/primitives/one/oneI.H b/src/OpenFOAM/primitives/one/oneI.H index 1a60bae27f..69a8f685f4 100644 --- a/src/OpenFOAM/primitives/one/oneI.H +++ b/src/OpenFOAM/primitives/one/oneI.H @@ -32,6 +32,11 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +inline const one& operator*(const one& o, const one&) +{ + return o; +} + template inline const Type& operator*(const Type& t, const one&) { @@ -44,6 +49,12 @@ inline const Type& operator*(const one&, const Type& t) return t; } + +inline const one& operator/(const one& o, const one&) +{ + return o; +} + template inline Type operator/(const one&, const Type& t) { diff --git a/src/finiteVolume/finiteVolume/fvm/fvmDdt.C b/src/finiteVolume/finiteVolume/fvm/fvmDdt.C index 534bb743d7..9a73ae3695 100644 --- a/src/finiteVolume/finiteVolume/fvm/fvmDdt.C +++ b/src/finiteVolume/finiteVolume/fvm/fvmDdt.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -99,6 +99,45 @@ ddt } +template +tmp > +ddt +( + const one&, + const one&, + const GeometricField& vf +) +{ + return ddt(vf); +} + + +template +tmp > +ddt +( + const one&, + const volScalarField& rho, + const GeometricField& vf +) +{ + return ddt(rho, vf); +} + + +template +tmp > +ddt +( + const volScalarField& alpha, + const one&, + const GeometricField& vf +) +{ + return ddt(alpha, vf); +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace fvm diff --git a/src/finiteVolume/finiteVolume/fvm/fvmDdt.H b/src/finiteVolume/finiteVolume/fvm/fvmDdt.H index 3b5d701d41..efc28a2cca 100644 --- a/src/finiteVolume/finiteVolume/fvm/fvmDdt.H +++ b/src/finiteVolume/finiteVolume/fvm/fvmDdt.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -76,6 +76,30 @@ namespace fvm const volScalarField&, const GeometricField& ); + + template + tmp > ddt + ( + const one&, + const one&, + const GeometricField& + ); + + template + tmp > ddt + ( + const one&, + const volScalarField&, + const GeometricField& + ); + + template + tmp > ddt + ( + const volScalarField&, + const one&, + const GeometricField& + ); }