* the set of indices represented
* by this class.
*/
-- void add_range (const unsigned int begin,
-- const unsigned int end);
++ void add_range (const types::global_dof_index begin,
++ const types::global_dof_index end);
/**
* Add an individual index to the
* set of indices.
*/
-- void add_index (const unsigned int index);
++ void add_index (const types::global_dof_index index);
/**
* Add a whole set of indices
inline
--unsigned int
- IndexSet::nth_index_in_set (const types::global_dof_index n) const
++types::global_dof_index
+ IndexSet::nth_index_in_set (const unsigned int n) const
{
// to make this call thread-safe, compress()
// must not be called through this function
#include <deal.II/base/config.h>
-
++#include <cstddef>
DEAL_II_NAMESPACE_OPEN
/**
static const unsigned int
invalid_unsigned_int = static_cast<unsigned int> (-1);
- static const size_type
- invalid_size_type = static_cast<size_type> (-1);
+ /**
+ * Representation of the
+ * largest number that
+ * can be put into a
+ * size_type. This value
+ * is used throughout
+ * the library as a
+ * marker for an
+ * invalid size_type
+ * value, such as
+ * an invalid array
+ * index, an invalid
+ * array size, and the
+ * like.
+ */
++ static const std::size_t
++ invalid_size_type = static_cast<std::size_t> (-1);
+
/**
* An invalid value for indices of degrees
* of freedom.
* match the result of
* active_fe_index().
*/
- unsigned int vertex_dof_index (const unsigned int vertex,
- const unsigned int i,
- const unsigned int fe_index = DH::default_fe_index) const;
+ types::global_dof_index vertex_dof_index (const unsigned int vertex,
+ const unsigned int i,
+ const unsigned int fe_index = DH::default_fe_index) const;
/**
- * Returns the Global DoF index of the <i>i degree associated with the @p
- * vertexth vertex on the level @p level. Also see vertex_dof_index().
+ * Returns the Global DoF index of the <code>i</code>th degree of
+ * freedom associated with the <code>vertex</code>th vertex on
+ * level @p level. Also see vertex_dof_index().
*/
- unsigned int mg_vertex_dof_index (const int level,
- const unsigned int vertex,
- const unsigned int i,
- const unsigned int fe_index = DH::default_fe_index) const;
+ types::global_dof_index mg_vertex_dof_index (const int level, const unsigned int vertex, const unsigned int i, const unsigned int fe_index = DH::default_fe_index) const;
/**
* Index of the <i>i</i>th degree
#include <deal.II/base/subscriptor.h>
#include <deal.II/base/exceptions.h>
#include <deal.II/base/logstream.h>
++#include <cstddef>
#include <vector>
DEAL_II_NAMESPACE_OPEN
LogStream &
operator << (LogStream &s, const BlockIndices &bi)
{
- const size_type n = bi.size();
- const unsigned int n = bi.size();
++ const std::size_t n = bi.size();
s << n << ":[";
// Write first size without leading space
if (n>0)
s << bi.block_size(0);
// Write all other sizes
- for (size_type i=1; i<n; ++i)
- for (unsigned int i=1; i<n; ++i)
++ for (std::size_t i=1; i<n; ++i)
s << ' ' << bi.block_size(i);
s << "]->" << bi.total_size();
return s;
inline
- std::pair<size_type,size_type>
-std::pair<unsigned int,unsigned int>
-BlockIndices::global_to_local (const unsigned int i) const
++std::pair<std::size_t,std::size_t>
+BlockIndices::global_to_local (const size_type i) const
{
Assert (i<total_size(), ExcIndexRange(i, 0, total_size()));
inline
- size_type
-unsigned int
-BlockIndices::local_to_global (const unsigned int block,
- const unsigned int index) const
++std::size_t
+BlockIndices::local_to_global (const size_type block,
+ const size_type index) const
{
Assert (block < n_blocks, ExcIndexRange(block, 0, n_blocks));
Assert (index < start_indices[block+1]-start_indices[block],
inline
- size_type
-unsigned int
++std::size_t
BlockIndices::size () const
{
return n_blocks;
inline
- size_type
-unsigned int
++std::size_t
BlockIndices::total_size () const
{
if (n_blocks == 0) return 0;
inline
- size_type
-unsigned int
-BlockIndices::block_size (const unsigned int block) const
++std::size_t
+BlockIndices::block_size (const size_type block) const
{
Assert (block < n_blocks, ExcIndexRange(block, 0, n_blocks));
return start_indices[block+1]-start_indices[block];
inline
- size_type
-unsigned int
-BlockIndices::block_start (const unsigned int block) const
++std::size_t
+BlockIndices::block_start (const size_type block) const
{
Assert (block < n_blocks, ExcIndexRange(block, 0, n_blocks));
return start_indices[block];
template <class VectorType>
inline
- size_type
-unsigned int
++std::size_t
BlockVectorBase<VectorType>::size () const
{
return block_indices.total_size();
inline
- size_type
-unsigned int
++std::size_t
CompressedSimpleSparsityPattern::n_rows () const
{
return rows;
inline
- size_type
-unsigned int
++std::size_t
CompressedSimpleSparsityPattern::n_cols () const
{
return cols;
inline
- size_type
-unsigned int
-CompressedSimpleSparsityPattern::row_length (const unsigned int row) const
++std::size_t
+CompressedSimpleSparsityPattern::row_length (const size_type row) const
{
Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
if (rowset.size() > 0 && !rowset.is_element(row))
inline
- size_type
-unsigned int
-CompressedSimpleSparsityPattern::column_number (const unsigned int row,
- const unsigned int index) const
++std::size_t
+CompressedSimpleSparsityPattern::column_number (const size_type row,
+ const size_type index) const
{
Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
Assert( rowset.size() == 0 || rowset.is_element(row), ExcInternalError());
inline
- size_type
-unsigned int
++std::size_t
CompressedSparsityPattern::n_rows () const
{
return rows;
inline
- size_type
-unsigned int
++std::size_t
CompressedSparsityPattern::n_cols () const
{
return cols;
inline
- size_type
-unsigned int
-CompressedSparsityPattern::row_length (const unsigned int row) const
++std::size_t
+CompressedSparsityPattern::row_length (const size_type row) const
{
Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
inline
- size_type
-unsigned int
-CompressedSparsityPattern::column_number (const unsigned int row,
- const unsigned int index) const
++std::size_t
+CompressedSparsityPattern::column_number (const size_type row,
+ const size_type index) const
{
Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
Assert (index < lines[row].entries.size(),
inline
- size_type
-unsigned int
++std::size_t
ConstraintMatrix::n_constraints () const
{
return lines.size();
inline
- const std::vector<std::pair<size_type,double> > *
-const std::vector<std::pair<unsigned int,double> > *
-ConstraintMatrix::get_constraint_entries (unsigned int line) const
++const std::vector<std::pair<std::size_t,double> > *
+ConstraintMatrix::get_constraint_entries (const size_type line) const
{
// check whether the entry is
// constrained. could use is_constrained, but
- inline size_type
-inline unsigned int
-ConstraintMatrix::calculate_line_index (const unsigned int line) const
++inline std::size_t
+ConstraintMatrix::calculate_line_index (const size_type line) const
{
//IndexSet is unused (serial case)
if (!local_lines.size())
* A(1...n,j)</i>. Swap columns
* i and j of this
*/
- void swap_col (const size_type int i,
- const size_type int j);
- void swap_col (const unsigned int i,
- const unsigned int j);
++ void swap_col (const size_type i,
++ const size_type j);
/**
* Add constant to diagonal
template <typename number>
inline
- size_type
-unsigned int
++std::size_t
FullMatrix<number>::m() const
{
return this->n_rows();
template <typename number>
inline
- size_type
-unsigned int
++std::size_t
FullMatrix<number>::n() const
{
return this->n_cols();
template <typename number>
inline
- size_type
-unsigned int
++std::size_t
FullMatrix<number>::Accessor::row() const
{
return a_row;
template <typename number>
inline
- size_type
-unsigned int
++std::size_t
FullMatrix<number>::Accessor::column() const
{
return a_col;
template <typename Number>
inline
- size_type Vector<Number>::size () const
- types::global_dof_index Vector<Number>::size () const
++ std::size_t Vector<Number>::size () const
{
return partitioner->size();
}
template <typename Number>
inline
- size_type Vector<Number>::local_size () const
- unsigned int Vector<Number>::local_size () const
++ std::size_t Vector<Number>::local_size () const
{
return partitioner->local_size();
}
template <typename Number>
inline
- std::pair<size_type, size_type>
- std::pair<types::global_dof_index, types::global_dof_index>
++ std::pair<std::size_t,std::size_t>
Vector<Number>::local_range () const
{
return partitioner->local_range();
template <typename Number>
inline
- size_type
- unsigned int
++ std::size_t
Vector<Number>::n_ghost_entries () const
{
return partitioner->n_ghost_indices();
* compress() and flips the state. This can sometimes lead to very
* confusing behavior, in code that may for example look like this:
*
- * @verbatim
+ * @code
* TrilinosWrappers::Vector vector;
* // do some write operations on the vector
- * for (unsigned int i=0; i<vector->size(); ++i)
+ * for (size_type i=0; i<vector->size(); ++i)
* vector(i) = i;
*
* // do some additions to vector elements, but
template <typename Number>
inline
- size_type Vector<Number>::size () const
-unsigned int Vector<Number>::size () const
++std::size_t Vector<Number>::size () const
{
return vec_size;
}
class VectorView : public Vector<Number>
{
public:
- typedef std::size_t int size_type;
+
+ /**
+ * Declare type for container size.
+ */
++ typedef std::size_t size_type;
+
/**
* Read write constructor. Takes the size
* of the vector, just like the standard