]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Merge from mainline.
authorturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 18 Feb 2013 19:46:12 +0000 (19:46 +0000)
committerturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 18 Feb 2013 19:46:12 +0000 (19:46 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@28455 0785d39b-7218-0410-832d-ea1e28bc413d

28 files changed:
1  2 
deal.II/examples/step-42/step-42.cc
deal.II/include/deal.II/base/index_set.h
deal.II/include/deal.II/base/types.h
deal.II/include/deal.II/base/utilities.h
deal.II/include/deal.II/dofs/dof_accessor.h
deal.II/include/deal.II/dofs/dof_levels.h
deal.II/include/deal.II/dofs/number_cache.h
deal.II/include/deal.II/grid/tria.h
deal.II/include/deal.II/lac/arpack_solver.h
deal.II/include/deal.II/lac/block_indices.h
deal.II/include/deal.II/lac/block_vector.h
deal.II/include/deal.II/lac/block_vector_base.h
deal.II/include/deal.II/lac/compressed_set_sparsity_pattern.h
deal.II/include/deal.II/lac/compressed_simple_sparsity_pattern.h
deal.II/include/deal.II/lac/compressed_sparsity_pattern.h
deal.II/include/deal.II/lac/constraint_matrix.h
deal.II/include/deal.II/lac/filtered_matrix.h
deal.II/include/deal.II/lac/full_matrix.h
deal.II/include/deal.II/lac/parallel_block_vector.h
deal.II/include/deal.II/lac/parallel_vector.h
deal.II/include/deal.II/lac/trilinos_vector.h
deal.II/include/deal.II/lac/vector.h
deal.II/include/deal.II/lac/vector_view.h
deal.II/include/deal.II/numerics/matrix_tools.h
deal.II/include/deal.II/numerics/solution_transfer.h
deal.II/include/deal.II/numerics/vector_tools.h
deal.II/include/deal.II/numerics/vector_tools.templates.h
deal.II/source/distributed/tria.cc

Simple merge
index 3731e02d56d2b3b0cbf30af8283f1c2f0c40e459,f8666206b629f16f836bbfc213a26bbcf3c4942a..4d650aafc431c229793648c6dde0edb36318fae6
@@@ -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
index cfa6313ccff6ee3239c7dc277b7f330001a0519a,2a37e62c29b90cd115371dd10cb5191525de3bf1..f5be470f6fe87d8b9179ce0984b7b3e9d62a07e6
@@@ -14,6 -14,7 +14,7 @@@
  
  
  #include <deal.II/base/config.h>
 -
++#include <cstddef>
  DEAL_II_NAMESPACE_OPEN
  
  /**
@@@ -164,24 -122,6 +165,24 @@@ namespace number
    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.
index 53fe88c3db7d5271384dabe6a62b7764fffa8b23,b0793d734d023b15754a0875af17aff284cd0ffe..066915fba144a95f037a5778dbeb9ff524f9a049
@@@ -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>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
Simple merge
index 2cd2dac063040f7752f139e5b2a3a8932b27a031,a05d6492f53e3979e5ea93518057ef1bedf5e9c3..ec3e580039418ce9b5e87a67ff1f01ea057a79ed
@@@ -17,6 -17,6 +17,7 @@@
  #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
@@@ -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<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;
@@@ -402,8 -398,8 +403,8 @@@ BlockIndices::push_back(const size_typ
  
  
  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];
index 3c2f99ff5ac82633236668b7894116f6516f9144,2eca83b4d2789519a2d935ca56f02320de515a2c..d8545fc9a819e0e613de9c61d7127528a141afda
@@@ -1767,7 -1762,7 +1767,7 @@@ BlockVectorBase<VectorType>::BlockVecto
  
  template <class VectorType>
  inline
- size_type
 -unsigned int
++std::size_t
  BlockVectorBase<VectorType>::size () const
  {
    return block_indices.total_size();
index 6ebde752c4a4c199bfc2d842f072ab63de0150e7,a7b9daed20ecbd1a836d276a720a571551fbf7db..9ef3fd35ae6adaaa751bf963939c445cfbc5b9ae
@@@ -488,7 -483,7 +488,7 @@@ CompressedSimpleSparsityPattern::Line::
  
  
  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;
@@@ -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))
  
  
  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());
index f0a77f0b0a926abfd45608a35e140c8bdfecaf80,94ade6925157a8aa90bd142423a5d8d4f0a8a750..2d5328eedbbc2a97cab06260392037d9b2600f40
@@@ -507,7 -502,7 +507,7 @@@ CompressedSparsityPattern::Line::add (c
  
  
  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;
@@@ -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()));
  
  
  
  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(),
index e8a1c7cf8e478d0f36cacb2bc71530b6dc0fc3c6,bf539e6b23f127e451d5c1797d802dc8b9d9d62a..f3bbba92e0d51acaf96963cbf090c6b9628dfcbb
@@@ -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<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
@@@ -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())
index be44375f90e207a751fb871d5ec69cb55752de81,a8db6a6ea27c64b15e141223b99a7cb281e916a2..3fcedd85913dea4acf34398294835aae02c51177
@@@ -1005,8 -1000,8 +1005,8 @@@ public
     *  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();
@@@ -1654,7 -1649,7 +1654,7 @@@ Accessor (const FullMatrix<number> *mat
  
  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;
index 96a96cd17022cf2c26a883701d02e2d5cf608e2b,a99f840b488312e75662a853a4d95f1430fc9194..3fe568461942a33d6208771eb6861f219c5b55eb
@@@ -1378,7 -1373,7 +1373,7 @@@ namespace paralle
  
      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();
index e246ac093df221cdcc1fce6a397e622f04ab6b40,b1f53d34de6c817d08de43fd411fa0603485a5d2..6baf82634fb66885f6d468fed8782b2953da5229
@@@ -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; i<vector->size(); ++i)
 +     * for (size_type i=0; i<vector->size(); ++i)
       *   vector(i) = i;
       *
       *                   // do some additions to vector elements, but
index 98139d2966e24ea99052145a50d8916442ca2297,bb109a84fb537cef9b797e6f4375b36b276ad33e..ce51bf021bf129ed938fc6af69bde3e655688895
@@@ -1191,7 -1191,7 +1191,7 @@@ Vector<Number>::operator = (const Vecto
  
  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;
  }
index e5d6308c1f2391c4fb90ea94eba2e6bd03a8a982,7c875227cdb831de15dcece123c6d5bab0b3d154..b2dd304a9d29805d492b178cf757913aae123ce5
@@@ -132,12 -132,6 +132,12 @@@ template<typename Number
  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
Simple merge

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.