ENH: Rectangular/SquareMatrix: add move assignment

This commit is contained in:
Kutalmis Bercin
2022-01-28 14:43:20 +00:00
committed by Mark Olesen
parent 96cb473305
commit 98b4779793
4 changed files with 27 additions and 4 deletions

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd.
Copyright (C) 2019-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -135,6 +135,9 @@ public:
// Member Operators
//- Move assignment
inline void operator=(RectangularMatrix<Type>&& mat);
//- Assign all elements to zero
inline void operator=(const Foam::zero);

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd.
Copyright (C) 2019-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -171,6 +171,16 @@ Foam::RectangularMatrix<Type>::clone() const
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class Type>
inline void Foam::RectangularMatrix<Type>::operator=
(
RectangularMatrix<Type>&& mat
)
{
this->transfer(mat);
}
template<class Type>
inline void Foam::RectangularMatrix<Type>::operator=(const Foam::zero)
{

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd.
Copyright (C) 2019-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -181,6 +181,9 @@ public:
// Member Operators
//- Move assignment
inline void operator=(SquareMatrix<Type>&& mat);
//- Assign all elements to zero
inline void operator=(const Foam::zero);

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd.
Copyright (C) 2019-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -290,6 +290,13 @@ inline bool Foam::SquareMatrix<Type>::tridiagonal() const
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class Type>
inline void Foam::SquareMatrix<Type>::operator=(SquareMatrix<Type>&& mat)
{
this->transfer(mat);
}
template<class Type>
inline void Foam::SquareMatrix<Type>::operator=(const Foam::zero)
{