VectorSpaces and MatrixSpaces: Added construction from and assignment to zero

This commit is contained in:
Henry Weller
2016-03-22 08:25:50 +00:00
parent 0f0e4a0c38
commit e6e687b67d
22 changed files with 203 additions and 62 deletions

View File

@ -197,6 +197,9 @@ public:
//- Assign to a triad
inline void operator=(const Vector<Vector<Cmpt>>&);
//- Assignment to zero
inline void operator=(const Foam::zero);
};

View File

@ -33,9 +33,9 @@ inline Foam::Tensor<Cmpt>::Tensor()
template<class Cmpt>
inline Foam::Tensor<Cmpt>::Tensor(const Foam::zero z)
inline Foam::Tensor<Cmpt>::Tensor(const Foam::zero)
:
Tensor::msType(z)
Tensor::msType(Zero)
{}
@ -329,7 +329,7 @@ inline Foam::Tensor<Cmpt> Foam::Tensor<Cmpt>::T() const
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class Cmpt>
inline void Foam::Tensor<Cmpt>::operator&=(const Tensor<Cmpt>& t)
@ -400,6 +400,13 @@ inline void Foam::Tensor<Cmpt>::operator=(const Vector<Vector<Cmpt>>& tr)
}
template<class Cmpt>
inline void Foam::Tensor<Cmpt>::operator=(const Foam::zero)
{
Tensor::msType::operator=(Zero);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam