From dbbcf71babd1e8821a3ee2aee8fb0eedc5d482b1 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@esi-group.com>
Date: Thu, 21 Feb 2019 11:33:54 +0100
Subject: [PATCH] ENH: improvements, modernization of matrix containers (#1220)

- add iterators, begin/end, empty() methods for STL behaviour.
  Use standard algorithms where possible
     * std::fill, std::copy
     * std::min_element, std::max_element

- access methods consistent with other OpenFOAM containers:
     * data(), cdata(), uniform()

- Use ListPolicy to impose output line breaks

- Can recover matrix storage for re-use elsewhere.
  For example, to populate values with 2D i-j addressing and later
  release it as flat linear storage.

- added minMax() function for Matrix

- additional inplace +=, -=, *=, /= operations

Matrices are not yet move constructable, pending a use case.
---
 src/OpenFOAM/matrices/Matrix/MatrixI.H | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/OpenFOAM/matrices/Matrix/MatrixI.H b/src/OpenFOAM/matrices/Matrix/MatrixI.H
index 5c6d8e3222..81c9a3c2bb 100644
--- a/src/OpenFOAM/matrices/Matrix/MatrixI.H
+++ b/src/OpenFOAM/matrices/Matrix/MatrixI.H
@@ -419,7 +419,6 @@ inline Foam::tmp<Foam::Field<Type>> Foam::Matrix<Form, Type>::rightMultiply
 (
     const IndirectListBase<Type, Addr>& colVec
 ) const
-{
     return this->rightMultiplyImpl(colVec);
 }
 
@@ -460,8 +459,6 @@ inline typename Foam::Matrix<Form, Type>::iterator
 Foam::Matrix<Form, Type>::end()
 {
     return v_ + (mRows_ * nCols_);
-}
-
 
 template<class Form, class Type>
 inline typename Foam::Matrix<Form, Type>::const_iterator
-- 
GitLab