]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Change unsigned int to types::global_dof_index.
authorbuerg <buerg@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 11 Aug 2012 14:24:05 +0000 (14:24 +0000)
committerbuerg <buerg@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 11 Aug 2012 14:24:05 +0000 (14:24 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_3@25902 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/files
deal.II/include/deal.II/lac/block_vector.h
deal.II/include/deal.II/lac/block_vector.templates.h
deal.II/include/deal.II/lac/block_vector_base.h

index f43157b90e9408d1b50254721626e985fd1fdfd7..0495321d1dc039a39dac3d8764e41217cebbeff1 100644 (file)
@@ -117,7 +117,7 @@ MARKUS source/lac/block_sparse_matrix.cc
 MARKUS source/lac/block_sparse_matrix_ez.cc
 MARKUS source/lac/block_sparsity_pattern.cc
 MARKUS source/lac/block_vector.cc
-source/lac/chunk_sparse_matrix.cc
+MARKUS source/lac/chunk_sparse_matrix.cc
 source/lac/chunk_sparsity_pattern.cc
 MARKUS source/lac/compressed_set_sparsity_pattern.cc
 source/lac/compressed_simple_sparsity_pattern.cc
@@ -370,8 +370,8 @@ MARKUS include/deal.II/lac/block_sparsity_pattern.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
+MARKUS include/deal.II/lac/chunk_sparse_matrix.h
+MARKUS include/deal.II/lac/chunk_sparse_matrix.templates.h
 include/deal.II/lac/chunk_sparsity_pattern.h
 MARKUS include/deal.II/lac/compressed_set_sparsity_pattern.h
 include/deal.II/lac/compressed_simple_sparsity_pattern.h
index 7344af92cd5a0bb64b4eb130150eca76c8c74c0f..b69f0d24b1dc9a77ef0d22e7bfd43dd320cbca82 100644 (file)
@@ -101,8 +101,8 @@ class BlockVector : public BlockVectorBase<Vector<Number> >
                                       *  use blocks of different
                                       *  sizes.
                                       */
-    explicit BlockVector (const unsigned int num_blocks = 0,
-                          const unsigned int block_size = 0);
+    explicit BlockVector (const unsigned int            num_blocks = 0,
+                          const types::global_dof_index block_size = 0);
 
                                      /**
                                       * Copy-Constructor. Dimension set to
@@ -157,7 +157,7 @@ class BlockVector : public BlockVectorBase<Vector<Number> >
                                       * <tt>block_sizes[i]</tt> zero
                                       * elements.
                                       */
-    BlockVector (const std::vector<unsigned int> &block_sizes);
+    BlockVector (const std::vector<types::global_dof_index> &block_sizes);
 
                                      /**
                                       * Constructor. Initialize vector
@@ -255,7 +255,7 @@ class BlockVector : public BlockVectorBase<Vector<Number> >
                                       * is filled with zeros.
                                       */
     void reinit (const unsigned int num_blocks,
-                 const unsigned int block_size = 0,
+                 const types::global_dof_index block_size = 0,
                  const bool fast = false);
 
                                      /**
@@ -289,8 +289,8 @@ class BlockVector : public BlockVectorBase<Vector<Number> >
                                       * since they may be routed to
                                       * the wrong block.
                                       */
-    void reinit (const std::vector<unsigned int> &N,
-                 const bool                       fast=false);
+    void reinit (const std::vector<types::global_dof_index> &N,
+                 const bool                                 fast=false);
 
                                      /**
                                       * Reinitialize the BlockVector
index 488ae075bdb12975e4c4dc2dd65368272ae9b10f..cf9e2c5dca314e8bc11ad435f1909413bf31d253 100644 (file)
@@ -23,7 +23,7 @@ DEAL_II_NAMESPACE_OPEN
 
 template <typename Number>
 BlockVector<Number>::BlockVector (const unsigned int n_blocks,
-                                  const unsigned int block_size)
+                                  const types::global_dof_index block_size)
 {
   reinit (n_blocks, block_size);
 }
@@ -31,7 +31,7 @@ BlockVector<Number>::BlockVector (const unsigned int n_blocks,
 
 
 template <typename Number>
-BlockVector<Number>::BlockVector (const std::vector<unsigned int> &n)
+BlockVector<Number>::BlockVector (const std::vector<types::global_dof_index> &n)
 {
   reinit (n, false);
 }
@@ -88,18 +88,18 @@ BlockVector<Number>::BlockVector (const TrilinosWrappers::BlockVector &v)
 
 
 template <typename Number>
-void BlockVector<Number>::reinit (const unsigned int n_bl,
-                                  const unsigned int bl_sz,
-                                  const bool         fast)
+void BlockVector<Number>::reinit (const unsigned int            n_bl,
+                                  const types::global_dof_index bl_sz,
+                                  const bool                    fast)
 {
-  std::vector<unsigned int> n(n_bl, bl_sz);
+  std::vector<types::global_dof_index> n(n_bl, bl_sz);
   reinit(n, fast);
 }
 
 
 template <typename Number>
-void BlockVector<Number>::reinit (const std::vector<unsigned int> &n,
-                                  const bool                       fast)
+void BlockVector<Number>::reinit (const std::vector<types::global_dof_index> &n,
+                                  const bool                                 fast)
 {
   this->block_indices.reinit (n);
   if (this->components.size() != this->n_blocks())
index f984a739a29d4e7a6a45614ec905f91368daf46f..908af5afd209089689dca3f5d56e4798d26729e8 100644 (file)
@@ -352,8 +352,8 @@ namespace internal
                                           * const or non-const
                                           * reference.
                                           */
-        Iterator (BlockVector    &parent,
-                  const unsigned int  global_index);
+        Iterator (BlockVector                   &parent,
+                  const types::global_dof_index global_index);
 
                                          /**
                                           * Copy constructor.
@@ -381,11 +381,11 @@ namespace internal
                                           * variables.
                                           */
         Iterator (BlockVector        &parent,
-                  const unsigned int  global_index,
-                  const unsigned int  current_block,
-                  const unsigned int  index_within_block,
-                  const unsigned int  next_break_forward,
-                  const unsigned int  next_break_backward);
+                  const types::global_dof_index  global_index,
+                  const unsigned int             current_block,
+                  const types::global_dof_index  index_within_block,
+                  const types::global_dof_index  next_break_forward,
+                  const types::global_dof_index  next_break_backward);
 
       public:
 
