]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
fix compilation when using p4est
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 22 Oct 2012 20:19:23 +0000 (20:19 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 22 Oct 2012 20:19:23 +0000 (20:19 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_3@27169 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/dofs/dof_handler_policy.cc

index 08f5fdedf245d69bc17cfe9fa43938fa309f82c8..06549151217e1a792f94d8a42b1091c1143a0bd0 100644 (file)
@@ -582,7 +582,7 @@ namespace internal
             {
                 std::vector<unsigned int> tree_index;
                 std::vector<typename dealii::internal::p4est::types<dim>::quadrant> quadrants;
-                std::vector<types::global_dof_index> dofs;
+                std::vector<dealii::types::global_dof_index> dofs;
 
                 unsigned int bytes_for_buffer () const
                   {
@@ -590,7 +590,7 @@ namespace internal
                             tree_index.size() * sizeof(unsigned int) +
                             quadrants.size() * sizeof(typename dealii::internal::p4est
                                                       ::types<dim>::quadrant) +
-                            dofs.size() * sizeof(types::global_dof_index));
+                            dofs.size() * sizeof(dealii::types::global_dof_index));
                   }
 
                 void pack_data (std::vector<char> &buffer) const
@@ -617,8 +617,8 @@ namespace internal
 
                     std::memcpy(ptr,
                                 &dofs[0],
-                                dofs.size() * sizeof(types::global_dof_index));
-                    ptr += dofs.size() * sizeof(types::global_dof_index);
+                                dofs.size() * sizeof(dealii::types::global_dof_index));
+                    ptr += dofs.size() * sizeof(dealii::types::global_dof_index);
 
                     Assert (ptr == &buffer[0]+buffer.size(),
                             ExcInternalError());
@@ -692,7 +692,7 @@ namespace internal
                                                    // this cell's dof_indices
                                                    // need to be sent to
                                                    // someone
-                  std::vector<types::global_dof_index>
+                  std::vector<dealii::types::global_dof_index>
                     local_dof_indices (dealii_cell->get_fe().dofs_per_cell);
                   dealii_cell->get_dof_indices (local_dof_indices);
 
@@ -735,7 +735,7 @@ namespace internal
           const typename dealii::internal::p4est::types<dim>::quadrant &p4est_cell,
           const typename DoFHandler<dim,spacedim>::cell_iterator &dealii_cell,
           const typename dealii::internal::p4est::types<dim>::quadrant &quadrant,
