MARKUS source/lac/block_sparse_matrix.cc
MARKUS source/lac/block_sparse_matrix_ez.cc
MARKUS source/lac/block_sparsity_pattern.cc
-source/lac/block_vector.cc
+MARKUS source/lac/block_vector.cc
source/lac/chunk_sparse_matrix.cc
source/lac/chunk_sparsity_pattern.cc
MARKUS source/lac/compressed_set_sparsity_pattern.cc
MARKUS include/deal.II/lac/block_sparse_matrix.h
MARKUS include/deal.II/lac/block_sparse_matrix.templates.h
MARKUS include/deal.II/lac/block_sparsity_pattern.h
-include/deal.II/lac/block_vector_base.h
-include/deal.II/lac/block_vector.h
-include/deal.II/lac/block_vector.templates.h
+MARKUS include/deal.II/lac/block_vector_base.h
+MARKUS include/deal.II/lac/block_vector.h
+MARKUS include/deal.II/lac/block_vector.templates.h
include/deal.II/lac/chunk_sparse_matrix.h
include/deal.II/lac/chunk_sparse_matrix.templates.h
include/deal.II/lac/chunk_sparsity_pattern.h
* space. It is the sum of rows
* of the rows of sub-matrices.
*/
- unsigned int n_rows () const;
+ types::global_dof_index n_rows () const;
/**
* Return number of columns of
* columns of the columns of
* sub-matrices.
*/
- unsigned int n_cols () const;
+ types::global_dof_index n_cols () const;
/**
* Return the dimension of the
template <typename Number>
inline
-unsigned int
+types::global_dof_index
BlockSparseMatrixEZ<Number>::m () const
{
return n_rows();
template <typename Number>
inline
-unsigned int
+types::global_dof_index
BlockSparseMatrixEZ<Number>::n () const
{
return n_cols();
Assert (numbers::is_finite(value), ExcNumberNotFinite());
- const std::pair<unsigned int,unsigned int>
+ const std::pair<unsigned int,types::global_dof_index>
row_index = row_indices.global_to_local (i),
col_index = column_indices.global_to_local (j);
block(row_index.first,col_index.first).set (row_index.second,
Assert (numbers::is_finite(value), ExcNumberNotFinite());
- const std::pair<unsigned int,unsigned int>
+ const std::pair<unsigned int,types::global_dof_index>
row_index = row_indices.global_to_local (i),
col_index = column_indices.global_to_local (j);
block(row_index.first,col_index.first).add (row_index.second,
{
const unsigned int rows = n_block_rows();
const unsigned int columns = n_block_cols();
- std::vector<unsigned int> row_sizes (rows);
- std::vector<unsigned int> col_sizes (columns);
+ std::vector<types::global_dof_index> row_sizes (rows);
+ std::vector<types::global_dof_index> col_sizes (columns);
// first find out the row sizes
// from the first block column
* to which block <tt>(i,j)</tt> belongs
* and then relays to that block.
*/
- void add (const unsigned int i, const unsigned int j);
+ void add (const types::global_dof_index i, const types::global_dof_index j);
/**
* Add several nonzero entries to the
* of the (block-)rows of
* sub-matrices.
*/
- unsigned int n_rows () const;
+ types::global_dof_index n_rows () const;
/**
* Return number of columns of
* columns of the (block-)columns
* of sub-matrices.
*/
- unsigned int n_cols () const;
+ types::global_dof_index n_cols () const;
/**
* Check if a value at a certain
* position may be non-zero.
*/
- bool exists (const unsigned int i, const unsigned int j) const;
+ bool exists (const types::global_dof_index i, const types::global_dof_index j) const;
/**
* Number of entries in a
* all the blocks that form this
* row.
*/
- unsigned int row_length (const unsigned int row) const;
+ unsigned int row_length (const types::global_dof_index row) const;
/**
* Return the number of nonzero
*/
void reinit (const BlockIndices& row_indices,
const BlockIndices& col_indices,
- const std::vector<std::vector<unsigned int> >& row_lengths);
+ const std::vector<std::vector<types::global_dof_index> >& row_lengths);
/**
* and then entering the index
* values.
*/
- BlockCompressedSparsityPattern (const std::vector<unsigned int>& row_block_sizes,
- const std::vector<unsigned int>& col_block_sizes);
+ BlockCompressedSparsityPattern (const std::vector<types::global_dof_index>& row_block_sizes,
+ const std::vector<types::global_dof_index>& col_block_sizes);
/**
* Initialize the pattern with
* <tt>row_block_sizes[i]</tt>
* times <tt>col_block_sizes[j]</tt>.
*/
- void reinit (const std::vector< unsigned int > &row_block_sizes,
- const std::vector< unsigned int > &col_block_sizes);
+ void reinit (const std::vector< types::global_dof_index > &row_block_sizes,
+ const std::vector< types::global_dof_index > &col_block_sizes);
/**
* Resize the matrix to a tensor
* and then entering the index
* values.
*/
- BlockCompressedSetSparsityPattern (const std::vector<unsigned int>& row_block_sizes,
- const std::vector<unsigned int>& col_block_sizes);
+ BlockCompressedSetSparsityPattern (const std::vector<types::global_dof_index>& row_block_sizes,
+ const std::vector<types::global_dof_index>& col_block_sizes);
/**
* Initialize the pattern with
* <tt>row_block_sizes[i]</tt>
* times <tt>col_block_sizes[j]</tt>.
*/
- void reinit (const std::vector< unsigned int > &row_block_sizes,
- const std::vector< unsigned int > &col_block_sizes);
+ void reinit (const std::vector< types::global_dof_index > &row_block_sizes,
+ const std::vector< types::global_dof_index > &col_block_sizes);
/**
* Resize the matrix to a tensor
* and then entering the index
* values.
*/
- BlockCompressedSimpleSparsityPattern (const std::vector<unsigned int>& row_block_sizes,
- const std::vector<unsigned int>& col_block_sizes);
+ BlockCompressedSimpleSparsityPattern (const std::vector<types::global_dof_index>& row_block_sizes,
+ const std::vector<types::global_dof_index>& col_block_sizes);
/**
* Initialize the pattern with symmetric
* <tt>row_block_sizes[i]</tt>
* times <tt>col_block_sizes[j]</tt>.
*/
- void reinit (const std::vector< unsigned int > &row_block_sizes,
- const std::vector< unsigned int > &col_block_sizes);
+ void reinit (const std::vector< types::global_dof_index > &row_block_sizes,
+ const std::vector< types::global_dof_index > &col_block_sizes);
/**
* Resize the pattern with symmetric
* and then entering the index
* values.
*/
- BlockSparsityPattern (const std::vector<unsigned int>& row_block_sizes,
- const std::vector<unsigned int>& col_block_sizes);
+ BlockSparsityPattern (const std::vector<types::global_dof_index>& row_block_sizes,
+ const std::vector<types::global_dof_index>& col_block_sizes);
/**
* Initialize the pattern with an array
* <tt>row_block_sizes[i]</tt>
* times <tt>col_block_sizes[j]</tt>.
*/
- void reinit (const std::vector< unsigned int > &row_block_sizes,
- const std::vector< unsigned int > &col_block_sizes);
+ void reinit (const std::vector< types::global_dof_index > &row_block_sizes,
+ const std::vector< types::global_dof_index > &col_block_sizes);
/**
* Resize the matrix to a square tensor
template <class SparsityPatternBase>
inline
void
-BlockSparsityPatternBase<SparsityPatternBase>::add (const unsigned int i,
- const unsigned int j)
+BlockSparsityPatternBase<SparsityPatternBase>::add (const types::global_dof_index i,
+ const types::global_dof_index j)
{
// if you get an error here, are
// you sure you called
// <tt>collect_sizes()</tt> before?
- const std::pair<unsigned int,unsigned int>
+ const std::pair<unsigned int,types::global_dof_index>
row_index = row_indices.global_to_local (i),
col_index = column_indices.global_to_local (j);
sub_objects[row_index.first][col_index.first]->add (row_index.second,
template <class SparsityPatternBase>
template <typename ForwardIterator>
void
-BlockSparsityPatternBase<SparsityPatternBase>::add_entries (const unsigned int row,
+BlockSparsityPatternBase<SparsityPatternBase>::add_entries (const types::global_dof_index row,
ForwardIterator begin,
ForwardIterator end,
const bool indices_are_sorted)
counter_within_block.resize (this->n_block_cols());
}
- const unsigned int n_cols = static_cast<unsigned int>(end - begin);
+ const types::global_dof_index n_cols = static_cast<types::global_dof_index>(end - begin);
// Resize sub-arrays to n_cols. This
// is a bit wasteful, but we resize
// comes from an element matrix).
for (ForwardIterator it = begin; it != end; ++it)
{
- const unsigned int col = *it;
+ const types::global_dof_index col = *it;
- const std::pair<unsigned int, unsigned int>
+ const std::pair<unsigned int, types::global_dof_index>
col_index = this->column_indices.global_to_local(col);
const unsigned int local_index = counter_within_block[col_index.first]++;
// where we should start reading out
// data. Now let's write the data into
// the individual blocks!
- const std::pair<unsigned int,unsigned int>
+ const std::pair<unsigned int,types::global_dof_index>
row_index = this->row_indices.global_to_local (row);
for (unsigned int block_col=0; block_col<n_block_cols(); ++block_col)
{
template <class SparsityPatternBase>
inline
bool
-BlockSparsityPatternBase<SparsityPatternBase>::exists (const unsigned int i,
- const unsigned int j) const
+BlockSparsityPatternBase<SparsityPatternBase>::exists (const types::global_dof_index i,
+ const types::global_dof_index j) const
{
// if you get an error here, are
// you sure you called
// <tt>collect_sizes()</tt> before?
- const std::pair<unsigned int,unsigned int>
+ const std::pair<unsigned int,types::global_dof_index>
row_index = row_indices.global_to_local (i),
col_index = column_indices.global_to_local (j);
return sub_objects[row_index.first][col_index.first]->exists (row_index.second,
inline
unsigned int
BlockSparsityPatternBase<SparsityPatternBase>::
-row_length (const unsigned int row) const
+row_length (const types::global_dof_index row) const
{
- const std::pair<unsigned int,unsigned int>
+ const std::pair<unsigned int,types::global_dof_index>
row_index = row_indices.global_to_local (row);
unsigned int c = 0;
template <class SparsityPatternBase>
-unsigned int
+types::global_dof_index
BlockSparsityPatternBase<SparsityPatternBase>::n_rows () const
{
// only count in first column, since
// all rows should be equivalent
- unsigned int count = 0;
+ types::global_dof_index count = 0;
for (unsigned int r=0; r<rows; ++r)
count += sub_objects[r][0]->n_rows();
return count;
template <class SparsityPatternBase>
-unsigned int
+types::global_dof_index
BlockSparsityPatternBase<SparsityPatternBase>::n_cols () const
{
// only count in first row, since
// all rows should be equivalent
- unsigned int count = 0;
+ types::global_dof_index count = 0;
for (unsigned int c=0; c<columns; ++c)
count += sub_objects[0][c]->n_cols();
return count;
BlockSparsityPattern::reinit(
const BlockIndices& rows,
const BlockIndices& cols,
- const std::vector<std::vector<unsigned int> >& row_lengths)
+ const std::vector<std::vector<types::global_dof_index> >& row_lengths)
{
AssertDimension (row_lengths.size(), cols.size());
for (unsigned int j=0;j<cols.size();++j)
for (unsigned int i=0;i<rows.size();++i)
{
- const unsigned int start = rows.local_to_global(i, 0);
- const unsigned int length = rows.block_size(i);
+ const types::global_dof_index start = rows.local_to_global(i, 0);
+ const types::global_dof_index length = rows.block_size(i);
if (row_lengths[j].size()==1)
block(i,j).reinit(rows.block_size(i),
cols.block_size(j), row_lengths[j][0], i==j);
else
{
- VectorSlice<const std::vector<unsigned int> >
+ VectorSlice<const std::vector<types::global_dof_index> >
block_rows(row_lengths[j], start, length);
block(i,j).reinit(rows.block_size(i),
cols.block_size(j),
BlockCompressedSparsityPattern::
BlockCompressedSparsityPattern (
- const std::vector<unsigned int>& row_indices,
- const std::vector<unsigned int>& col_indices)
+ const std::vector<types::global_dof_index>& row_indices,
+ const std::vector<types::global_dof_index>& col_indices)
{
reinit(row_indices, col_indices);
}
void
BlockCompressedSparsityPattern::reinit (
- const std::vector< unsigned int > &row_block_sizes,
- const std::vector< unsigned int > &col_block_sizes)
+ const std::vector< types::global_dof_index > &row_block_sizes,
+ const std::vector< types::global_dof_index > &col_block_sizes)
{
BlockSparsityPatternBase<CompressedSparsityPattern>::reinit(row_block_sizes.size(), col_block_sizes.size());
for (unsigned int i=0;i<row_block_sizes.size();++i)
BlockCompressedSetSparsityPattern::
BlockCompressedSetSparsityPattern (
- const std::vector<unsigned int>& row_indices,
- const std::vector<unsigned int>& col_indices)
+ const std::vector<types::global_dof_index>& row_indices,
+ const std::vector<types::global_dof_index>& col_indices)
{
reinit(row_indices, col_indices);
}
void
BlockCompressedSetSparsityPattern::reinit (
- const std::vector< unsigned int > &row_block_sizes,
- const std::vector< unsigned int > &col_block_sizes)
+ const std::vector< types::global_dof_index > &row_block_sizes,
+ const std::vector< types::global_dof_index > &col_block_sizes)
{
BlockSparsityPatternBase<CompressedSetSparsityPattern>::reinit(row_block_sizes.size(), col_block_sizes.size());
for (unsigned int i=0;i<row_block_sizes.size();++i)
BlockCompressedSimpleSparsityPattern::
BlockCompressedSimpleSparsityPattern (const unsigned int n_rows,
- const unsigned int n_columns)
+ const unsigned int n_columns)
:
BlockSparsityPatternBase<CompressedSimpleSparsityPattern>(n_rows,
n_columns)
BlockCompressedSimpleSparsityPattern::
-BlockCompressedSimpleSparsityPattern (const std::vector<unsigned int>& row_indices,
- const std::vector<unsigned int>& col_indices)
+BlockCompressedSimpleSparsityPattern (const std::vector<types::global_dof_index>& row_indices,
+ const std::vector<types::global_dof_index>& col_indices)
:
BlockSparsityPatternBase<CompressedSimpleSparsityPattern>(row_indices.size(),
col_indices.size())
void
BlockCompressedSimpleSparsityPattern::reinit (
- const std::vector< unsigned int > &row_block_sizes,
- const std::vector< unsigned int > &col_block_sizes)
+ const std::vector< types::global_dof_index > &row_block_sizes,
+ const std::vector< types::global_dof_index > &col_block_sizes)
{
BlockSparsityPatternBase<CompressedSimpleSparsityPattern>::
reinit(row_block_sizes.size(), col_block_sizes.size());
BlockSparsityPattern::
- BlockSparsityPattern (const std::vector<unsigned int>& row_indices,
- const std::vector<unsigned int>& col_indices)
+ BlockSparsityPattern (const std::vector<types::global_dof_index>& row_indices,
+ const std::vector<types::global_dof_index>& col_indices)
:
BlockSparsityPatternBase<SparsityPattern>(row_indices.size(),
col_indices.size())
void
- BlockSparsityPattern::reinit (const std::vector<unsigned int> &row_block_sizes,
- const std::vector<unsigned int> &col_block_sizes)
+ BlockSparsityPattern::reinit (const std::vector<types::global_dof_index> &row_block_sizes,
+ const std::vector<types::global_dof_index> &col_block_sizes)
{
dealii::BlockSparsityPatternBase<SparsityPattern>::
reinit(row_block_sizes.size(), col_block_sizes.size());