BUG: Tensor2D derives from VectorSpace, not MatrixSpace

This commit is contained in:
Mark Olesen
2019-12-15 18:58:55 +01:00
parent 3176b3a5de
commit c614388ddb
2 changed files with 9 additions and 12 deletions

View File

@ -82,11 +82,13 @@ public:
//- Component labeling enumeration
enum components { XX, XY, YX, YY };
// Constructors
// Generated Methods
//- Construct null
inline Tensor2D();
Tensor2D() = default;
// Constructors
//- Construct initialized to zero
inline Tensor2D(const Foam::zero);

View File

@ -28,15 +28,10 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Cmpt>
inline Foam::Tensor2D<Cmpt>::Tensor2D()
{}
template<class Cmpt>
inline Foam::Tensor2D<Cmpt>::Tensor2D(const Foam::zero)
:
Tensor2D::msType(Zero)
Tensor2D::vsType(Zero)
{}
@ -46,7 +41,7 @@ inline Foam::Tensor2D<Cmpt>::Tensor2D
const VectorSpace<Tensor2D<Cmpt>, Cmpt, 4>& vs
)
:
Tensor2D::msType(vs)
Tensor2D::vsType(vs)
{}
@ -61,7 +56,7 @@ inline Foam::Tensor2D<Cmpt>::Tensor2D(const SymmTensor2D<Cmpt>& st)
template<class Cmpt>
inline Foam::Tensor2D<Cmpt>::Tensor2D(const SphericalTensor2D<Cmpt>& st)
:
Tensor2D::msType(Zero)
Tensor2D::vsType(Zero)
{
this->v_[XX] = st.ii();
this->v_[YY] = st.ii();
@ -95,7 +90,7 @@ inline Foam::Tensor2D<Cmpt>::Tensor2D
template<class Cmpt>
inline Foam::Tensor2D<Cmpt>::Tensor2D(Istream& is)
:
Tensor2D::msType(is)
Tensor2D::vsType(is)
{}