-          types::global_dof_index * dofs)
+          dealii::types::global_dof_index * dofs)
         {
           if (internal::p4est::quadrant_is_equal<dim>(p4est_cell, quadrant))
             {
@@ -743,7 +743,7 @@ namespace internal
               Assert(dealii_cell->is_ghost(), ExcInternalError());
 
                                                // update dof indices of cell
-              std::vector<types::global_dof_index>
+              std::vector<dealii::types::global_dof_index>
                 dof_indices (dealii_cell->get_fe().dofs_per_cell);
               dealii_cell->update_cell_dof_indices_cache();
               dealii_cell->get_dof_indices(dof_indices);
@@ -912,7 +912,7 @@ namespace internal
                                            // that are going to send stuff to us
           std::set<dealii::types::subdomain_id> senders;
           {
-            std::vector<types::global_dof_index> local_dof_indices;
+            std::vector<dealii::types::global_dof_index> local_dof_indices;
             typename DoFHandler<dim,spacedim>::active_cell_iterator
               cell, endc = dof_handler.end();
 
@@ -966,7 +966,7 @@ namespace internal
               typename dealii::internal::p4est::types<dim>::quadrant * quadrant
                 =reinterpret_cast<typename dealii::internal::p4est::types<dim>::quadrant *>(ptr);
               ptr+=cells*sizeof(typename dealii::internal::p4est::types<dim>::quadrant);
-              types::global_dof_index * dofs=reinterpret_cast<types::global_dof_index*>(ptr);
+              dealii::types::global_dof_index * dofs=reinterpret_cast<dealii::types::global_dof_index*>(ptr);
 
               for (unsigned int c=0;c<cells;++c, dofs+=1+dofs[0])
                 {
@@ -1068,19 +1068,19 @@ namespace internal
 
                                          //* 1. distribute on own
                                          //* subdomain
-        const types::global_dof_index n_initial_local_dofs =
+        const dealii::types::global_dof_index n_initial_local_dofs =
           Implementation::distribute_dofs (0, tr->locally_owned_subdomain(),
                                            dof_handler);
 
                                          //* 2. iterate over ghostcells and
                                          //kill dofs that are not owned
                                          //by us
-        std::vector<types::global_dof_index> renumbering(n_initial_local_dofs);
+        std::vector<dealii::types::global_dof_index> renumbering(n_initial_local_dofs);
         for (unsigned int i=0; i<renumbering.size(); ++i)
           renumbering[i] = i;
 
         {
-          std::vector<types::global_dof_index> local_dof_indices;
+          std::vector<dealii::types::global_dof_index> local_dof_indices;
 
           typename DoFHandler<dim,spacedim>::active_cell_iterator
             cell = dof_handler.begin_active(),
@@ -1114,7 +1114,7 @@ namespace internal
 
                                          // make indices consecutive
         number_cache.n_locally_owned_dofs = 0;
-        for (std::vector<types::global_dof_index>::iterator it=renumbering.begin();
+        for (std::vector<dealii::types::global_dof_index>::iterator it=renumbering.begin();
              it!=renumbering.end(); ++it)
           if (*it != DoFHandler<dim,spacedim>::invalid_dof_index)
             *it = number_cache.n_locally_owned_dofs++;
@@ -1129,14 +1129,14 @@ namespace internal
                         1, MPI_UNSIGNED,
                         tr->get_communicator());
 
-        const types::global_dof_index
+        const dealii::types::global_dof_index
           shift = std::accumulate (number_cache
                                    .n_locally_owned_dofs_per_processor.begin(),
                                    number_cache
                                    .n_locally_owned_dofs_per_processor.begin()
                                    + tr->locally_owned_subdomain(),
-                                   0);
-        for (std::vector<types::global_dof_index>::iterator it=renumbering.begin();
+                                   static_cast<dealii::types::global_dof_index>(0));
+        for (std::vector<dealii::types::global_dof_index>::iterator it=renumbering.begin();
              it!=renumbering.end(); ++it)
           if (*it != DoFHandler<dim,spacedim>::invalid_dof_index)
             (*it) += shift;
@@ -1156,7 +1156,7 @@ namespace internal
                              .n_locally_owned_dofs_per_processor.begin(),
                              number_cache
                              .n_locally_owned_dofs_per_processor.end(),
-                             0);
+                             static_cast<dealii::types::global_dof_index>(0));
 
         number_cache.locally_owned_dofs = IndexSet(number_cache.n_global_dofs);
         number_cache.locally_owned_dofs
@@ -1167,7 +1167,7 @@ namespace internal
                                          // fill global_dof_indexsets
         number_cache.locally_owned_dofs_per_processor.resize(n_cpus);
         {
-          types::global_dof_index lshift = 0;
+          dealii::types::global_dof_index lshift = 0;
           for (unsigned int i=0;i<n_cpus;++i)
             {
               number_cache.locally_owned_dofs_per_processor[i]
@@ -1247,7 +1247,7 @@ namespace internal
 #ifdef DEBUG
                                          //check that we are really done
         {
-          std::vector<types::global_dof_index> local_dof_indices;
+          std::vector<dealii::types::global_dof_index> local_dof_indices;
           typename DoFHandler<dim,spacedim>::active_cell_iterator
             cell, endc = dof_handler.end();
 
@@ -1283,7 +1283,7 @@ namespace internal
       template <int dim, int spacedim>
       NumberCache
       ParallelDistributed<dim, spacedim>::
-      renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
+      renumber_dofs (const std::vector<dealii::types::global_dof_index> &new_numbers,
                      dealii::DoFHandler<dim,spacedim> &dof_handler) const
       {
         Assert (new_numbers.size() == dof_handler.locally_owned_dofs().n_elements(),
@@ -1308,9 +1308,9 @@ namespace internal
         number_cache.locally_owned_dofs = IndexSet (dof_handler.n_dofs());
         if (dof_handler.locally_owned_dofs().n_elements()>0)
         {
-          std::vector<types::global_dof_index>::const_iterator it = new_numbers.begin();
+          std::vector<dealii::types::global_dof_index>::const_iterator it = new_numbers.begin();
           const unsigned int n_blocks = dof_handler.get_fe().n_blocks();
-          std::vector<std::pair<types::global_dof_index,unsigned int> > block_indices(n_blocks);
+          std::vector<std::pair<dealii::types::global_dof_index,unsigned int> > block_indices(n_blocks);
           block_indices[0].first = *it++;
           block_indices[0].second = 1;
           unsigned int current_block = 0, n_filled_blocks = 1;
@@ -1393,7 +1393,7 @@ namespace internal
                                          // mark not locally active DoFs as
                                          // invalid
         {
-          std::vector<types::global_dof_index> local_dof_indices;
+          std::vector<dealii::types::global_dof_index> local_dof_indices;
 
           typename DoFHandler<dim,spacedim>::active_cell_iterator
             cell = dof_handler.begin_active(),
@@ -1539,7 +1539,7 @@ namespace internal
                                .n_locally_owned_dofs_per_processor.begin(),
                                number_cache
                                .n_locally_owned_dofs_per_processor.end(),
-                               0);
+                               static_cast<dealii::types::global_dof_index>(0));
 
           tr->load_user_flags(user_flags);
         }

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.