matrixops.hpp
Go to the documentation of this file.
static Matrix Axpy(const Matrix &A, const Matrix &B, double alpha) axpy like operation - returns A+alpha*B static Matrix extractDiagonal(const Matrix &A) Extract the diagonal of a matrix into a new matrix. static Matrix augment(const Matrix &A, const Matrix &B, size_t r0, size_t c0, bool symmetric) Augment a matrix with another. static Matrix fromDense(const Dune::DynamicMatrix< double > &T) Create a sparse matrix from a dense matrix. static Matrix extractBlock(const Matrix &A, size_t r0, size_t N, size_t c0, size_t M) Extract a subblock of a matrix into a new matrix. static void saveAsc(const Matrix &A, const std::string &file) Save a matrix as a dense asc file. static void fromAdjacency(Matrix &A, const AdjacencyPattern &adj, int rows, int cols) Create a sparse matrix from a given adjacency pattern. Dune::BCRSMatrix< Dune::FieldMatrix< double, 1, 1 > > Matrix A sparse matrix holding our operator. Definition: matrixops.hpp:27 Dune::BlockVector< Dune::FieldVector< double, 1 > > Vector A vector holding our RHS. Definition: matrixops.hpp:33 std::vector< std::set< int > > AdjacencyPattern For storing matrix adjacency/sparsity patterns. Definition: matrixops.hpp:30 Definition: ImplicitAssembly.hpp:43 |