* return the first block of a
* BlockVector it would generate.
*/
- unsigned int first_block_of_base (const unsigned int b) const;
+ types::global_dof_index first_block_of_base (const unsigned int b) const;
/**
* For each vector component,
* inside the block for this
* shape function.
*/
- std::pair<unsigned int,unsigned int>
+ std::pair<unsigned int,types::global_dof_index>
system_to_block_index (const unsigned int component) const;
/**
template <int dim, int spacedim>
inline
-unsigned int
+types::global_dof_index
FiniteElement<dim,spacedim>::first_block_of_base (const unsigned int index) const
{
return base_to_block_indices.block_start(index);
template <int dim, int spacedim>
inline
-std::pair<unsigned int,unsigned int>
+std::pair<unsigned int,types::global_dof_index>
FiniteElement<dim,spacedim>::system_to_block_index (const unsigned int index) const
{
Assert (index < this->dofs_per_cell,
// The block is computed simply as
// first block of this base plus
// the index within the base blocks
- return std::pair<unsigned int, unsigned int>(
+ return std::pair<unsigned int, types::global_dof_index>(
first_block_of_base(system_to_base_table[index].first.first)
+ system_to_base_table[index].first.second,
system_to_base_table[index].second);
* of the vector space of the
* block vector.
*/
- std::size_t total_size () const;
+ size_type total_size () const;
/**
* The size of the @p ith block.
*/
- std::size_t block_size (const size_type i) const;
+ size_type block_size (const size_type i) const;
//@}
/**
* The start index of the ith block.
*/
- size_type block_start (const size_type i) const;
+ size_type block_start (const unsigned int i) const;
//@}
/**
{
if (start_indices.size() != n.size()+1)
{
- n_blocks = n.size();
+ n_blocks = static_cast<unsigned int>(n.size());
start_indices.resize(n_blocks+1);
}
start_indices[0] = 0;
inline
BlockIndices::BlockIndices (const std::vector<size_type> &n)
:
- n_blocks(n.size()),
+ n_blocks(static_cast<unsigned int>(n.size())),
start_indices(n.size()+1)
{
reinit (n);
inline
-std::size_t
+BlockIndices::size_type
BlockIndices::total_size () const
{
if (n_blocks == 0) return 0;
inline
-std::size_t
+BlockIndices::size_type
BlockIndices::block_size (const size_type block) const
{
Assert (block < n_blocks, ExcIndexRange(block, 0, n_blocks));
inline
BlockIndices::size_type
-BlockIndices::block_start (const size_type block) const
+BlockIndices::block_start (const unsigned int block) const
{
Assert (block < n_blocks, ExcIndexRange(block, 0, n_blocks));
return start_indices[block];
/**
* Declare type of container size.
*/
+ // A FullMatrix will never require to use unsigned long long int instead of
+ // unsigned but because a ConstraintMatrix can be a SparseMatrix or a
+ // FullMatrix, we need have the same interface.
typedef types::global_dof_index size_type;
/**
// sum = v_i^T dst
number2 sum = diagonal[j]* (*aux)(j);
for (size_type i=j+1 ; i<m ; ++i)
- sum += this->el(i,j)*(*aux)(i);
+ sum += static_cast<number2>(this->el(i,j))*(*aux)(i);
// dst -= v * sum
(*aux)(j) -= sum*diagonal[j];
for (size_type i=j+1 ; i<m ; ++i)
- (*aux)(i) -= sum*this->el(i,j);
+ (*aux)(i) -= sum*static_cast<number2>(this->el(i,j));
}
// Compute norm of residual
number2 sum = 0.;
ExcDimensionMismatch(block_data.size(),
element.n_blocks()));
- unsigned int k=0;
+ types::global_dof_index k=0;
unsigned int i=0;
for (unsigned int b=0; b<element.n_base_elements(); ++b)
for (unsigned int m=0; m<element.element_multiplicity(b); ++m)
}
Assert (i == element.n_blocks(), ExcInternalError());
- std::vector<unsigned int> start_indices(block_data.size());
+ std::vector<types::global_dof_index> start_indices(block_data.size());
k = 0;
for (unsigned int i=0; i<block_data.size(); ++i)
if (return_start_indices)
//TODO:[GK] This does not work for a single RT
for (unsigned int i=0; i<element.dofs_per_cell; ++i)
{
- std::pair<types::global_dof_index, types::global_dof_index>
+ std::pair<unsigned int, types::global_dof_index>
indices = element.system_to_block_index(i);
renumbering[i] = start_indices[indices.first]
+indices.second;