Skip to content
Snippets Groups Projects
Commit 2b6df576 authored by Kutalmış Berçin's avatar Kutalmış Berçin
Browse files

ENH: Rectangular/SquareMatrix: add move assignment

parent 2d7cd347
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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)
{
......
......@@ -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);
......
......@@ -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)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment