Commit 37157f43 authored by Henry Weller's avatar Henry Weller
Browse files

Vector: added operator=(scalar)

parent 6f188f9e
......@@ -123,6 +123,11 @@ public:
(
const Foam::List<Vector<Cmpt>>&
) const;
// Member Operators
inline void operator=(const scalar);
};
......
......@@ -111,6 +111,18 @@ inline const Vector<Cmpt>& Vector<Cmpt>::centre
}
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class Cmpt>
inline void Vector<Cmpt>::operator=
(
const scalar s
)
{
VectorSpace<Vector<Cmpt>, Cmpt, 3>::operator=(s);
}
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
template<class Cmpt>
......
......@@ -133,6 +133,7 @@ public:
inline void operator+=(const VectorSpace<Form, Cmpt, nCmpt>&);
inline void operator-=(const VectorSpace<Form, Cmpt, nCmpt>&);
inline void operator=(const scalar);
inline void operator*=(const scalar);
inline void operator/=(const scalar);
......
......@@ -218,6 +218,16 @@ inline void VectorSpace<Form, Cmpt, nCmpt>::operator-=
}
template<class Form, class Cmpt, int nCmpt>
inline void VectorSpace<Form, Cmpt, nCmpt>::operator=
(
const scalar s
)
{
VectorSpaceOps<nCmpt,0>::eqOpS(*this, s, eqOp<Cmpt>());
}
template<class Form, class Cmpt, int nCmpt>
inline void VectorSpace<Form, Cmpt, nCmpt>::operator*=
(
......
Supports Markdown
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