Skip to content
Snippets Groups Projects
Commit fc3883d1 authored by Henry's avatar Henry
Browse files

geometricOneField: add support for * and / of two geometricOneFields

parent 144a2b23
Branches
Tags
No related merge requests found
......@@ -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
......
......@@ -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;
}
// ************************************************************************* //
......@@ -32,6 +32,11 @@ namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
inline const one& operator*(const one& o, const one&)
{
return o;
}
template<class Type>
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<class Type>
inline Type operator/(const one&, const Type& t)
{
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment