geometricOneField: add support for * and / of two geometricOneFields
This commit is contained in:
parent
144a2b232e
commit
fc3883d14b
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user