17 #ifndef __deal2__block_sparse_matrix_ez_templates_h 18 #define __deal2__block_sparse_matrix_ez_templates_h 21 #include <deal.II/base/config.h> 22 #include <deal.II/base/memory_consumption.h> 23 #include <deal.II/lac/block_sparse_matrix_ez.h> 28 template <
typename number>
34 template <
typename number>
37 const unsigned int cols)
39 row_indices (rows, 0),
40 column_indices (cols, 0)
55 template <
typename number>
76 template <
typename number>
91 template <
typename number>
103 template <
typename number>
106 const unsigned int cols)
115 template <
typename number>
126 template <
typename number>
132 if (
block(r,c).empty () ==
false)
139 template <
typename number>
145 std::vector<size_type> row_sizes (rows);
146 std::vector<size_type> col_sizes (columns);
150 for (
unsigned int r=0; r<rows; ++r)
151 row_sizes[r] =
blocks[r][0].
m();
155 for (
unsigned int c=1; c<columns; ++c)
156 for (
unsigned int r=0; r<rows; ++r)
166 for (
unsigned int c=0; c<columns; ++c)
167 col_sizes[c] =
blocks[0][c].
n();
168 for (
unsigned int r=1; r<rows; ++r)
169 for (
unsigned int c=0; c<columns; ++c)
217 DEAL_II_NAMESPACE_CLOSE
219 #endif // ifdef block_sparse_matrix_templates_h void reinit(const TableIndices< N > &new_size, const bool fast=false)
Table< 2, SparseMatrixEZ< Number > > blocks
SparseMatrixEZ< Number > & block(const unsigned int row, const unsigned int column)
unsigned int n_block_rows() const
unsigned int n_block_cols() const
#define Assert(cond, exc)
void reinit(const unsigned int n_blocks, const size_type n_elements_per_block)
BlockIndices column_indices
BlockSparseMatrixEZ & operator=(const BlockSparseMatrixEZ< Number > &)
::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
::ExceptionBase & ExcScalarAssignmentOnlyForZeroValue()
void reinit(const unsigned int n_block_rows, const unsigned int n_block_cols)