Commit e7ef7ed4 authored by Henry Weller's avatar Henry Weller
Browse files

src/OpenFOAM/primitives: inherit operator=(const Foam::zero) from base class where appropriate

parent e47179a7
...@@ -94,11 +94,6 @@ public: ...@@ -94,11 +94,6 @@ public:
inline Cmpt& x(); inline Cmpt& x();
inline Cmpt& y(); inline Cmpt& y();
inline Cmpt& z(); inline Cmpt& z();
// Member Operators
inline void operator=(const Foam::zero);
}; };
......
...@@ -109,13 +109,4 @@ inline Cmpt& Foam::RowVector<Cmpt>::z() ...@@ -109,13 +109,4 @@ inline Cmpt& Foam::RowVector<Cmpt>::z()
} }
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class Cmpt>
inline void Foam::RowVector<Cmpt>::operator=(const Foam::zero)
{
RowVector::msType::operator=(Zero);
}
// ************************************************************************* // // ************************************************************************* //
...@@ -109,12 +109,6 @@ public: ...@@ -109,12 +109,6 @@ public:
//- Transpose //- Transpose
inline const SphericalTensor<Cmpt>& T() const; inline const SphericalTensor<Cmpt>& T() const;
// Member Operators
//- Assignment to zero
inline void operator=(const Foam::zero);
}; };
......
...@@ -88,15 +88,6 @@ Foam::SphericalTensor<Cmpt>::T() const ...@@ -88,15 +88,6 @@ Foam::SphericalTensor<Cmpt>::T() const
} }
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class Cmpt>
inline void Foam::SphericalTensor<Cmpt>::operator=(const Foam::zero)
{
SphericalTensor::vsType::operator=(Zero);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
......
...@@ -100,12 +100,6 @@ public: ...@@ -100,12 +100,6 @@ public:
inline const Cmpt& ii() const; inline const Cmpt& ii() const;
inline Cmpt& ii(); inline Cmpt& ii();
// Member Operators
//- Assignment to zero
inline void operator=(const Foam::zero);
}; };
......
...@@ -79,15 +79,6 @@ inline Cmpt& Foam::SphericalTensor2D<Cmpt>::ii() ...@@ -79,15 +79,6 @@ inline Cmpt& Foam::SphericalTensor2D<Cmpt>::ii()
} }
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class Cmpt>
inline void Foam::SphericalTensor2D<Cmpt>::operator=(const Foam::zero)
{
SphericalTensor2D::vsType::operator=(Zero);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
......
...@@ -128,10 +128,10 @@ public: ...@@ -128,10 +128,10 @@ public:
// Member Operators // Member Operators
//- Assignment to zero //- Inherit VectorSpace assignment operators
inline void operator=(const Foam::zero); using SymmTensor::vsType::operator=;
//- Construct given SphericalTensor //- Assign to given SphericalTensor
inline void operator=(const SphericalTensor<Cmpt>&); inline void operator=(const SphericalTensor<Cmpt>&);
}; };
......
...@@ -175,13 +175,6 @@ inline void Foam::SymmTensor<Cmpt>::operator=(const SphericalTensor<Cmpt>& st) ...@@ -175,13 +175,6 @@ inline void Foam::SymmTensor<Cmpt>::operator=(const SphericalTensor<Cmpt>& st)
} }
template<class Cmpt>
inline void Foam::SymmTensor<Cmpt>::operator=(const Foam::zero)
{
SymmTensor::vsType::operator=(Zero);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
......
...@@ -120,8 +120,8 @@ public: ...@@ -120,8 +120,8 @@ public:
// Member Operators // Member Operators
//- Assignment to zero //- Inherit VectorSpace assignment operators
inline void operator=(const Foam::zero); using SymmTensor2D::vsType::operator=;
//- Construct given SphericalTensor2D //- Construct given SphericalTensor2D
inline void operator=(const SphericalTensor2D<Cmpt>&); inline void operator=(const SphericalTensor2D<Cmpt>&);
......
...@@ -137,13 +137,6 @@ inline void Foam::SymmTensor2D<Cmpt>::operator= ...@@ -137,13 +137,6 @@ inline void Foam::SymmTensor2D<Cmpt>::operator=
} }
template<class Cmpt>
inline void Foam::SymmTensor2D<Cmpt>::operator=(const Foam::zero)
{
SymmTensor2D::vsType::operator=(Zero);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
......
...@@ -185,6 +185,9 @@ public: ...@@ -185,6 +185,9 @@ public:
//- Inner-product with a Tensor //- Inner-product with a Tensor
inline void operator&=(const Tensor<Cmpt>&); inline void operator&=(const Tensor<Cmpt>&);
//- Inherit MatrixSpace assignment operators
using Tensor::msType::operator=;
//- Assign to an equivalent vector space //- Assign to an equivalent vector space
template<class Cmpt2> template<class Cmpt2>
inline void operator=(const VectorSpace<Tensor<Cmpt2>, Cmpt2, 9>&); inline void operator=(const VectorSpace<Tensor<Cmpt2>, Cmpt2, 9>&);
...@@ -197,9 +200,6 @@ public: ...@@ -197,9 +200,6 @@ public:
//- Assign to a triad //- Assign to a triad
inline void operator=(const Vector<Vector<Cmpt>>&); inline void operator=(const Vector<Vector<Cmpt>>&);
//- Assignment to zero
inline void operator=(const Foam::zero);
}; };
......
...@@ -400,13 +400,6 @@ inline void Foam::Tensor<Cmpt>::operator=(const Vector<Vector<Cmpt>>& tr) ...@@ -400,13 +400,6 @@ 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 namespace Foam
......
...@@ -145,9 +145,6 @@ public: ...@@ -145,9 +145,6 @@ public:
//- Copy SphericalTensor2D //- Copy SphericalTensor2D
inline void operator=(const SphericalTensor2D<Cmpt>&); inline void operator=(const SphericalTensor2D<Cmpt>&);
//- Assignment to zero
inline void operator=(const Foam::zero);
}; };
......
...@@ -170,7 +170,7 @@ inline Foam::Tensor2D<Cmpt> Foam::Tensor2D<Cmpt>::T() const ...@@ -170,7 +170,7 @@ inline Foam::Tensor2D<Cmpt> Foam::Tensor2D<Cmpt>::T() const
} }
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class Cmpt> template<class Cmpt>
inline void Foam::Tensor2D<Cmpt>::operator=(const SymmTensor2D<Cmpt>& st) inline void Foam::Tensor2D<Cmpt>::operator=(const SymmTensor2D<Cmpt>& st)
...@@ -188,15 +188,6 @@ inline void Foam::Tensor2D<Cmpt>::operator=(const SphericalTensor2D<Cmpt>& st) ...@@ -188,15 +188,6 @@ inline void Foam::Tensor2D<Cmpt>::operator=(const SphericalTensor2D<Cmpt>& st)
} }
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class Cmpt>
inline void Foam::Tensor2D<Cmpt>::operator=(const Foam::zero)
{
Tensor2D::msType::operator=(Zero);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
......
...@@ -112,11 +112,6 @@ public: ...@@ -112,11 +112,6 @@ public:
( (
const Foam::List<Vector<Cmpt>>& const Foam::List<Vector<Cmpt>>&
) const; ) const;
// Member Operators
inline void operator=(const Foam::zero);
}; };
......
...@@ -121,15 +121,6 @@ inline const Foam::Vector<Cmpt>& Foam::Vector<Cmpt>::centre ...@@ -121,15 +121,6 @@ inline const Foam::Vector<Cmpt>& Foam::Vector<Cmpt>::centre
} }
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class Cmpt>
inline void Foam::Vector<Cmpt>::operator=(const Foam::zero)
{
Vector::vsType::operator=(Zero);
}
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
namespace Foam namespace Foam
......
...@@ -103,12 +103,6 @@ public: ...@@ -103,12 +103,6 @@ public:
//- Perp dot product (dot product with perpendicular vector) //- Perp dot product (dot product with perpendicular vector)
inline scalar perp(const Vector2D<Cmpt>& b) const; inline scalar perp(const Vector2D<Cmpt>& b) const;
// Member Operators
//- Assignment to zero
inline void operator=(const Foam::zero);
}; };
......
...@@ -90,15 +90,6 @@ inline Cmpt& Foam::Vector2D<Cmpt>::y() ...@@ -90,15 +90,6 @@ inline Cmpt& Foam::Vector2D<Cmpt>::y()
} }
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class Cmpt>
inline void Foam::Vector2D<Cmpt>::operator=(const Foam::zero)
{
Vector2D::vsType::operator=(Zero);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
......
...@@ -93,11 +93,6 @@ public: ...@@ -93,11 +93,6 @@ public:
//- Construct from Istream //- Construct from Istream
inline CompactSpatialTensor(Istream&); inline CompactSpatialTensor(Istream&);
// Member Operators
inline void operator=(const Foam::zero);
}; };
......
...@@ -94,13 +94,4 @@ inline Foam::CompactSpatialTensor<Cmpt>::CompactSpatialTensor(Istream& is) ...@@ -94,13 +94,4 @@ inline Foam::CompactSpatialTensor<Cmpt>::CompactSpatialTensor(Istream& is)
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Cmpt>
inline void Foam::CompactSpatialTensor<Cmpt>::operator=(const Foam::zero)
{
CompactSpatialTensor::msType::operator=(Zero);
}
// ************************************************************************* // // ************************************************************************* //
Markdown is supported
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