diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f7df41fb8f59d75698883dbd62f14d9fd8038da..39038b29c5eb609fea0ea5aaafe9177b271ec5e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ - The class `VTKBasisWriter` has been removed. It only worked for old `dune-fufem`-style function space bases. +- The deprecated file `ulis_tools.hh` has been removed. It contained a short list of + basic linear algebra methods that are now covered by the `dune-matrix-vector` module. + # 2.9 Release diff --git a/dune/fufem/CMakeLists.txt b/dune/fufem/CMakeLists.txt index 23e04bfcb8e4b90671d395f3b25fbfec35072fd6..1cdf4a29e694707369f09b60f6ac2b9b3664d0e0 100644 --- a/dune/fufem/CMakeLists.txt +++ b/dune/fufem/CMakeLists.txt @@ -51,5 +51,4 @@ install(FILES staticmatrixtools.hh surfmassmatrix.hh symmetrictensor.hh - ulis_tools.hh DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/fufem) diff --git a/dune/fufem/ulis_tools.hh b/dune/fufem/ulis_tools.hh deleted file mode 100644 index 373886b5991a5edbccff1a674b733f5a6906f2eb..0000000000000000000000000000000000000000 --- a/dune/fufem/ulis_tools.hh +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef ULIS_TOOLS_HH -#define ULIS_TOOLS_HH - -#include <dune/common/fvector.hh> -#include <dune/common/fmatrix.hh> -#include <dune/istl/bvector.hh> -#include <dune/istl/bcrsmatrix.hh> -#include <dune/istl/matrixindexset.hh> - -#include <vector> - -#warning This header is deprecated. Please use Arithmetic::addProduct() in place of multiplyFM() and StaticMatrix::transpose() in place of transpose() - -// Multiplies Matrices of Dune::FieldMatrix Type -template<class LeftMatrixType, class RightMatrixType> -inline void multiplyFM(const LeftMatrixType& A, const RightMatrixType& B, Dune::FieldMatrix<typename LeftMatrixType::field_type,LeftMatrixType::rows,RightMatrixType::cols >& C) -{ - assert(LeftMatrixType::cols == RightMatrixType::rows); - - int n = LeftMatrixType::rows, - m = LeftMatrixType::cols, - k = RightMatrixType::cols; - - C = 0.0; - - for (int row = 0; row < n; ++row) - { - for (int col = 0 ; col < k; ++col) - { - for (int i = 0; i < m; ++i) - C[row][col] += A[row][i]*B[i][col]; - } - } -} - -// Transposes Matrices of Dune::FieldMatrix Type -template<class MatrixType, class TransposedMatrixType> -inline void transposeFM(const MatrixType& M, TransposedMatrixType& Mt) -{ - int nRows = MatrixType::rows, - nCols = MatrixType::cols; - - for (int row = 0; row < nRows; ++row) - { - for (int col = 0 ; col < nCols; ++col) - { - Mt[col][row] = M[row][col]; - } - } - -} - -// Transposes Matrices of Dune::BCRSMatrix<FieldMatrix<K,n,m>,?> Type -template<class MatrixType, class TransposedMatrixType> -void transpose(const MatrixType& A, TransposedMatrixType& At) -{ - const int nRows = A.N(); - const int nCols = A.M(); - - const int nBlockRows = MatrixType::block_type::rows, - nBlockCols = MatrixType::block_type::cols; - - typename TransposedMatrixType::block_type transposedBlock; - - Dune::MatrixIndexSet idxSetA(nRows, nCols); - idxSetA.import<MatrixType>(A); - - Dune::MatrixIndexSet idxSetAt(nCols, nRows); - - typedef typename MatrixType::ConstColIterator ColIterator; - - for (int row = 0; row < nRows; ++row) - { - ColIterator col = A[row].begin(); - ColIterator end = A[row].end(); - for ( ; col != end; ++col) - { - idxSetAt.add(col.index(),row); - } - } - - idxSetAt.exportIdx(At); - - if (nBlockRows+nBlockCols > 2) - { - for (int row = 0; row < nRows; ++row) - { - ColIterator col = A[row].begin(); - ColIterator end = A[row].end(); - for ( ; col != end; ++col) - { - transposeFM<typename MatrixType::block_type, typename TransposedMatrixType::block_type >(A[row][col.index()],transposedBlock); - At[col.index()][row] = transposedBlock; - } - } - } - else - { - for (int row = 0; row < nRows; ++row) - { - ColIterator col = A[row].begin(); - ColIterator end = A[row].end(); - for ( ; col != end; ++col) - { - At[col.index()][row][0][0] = A[row][col.index()][0][0]; - } - } - } -} - -#endif