@@ -612,7 +612,7 @@ namespace internal
                                           * element to which we
                                           * presently point.
                                           */
-        unsigned int     global_index;
+        types::global_dof_index     global_index;
 
                                          /**
                                           * Current block and index
@@ -621,7 +621,7 @@ namespace internal
                                           * to.
                                           */
         unsigned int current_block;
-        unsigned int index_within_block;
+        types::global_dof_index index_within_block;
 
                                          /**
                                           * Indices of the global
@@ -635,8 +635,8 @@ namespace internal
                                           * efficient than always
                                           * asking the parent object.
                                           */
-        unsigned int next_break_forward;
-        unsigned int next_break_backward;
+        types::global_dof_index next_break_forward;
+        types::global_dof_index next_break_backward;
 
                                          /**
                                           * Move forward one element.
@@ -825,7 +825,7 @@ class BlockVectorBase : public Subscriptor
                                       * is the sum of the dimensions of all
                                       * components.
                                       */
-    unsigned int size () const;
+    types::global_dof_index size () const;
 
                                      /**
                                       * Return an iterator pointing to
@@ -856,20 +856,20 @@ class BlockVectorBase : public Subscriptor
                                      /**
                                       * Access components, returns U(i).
                                       */
-    value_type operator() (const unsigned int i) const;
+    value_type operator() (const types::global_dof_index i) const;
 
                                      /**
                                       * Access components, returns U(i)
                                       * as a writeable reference.
                                       */
-    reference operator() (const unsigned int i);
+    reference operator() (const types::global_dof_index i);
 
                                      /**
                                       * Access components, returns U(i).
                                       *
                                       * Exactly the same as operator().
                                       */
-    value_type operator[] (const unsigned int i) const;
+    value_type operator[] (const types::global_dof_index i) const;
 
                                      /**
                                       * Access components, returns U(i)
@@ -877,7 +877,7 @@ class BlockVectorBase : public Subscriptor
                                       *
                                       * Exactly the same as operator().
                                       */
-    reference operator[] (const unsigned int i);
+    reference operator[] (const types::global_dof_index i);
 
                                      /**
                                       * Copy operator: fill all components of
@@ -998,8 +998,8 @@ class BlockVectorBase : public Subscriptor
                                         * indices.
                                         */
     template <typename Number>
-    void add (const std::vector<unsigned int> &indices,
-              const std::vector<Number>       &values);
+    void add (const std::vector<types::global_dof_index> &indices,
+              const std::vector<Number>                  &values);
 
                                        /**
                                         * This is a second collective
@@ -1009,8 +1009,8 @@ class BlockVectorBase : public Subscriptor
                                         * values.
                                         */
     template <typename Number>
-    void add (const std::vector<unsigned int> &indices,
-              const Vector<Number>            &values);
+    void add (const std::vector<types::global_dof_index> &indices,
+              const Vector<Number>                       &values);
 
                                       /**
                                        * Take an address where
@@ -1022,9 +1022,9 @@ class BlockVectorBase : public Subscriptor
                                        * functions above.
                                        */
     template <typename Number>
