From: turcksin Date: Mon, 18 Feb 2013 19:46:12 +0000 (+0000) Subject: Merge from mainline. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=335a8928cddca80ef1a9596d6e6b61af5057a3e4;p=dealii-svn.git Merge from mainline. git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@28455 0785d39b-7218-0410-832d-ea1e28bc413d --- 335a8928cddca80ef1a9596d6e6b61af5057a3e4 diff --cc deal.II/include/deal.II/base/index_set.h index 3731e02d56,f8666206b6..4d650aafc4 --- a/deal.II/include/deal.II/base/index_set.h +++ b/deal.II/include/deal.II/base/index_set.h @@@ -104,14 -104,14 +104,14 @@@ public * 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 @@@ -857,8 -857,8 +857,8 @@@ IndexSet::n_elements () cons 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 diff --cc deal.II/include/deal.II/base/types.h index cfa6313ccf,2a37e62c29..f5be470f6f --- a/deal.II/include/deal.II/base/types.h +++ b/deal.II/include/deal.II/base/types.h @@@ -14,6 -14,7 +14,7 @@@ #include - ++#include DEAL_II_NAMESPACE_OPEN /** @@@ -164,24 -122,6 +165,24 @@@ namespace number static const unsigned int invalid_unsigned_int = static_cast (-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 size_type - invalid_size_type = static_cast (-1); ++ static const std::size_t ++ invalid_size_type = static_cast (-1); + /** * An invalid value for indices of degrees * of freedom. diff --cc deal.II/include/deal.II/dofs/dof_accessor.h index 53fe88c3db,b0793d734d..066915fba1 --- a/deal.II/include/deal.II/dofs/dof_accessor.h +++ b/deal.II/include/deal.II/dofs/dof_accessor.h @@@ -496,15 -496,19 +496,16 @@@ public * 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 degree associated with the @p - * vertexth vertex on the level @p level. Also see vertex_dof_index(). + * Returns the Global DoF index of the ith degree of + * freedom associated with the vertexth 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 ith degree diff --cc deal.II/include/deal.II/lac/block_indices.h index 2cd2dac063,a05d6492f5..ec3e580039 --- a/deal.II/include/deal.II/lac/block_indices.h +++ b/deal.II/include/deal.II/lac/block_indices.h @@@ -17,6 -17,6 +17,7 @@@ #include #include #include ++#include #include DEAL_II_NAMESPACE_OPEN @@@ -226,13 -222,13 +227,13 @@@ inlin 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" << bi.total_size(); return s; @@@ -402,8 -398,8 +403,8 @@@ BlockIndices::push_back(const size_typ inline - std::pair -std::pair -BlockIndices::global_to_local (const unsigned int i) const ++std::pair +BlockIndices::global_to_local (const size_type i) const { Assert (i::BlockVecto template inline - size_type -unsigned int ++std::size_t BlockVectorBase::size () const { return block_indices.total_size(); diff --cc deal.II/include/deal.II/lac/compressed_simple_sparsity_pattern.h index 6ebde752c4,a7b9daed20..9ef3fd35ae --- a/deal.II/include/deal.II/lac/compressed_simple_sparsity_pattern.h +++ b/deal.II/include/deal.II/lac/compressed_simple_sparsity_pattern.h @@@ -488,7 -483,7 +488,7 @@@ CompressedSimpleSparsityPattern::Line:: inline - size_type -unsigned int ++std::size_t CompressedSimpleSparsityPattern::n_rows () const { return rows; @@@ -497,7 -492,7 +497,7 @@@ inline - size_type -unsigned int ++std::size_t CompressedSimpleSparsityPattern::n_cols () const { return cols; @@@ -550,8 -545,8 +550,8 @@@ CompressedSimpleSparsityPattern::Line:: 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)) @@@ -565,9 -560,9 +565,9 @@@ 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()); diff --cc deal.II/include/deal.II/lac/compressed_sparsity_pattern.h index f0a77f0b0a,94ade69251..2d5328eedb --- a/deal.II/include/deal.II/lac/compressed_sparsity_pattern.h +++ b/deal.II/include/deal.II/lac/compressed_sparsity_pattern.h @@@ -507,7 -502,7 +507,7 @@@ CompressedSparsityPattern::Line::add (c inline - size_type -unsigned int ++std::size_t CompressedSparsityPattern::n_rows () const { return rows; @@@ -516,7 -511,7 +516,7 @@@ inline - size_type -unsigned int ++std::size_t CompressedSparsityPattern::n_cols () const { return cols; @@@ -561,8 -556,8 +561,8 @@@ CompressedSparsityPattern::Line::Line ( 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())); @@@ -574,9 -569,9 +574,9 @@@ 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(), diff --cc deal.II/include/deal.II/lac/constraint_matrix.h index e8a1c7cf8e,bf539e6b23..f3bbba92e0 --- a/deal.II/include/deal.II/lac/constraint_matrix.h +++ b/deal.II/include/deal.II/lac/constraint_matrix.h @@@ -1921,7 -1916,7 +1921,7 @@@ ConstraintMatrix::set_inhomogeneity (co inline - size_type -unsigned int ++std::size_t ConstraintMatrix::n_constraints () const { return lines.size(); @@@ -1962,8 -1957,8 +1962,8 @@@ ConstraintMatrix::is_inhomogeneously_co inline - const std::vector > * -const std::vector > * -ConstraintMatrix::get_constraint_entries (unsigned int line) const ++const std::vector > * +ConstraintMatrix::get_constraint_entries (const size_type line) const { // check whether the entry is // constrained. could use is_constrained, but @@@ -1995,8 -1990,8 +1995,8 @@@ ConstraintMatrix::get_inhomogeneity (co - 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()) diff --cc deal.II/include/deal.II/lac/full_matrix.h index be44375f90,a8db6a6ea2..3fcedd8591 --- a/deal.II/include/deal.II/lac/full_matrix.h +++ b/deal.II/include/deal.II/lac/full_matrix.h @@@ -1005,8 -1000,8 +1005,8 @@@ public * A(1...n,j). 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 @@@ -1476,7 -1471,7 +1476,7 @@@ template inline - size_type -unsigned int ++std::size_t FullMatrix::m() const { return this->n_rows(); @@@ -1486,7 -1481,7 +1486,7 @@@ template inline - size_type -unsigned int ++std::size_t FullMatrix::n() const { return this->n_cols(); @@@ -1654,7 -1649,7 +1654,7 @@@ Accessor (const FullMatrix *mat template inline - size_type -unsigned int ++std::size_t FullMatrix::Accessor::row() const { return a_row; @@@ -1663,7 -1658,7 +1663,7 @@@ template inline - size_type -unsigned int ++std::size_t FullMatrix::Accessor::column() const { return a_col; diff --cc deal.II/include/deal.II/lac/parallel_vector.h index 96a96cd170,a99f840b48..3fe5684619 --- a/deal.II/include/deal.II/lac/parallel_vector.h +++ b/deal.II/include/deal.II/lac/parallel_vector.h @@@ -1378,7 -1373,7 +1373,7 @@@ namespace paralle template inline - size_type Vector::size () const - types::global_dof_index Vector::size () const ++ std::size_t Vector::size () const { return partitioner->size(); } @@@ -1387,7 -1382,7 +1382,7 @@@ template inline - size_type Vector::local_size () const - unsigned int Vector::local_size () const ++ std::size_t Vector::local_size () const { return partitioner->local_size(); } @@@ -1396,7 -1391,7 +1391,7 @@@ template inline - std::pair - std::pair ++ std::pair Vector::local_range () const { return partitioner->local_range(); @@@ -1417,7 -1412,7 +1412,7 @@@ template inline - size_type - unsigned int ++ std::size_t Vector::n_ghost_entries () const { return partitioner->n_ghost_indices(); diff --cc deal.II/include/deal.II/lac/trilinos_vector.h index e246ac093d,b1f53d34de..6baf82634f --- a/deal.II/include/deal.II/lac/trilinos_vector.h +++ b/deal.II/include/deal.II/lac/trilinos_vector.h @@@ -124,10 -124,10 +124,10 @@@ namespace TrilinosWrapper * 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; isize(); ++i) + * for (size_type i=0; isize(); ++i) * vector(i) = i; * * // do some additions to vector elements, but diff --cc deal.II/include/deal.II/lac/vector.h index 98139d2966,bb109a84fb..ce51bf021b --- a/deal.II/include/deal.II/lac/vector.h +++ b/deal.II/include/deal.II/lac/vector.h @@@ -1191,7 -1191,7 +1191,7 @@@ Vector::operator = (const Vecto template inline - size_type Vector::size () const -unsigned int Vector::size () const ++std::size_t Vector::size () const { return vec_size; } diff --cc deal.II/include/deal.II/lac/vector_view.h index e5d6308c1f,7c875227cd..b2dd304a9d --- a/deal.II/include/deal.II/lac/vector_view.h +++ b/deal.II/include/deal.II/lac/vector_view.h @@@ -132,12 -132,6 +132,12 @@@ template { public: + + /** + * Declare type for container size. + */ - typedef std::size_t int size_type; ++ typedef std::size_t size_type; + /** * Read write constructor. Takes the size * of the vector, just like the standard