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

This commit is contained in:
Henry Weller
2016-04-17 21:02:57 +01:00
parent e47179a70d
commit e7ef7ed4e6
26 changed files with 9 additions and 166 deletions

View File

@ -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);
}; };

View File

@ -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);
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -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);
}; };

View File

@ -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

View File

@ -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);
}; };

View File

@ -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

View File

@ -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>&);
}; };

View File

@ -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

View File

@ -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>&);

View File

@ -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

View File

@ -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:
//- 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);
}; };

View File

@ -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

View File

@ -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);
}; };

View File

@ -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)
} }
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class Cmpt>
inline void Foam::Tensor2D<Cmpt>::operator=(const Foam::zero)
{
Tensor2D::msType::operator=(Zero);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam

View File

@ -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);
}; };

View File

@ -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

View File

@ -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);
}; };

View File

@ -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

View File

@ -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);
}; };

View File

@ -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);
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -92,11 +92,6 @@ public:
//- Construct from Istream //- Construct from Istream
inline CompactSpatialTensorT(Istream&); inline CompactSpatialTensorT(Istream&);
// Member Operators
inline void operator=(const Foam::zero);
}; };

View File

@ -94,13 +94,4 @@ inline Foam::CompactSpatialTensorT<Cmpt>::CompactSpatialTensorT(Istream& is)
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Cmpt>
inline void Foam::CompactSpatialTensorT<Cmpt>::operator=(const Foam::zero)
{
CompactSpatialTensorT::msType::operator=(Zero);
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -123,11 +123,6 @@ public:
//- Construct from Istream //- Construct from Istream
inline SpatialTensor(Istream&); inline SpatialTensor(Istream&);
// Member Operators
inline void operator=(const Foam::zero);
}; };

View File

@ -133,15 +133,6 @@ inline Foam::SpatialTensor<Cmpt>::SpatialTensor(Istream& is)
{} {}
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class Cmpt>
inline void Foam::SpatialTensor<Cmpt>::operator=(const Foam::zero)
{
SpatialTensor::msType::operator=(Zero);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam

View File

@ -151,8 +151,6 @@ public:
// Member Operators // Member Operators
inline void operator=(const Foam::zero);
//- Return the dual spatial vector //- Return the dual spatial vector
inline dual operator*() const; inline dual operator*() const;
}; };

View File

@ -205,13 +205,6 @@ const Foam::SpatialVector<Cmpt>& Foam::SpatialVector<Cmpt>::dual::v() const
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class Cmpt>
inline void Foam::SpatialVector<Cmpt>::operator=(const Foam::zero)
{
SpatialVector::vsType::operator=(Zero);
}
template<class Cmpt> template<class Cmpt>
inline typename Foam::SpatialVector<Cmpt>::dual inline typename Foam::SpatialVector<Cmpt>::dual
Foam::SpatialVector<Cmpt>::operator*() const Foam::SpatialVector<Cmpt>::operator*() const