-    void add (const unsigned int  n_elements,
-              const unsigned int *indices,
-              const Number       *values);
+    void add (const unsigned int            n_elements,
+              const types::global_dof_index *indices,
+              const Number                  *values);
 
                                      /**
                                       * $U(0-DIM)+=s$.  Addition of <tt>s</tt>
@@ -1225,11 +1225,11 @@ namespace internal
     inline
     Iterator<BlockVectorType,constness>::
     Iterator (BlockVector        &parent,
-              const unsigned int  global_index,
-              const unsigned int  current_block,
-              const unsigned int  index_within_block,
-              const unsigned int  next_break_forward,
-              const unsigned int  next_break_backward)
+              const types::global_dof_index  global_index,
+              const unsigned int             current_block,
+              const types::global_dof_index  index_within_block,
+              const types::global_dof_index  next_break_forward,
+              const types::global_dof_index  next_break_backward)
                     :
                     parent (&parent),
                     global_index (global_index),
@@ -1633,8 +1633,8 @@ namespace internal
 
     template <class BlockVectorType, bool constness>
     Iterator<BlockVectorType,constness>::
-    Iterator (BlockVector       &parent,
-              const unsigned int global_index)
+    Iterator (BlockVector                   &parent,
+              const types::global_dof_index global_index)
                     :
                     parent (&parent),
                     global_index (global_index)
@@ -1647,7 +1647,7 @@ namespace internal
                                        // past-the-end
       if (global_index < parent.size())
         {
-          const std::pair<unsigned int, unsigned int>
+          const std::pair<unsigned int, types::global_dof_index>
             indices = parent.block_indices.global_to_local(global_index);
           current_block      = indices.first;
           index_within_block = indices.second;
@@ -1756,7 +1756,7 @@ BlockVectorBase<VectorType>::BlockVectorBase ()
 
 template <class VectorType>
 inline
-unsigned int
+types::global_dof_index
 BlockVectorBase<VectorType>::size () const
 {
   return block_indices.total_size();
@@ -1811,7 +1811,7 @@ inline
 void
 BlockVectorBase<VectorType>::collect_sizes ()
 {
-  std::vector<unsigned int> sizes (n_blocks());
+  std::vector<types::global_dof_index> sizes (n_blocks());
 
   for (unsigned int i=0; i<n_blocks(); ++i)
     sizes[i] = block(i).size();
@@ -2007,8 +2007,8 @@ template <class VectorType>
 template <typename Number>
 inline
 void
-BlockVectorBase<VectorType>::add (const std::vector<unsigned int> &indices,
-                                  const std::vector<Number>       &values)
+BlockVectorBase<VectorType>::add (const std::vector<types::global_dof_index> &indices,
+                                  const std::vector<Number>                  &values)
 {
   Assert (indices.size() == values.size(),
           ExcDimensionMismatch(indices.size(), values.size()));
@@ -2021,8 +2021,8 @@ template <class VectorType>
 template <typename Number>
 inline
 void
-BlockVectorBase<VectorType>::add (const std::vector<unsigned int> &indices,
-                                  const Vector<Number>            &values)
+BlockVectorBase<VectorType>::add (const std::vector<types::global_dof_index> &indices,
+                                  const Vector<Number>                       &values)
 {
   Assert (indices.size() == values.size(),
           ExcDimensionMismatch(indices.size(), values.size()));
@@ -2037,9 +2037,9 @@ template <class VectorType>
 template <typename Number>
 inline
 void
-BlockVectorBase<VectorType>::add (const unsigned int  n_indices,
-                                  const unsigned int *indices,
-                                  const Number       *values)
+BlockVectorBase<VectorType>::add (const unsigned int            n_indices,
+                                  const types::global_dof_index *indices,
+                                  const Number                  *values)
 {
   for (unsigned int i=0; i<n_indices; ++i)
     (*this)(indices[i]) += values[i];
@@ -2393,9 +2393,9 @@ BlockVectorBase<VectorType>::operator /= (const value_type factor)
 template <class VectorType>
 inline
 typename BlockVectorBase<VectorType>::value_type
-BlockVectorBase<VectorType>::operator() (const unsigned int i) const
+BlockVectorBase<VectorType>::operator() (const types::global_dof_index i) const
 {
-  const std::pair<unsigned int,unsigned int> local_index
+  const std::pair<unsigned int,types::global_dof_index> local_index
     = block_indices.global_to_local (i);
   return components[local_index.first](local_index.second);
 }
@@ -2405,9 +2405,9 @@ BlockVectorBase<VectorType>::operator() (const unsigned int i) const
 template <class VectorType>
 inline
 typename BlockVectorBase<VectorType>::reference
-BlockVectorBase<VectorType>::operator() (const unsigned int i)
+BlockVectorBase<VectorType>::operator() (const types::global_dof_index i)
 {
-  const std::pair<unsigned int,unsigned int> local_index
+  const std::pair<unsigned int,types::global_dof_index> local_index
     = block_indices.global_to_local (i);
   return components[local_index.first](local_index.second);
 }
@@ -2417,7 +2417,7 @@ BlockVectorBase<VectorType>::operator() (const unsigned int i)
 template <class VectorType>
 inline
 typename BlockVectorBase<VectorType>::value_type
-BlockVectorBase<VectorType>::operator[] (const unsigned int i) const
+BlockVectorBase<VectorType>::operator[] (const types::global_dof_index i) const
 {
   return operator()(i);
 }
@@ -2427,7 +2427,7 @@ BlockVectorBase<VectorType>::operator[] (const unsigned int i) const
 template <class VectorType>
 inline
 typename BlockVectorBase<VectorType>::reference
-BlockVectorBase<VectorType>::operator[] (const unsigned int i)
+BlockVectorBase<VectorType>::operator[] (const types::global_dof_index i)
 {
   return operator()(i);
 }

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.