* pattern must be equal.
*/
void reinit(const BlockSparsityPattern& sparsity);
-
+
operator MATRIX&();
operator const MATRIX&() const;
-
+
/**
* Add <tt>value</tt> to the
* element (<i>i,j</i>). Throws
* matching #matrix.
*/
template<class VECTOR>
- void Tvmult_add (VECTOR& w, const VECTOR& v) const;
-
+ void Tvmult_add (VECTOR& w, const VECTOR& v) const;
+
/**
* The memory used by this object.
*/
unsigned int memory_consumption () const;
-
+
/**
* The block number computed from
* an index by using
* block.
*/
BlockIndices column_indices;
-
+
friend void internal::reinit<>(MatrixBlock<MATRIX>&, const BlockSparsityPattern&);
};
* The type of object stored.
*/
typedef MatrixBlock<MATRIX> value_type;
-
+
/**
* Add a new matrix block at the
* position <tt>(row,column)</tt>
* pattern from the block system.
*/
void reinit(const BlockSparsityPattern& sparsity);
-
+
/**
* Clears the object.
*
* blocks at the end.
*/
void clear (bool really_clean = false);
-
+
/**
* The memory used by this object.
*/
* the block at position <i>i</i>.
*/
const value_type& block(unsigned int i) const;
-
+
/**
* Access a reference to
* the block at position <i>i</i>.
*/
value_type& block(unsigned int i);
-
+
/**
* Access the matrix at position
* <i>i</i> for read and write
* The number of blocks.
*/
unsigned int size () const;
-
+
/**
* Add a new matrix block at the
* position <tt>(row,column)</tt>
*/
void add(unsigned int row, unsigned int column,
const std::string& name);
-
+
/**
* For matrices using a
* SparsityPattern, this function
* refinement edge.
*/
void reinit_edge_flux(const MGLevelObject<BlockSparsityPattern>& sparsity);
-
+
/**
* Clears the object.
*
* blocks at the end.
*/
void clear (bool really_clean = false);
-
+
/**
* Access a constant reference to
* the matrix block at position <i>i</i>.
*/
const value_type& block(unsigned int i) const;
-
+
/**
* Access a reference to
* the matrix block at position <i>i</i>.
*/
value_type& block(unsigned int i);
-
+
/**
* Access a constant reference to
* the edge matrix block at position <i>i</i>.
*/
const value_type& block_in(unsigned int i) const;
-
+
/**
* Access a reference to
* the edge matrix block at position <i>i</i>.
*/
value_type& block_in(unsigned int i);
-
+
/**
* Access a constant reference to
* the edge matrix block at position <i>i</i>.
*/
const value_type& block_out(unsigned int i) const;
-
+
/**
* Access a reference to
* the edge matrix block at position <i>i</i>.
*/
value_type& block_out(unsigned int i);
-
+
/**
* Access a constant reference to
* the edge flux matrix block at position <i>i</i>.
*/
const value_type& block_up(unsigned int i) const;
-
+
/**
* Access a reference to
* the edge flux matrix block at position <i>i</i>.
*/
value_type& block_up(unsigned int i);
-
+
/**
* Access a constant reference to
* the edge flux matrix block at position <i>i</i>.
*/
const value_type& block_down(unsigned int i) const;
-
+
/**
* Access a reference to
* the edge flux matrix block at position <i>i</i>.
*/
value_type& block_down(unsigned int i);
-
+
/**
* The memory used by this object.
*/
private:
/// Clear one of the matrix objects
void clear_object(NamedData<MGLevelObject<MatrixBlock<MATRIX> > >&);
-
- /// Flag for storing #matrices_in and #matrices_out
+
+ /// Flag for storing matrices_in and matrices_out
const bool edge_matrices;
- /// Flag for storing #flux_matrices_up and #flux_matrices_down
+ /// Flag for storing flux_matrices_up and flux_matrices_down
const bool edge_flux_matrices;
-
+
/// The level matrices
NamedData<MGLevelObject<MatrixBlock<MATRIX> > > matrices;
/// The matrix from the interior of a level to the refinement edge
v.column_indices = p.get_column_indices();
}
-
+
template <typename number>
void
reinit(MatrixBlock<dealii::SparseMatrix<number> >& v, const BlockSparsityPattern& p)
{
Assert(row_indices.size() != 0, ExcNotInitialized());
Assert(column_indices.size() != 0, ExcNotInitialized());
-
+
AssertDimension (r_indices.size(), values.m());
AssertDimension (c_indices.size(), values.n());
{
Assert(row_indices.size() != 0, ExcNotInitialized());
Assert(column_indices.size() != 0, ExcNotInitialized());
-
+
const std::pair<unsigned int, unsigned int> bi
= row_indices.global_to_local(b_row);
{
Assert(row_indices.size() != 0, ExcNotInitialized());
Assert(column_indices.size() != 0, ExcNotInitialized());
-
+
AssertDimension (indices.size(), values.m());
Assert (values.n() == values.m(), ExcNotQuadratic());
{
Assert(row_indices.size() != 0, ExcNotInitialized());
Assert(column_indices.size() != 0, ExcNotInitialized());
-
+
AssertDimension (col_indices.size(), values.size());
add (row, col_indices.size(), &col_indices[0], &values[0],
elide_zero_values);
MGLevelObject<MatrixBlock<MATRIX> > p(0, 1);
p[0].row = row;
p[0].column = column;
-
+
matrices.add(p, name);
if (edge_matrices)
{
block_down(i)[level].column = col;
internal::reinit(block_down(i)[level], sparsity[level]);
}
-
+
}
}