From 289ffc0b33a9705a299beaafcc15c89c736bec2c Mon Sep 17 00:00:00 2001 From: heister Date: Mon, 22 Oct 2012 20:19:23 +0000 Subject: [PATCH] fix compilation when using p4est 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 | 48 +++++++++++------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/deal.II/source/dofs/dof_handler_policy.cc b/deal.II/source/dofs/dof_handler_policy.cc index 08f5fdedf2..0654915121 100644 --- a/deal.II/source/dofs/dof_handler_policy.cc +++ b/deal.II/source/dofs/dof_handler_policy.cc @@ -582,7 +582,7 @@ namespace internal { std::vector tree_index; std::vector::quadrant> quadrants; - std::vector dofs; + std::vector 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::quadrant) + - dofs.size() * sizeof(types::global_dof_index)); + dofs.size() * sizeof(dealii::types::global_dof_index)); } void pack_data (std::vector &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 + std::vector 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::quadrant &p4est_cell, const typename DoFHandler::cell_iterator &dealii_cell, const typename dealii::internal::p4est::types::quadrant &quadrant, - types::global_dof_index * dofs) + dealii::types::global_dof_index * dofs) { if (internal::p4est::quadrant_is_equal(p4est_cell, quadrant)) { @@ -743,7 +743,7 @@ namespace internal Assert(dealii_cell->is_ghost(), ExcInternalError()); // update dof indices of cell - std::vector + std::vector 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 senders; { - std::vector local_dof_indices; + std::vector local_dof_indices; typename DoFHandler::active_cell_iterator cell, endc = dof_handler.end(); @@ -966,7 +966,7 @@ namespace internal typename dealii::internal::p4est::types::quadrant * quadrant =reinterpret_cast::quadrant *>(ptr); ptr+=cells*sizeof(typename dealii::internal::p4est::types::quadrant); - types::global_dof_index * dofs=reinterpret_cast(ptr); + dealii::types::global_dof_index * dofs=reinterpret_cast(ptr); for (unsigned int c=0;clocally_owned_subdomain(), dof_handler); //* 2. iterate over ghostcells and //kill dofs that are not owned //by us - std::vector renumbering(n_initial_local_dofs); + std::vector renumbering(n_initial_local_dofs); for (unsigned int i=0; i local_dof_indices; + std::vector local_dof_indices; typename DoFHandler::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::iterator it=renumbering.begin(); + for (std::vector::iterator it=renumbering.begin(); it!=renumbering.end(); ++it) if (*it != DoFHandler::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::iterator it=renumbering.begin(); + static_cast(0)); + for (std::vector::iterator it=renumbering.begin(); it!=renumbering.end(); ++it) if (*it != DoFHandler::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(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 local_dof_indices; + std::vector local_dof_indices; typename DoFHandler::active_cell_iterator cell, endc = dof_handler.end(); @@ -1283,7 +1283,7 @@ namespace internal template NumberCache ParallelDistributed:: - renumber_dofs (const std::vector &new_numbers, + renumber_dofs (const std::vector &new_numbers, dealii::DoFHandler &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::const_iterator it = new_numbers.begin(); + std::vector::const_iterator it = new_numbers.begin(); const unsigned int n_blocks = dof_handler.get_fe().n_blocks(); - std::vector > block_indices(n_blocks); + std::vector > 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 local_dof_indices; + std::vector local_dof_indices; typename DoFHandler::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(0)); tr->load_user_flags(user_flags); } -- 2.39.5