diff --git a/src/TNL/Matrices/DenseMatrix.h b/src/TNL/Matrices/DenseMatrix.h index 3d0e2d62da85d102c502a5770cbe3fc2be013408..d46b844e66d55812eed984d0d5c99fa082a3acd2 100644 --- a/src/TNL/Matrices/DenseMatrix.h +++ b/src/TNL/Matrices/DenseMatrix.h @@ -906,12 +906,6 @@ class DenseMatrix : public Matrix< Real, Device, Index, RealAllocator > void getTransposition( const Matrix& matrix, const RealType& matrixMultiplicator = 1.0 ); - template< typename Vector1, typename Vector2 > - void performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega = 1.0 ) const; - /** * \brief Assignment operator with exactly the same type of the dense matrix. * diff --git a/src/TNL/Matrices/DenseMatrix.hpp b/src/TNL/Matrices/DenseMatrix.hpp index a42421aa7a661fba0ec7fde144a335322af6f157..ae3f7ee6bb7a7621a06f55ef93eb9f0a833f7c6a 100644 --- a/src/TNL/Matrices/DenseMatrix.hpp +++ b/src/TNL/Matrices/DenseMatrix.hpp @@ -1037,28 +1037,6 @@ void DenseMatrix< Real, Device, Index, Organization, RealAllocator >::getTranspo } } -template< typename Real, - typename Device, - typename Index, - ElementsOrganization Organization, - typename RealAllocator > - template< typename Vector1, typename Vector2 > -void DenseMatrix< Real, Device, Index, Organization, RealAllocator >::performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega ) const -{ - RealType sum( 0.0 ), diagonalValue; - for( IndexType i = 0; i < this->getColumns(); i++ ) - { - if( i == row ) - diagonalValue = this->getElement( row, row ); - else - sum += this->getElement( row, i ) * x[ i ]; - } - x[ row ] = ( 1.0 - omega ) * x[ row ] + omega / diagonalValue * ( b[ row ] - sum ); -} - template< typename Real, typename Device, typename Index, diff --git a/src/TNL/Matrices/DenseMatrixView.h b/src/TNL/Matrices/DenseMatrixView.h index 89a2219b3bddcc9b9139d8984694010fa298b61b..712a565ae255a9997bf0e3fc113e566dc56b2941 100644 --- a/src/TNL/Matrices/DenseMatrixView.h +++ b/src/TNL/Matrices/DenseMatrixView.h @@ -856,12 +856,6 @@ class DenseMatrixView : public MatrixView< Real, Device, Index > void getTransposition( const Matrix& matrix, const RealType& matrixMultiplicator = 1.0 ); - template< typename Vector1, typename Vector2 > - void performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega = 1.0 ) const; - /** * \brief Assignment operator with DenseMatrix. * diff --git a/src/TNL/Matrices/DenseMatrixView.hpp b/src/TNL/Matrices/DenseMatrixView.hpp index 3a44269d1d78923c5b0e40091c9b20d9eb303483..336fcbb9aa8ac3a5ddfae3f9528058783a3ac769 100644 --- a/src/TNL/Matrices/DenseMatrixView.hpp +++ b/src/TNL/Matrices/DenseMatrixView.hpp @@ -1006,28 +1006,6 @@ void DenseMatrixView< Real, Device, Index, Organization >::getTransposition( con } } -template< typename Real, - typename Device, - typename Index, - ElementsOrganization Organization > - template< typename Vector1, typename Vector2 > -void DenseMatrixView< Real, Device, Index, Organization >::performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega ) const -{ - RealType sum( 0.0 ), diagonalValue; - for( IndexType i = 0; i < this->getColumns(); i++ ) - { - if( i == row ) - diagonalValue = this->getElement( row, row ); - else - sum += this->getElement( row, i ) * x[ i ]; - } - x[ row ] = ( 1.0 - omega ) * x[ row ] + omega / diagonalValue * ( b[ row ] - sum ); -} - - template< typename Real, typename Device, typename Index, diff --git a/src/TNL/Matrices/LambdaMatrix.h b/src/TNL/Matrices/LambdaMatrix.h index 2b788ed5270540a58582153b8c37e87dd346c2a4..0278a00ef40e83a651dcfa4f902db4545326ebde 100644 --- a/src/TNL/Matrices/LambdaMatrix.h +++ b/src/TNL/Matrices/LambdaMatrix.h @@ -490,13 +490,6 @@ class LambdaMatrix const IndexType begin = 0, IndexType end = 0 ) const; - - template< typename Vector1, typename Vector2 > - void performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega = 1.0 ) const; - /** * \brief Method for printing the matrix to output stream. * diff --git a/src/TNL/Matrices/LambdaMatrix.hpp b/src/TNL/Matrices/LambdaMatrix.hpp index 730c8b5b1d092d03ce1914b31722fdd5c88966dc..e348a6dba6229e6c23c38e81d87fe4c834794606 100644 --- a/src/TNL/Matrices/LambdaMatrix.hpp +++ b/src/TNL/Matrices/LambdaMatrix.hpp @@ -401,22 +401,6 @@ sequentialForAllRows( Function&& function ) const sequentialForRows( (IndexType) 0, this->getRows(), function ); } -template< typename MatrixElementsLambda, - typename CompressedRowLengthsLambda, - typename Real, - typename Device, - typename Index > - template< typename Vector1, typename Vector2 > -void -LambdaMatrix< MatrixElementsLambda, CompressedRowLengthsLambda, Real, Device, Index >:: -performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega ) const -{ - throw Exceptions::NotImplementedError("performSORIteration is not implemented for SparseMatrixView"); -} - template< typename MatrixElementsLambda, typename CompressedRowLengthsLambda, typename Real, diff --git a/src/TNL/Matrices/MultidiagonalMatrix.h b/src/TNL/Matrices/MultidiagonalMatrix.h index 3a74b0b44ff0d0b5529e87416b36790113a02f6f..d56f1fd0619ae582f90e0557cbf30068cc5aeaaf 100644 --- a/src/TNL/Matrices/MultidiagonalMatrix.h +++ b/src/TNL/Matrices/MultidiagonalMatrix.h @@ -1053,13 +1053,6 @@ class MultidiagonalMatrix : public Matrix< Real, Device, Index, RealAllocator > void getTransposition( const MultidiagonalMatrix< Real2, Device, Index2 >& matrix, const RealType& matrixMultiplicator = 1.0 ); - template< typename Vector1, typename Vector2 > - __cuda_callable__ - void performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega = 1.0 ) const; - /** * \brief Assignment of exactly the same matrix type. * diff --git a/src/TNL/Matrices/MultidiagonalMatrix.hpp b/src/TNL/Matrices/MultidiagonalMatrix.hpp index 244188831cf05b7d2dc5218060ff35c589e0d016..6ece15b4ca76b060d2e6d027ebe8efba2c252d8a 100644 --- a/src/TNL/Matrices/MultidiagonalMatrix.hpp +++ b/src/TNL/Matrices/MultidiagonalMatrix.hpp @@ -808,29 +808,6 @@ getTransposition( const MultidiagonalMatrix< Real2, Device, Index2 >& matrix, } } -template< typename Real, - typename Device, - typename Index, - ElementsOrganization Organization, - typename RealAllocator, - typename IndexAllocator > - template< typename Vector1, typename Vector2 > -__cuda_callable__ -void MultidiagonalMatrix< Real, Device, Index, Organization, RealAllocator, IndexAllocator >:: -performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega ) const -{ - RealType sum( 0.0 ); - if( row > 0 ) - sum += this->getElementFast( row, row - 1 ) * x[ row - 1 ]; - if( row < this->getColumns() - 1 ) - sum += this->getElementFast( row, row + 1 ) * x[ row + 1 ]; - x[ row ] = ( 1.0 - omega ) * x[ row ] + omega / this->getElementFast( row, row ) * ( b[ row ] - sum ); -} - - // copy assignment template< typename Real, typename Device, diff --git a/src/TNL/Matrices/MultidiagonalMatrixView.h b/src/TNL/Matrices/MultidiagonalMatrixView.h index 869ddb9732e8541fecf9847c1ed648f189012335..a0e13874d03f2072eda90dd19dd65a38067d2367 100644 --- a/src/TNL/Matrices/MultidiagonalMatrixView.h +++ b/src/TNL/Matrices/MultidiagonalMatrixView.h @@ -811,13 +811,6 @@ class MultidiagonalMatrixView : public MatrixView< Real, Device, Index > void getTransposition( const MultidiagonalMatrixView< Real2, Device, Index2 >& matrix, const RealType& matrixMultiplicator = 1.0 ); - template< typename Vector1, typename Vector2 > - __cuda_callable__ - void performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega = 1.0 ) const; - /** * \brief Assignment of exactly the same matrix type. * diff --git a/src/TNL/Matrices/MultidiagonalMatrixView.hpp b/src/TNL/Matrices/MultidiagonalMatrixView.hpp index 550158e4d458261e65d89fb5bd5d4018f4eb9a32..65293b809e671abc4a57ce73b99741d90aefefa7 100644 --- a/src/TNL/Matrices/MultidiagonalMatrixView.hpp +++ b/src/TNL/Matrices/MultidiagonalMatrixView.hpp @@ -774,28 +774,6 @@ getTransposition( const MultidiagonalMatrixView< Real2, Device, Index2 >& matrix } } -template< typename Real, - typename Device, - typename Index, - ElementsOrganization Organization > - template< typename Vector1, typename Vector2 > -__cuda_callable__ -void -MultidiagonalMatrixView< Real, Device, Index, Organization >:: -performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega ) const -{ - RealType sum( 0.0 ); - if( row > 0 ) - sum += this->getElementFast( row, row - 1 ) * x[ row - 1 ]; - if( row < this->getColumns() - 1 ) - sum += this->getElementFast( row, row + 1 ) * x[ row + 1 ]; - x[ row ] = ( 1.0 - omega ) * x[ row ] + omega / this->getElementFast( row, row ) * ( b[ row ] - sum ); -} - - template< typename Real, typename Device, typename Index, diff --git a/src/TNL/Matrices/SparseMatrix.h b/src/TNL/Matrices/SparseMatrix.h index fa3441b01874b7f5c78a528fda7236dbc6f03838..76d47b50dc1db36bee622ab09b19e7032fe3fb34 100644 --- a/src/TNL/Matrices/SparseMatrix.h +++ b/src/TNL/Matrices/SparseMatrix.h @@ -1043,12 +1043,6 @@ class SparseMatrix : public Matrix< Real, Device, Index, RealAllocator > const RealType& matrixMultiplicator = 1.0 ); */ - template< typename Vector1, typename Vector2 > - void performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega = 1.0 ) const; - /** * \brief Assignment of exactly the same matrix type. * diff --git a/src/TNL/Matrices/SparseMatrix.hpp b/src/TNL/Matrices/SparseMatrix.hpp index 93cd9b173f786fdf7403cb7ef06ac6c753d6afb7..b7df383b0aecaf1ee1867f3253de4c5dfc55ce87 100644 --- a/src/TNL/Matrices/SparseMatrix.hpp +++ b/src/TNL/Matrices/SparseMatrix.hpp @@ -815,25 +815,6 @@ getTransposition( const SparseMatrix< Real2, Device, Index2 >& matrix, }*/ -template< typename Real, - typename Device, - typename Index, - typename MatrixType, - template< typename, typename, typename > class Segments, - typename ComputeReal, - typename RealAllocator, - typename IndexAllocator > -template< typename Vector1, typename Vector2 > -void -SparseMatrix< Real, Device, Index, MatrixType, Segments, ComputeReal, RealAllocator, IndexAllocator >:: -performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega ) const -{ - this->view.performSORIteration( b, row, x, omega ); -} - // copy assignment template< typename Real, typename Device, diff --git a/src/TNL/Matrices/SparseMatrixView.h b/src/TNL/Matrices/SparseMatrixView.h index eaf692ac66d58c1778caa9847f36c65094cd7a4d..704d8c7ed98ccf3c10a0de9ddd1adf5b1b8dad83 100644 --- a/src/TNL/Matrices/SparseMatrixView.h +++ b/src/TNL/Matrices/SparseMatrixView.h @@ -821,12 +821,6 @@ class SparseMatrixView : public MatrixView< Real, Device, Index > const IndexType begin = 0, IndexType end = 0 ) const; - template< typename Vector1, typename Vector2 > - void performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega = 1.0 ) const; - /** * \brief Assignment of any matrix type. * . diff --git a/src/TNL/Matrices/SparseMatrixView.hpp b/src/TNL/Matrices/SparseMatrixView.hpp index d7ed73815b9aa27ce1944eb59715eced576bd09c..3d0ce734274506c98e249358f81b3f36e018d4a8 100644 --- a/src/TNL/Matrices/SparseMatrixView.hpp +++ b/src/TNL/Matrices/SparseMatrixView.hpp @@ -827,23 +827,6 @@ getTransposition( const SparseMatrixView< Real2, Device, Index2 >& matrix, }*/ -template< typename Real, - typename Device, - typename Index, - typename MatrixType, - template< typename, typename > class SegmentsView, - typename ComputeReal > -template< typename Vector1, typename Vector2 > -void -SparseMatrixView< Real, Device, Index, MatrixType, SegmentsView, ComputeReal >:: -performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega ) const -{ - throw Exceptions::NotImplementedError("performSORIteration is not implemented for SparseMatrixView"); -} - template< typename Real, typename Device, typename Index, diff --git a/src/TNL/Matrices/TridiagonalMatrix.h b/src/TNL/Matrices/TridiagonalMatrix.h index 45e6d132fecd289df3ba1ccf608eebf39a1342d7..bb47f68126cef4172f43688583989a047f8685ac 100644 --- a/src/TNL/Matrices/TridiagonalMatrix.h +++ b/src/TNL/Matrices/TridiagonalMatrix.h @@ -945,13 +945,6 @@ class TridiagonalMatrix : public Matrix< Real, Device, Index, RealAllocator > void getTransposition( const TridiagonalMatrix< Real2, Device, Index2 >& matrix, const RealType& matrixTriplicator = 1.0 ); - template< typename Vector1, typename Vector2 > - __cuda_callable__ - void performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega = 1.0 ) const; - /** * \brief Assignment of exactly the same matrix type. * diff --git a/src/TNL/Matrices/TridiagonalMatrix.hpp b/src/TNL/Matrices/TridiagonalMatrix.hpp index 93ebcd8b39e68ba0f70079497a8b3cb64d5e5e43..80236b7de7ca023ea4100f58d0bb7204add17b1c 100644 --- a/src/TNL/Matrices/TridiagonalMatrix.hpp +++ b/src/TNL/Matrices/TridiagonalMatrix.hpp @@ -658,27 +658,6 @@ void TridiagonalMatrix< Real, Device, Index, Organization, RealAllocator >::getT } } -template< typename Real, - typename Device, - typename Index, - ElementsOrganization Organization, - typename RealAllocator > - template< typename Vector1, typename Vector2 > -__cuda_callable__ -void TridiagonalMatrix< Real, Device, Index, Organization, RealAllocator >::performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega ) const -{ - RealType sum( 0.0 ); - if( row > 0 ) - sum += this->getElementFast( row, row - 1 ) * x[ row - 1 ]; - if( row < this->getColumns() - 1 ) - sum += this->getElementFast( row, row + 1 ) * x[ row + 1 ]; - x[ row ] = ( 1.0 - omega ) * x[ row ] + omega / this->getElementFast( row, row ) * ( b[ row ] - sum ); -} - - // copy assignment template< typename Real, typename Device, diff --git a/src/TNL/Matrices/TridiagonalMatrixView.h b/src/TNL/Matrices/TridiagonalMatrixView.h index c8e0ecdcad2e6f9b4fc45f2b56e09a0070866c5a..3420f68154b8192b4e33270535890d3d50dc3665 100644 --- a/src/TNL/Matrices/TridiagonalMatrixView.h +++ b/src/TNL/Matrices/TridiagonalMatrixView.h @@ -779,13 +779,6 @@ class TridiagonalMatrixView : public MatrixView< Real, Device, Index > void getTransposition( const TridiagonalMatrixView< Real2, Device, Index2 >& matrix, const RealType& matrixMultiplicator = 1.0 ); - template< typename Vector1, typename Vector2 > - __cuda_callable__ - void performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega = 1.0 ) const; - /** * \brief Assignment of exactly the same matrix type. * diff --git a/src/TNL/Matrices/TridiagonalMatrixView.hpp b/src/TNL/Matrices/TridiagonalMatrixView.hpp index c67073381047ef8a282bae91fcb5e470f5a484d1..64da406244ea7bd44d71c4e025b7a10a356f9627 100644 --- a/src/TNL/Matrices/TridiagonalMatrixView.hpp +++ b/src/TNL/Matrices/TridiagonalMatrixView.hpp @@ -757,28 +757,6 @@ getTransposition( const TridiagonalMatrixView< Real2, Device, Index2 >& matrix, } } -template< typename Real, - typename Device, - typename Index, - ElementsOrganization Organization > - template< typename Vector1, typename Vector2 > -__cuda_callable__ -void -TridiagonalMatrixView< Real, Device, Index, Organization >:: -performSORIteration( const Vector1& b, - const IndexType row, - Vector2& x, - const RealType& omega ) const -{ - RealType sum( 0.0 ); - if( row > 0 ) - sum += this->getElementFast( row, row - 1 ) * x[ row - 1 ]; - if( row < this->getColumns() - 1 ) - sum += this->getElementFast( row, row + 1 ) * x[ row + 1 ]; - x[ row ] = ( 1.0 - omega ) * x[ row ] + omega / this->getElementFast( row, row ) * ( b[ row ] - sum ); -} - - template< typename Real, typename Device, typename Index,