mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Rectangular/SquareMatrix: add move assignment
This commit is contained in:
committed by
Mark Olesen
parent
96cb473305
commit
98b4779793
@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user