24#ifndef __BLOCKMATRIX_H
25#define __BLOCKMATRIX_H
27#include <boost/multi_array.hpp>
30#include "BlockVector.h"
51 void set_block(std::size_t i, std::size_t j,
52 std::shared_ptr<GenericMatrix> m);
55 std::shared_ptr<const GenericMatrix>
56 get_block(std::size_t i, std::size_t j)
const;
59 std::shared_ptr<GenericMatrix>
get_block(std::size_t i, std::size_t j);
62 std::size_t
size(std::size_t dim)
const;
68 void apply(std::string mode);
71 std::string
str(
bool verbose)
const;
75 bool transposed=
false)
const;
80 std::shared_ptr<GenericMatrix>
85 boost::multi_array<std::shared_ptr<GenericMatrix>, 2> matrices;
Block Matrix.
Definition BlockMatrix.h:41
~BlockMatrix()
Destructor.
Definition BlockMatrix.cpp:46
void set_block(std::size_t i, std::size_t j, std::shared_ptr< GenericMatrix > m)
Set block.
Definition BlockMatrix.cpp:51
std::shared_ptr< const GenericMatrix > get_block(std::size_t i, std::size_t j) const
Get block (const version)
Definition BlockMatrix.cpp:60
void zero()
Set all entries to zero and keep any sparse structure.
Definition BlockMatrix.cpp:81
std::string str(bool verbose) const
Return informal string representation (pretty-print)
Definition BlockMatrix.cpp:96
void mult(const BlockVector &x, BlockVector &y, bool transposed=false) const
Matrix-vector product, y = Ax.
Definition BlockMatrix.cpp:122
void apply(std::string mode)
Finalize assembly of tensor.
Definition BlockMatrix.cpp:88
std::shared_ptr< GenericMatrix > schur_approximation(bool symmetry=true) const
Definition BlockMatrix.cpp:161
std::size_t size(std::size_t dim) const
Return size of given dimension.
Definition BlockMatrix.cpp:75
Block vector.
Definition BlockVector.h:42