From: Wolfgang Bangerth Date: Thu, 10 Dec 2015 16:45:02 +0000 (-0600) Subject: Replace now deprecated call to get_tria() by get_triangulation(). X-Git-Tag: v8.4.0-rc2~165^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1970%2Fhead;p=dealii.git Replace now deprecated call to get_tria() by get_triangulation(). --- diff --git a/include/deal.II/dofs/dof_accessor.templates.h b/include/deal.II/dofs/dof_accessor.templates.h index 3775c9e1b2..32ef600810 100644 --- a/include/deal.II/dofs/dof_accessor.templates.h +++ b/include/deal.II/dofs/dof_accessor.templates.h @@ -725,7 +725,7 @@ namespace internal ? typename internal::Triangulation::Iterators:: - raw_cell_iterator (&dof_handler.get_tria(), + raw_cell_iterator (&dof_handler.get_triangulation(), obj_level, obj_index)->used() : @@ -733,7 +733,7 @@ namespace internal ? typename internal::Triangulation::Iterators:: - raw_line_iterator (&dof_handler.get_tria(), + raw_line_iterator (&dof_handler.get_triangulation(), obj_level, obj_index)->used() : @@ -777,7 +777,7 @@ namespace internal ? typename internal::Triangulation::Iterators:: - raw_cell_iterator (&dof_handler.get_tria(), + raw_cell_iterator (&dof_handler.get_triangulation(), obj_level, obj_index)->used() : @@ -785,7 +785,7 @@ namespace internal ? typename internal::Triangulation::Iterators:: - raw_line_iterator (&dof_handler.get_tria(), + raw_line_iterator (&dof_handler.get_triangulation(), obj_level, obj_index)->used() : diff --git a/include/deal.II/dofs/dof_renumbering.h b/include/deal.II/dofs/dof_renumbering.h index 4511fbbe61..564eeb8229 100644 --- a/include/deal.II/dofs/dof_renumbering.h +++ b/include/deal.II/dofs/dof_renumbering.h @@ -756,7 +756,7 @@ namespace DoFRenumbering * renumbered. * * @pre @p cell_order must have size - * dof_handler.get_tria().n_active_cells(). Every active + * dof_handler.get_triangulation().n_active_cells(). Every active * cell iterator of that triangulation needs to be present in @p cell_order * exactly once. */ @@ -790,7 +790,7 @@ namespace DoFRenumbering * renumbered. * * @pre @p cell_order must have size - * dof_handler.get_tria().n_active_cells(). Every active + * dof_handler.get_triangulation().n_active_cells(). Every active * cell iterator of that triangulation needs to be present in @p cell_order * exactly once. * @post For each @p i between zero and dof_handler.n_dofs(), diff --git a/include/deal.II/matrix_free/matrix_free.h b/include/deal.II/matrix_free/matrix_free.h index 0d070be5ef..3f9b4b9de8 100644 --- a/include/deal.II/matrix_free/matrix_free.h +++ b/include/deal.II/matrix_free/matrix_free.h @@ -1224,7 +1224,7 @@ MatrixFree::get_cell_iterator(const unsigned int macro_cell_number, std::pair index = cell_level_index[macro_cell_number*vectorization_length+vector_number]; return typename DoFHandler::cell_iterator - (&dofh->get_tria(), index.first, index.second, dofh); + (&dofh->get_triangulation(), index.first, index.second, dofh); } @@ -1252,7 +1252,7 @@ MatrixFree::get_hp_cell_iterator(const unsigned int macro_cell_numbe std::pair index = cell_level_index[macro_cell_number*vectorization_length+vector_number]; return typename hp::DoFHandler::cell_iterator - (&dofh->get_tria(), index.first, index.second, dofh); + (&dofh->get_triangulation(), index.first, index.second, dofh); } diff --git a/include/deal.II/matrix_free/matrix_free.templates.h b/include/deal.II/matrix_free/matrix_free.templates.h index 575fbba5b7..cad7355329 100644 --- a/include/deal.II/matrix_free/matrix_free.templates.h +++ b/include/deal.II/matrix_free/matrix_free.templates.h @@ -133,7 +133,7 @@ internal_reinit(const Mapping &mapping, AssertDimension (dof_handler.size(), locally_owned_set.size()); // set variables that are independent of FE - internal::assert_communicator_equality (dof_handler[0]->get_tria(), + internal::assert_communicator_equality (dof_handler[0]->get_triangulation(), additional_data.mpi_communicator); size_info.communicator = additional_data.mpi_communicator; if (Utilities::MPI::job_supports_mpi() == true) @@ -213,7 +213,7 @@ internal_reinit(const Mapping &mapping, // general case? if (additional_data.initialize_mapping == true) { - mapping_info.initialize (dof_handler[0]->get_tria(), cell_level_index, + mapping_info.initialize (dof_handler[0]->get_triangulation(), cell_level_index, dof_info[0].cell_active_fe_index, mapping, quad, additional_data.mapping_update_flags); @@ -263,7 +263,7 @@ internal_reinit(const Mapping &mapping, AssertDimension (dof_handler.size(), locally_owned_set.size()); // set variables that are independent of FE - internal::assert_communicator_equality (dof_handler[0]->get_tria(), + internal::assert_communicator_equality (dof_handler[0]->get_triangulation(), additional_data.mpi_communicator); size_info.communicator = additional_data.mpi_communicator; if (Utilities::MPI::job_supports_mpi() == true) @@ -341,7 +341,7 @@ internal_reinit(const Mapping &mapping, // determined in @p extract_local_to_global_indices. if (additional_data.initialize_mapping == true) { - mapping_info.initialize (dof_handler[0]->get_tria(), cell_level_index, + mapping_info.initialize (dof_handler[0]->get_triangulation(), cell_level_index, dof_info[0].cell_active_fe_index, mapping, quad, additional_data.mapping_update_flags); @@ -396,7 +396,7 @@ initialize_dof_handlers (const std::vector*> &dof_handler, const unsigned int n_mpi_procs = size_info.n_procs; const unsigned int my_pid = size_info.my_pid; - const Triangulation &tria = dof_handlers.dof_handler[0]->get_tria(); + const Triangulation &tria = dof_handlers.dof_handler[0]->get_triangulation(); if (level == numbers::invalid_unsigned_int) { if (n_mpi_procs == 1) @@ -445,7 +445,7 @@ initialize_dof_handlers (const std::vector*> &dof_hand // if we have no level given, use the same as for the standard DoFHandler, // otherwise we must loop through the respective level - const Triangulation &tria = dof_handler[0]->get_tria(); + const Triangulation &tria = dof_handler[0]->get_triangulation(); if (n_mpi_procs == 1) { @@ -565,7 +565,7 @@ void MatrixFree::initialize_indices { const DoFHandler *dofh = &*dof_handlers.dof_handler[no]; typename DoFHandler::active_cell_iterator - cell_it (&dofh->get_tria(), + cell_it (&dofh->get_triangulation(), cell_level_index[counter].first, cell_level_index[counter].second, dofh); @@ -582,9 +582,9 @@ void MatrixFree::initialize_indices dof_handlers.level != numbers::invalid_unsigned_int) { const DoFHandler *dofh = dof_handlers.dof_handler[no]; - AssertIndexRange (dof_handlers.level, dofh->get_tria().n_levels()); + AssertIndexRange (dof_handlers.level, dofh->get_triangulation().n_levels()); typename DoFHandler::cell_iterator - cell_it (&dofh->get_tria(), + cell_it (&dofh->get_triangulation(), cell_level_index[counter].first, cell_level_index[counter].second, dofh); @@ -601,7 +601,7 @@ void MatrixFree::initialize_indices const hp::DoFHandler *dofh = dof_handlers.hp_dof_handler[no]; typename hp::DoFHandler::active_cell_iterator - cell_it (&dofh->get_tria(), + cell_it (&dofh->get_triangulation(), cell_level_index[counter].first, cell_level_index[counter].second, dofh); diff --git a/include/deal.II/multigrid/mg_constrained_dofs.h b/include/deal.II/multigrid/mg_constrained_dofs.h index 45edc852ed..0718e0e5ac 100644 --- a/include/deal.II/multigrid/mg_constrained_dofs.h +++ b/include/deal.II/multigrid/mg_constrained_dofs.h @@ -177,7 +177,7 @@ inline void MGConstrainedDoFs::initialize(const DoFHandler &dof) { - const unsigned int nlevels = dof.get_tria().n_global_levels(); + const unsigned int nlevels = dof.get_triangulation().n_global_levels(); boundary_indices.resize(nlevels); diff --git a/include/deal.II/multigrid/mg_transfer.templates.h b/include/deal.II/multigrid/mg_transfer.templates.h index b7b1d44835..41630fe3bc 100644 --- a/include/deal.II/multigrid/mg_transfer.templates.h +++ b/include/deal.II/multigrid/mg_transfer.templates.h @@ -85,7 +85,7 @@ namespace const unsigned int n_target_blocks = max_block + 1; std::vector > - ndofs(mg_dof.get_tria().n_levels(), + ndofs(mg_dof.get_triangulation().n_levels(), std::vector(n_target_blocks)); MGTools::count_dofs_per_block (mg_dof, ndofs, target_component); @@ -112,7 +112,7 @@ namespace { const parallel::Triangulation *tria = (dynamic_cast*> - (&mg_dof.get_tria())); + (&mg_dof.get_triangulation())); for (unsigned int level=v.min_level(); level<=v.max_level(); ++level) @@ -142,7 +142,7 @@ namespace { const dealii::parallel::distributed::Triangulation *tria = (dynamic_cast*> - (&mg_dof.get_tria())); + (&mg_dof.get_triangulation())); AssertThrow(tria!=NULL, ExcMessage("multigrid with Trilinos vectors only works with distributed Triangulation!")); #ifdef DEAL_II_WITH_P4EST @@ -179,7 +179,7 @@ MGTransferPrebuilt::copy_to_mg std::cout << "copy_to_mg src " << src.l2_norm() << std::endl; MPI_Barrier(MPI_COMM_WORLD); #endif - for (unsigned int level=mg_dof_handler.get_tria().n_global_levels(); level != 0;) + for (unsigned int level=mg_dof_handler.get_triangulation().n_global_levels(); level != 0;) { --level; VectorType &dst_level = dst[level]; @@ -238,7 +238,7 @@ MGTransferPrebuilt::copy_from_mg // have fine level basis // functions dst = 0; - for (unsigned int level=0; level::copy_from_mg_add // to the coarse level, but // have fine level basis // functions - for (unsigned int level=0; level >::const_iterator dof_pair_iterator; diff --git a/include/deal.II/multigrid/mg_transfer_block.templates.h b/include/deal.II/multigrid/mg_transfer_block.templates.h index aee1471f23..2745fc9f7f 100644 --- a/include/deal.II/multigrid/mg_transfer_block.templates.h +++ b/include/deal.II/multigrid/mg_transfer_block.templates.h @@ -44,7 +44,7 @@ MGTransferBlockSelect::copy_from_mg ( BlockVector &dst, const MGLevelObject > &src) const { - for (unsigned int level=0; levelfirst) = src[level](i->second); @@ -60,7 +60,7 @@ MGTransferBlockSelect::copy_from_mg ( Vector &dst, const MGLevelObject > &src) const { - for (unsigned int level=0; levelfirst) = src[level](i->second); @@ -76,7 +76,7 @@ MGTransferBlockSelect::copy_from_mg_add ( BlockVector &dst, const MGLevelObject > &src) const { - for (unsigned int level=0; levelfirst) += src[level](i->second); @@ -92,7 +92,7 @@ MGTransferBlockSelect::copy_from_mg_add ( Vector &dst, const MGLevelObject > &src) const { - for (unsigned int level=0; levelfirst) += src[level](i->second); @@ -122,7 +122,7 @@ MGTransferBlock::copy_from_mg ( { for (unsigned int block=0; blockfirst) = src[level].block(mg_block[block])(i->second); @@ -140,7 +140,7 @@ MGTransferBlock::copy_from_mg_add ( { for (unsigned int block=0; blockfirst) += src[level].block(mg_block[block])(i->second); diff --git a/include/deal.II/multigrid/multigrid.h b/include/deal.II/multigrid/multigrid.h index 21596f2f1a..84c28f942f 100644 --- a/include/deal.II/multigrid/multigrid.h +++ b/include/deal.II/multigrid/multigrid.h @@ -433,7 +433,7 @@ Multigrid::Multigrid (const DoFHandler &mg_dof_handler : cycle_type(cycle), minlevel(0), - maxlevel(mg_dof_handler.get_tria().n_global_levels()-1), + maxlevel(mg_dof_handler.get_triangulation().n_global_levels()-1), defect(minlevel,maxlevel), solution(minlevel,maxlevel), t(minlevel,maxlevel), diff --git a/include/deal.II/multigrid/sparse_matrix_collection.h b/include/deal.II/multigrid/sparse_matrix_collection.h index ffa91fa48f..7980de5f19 100644 --- a/include/deal.II/multigrid/sparse_matrix_collection.h +++ b/include/deal.II/multigrid/sparse_matrix_collection.h @@ -82,7 +82,7 @@ namespace mg void SparseMatrixCollection::reinit(const DoFHandlerType &dof_handler) { - AssertIndexRange(sparsity.max_level(), dof_handler.get_tria().n_levels()); + AssertIndexRange(sparsity.max_level(), dof_handler.get_triangulation().n_levels()); for (unsigned int level=sparsity.min_level(); level<=sparsity.max_level(); ++level) diff --git a/include/deal.II/numerics/error_estimator.templates.h b/include/deal.II/numerics/error_estimator.templates.h index f619826bcc..facca6b8fe 100644 --- a/include/deal.II/numerics/error_estimator.templates.h +++ b/include/deal.II/numerics/error_estimator.templates.h @@ -1058,24 +1058,24 @@ estimate (const Mapping &mapping, { #ifdef DEAL_II_WITH_P4EST if (dynamic_cast*> - (&dof_handler.get_tria()) + (&dof_handler.get_triangulation()) != 0) Assert ((subdomain_id_ == numbers::invalid_subdomain_id) || (subdomain_id_ == dynamic_cast&> - (dof_handler.get_tria()).locally_owned_subdomain()), + (dof_handler.get_triangulation()).locally_owned_subdomain()), ExcMessage ("For parallel distributed triangulations, the only " "valid subdomain_id that can be passed here is the " "one that corresponds to the locally owned subdomain id.")); const types::subdomain_id subdomain_id = ((dynamic_cast*> - (&dof_handler.get_tria()) + (&dof_handler.get_triangulation()) != 0) ? dynamic_cast&> - (dof_handler.get_tria()).locally_owned_subdomain() + (dof_handler.get_triangulation()).locally_owned_subdomain() : subdomain_id_); #else @@ -1153,8 +1153,8 @@ estimate (const Mapping &mapping, // reserve one slot for each cell and set it to zero for (unsigned int n=0; n - used_boundary_ids = dof.get_tria().get_boundary_ids(); + used_boundary_ids = dof.get_triangulation().get_boundary_ids(); typename FunctionMap::type boundary_functions; for (unsigned int i=0; in_components, n_components)); } - difference.reinit (dof.get_tria().n_active_cells()); + difference.reinit (dof.get_triangulation().n_active_cells()); switch (norm) { @@ -7071,7 +7071,7 @@ namespace VectorTools // over the entire domain if (const parallel::Triangulation * p_triangulation - = dynamic_cast *>(&dof.get_tria())) + = dynamic_cast *>(&dof.get_triangulation())) { // The type used to store the elements of the global vector may be a // real or a complex number. Do the global reduction always with real @@ -7191,7 +7191,7 @@ namespace VectorTools // carefully selecting the right components. FESystem feq(FE_Q(degree), spacedim); - DoFHandlerType dhq(dh.get_tria()); + DoFHandlerType dhq(dh.get_triangulation()); dhq.distribute_dofs(feq); Vector eulerq(dhq.n_dofs()); const ComponentMask maskq(spacedim, true); diff --git a/source/distributed/solution_transfer.cc b/source/distributed/solution_transfer.cc index 1f77407c80..a793b2b97f 100644 --- a/source/distributed/solution_transfer.cc +++ b/source/distributed/solution_transfer.cc @@ -49,7 +49,7 @@ namespace parallel dof_handler(&dof, typeid(*this).name()) { Assert (dynamic_cast*> - (&dof_handler->get_tria()) != 0, + (&dof_handler->get_triangulation()) != 0, ExcMessage("parallel::distributed::SolutionTransfer requires a parallel::distributed::Triangulation object.")); } @@ -82,7 +82,7 @@ namespace parallel parallel::distributed::Triangulation *tria = (dynamic_cast*> (const_cast*> - (&dof_handler->get_tria()))); + (&dof_handler->get_triangulation()))); Assert (tria != 0, ExcInternalError()); offset @@ -163,7 +163,7 @@ namespace parallel parallel::distributed::Triangulation *tria = (dynamic_cast*> (const_cast*> - (&dof_handler->get_tria()))); + (&dof_handler->get_triangulation()))); Assert (tria != 0, ExcInternalError()); tria->notify_ready_to_unpack(offset, diff --git a/source/dofs/block_info.cc b/source/dofs/block_info.cc index 369131f0e5..d2b77a6f15 100644 --- a/source/dofs/block_info.cc +++ b/source/dofs/block_info.cc @@ -37,7 +37,7 @@ BlockInfo::initialize(const DoFHandler &dof, bool levels_only, bo if (!active_only && dof.has_level_dofs()) { - std::vector > sizes (dof.get_tria ().n_levels ()); + std::vector > sizes (dof.get_triangulation().n_levels ()); for (unsigned int i = 0; i < sizes.size (); ++i) sizes[i].resize (dof.get_fe ().n_blocks ()); diff --git a/source/dofs/dof_handler.cc b/source/dofs/dof_handler.cc index 7bc35123bf..4627df3861 100644 --- a/source/dofs/dof_handler.cc +++ b/source/dofs/dof_handler.cc @@ -375,10 +375,10 @@ namespace internal static void reserve_space_mg (DoFHandler<1, spacedim> &dof_handler) { - Assert (dof_handler.get_tria ().n_levels () > 0, ExcMessage ("Invalid triangulation")); + Assert (dof_handler.get_triangulation().n_levels () > 0, ExcMessage ("Invalid triangulation")); dof_handler.clear_mg_space (); - const dealii::Triangulation<1, spacedim> &tria = dof_handler.get_tria (); + const dealii::Triangulation<1, spacedim> &tria = dof_handler.get_triangulation(); const unsigned int &dofs_per_line = dof_handler.get_fe ().dofs_per_line; const unsigned int &n_levels = tria.n_levels (); @@ -431,11 +431,11 @@ namespace internal static void reserve_space_mg (DoFHandler<2, spacedim> &dof_handler) { - Assert (dof_handler.get_tria ().n_levels () > 0, ExcMessage ("Invalid triangulation")); + Assert (dof_handler.get_triangulation().n_levels () > 0, ExcMessage ("Invalid triangulation")); dof_handler.clear_mg_space (); const dealii::FiniteElement<2, spacedim> &fe = dof_handler.get_fe (); - const dealii::Triangulation<2, spacedim> &tria = dof_handler.get_tria (); + const dealii::Triangulation<2, spacedim> &tria = dof_handler.get_triangulation(); const unsigned int &n_levels = tria.n_levels (); for (unsigned int i = 0; i < n_levels; ++i) @@ -490,11 +490,11 @@ namespace internal static void reserve_space_mg (DoFHandler<3, spacedim> &dof_handler) { - Assert (dof_handler.get_tria ().n_levels () > 0, ExcMessage ("Invalid triangulation")); + Assert (dof_handler.get_triangulation().n_levels () > 0, ExcMessage ("Invalid triangulation")); dof_handler.clear_mg_space (); const dealii::FiniteElement<3, spacedim> &fe = dof_handler.get_fe (); - const dealii::Triangulation<3, spacedim> &tria = dof_handler.get_tria (); + const dealii::Triangulation<3, spacedim> &tria = dof_handler.get_triangulation(); const unsigned int &n_levels = tria.n_levels (); for (unsigned int i = 0; i < n_levels; ++i) @@ -832,8 +832,8 @@ template typename DoFHandler::cell_iterator DoFHandler::begin (const unsigned int level) const { - typename Triangulation::cell_iterator cell = this->get_tria().begin(level); - if (cell == this->get_tria().end(level)) + typename Triangulation::cell_iterator cell = this->get_triangulation().begin(level); + if (cell == this->get_triangulation().end(level)) return end(level); return cell_iterator (*cell, this); } @@ -860,7 +860,7 @@ template typename DoFHandler::cell_iterator DoFHandler::end () const { - return cell_iterator (&this->get_tria(), + return cell_iterator (&this->get_triangulation(), -1, -1, this); @@ -871,7 +871,7 @@ template typename DoFHandler::cell_iterator DoFHandler::end (const unsigned int level) const { - typename Triangulation::cell_iterator cell = this->get_tria().end(level); + typename Triangulation::cell_iterator cell = this->get_triangulation().end(level); if (cell.state() != IteratorState::valid) return end(); return cell_iterator (*cell, this); @@ -882,7 +882,7 @@ template typename DoFHandler::active_cell_iterator DoFHandler::end_active (const unsigned int level) const { - typename Triangulation::cell_iterator cell = this->get_tria().end_active(level); + typename Triangulation::cell_iterator cell = this->get_triangulation().end_active(level); if (cell.state() != IteratorState::valid) return active_cell_iterator(end()); return active_cell_iterator (*cell, this); @@ -896,8 +896,8 @@ DoFHandler::begin_mg (const unsigned int level) const { // Assert(this->has_level_dofs(), ExcMessage("You can only iterate over mg " // "levels if mg dofs got distributed.")); - typename Triangulation::cell_iterator cell = this->get_tria().begin(level); - if (cell == this->get_tria().end(level)) + typename Triangulation::cell_iterator cell = this->get_triangulation().begin(level); + if (cell == this->get_triangulation().end(level)) return end_mg(level); return level_cell_iterator (*cell, this); } @@ -909,7 +909,7 @@ DoFHandler::end_mg (const unsigned int level) const { // Assert(this->has_level_dofs(), ExcMessage("You can only iterate over mg " // "levels if mg dofs got distributed.")); - typename Triangulation::cell_iterator cell = this->get_tria().end(level); + typename Triangulation::cell_iterator cell = this->get_triangulation().end(level); if (cell.state() != IteratorState::valid) return end(); return level_cell_iterator (*cell, this); @@ -920,7 +920,7 @@ template typename DoFHandler::level_cell_iterator DoFHandler::end_mg () const { - return level_cell_iterator (&this->get_tria(), -1, -1, this); + return level_cell_iterator (&this->get_triangulation(), -1, -1, this); } @@ -1427,8 +1427,8 @@ void DoFHandler<2>::renumber_dofs (const unsigned int level, { // save user flags as they will be modified std::vector user_flags; - this->get_tria().save_user_flags(user_flags); - const_cast &>(this->get_tria()).clear_user_flags (); + this->get_triangulation().save_user_flags(user_flags); + const_cast &>(this->get_triangulation()).clear_user_flags (); // flag all lines adjacent to cells of the current // level, as those lines logically belong to the same @@ -1448,7 +1448,7 @@ void DoFHandler<2>::renumber_dofs (const unsigned int level, cell->line(l)->clear_user_flag(); } // finally, restore user flags - const_cast &>(this->get_tria()).load_user_flags (user_flags); + const_cast &>(this->get_triangulation()).load_user_flags (user_flags); } for (std::vector::iterator i=mg_levels[level]->dof_object.dofs.begin(); @@ -1487,8 +1487,8 @@ void DoFHandler<3>::renumber_dofs (const unsigned int level, { // save user flags as they will be modified std::vector user_flags; - this->get_tria().save_user_flags(user_flags); - const_cast &>(this->get_tria()).clear_user_flags (); + this->get_triangulation().save_user_flags(user_flags); + const_cast &>(this->get_triangulation()).clear_user_flags (); // flag all lines adjacent to cells of the current // level, as those lines logically belong to the same @@ -1509,7 +1509,7 @@ void DoFHandler<3>::renumber_dofs (const unsigned int level, cell->line(l)->clear_user_flag(); } // finally, restore user flags - const_cast &>(this->get_tria()).load_user_flags (user_flags); + const_cast &>(this->get_triangulation()).load_user_flags (user_flags); } // QUAD DoFs @@ -1517,8 +1517,8 @@ void DoFHandler<3>::renumber_dofs (const unsigned int level, { // save user flags as they will be modified std::vector user_flags; - this->get_tria().save_user_flags(user_flags); - const_cast &>(this->get_tria()).clear_user_flags (); + this->get_triangulation().save_user_flags(user_flags); + const_cast &>(this->get_triangulation()).clear_user_flags (); // flag all quads adjacent to cells of the current // level, as those lines logically belong to the same @@ -1538,7 +1538,7 @@ void DoFHandler<3>::renumber_dofs (const unsigned int level, cell->quad(q)->clear_user_flag(); } // finally, restore user flags - const_cast &>(this->get_tria()).load_user_flags (user_flags); + const_cast &>(this->get_triangulation()).load_user_flags (user_flags); } //HEX DoFs diff --git a/source/dofs/dof_handler_policy.cc b/source/dofs/dof_handler_policy.cc index 0d82f902c5..c84fe75afd 100644 --- a/source/dofs/dof_handler_policy.cc +++ b/source/dofs/dof_handler_policy.cc @@ -231,7 +231,7 @@ namespace internal DoFHandler &dof_handler) { const dealii::Triangulation &tria - = dof_handler.get_tria(); + = dof_handler.get_triangulation(); Assert (tria.n_levels() > 0, ExcMessage("Empty triangulation")); // Clear user flags because we will need them. But first we save @@ -468,7 +468,7 @@ namespace internal const unsigned int level) { const dealii::Triangulation &tria - = dof_handler.get_tria(); + = dof_handler.get_triangulation(); Assert (tria.n_levels() > 0, ExcMessage("Empty triangulation")); if (level>=tria.n_levels()) return 0; //this is allowed for multigrid @@ -558,7 +558,7 @@ namespace internal // invalid_dof_index: // check if this one // really is unused - Assert (dof_handler.get_tria() + Assert (dof_handler.get_triangulation() .vertex_used((i-dof_handler.vertex_dofs.begin()) / dof_handler.selected_fe->dofs_per_vertex) == false, @@ -656,7 +656,7 @@ namespace internal // if index is invalid_dof_index: // check if this one really is // unused - Assert (dof_handler.get_tria() + Assert (dof_handler.get_triangulation() .vertex_used((i-dof_handler.vertex_dofs.begin()) / dof_handler.selected_fe->dofs_per_vertex) == false, @@ -699,7 +699,7 @@ namespace internal const unsigned int level, const bool check_validity) { - if (level>=dof_handler.get_tria().n_levels()) + if (level>=dof_handler.get_triangulation().n_levels()) return; for (typename std::vector::MGVertexDoFs>::iterator i=dof_handler.mg_vertex_dofs.begin(); i!=dof_handler.mg_vertex_dofs.end(); ++i) @@ -724,8 +724,8 @@ namespace internal { // save user flags as they will be modified std::vector user_flags; - dof_handler.get_tria().save_user_flags(user_flags); - const_cast &>(dof_handler.get_tria()).clear_user_flags (); + dof_handler.get_triangulation().save_user_flags(user_flags); + const_cast &>(dof_handler.get_triangulation()).clear_user_flags (); // flag all lines adjacent to cells of the current // level, as those lines logically belong to the same @@ -754,7 +754,7 @@ namespace internal cell->line(l)->clear_user_flag(); } // finally, restore user flags - const_cast &>(dof_handler.get_tria()).load_user_flags (user_flags); + const_cast &>(dof_handler.get_triangulation()).load_user_flags (user_flags); } for (std::vector::iterator i=dof_handler.mg_levels[level]->dof_object.dofs.begin(); @@ -801,7 +801,7 @@ namespace internal // if index is invalid_dof_index: // check if this one really is // unused - Assert (dof_handler.get_tria() + Assert (dof_handler.get_triangulation() .vertex_used((i-dof_handler.vertex_dofs.begin()) / dof_handler.selected_fe->dofs_per_vertex) == false, @@ -851,7 +851,7 @@ namespace internal const unsigned int level, const bool check_validity) { - if (level>=dof_handler.get_tria().n_levels()) + if (level>=dof_handler.get_triangulation().n_levels()) return; for (typename std::vector::MGVertexDoFs>::iterator i=dof_handler.mg_vertex_dofs.begin(); i!=dof_handler.mg_vertex_dofs.end(); ++i) @@ -877,8 +877,8 @@ namespace internal { // save user flags as they will be modified std::vector user_flags; - dof_handler.get_tria().save_user_flags(user_flags); - const_cast &>(dof_handler.get_tria()).clear_user_flags (); + dof_handler.get_triangulation().save_user_flags(user_flags); + const_cast &>(dof_handler.get_triangulation()).clear_user_flags (); // flag all lines adjacent to cells of the current level, as // those lines logically belong to the same level as the cell, @@ -933,7 +933,7 @@ namespace internal } // finally, restore user flags - const_cast &>(dof_handler.get_tria()).load_user_flags (user_flags); + const_cast &>(dof_handler.get_triangulation()).load_user_flags (user_flags); } for (std::vector::iterator i=dof_handler.mg_levels[level]->dof_object.dofs.begin(); @@ -1006,10 +1006,10 @@ namespace internal { std::vector user_flags; - dof_handler.get_tria().save_user_flags (user_flags); - const_cast&>(dof_handler.get_tria()).clear_user_flags (); + dof_handler.get_triangulation().save_user_flags (user_flags); + const_cast&>(dof_handler.get_triangulation()).clear_user_flags (); - for (unsigned int level = 0; level < dof_handler.get_tria().n_levels(); ++level) + for (unsigned int level = 0; level < dof_handler.get_triangulation().n_levels(); ++level) { types::global_dof_index next_free_dof = Implementation::distribute_dofs_on_level(0, numbers::invalid_subdomain_id, dof_handler, level); @@ -1021,7 +1021,7 @@ namespace internal number_caches[level].n_locally_owned_dofs_per_processor.resize(1); number_caches[level].n_locally_owned_dofs_per_processor[0] = next_free_dof; } - const_cast&>(dof_handler.get_tria()).load_user_flags (user_flags); + const_cast&>(dof_handler.get_triangulation()).load_user_flags (user_flags); } template @@ -1073,11 +1073,11 @@ namespace internal // Namely, we first restore original partition (without artificial cells) // and then turn artificial cells on at the end of this function. const parallel::shared::Triangulation *tr = - (dynamic_cast*> (&dof_handler.get_tria ())); + (dynamic_cast*> (&dof_handler.get_triangulation())); Assert(tr != 0, ExcInternalError()); typename parallel::shared::Triangulation::active_cell_iterator - cell = dof_handler.get_tria().begin_active(), - endc = dof_handler.get_tria().end(); + cell = dof_handler.get_triangulation().begin_active(), + endc = dof_handler.get_triangulation().end(); std::vector current_subdomain_ids(tr->n_active_cells()); const std::vector &true_subdomain_ids = tr->get_true_subdomain_ids_of_cells(); if (tr->with_artificial_cells()) @@ -1096,11 +1096,11 @@ namespace internal cell->set_subdomain_id(true_subdomain_ids[index]); number_cache.locally_owned_dofs_per_processor = DoFTools::locally_owned_dofs_per_subdomain (dof_handler); - number_cache.locally_owned_dofs = number_cache.locally_owned_dofs_per_processor[dof_handler.get_tria().locally_owned_subdomain()]; + number_cache.locally_owned_dofs = number_cache.locally_owned_dofs_per_processor[dof_handler.get_triangulation().locally_owned_subdomain()]; number_cache.n_locally_owned_dofs_per_processor.resize (number_cache.locally_owned_dofs_per_processor.size()); for (unsigned int i = 0; i < number_cache.n_locally_owned_dofs_per_processor.size(); i++) number_cache.n_locally_owned_dofs_per_processor[i] = number_cache.locally_owned_dofs_per_processor[i].n_elements(); - number_cache.n_locally_owned_dofs = number_cache.n_locally_owned_dofs_per_processor[dof_handler.get_tria().locally_owned_subdomain()]; + number_cache.n_locally_owned_dofs = number_cache.n_locally_owned_dofs_per_processor[dof_handler.get_triangulation().locally_owned_subdomain()]; // restore current subdomain ids cell = tr->begin_active(); @@ -1139,11 +1139,11 @@ namespace internal // Similar to distribute_dofs() we need to have a special treatment in // case artificial cells are present. const parallel::shared::Triangulation *tr = - (dynamic_cast*> (&dof_handler.get_tria ())); + (dynamic_cast*> (&dof_handler.get_triangulation())); Assert(tr != 0, ExcInternalError()); typename parallel::shared::Triangulation::active_cell_iterator - cell = dof_handler.get_tria().begin_active(), - endc = dof_handler.get_tria().end(); + cell = dof_handler.get_triangulation().begin_active(), + endc = dof_handler.get_triangulation().end(); std::vector current_subdomain_ids(tr->n_active_cells()); const std::vector &true_subdomain_ids = tr->get_true_subdomain_ids_of_cells(); if (tr->with_artificial_cells()) @@ -1168,7 +1168,7 @@ namespace internal const unsigned int n_cpu = Utilities::MPI::n_mpi_processes (tr->get_communicator ()); std::vector gathered_new_numbers (dof_handler.n_dofs (), 0); Assert(Utilities::MPI::this_mpi_process (tr->get_communicator ()) == - dof_handler.get_tria ().locally_owned_subdomain (), + dof_handler.get_triangulation().locally_owned_subdomain (), ExcInternalError()) //gather new numbers among processors into one vector @@ -1243,7 +1243,7 @@ namespace internal number_cache.locally_owned_dofs_per_processor = DoFTools::locally_owned_dofs_per_subdomain (dof_handler); number_cache.locally_owned_dofs = - number_cache.locally_owned_dofs_per_processor[dof_handler.get_tria ().locally_owned_subdomain ()]; + number_cache.locally_owned_dofs_per_processor[dof_handler.get_triangulation().locally_owned_subdomain ()]; // sequential renumbering returns a vector of size 1 here, // correct this: number_cache.n_locally_owned_dofs_per_processor.resize(number_cache.locally_owned_dofs_per_processor.size()); @@ -1252,7 +1252,7 @@ namespace internal number_cache.n_locally_owned_dofs_per_processor[i] = number_cache.locally_owned_dofs_per_processor[i].n_elements (); number_cache.n_locally_owned_dofs = - number_cache.n_locally_owned_dofs_per_processor[dof_handler.get_tria ().locally_owned_subdomain ()]; + number_cache.n_locally_owned_dofs_per_processor[dof_handler.get_triangulation().locally_owned_subdomain ()]; // restore artificial cells cell = tr->begin_active(); @@ -1739,7 +1739,7 @@ namespace internal const parallel::distributed::Triangulation< dim, spacedim > *tr = (dynamic_cast*> - (&dof_handler.get_tria())); + (&dof_handler.get_triangulation())); Assert (tr != 0, ExcInternalError()); // now collect cells and their @@ -1866,7 +1866,7 @@ namespace internal for (unsigned int c=0; c::level_cell_iterator - cell (&dof_handler.get_tria(), + cell (&dof_handler.get_triangulation(), 0, p4est_tree_to_coarse_cell_permutation[treeindex[c]], &dof_handler); @@ -1970,7 +1970,7 @@ namespace internal const parallel::distributed::Triangulation< dim, spacedim > *tr = (dynamic_cast*> - (&dof_handler.get_tria())); + (&dof_handler.get_triangulation())); Assert (tr != 0, ExcInternalError()); // now collect cells and their @@ -2048,7 +2048,7 @@ namespace internal { //artificial } - else if (cell->level_subdomain_id()==dof_handler.get_tria().locally_owned_subdomain()) + else if (cell->level_subdomain_id()==dof_handler.get_triangulation().locally_owned_subdomain()) { //own local_dof_indices.resize (cell->get_fe().dofs_per_cell); @@ -2109,7 +2109,7 @@ namespace internal for (unsigned int c=0; c::level_cell_iterator - cell (&dof_handler.get_tria(), + cell (&dof_handler.get_triangulation(), 0, p4est_tree_to_coarse_cell_permutation[treeindex[c]], &dof_handler); @@ -2194,7 +2194,7 @@ namespace internal parallel::distributed::Triangulation< dim, spacedim > *tr = (dynamic_cast*> (const_cast*> - (&dof_handler.get_tria()))); + (&dof_handler.get_triangulation()))); Assert (tr != 0, ExcInternalError()); const unsigned int @@ -2416,7 +2416,7 @@ namespace internal parallel::distributed::Triangulation< dim, spacedim > *tr = (dynamic_cast*> (const_cast*> - (&dof_handler.get_tria()))); + (&dof_handler.get_triangulation()))); Assert (tr != 0, ExcInternalError()); AssertThrow( @@ -2427,7 +2427,7 @@ namespace internal const unsigned int n_cpus = Utilities::MPI::n_mpi_processes (tr->get_communicator()); - unsigned int n_levels = Utilities::MPI::max(dof_handler.get_tria().n_levels(), tr->get_communicator()); + unsigned int n_levels = Utilities::MPI::max(dof_handler.get_triangulation().n_levels(), tr->get_communicator()); for (unsigned int level = 0; level < n_levels; ++level) { @@ -2783,7 +2783,7 @@ namespace internal parallel::distributed::Triangulation< dim, spacedim > *tr = (dynamic_cast*> (const_cast*> - (&dof_handler.get_tria()))); + (&dof_handler.get_triangulation()))); Assert (tr != 0, ExcInternalError()); std::vector user_flags; diff --git a/source/dofs/dof_renumbering.cc b/source/dofs/dof_renumbering.cc index 43e9804d74..ae35017783 100644 --- a/source/dofs/dof_renumbering.cc +++ b/source/dofs/dof_renumbering.cc @@ -529,7 +529,7 @@ namespace DoFRenumbering dof_handler.renumber_dofs (renumbering); - // for (unsigned int level=0;level *tria = (dynamic_cast*> - (&start->get_dof_handler().get_tria()))) + (&start->get_dof_handler().get_triangulation()))) { #ifdef DEAL_II_WITH_MPI std::vector local_dof_count(n_buckets); @@ -1039,7 +1039,7 @@ namespace DoFRenumbering if (const parallel::Triangulation *tria = (dynamic_cast*> - (&start->get_dof_handler().get_tria()))) + (&start->get_dof_handler().get_triangulation()))) { #ifdef DEAL_II_WITH_MPI std::vector local_dof_count(n_buckets); @@ -1188,7 +1188,7 @@ namespace DoFRenumbering const parallel::distributed::Triangulation *tria = dynamic_cast*> - (&dof_handler.get_tria()); + (&dof_handler.get_triangulation()); if (tria) { @@ -1381,9 +1381,9 @@ namespace DoFRenumbering const DoFHandlerType &dof, const typename std::vector &cells) { - Assert(cells.size() == dof.get_tria().n_active_cells(), + Assert(cells.size() == dof.get_triangulation().n_active_cells(), ExcDimensionMismatch(cells.size(), - dof.get_tria().n_active_cells())); + dof.get_triangulation().n_active_cells())); types::global_dof_index n_global_dofs = dof.n_dofs(); @@ -1469,9 +1469,9 @@ namespace DoFRenumbering const unsigned int level, const typename std::vector &cells) { - Assert(cells.size() == dof.get_tria().n_cells(level), + Assert(cells.size() == dof.get_triangulation().n_cells(level), ExcDimensionMismatch(cells.size(), - dof.get_tria().n_cells(level))); + dof.get_triangulation().n_cells(level))); Assert (new_order.size() == dof.n_dofs(level), ExcDimensionMismatch(new_order.size(), dof.n_dofs(level))); Assert (reverse.size() == dof.n_dofs(level), @@ -1527,7 +1527,7 @@ namespace DoFRenumbering if (dof_wise_renumbering == false) { std::vector ordered_cells; - ordered_cells.reserve(dof.get_tria().n_active_cells()); + ordered_cells.reserve(dof.get_triangulation().n_active_cells()); const CompareDownstream comparator(direction); @@ -1635,7 +1635,7 @@ namespace DoFRenumbering if (dof_wise_renumbering == false) { std::vector ordered_cells; - ordered_cells.reserve (dof.get_tria().n_cells(level)); + ordered_cells.reserve (dof.get_triangulation().n_cells(level)); const CompareDownstream comparator(direction); @@ -1794,7 +1794,7 @@ namespace DoFRenumbering const bool counter) { std::vector ordered_cells; - ordered_cells.reserve (dof.get_tria().n_active_cells()); + ordered_cells.reserve (dof.get_triangulation().n_active_cells()); internal::ClockCells comparator(center, counter); typename DoFHandlerType::active_cell_iterator p = dof.begin_active(); @@ -1820,7 +1820,7 @@ namespace DoFRenumbering const bool counter) { std::vector ordered_cells; - ordered_cells.reserve(dof.get_tria().n_active_cells()); + ordered_cells.reserve(dof.get_triangulation().n_active_cells()); internal::ClockCells comparator(center, counter); typename DoFHandlerType::level_cell_iterator p = dof.begin(level); diff --git a/source/dofs/dof_tools.cc b/source/dofs/dof_tools.cc index 8f12f1d464..0563e73226 100644 --- a/source/dofs/dof_tools.cc +++ b/source/dofs/dof_tools.cc @@ -258,7 +258,7 @@ namespace DoFTools { const unsigned int dim = DoFHandlerType::dimension; const unsigned int spacedim = DoFHandlerType::space_dimension; - const Triangulation &tria = dof_handler.get_tria(); + const Triangulation &tria = dof_handler.get_triangulation(); (void)tria; AssertDimension (cell_data.size(), tria.n_active_cells()); @@ -522,7 +522,7 @@ namespace DoFTools const std::set &boundary_ids) { Assert ((dynamic_cast*> - (&dof_handler.get_tria()) + (&dof_handler.get_triangulation()) == 0), ExcMessage ("This function can not be used with distributed triangulations." "See the documentation for more information.")); @@ -1005,7 +1005,7 @@ namespace DoFTools const types::subdomain_id id = cell->level_subdomain_id(); // skip artificial and own cells (only look at ghost cells) - if (id == dof_handler.get_tria().locally_owned_subdomain() + if (id == dof_handler.get_triangulation().locally_owned_subdomain() || id == numbers::artificial_subdomain_id) continue; @@ -1116,7 +1116,7 @@ namespace DoFTools get_active_fe_indices (const DoFHandlerType &dof_handler, std::vector &active_fe_indices) { - AssertDimension (active_fe_indices.size(), dof_handler.get_tria().n_active_cells()); + AssertDimension (active_fe_indices.size(), dof_handler.get_triangulation().n_active_cells()); typename DoFHandlerType::active_cell_iterator cell = dof_handler.begin_active(), @@ -1133,7 +1133,7 @@ namespace DoFTools // ask is for its locally owned subdomain Assert ((dynamic_cast *> - (&dof_handler.get_tria()) == 0), + (&dof_handler.get_triangulation()) == 0), ExcMessage ("For parallel::distributed::Triangulation objects and " "associated DoF handler objects, asking for any information " "related to a subdomain other than the locally owned one does " @@ -1192,7 +1192,7 @@ namespace DoFTools // ask is for its locally owned subdomain Assert ((dynamic_cast *> - (&dof_handler.get_tria()) == 0), + (&dof_handler.get_triangulation()) == 0), ExcMessage ("For parallel::distributed::Triangulation objects and " "associated DoF handler objects, asking for any information " "related to a subdomain other than the locally owned one does " @@ -1256,7 +1256,7 @@ namespace DoFTools // ask is for its locally owned subdomain Assert ((dynamic_cast *> - (&dof_handler.get_tria()) == 0), + (&dof_handler.get_triangulation()) == 0), ExcMessage ("For parallel::distributed::Triangulation objects and " "associated DoF handler objects, asking for any subdomain other " "than the locally owned one does not make sense.")); @@ -1273,10 +1273,10 @@ namespace DoFTools // with possibly artifical cells, we need to take "true" subdomain IDs (i.e. without // artificial cells). Otherwise we are good to use subdomain_id as stored // in cell->subdomain_id(). - std::vector cell_owners (dof_handler.get_tria().n_active_cells()); + std::vector cell_owners (dof_handler.get_triangulation().n_active_cells()); if (const parallel::shared::Triangulation *tr = (dynamic_cast*> (&dof_handler.get_tria ()))) + DoFHandlerType::space_dimension>*> (&dof_handler.get_triangulation()))) { cell_owners = tr->get_true_subdomain_ids_of_cells(); Assert (tr->get_true_subdomain_ids_of_cells().size() == tr->n_active_cells(), @@ -1362,9 +1362,9 @@ namespace DoFTools // If we have a distributed::Triangulation only allow locally_owned // subdomain. Assert ( - (dof_handler.get_tria().locally_owned_subdomain() == numbers::invalid_subdomain_id) + (dof_handler.get_triangulation().locally_owned_subdomain() == numbers::invalid_subdomain_id) || - (subdomain == dof_handler.get_tria().locally_owned_subdomain()), + (subdomain == dof_handler.get_triangulation().locally_owned_subdomain()), ExcMessage ("For parallel::distributed::Triangulation objects and " "associated DoF handler objects, asking for any subdomain other " "than the locally owned one does not make sense.")); @@ -1429,8 +1429,8 @@ namespace DoFTools bool found = false; for (typename Triangulation::active_cell_iterator - cell=dof_handler.get_tria().begin_active(); - cell!=dof_handler.get_tria().end(); ++cell) + cell=dof_handler.get_triangulation().begin_active(); + cell!=dof_handler.get_triangulation().end(); ++cell) if (cell->subdomain_id() == subdomain) { found = true; @@ -1643,7 +1643,7 @@ namespace DoFTools if (const parallel::Triangulation *tria = (dynamic_cast*> - (&dof_handler.get_tria()))) + (&dof_handler.get_triangulation()))) { std::vector local_dof_count = dofs_per_component; @@ -1721,7 +1721,7 @@ namespace DoFTools // this information from all processors if (const parallel::Triangulation *tria = (dynamic_cast*> - (&dof_handler.get_tria()))) + (&dof_handler.get_triangulation()))) { std::vector local_dof_count = dofs_per_block; MPI_Allreduce ( &local_dof_count[0], &dofs_per_block[0], @@ -1904,7 +1904,7 @@ namespace DoFTools { AssertDimension(support_points.size(), dof_handler.n_dofs()); Assert ((dynamic_cast*> - (&dof_handler.get_tria()) + (&dof_handler.get_triangulation()) == 0), ExcMessage ("This function can not be used with distributed triangulations." @@ -1928,7 +1928,7 @@ namespace DoFTools { AssertDimension(support_points.size(), dof_handler.n_dofs()); Assert ((dynamic_cast*> - (&dof_handler.get_tria()) + (&dof_handler.get_triangulation()) == 0), ExcMessage ("This function can not be used with distributed triangulations." @@ -2116,8 +2116,8 @@ namespace DoFTools const bool interior_dofs_only, const bool boundary_dofs) { - Assert(level > 0 && level < dof_handler.get_tria().n_levels(), - ExcIndexRange(level, 1, dof_handler.get_tria().n_levels())); + Assert(level > 0 && level < dof_handler.get_triangulation().n_levels(), + ExcIndexRange(level, 1, dof_handler.get_triangulation().n_levels())); typename DoFHandlerType::level_cell_iterator pcell = dof_handler.begin(level-1); typename DoFHandlerType::level_cell_iterator endc = dof_handler.end(level-1); @@ -2188,16 +2188,16 @@ namespace DoFTools // Vector mapping from vertex index in the triangulation to consecutive // block indices on this level The number of cells at a vertex - std::vector vertex_cell_count(dof_handler.get_tria().n_vertices(), 0); + std::vector vertex_cell_count(dof_handler.get_triangulation().n_vertices(), 0); // Is a vertex at the boundary? - std::vector vertex_boundary(dof_handler.get_tria().n_vertices(), false); + std::vector vertex_boundary(dof_handler.get_triangulation().n_vertices(), false); - std::vector vertex_mapping(dof_handler.get_tria().n_vertices(), + std::vector vertex_mapping(dof_handler.get_triangulation().n_vertices(), numbers::invalid_unsigned_int); // Estimate for the number of dofs at this point - std::vector vertex_dof_count(dof_handler.get_tria().n_vertices(), 0); + std::vector vertex_dof_count(dof_handler.get_triangulation().n_vertices(), 0); // Identify all vertices active on this level and remember some data // about them diff --git a/source/dofs/dof_tools_constraints.cc b/source/dofs/dof_tools_constraints.cc index 7936224ff9..8531af2a56 100644 --- a/source/dofs/dof_tools_constraints.cc +++ b/source/dofs/dof_tools_constraints.cc @@ -933,7 +933,7 @@ namespace DoFTools //TODO[TL]: think about this in case of anisotropic //refinement - Assert (dof_handler.get_tria().get_anisotropic_refinement_flag() || + Assert (dof_handler.get_triangulation().get_anisotropic_refinement_flag() || ((this_face->child(0)->vertex_index(3) == this_face->child(1)->vertex_index(2)) && (this_face->child(0)->vertex_index(3) == @@ -2713,7 +2713,7 @@ namespace DoFTools { const typename dealii::parallel::Triangulation &tria = dynamic_cast&> - (coarse_to_fine_grid_map.get_destination_grid().get_tria ()); + (coarse_to_fine_grid_map.get_destination_grid().get_triangulation()); communicator = tria.get_communicator (); is_called_in_parallel = true; } @@ -2800,7 +2800,7 @@ namespace DoFTools // Try to find out whether the grids stem from the same coarse // grid. This is a rather crude test, but better than nothing - Assert (coarse_grid.get_tria().n_cells(0) == fine_grid.get_tria().n_cells(0), + Assert (coarse_grid.get_triangulation().n_cells(0) == fine_grid.get_triangulation().n_cells(0), ExcGridsDontMatch()); // check whether the map correlates the right objects diff --git a/source/dofs/dof_tools_sparsity.cc b/source/dofs/dof_tools_sparsity.cc index 58ff94eb73..733f2189cd 100644 --- a/source/dofs/dof_tools_sparsity.cc +++ b/source/dofs/dof_tools_sparsity.cc @@ -70,11 +70,11 @@ namespace DoFTools // subdomain. Not setting a subdomain is also okay, because we skip // ghost cells in the loop below. Assert ( - (dof.get_tria().locally_owned_subdomain() == numbers::invalid_subdomain_id) + (dof.get_triangulation().locally_owned_subdomain() == numbers::invalid_subdomain_id) || (subdomain_id == numbers::invalid_subdomain_id) || - (subdomain_id == dof.get_tria().locally_owned_subdomain()), + (subdomain_id == dof.get_triangulation().locally_owned_subdomain()), ExcMessage ("For parallel::distributed::Triangulation objects and " "associated DoF handler objects, asking for any subdomain other " "than the locally owned one does not make sense.")); @@ -134,11 +134,11 @@ namespace DoFTools // subdomain. Not setting a subdomain is also okay, because we skip // ghost cells in the loop below. Assert ( - (dof.get_tria().locally_owned_subdomain() == numbers::invalid_subdomain_id) + (dof.get_triangulation().locally_owned_subdomain() == numbers::invalid_subdomain_id) || (subdomain_id == numbers::invalid_subdomain_id) || - (subdomain_id == dof.get_tria().locally_owned_subdomain()), + (subdomain_id == dof.get_triangulation().locally_owned_subdomain()), ExcMessage ("For parallel::distributed::Triangulation objects and " "associated DoF handler objects, asking for any subdomain other " "than the locally owned one does not make sense.")); @@ -506,11 +506,11 @@ namespace DoFTools // subdomain. Not setting a subdomain is also okay, because we skip // ghost cells in the loop below. Assert ( - (dof.get_tria().locally_owned_subdomain() == numbers::invalid_subdomain_id) + (dof.get_triangulation().locally_owned_subdomain() == numbers::invalid_subdomain_id) || (subdomain_id == numbers::invalid_subdomain_id) || - (subdomain_id == dof.get_tria().locally_owned_subdomain()), + (subdomain_id == dof.get_triangulation().locally_owned_subdomain()), ExcMessage ("For parallel::distributed::Triangulation objects and " "associated DoF handler objects, asking for any subdomain other " "than the locally owned one does not make sense.")); @@ -1164,16 +1164,16 @@ namespace DoFTools // this function the Triangulation will be in the same state as it was // at the beginning of this function. std::vector user_flags; - dof.get_tria().save_user_flags(user_flags); + dof.get_triangulation().save_user_flags(user_flags); const_cast &> - (dof.get_tria()).clear_user_flags (); + (dof.get_triangulation()).clear_user_flags (); internal::make_flux_sparsity_pattern (dof, sparsity, int_mask, flux_mask); // finally restore the user flags const_cast &> - (dof.get_tria()).load_user_flags(user_flags); + (dof.get_triangulation()).load_user_flags(user_flags); } diff --git a/source/fe/fe_tools_interpolate.cc b/source/fe/fe_tools_interpolate.cc index 46826973c1..1a611c6521 100644 --- a/source/fe/fe_tools_interpolate.cc +++ b/source/fe/fe_tools_interpolate.cc @@ -78,7 +78,7 @@ namespace FETools const ConstraintMatrix &constraints, OutVector &u2) { - Assert(&dof1.get_tria()==&dof2.get_tria(), ExcTriangulationMismatch()); + Assert(&dof1.get_triangulation()==&dof2.get_triangulation(), ExcTriangulationMismatch()); Assert(u1.size()==dof1.n_dofs(), ExcDimensionMismatch(u1.size(), dof1.n_dofs())); @@ -137,7 +137,7 @@ namespace FETools // a cell, which this processor owns, // so we have to know the subdomain_id const types::subdomain_id subdomain_id = - dof1.get_tria().locally_owned_subdomain(); + dof1.get_triangulation().locally_owned_subdomain(); for (; cell1!=endc1; ++cell1, ++cell2) if ((cell1->subdomain_id() == subdomain_id) @@ -283,7 +283,7 @@ namespace FETools Vector u1_int_local(dofs_per_cell1); const types::subdomain_id subdomain_id = - dof1.get_tria().locally_owned_subdomain(); + dof1.get_triangulation().locally_owned_subdomain(); typename DoFHandler::active_cell_iterator cell = dof1.begin_active(), endc = dof1.end(); @@ -351,7 +351,7 @@ namespace FETools Vector u1_int_local(DoFTools::max_dofs_per_cell(dof1)); const types::subdomain_id subdomain_id = - dof1.get_tria().locally_owned_subdomain(); + dof1.get_triangulation().locally_owned_subdomain(); typename DoFHandlerType::active_cell_iterator cell = dof1.begin_active(), endc = dof1.end(); @@ -595,7 +595,7 @@ namespace FETools Vector u1_diff_local(dofs_per_cell); const types::subdomain_id subdomain_id = - dof1.get_tria().locally_owned_subdomain(); + dof1.get_triangulation().locally_owned_subdomain(); FullMatrix difference_matrix(dofs_per_cell, dofs_per_cell); get_interpolation_difference_matrix(dof1.get_fe(), fe2, @@ -701,7 +701,7 @@ namespace FETools const DoFHandler &dof2, OutVector &u2) { - Assert(&dof1.get_tria()==&dof2.get_tria(), ExcTriangulationMismatch()); + Assert(&dof1.get_triangulation()==&dof2.get_triangulation(), ExcTriangulationMismatch()); Assert(dof1.get_fe().n_components() == dof2.get_fe().n_components(), ExcDimensionMismatch(dof1.get_fe().n_components(), dof2.get_fe().n_components())); Assert(u1.size()==dof1.n_dofs(), ExcDimensionMismatch(u1.size(), dof1.n_dofs())); @@ -760,7 +760,7 @@ namespace FETools { Assert(dof1.get_fe().n_components() == dof2.get_fe().n_components(), ExcDimensionMismatch(dof1.get_fe().n_components(), dof2.get_fe().n_components())); - Assert(&dof1.get_tria()==&dof2.get_tria(), ExcTriangulationMismatch()); + Assert(&dof1.get_triangulation()==&dof2.get_triangulation(), ExcTriangulationMismatch()); Assert(u1.size()==dof1.n_dofs(), ExcDimensionMismatch(u1.size(), dof1.n_dofs())); Assert(u2.size()==dof2.n_dofs(), ExcDimensionMismatch(u2.size(), dof2.n_dofs())); @@ -784,7 +784,7 @@ namespace FETools } // then traverse grid bottom up - for (unsigned int level=0; level::cell_iterator cell=dof2.begin(level), endc=dof2.end(level); diff --git a/source/hp/dof_handler.cc b/source/hp/dof_handler.cc index 90ddd0d39e..5bc2f527d5 100644 --- a/source/hp/dof_handler.cc +++ b/source/hp/dof_handler.cc @@ -1705,7 +1705,7 @@ namespace hp typename DoFHandler::cell_iterator DoFHandler::begin(const unsigned int level) const { - return cell_iterator (*this->get_tria().begin(level), + return cell_iterator (*this->get_triangulation().begin(level), this); } @@ -1731,7 +1731,7 @@ namespace hp typename DoFHandler::cell_iterator DoFHandler::end () const { - return cell_iterator (&this->get_tria(), + return cell_iterator (&this->get_triangulation(), -1, -1, this); @@ -1742,7 +1742,7 @@ namespace hp typename DoFHandler::cell_iterator DoFHandler::end (const unsigned int level) const { - return (level == this->get_tria().n_levels()-1 ? + return (level == this->get_triangulation().n_levels()-1 ? end() : begin (level+1)); } @@ -1752,7 +1752,7 @@ namespace hp typename DoFHandler::active_cell_iterator DoFHandler::end_active (const unsigned int level) const { - return (level == this->get_tria().n_levels()-1 ? + return (level == this->get_triangulation().n_levels()-1 ? active_cell_iterator(end()) : begin_active (level+1)); } @@ -2254,8 +2254,8 @@ namespace hp // we will mark lines that we have already treated, so first save and clear // the user flags on lines and later restore them std::vector user_flags; - this->get_tria().save_user_flags_line(user_flags); - const_cast &>(this->get_tria()).clear_user_flags_line (); + this->get_triangulation().save_user_flags_line(user_flags); + const_cast &>(this->get_triangulation()).clear_user_flags_line (); // An implementation of the algorithm described in the hp paper, including // the modification mentioned later in the "complications in 3-d" subsections @@ -2433,7 +2433,7 @@ namespace hp } // finally restore the user flags - const_cast &>(this->get_tria()) + const_cast &>(this->get_triangulation()) .load_user_flags_line(user_flags); } @@ -2465,8 +2465,8 @@ namespace hp // on quads and later restore // them std::vector user_flags; - this->get_tria().save_user_flags_quad(user_flags); - const_cast &>(this->get_tria()).clear_user_flags_quad (); + this->get_triangulation().save_user_flags_quad(user_flags); + const_cast &>(this->get_triangulation()).clear_user_flags_quad (); // An implementation of the // algorithm described in the hp @@ -2558,7 +2558,7 @@ namespace hp } // finally restore the user flags - const_cast &>(this->get_tria()) + const_cast &>(this->get_triangulation()) .load_user_flags_quad(user_flags); } @@ -2720,7 +2720,7 @@ namespace hp number_cache.n_locally_owned_dofs = number_cache.n_global_dofs; if (dynamic_cast*> - (&this->get_tria()) + (&this->get_triangulation()) == 0) { number_cache.locally_owned_dofs diff --git a/source/multigrid/mg_tools.cc b/source/multigrid/mg_tools.cc index a1d9df09f3..932429d10c 100644 --- a/source/multigrid/mg_tools.cc +++ b/source/multigrid/mg_tools.cc @@ -123,7 +123,7 @@ namespace MGTools // flags. Since we restore them in // the end, this cast is safe. Triangulation &user_flags_triangulation = - const_cast&> (dofs.get_tria()); + const_cast&> (dofs.get_triangulation()); user_flags_triangulation.save_user_flags(old_flags); user_flags_triangulation.clear_user_flags(); @@ -297,7 +297,7 @@ namespace MGTools // flags. Since we restore them in // the end, this cast is safe. Triangulation &user_flags_triangulation = - const_cast&> (dofs.get_tria()); + const_cast&> (dofs.get_triangulation()); user_flags_triangulation.save_user_flags(old_flags); user_flags_triangulation.clear_user_flags(); @@ -553,8 +553,8 @@ namespace MGTools typename DoFHandlerType::cell_iterator cell = dof.begin(level), endc = dof.end(level); for (; cell!=endc; ++cell) - if (dof.get_tria().locally_owned_subdomain()==numbers::invalid_subdomain_id - || cell->level_subdomain_id()==dof.get_tria().locally_owned_subdomain()) + if (dof.get_triangulation().locally_owned_subdomain()==numbers::invalid_subdomain_id + || cell->level_subdomain_id()==dof.get_triangulation().locally_owned_subdomain()) { cell->get_mg_dof_indices (dofs_on_this_cell); // make sparsity pattern for this cell @@ -641,8 +641,8 @@ namespace MGTools SparsityPatternType &sparsity, const unsigned int level) { - Assert ((level>=1) && (level=1) && (level user_flags; - dof.get_tria().save_user_flags(user_flags); - const_cast &>(dof.get_tria()).clear_user_flags (); + dof.get_triangulation().save_user_flags(user_flags); + const_cast &>(dof.get_triangulation()).clear_user_flags (); for (; cell!=endc; ++cell) { @@ -872,7 +872,7 @@ namespace MGTools } // finally restore the user flags - const_cast &>(dof.get_tria()).load_user_flags(user_flags); + const_cast &>(dof.get_triangulation()).load_user_flags(user_flags); } @@ -888,8 +888,8 @@ namespace MGTools const unsigned int n_comp = fe.n_components(); (void)n_comp; - Assert ((level>=1) && (level=1) && (level &fe = dof_handler.get_fe(); const unsigned int n_components = fe.n_components(); - const unsigned int nlevels = dof_handler.get_tria().n_global_levels(); + const unsigned int nlevels = dof_handler.get_triangulation().n_global_levels(); Assert (result.size() == nlevels, ExcDimensionMismatch(result.size(), nlevels)); @@ -1072,7 +1072,7 @@ namespace MGTools { const FiniteElement &fe = dof_handler.get_fe(); const unsigned int n_blocks = fe.n_blocks(); - const unsigned int n_levels = dof_handler.get_tria().n_global_levels(); + const unsigned int n_levels = dof_handler.get_triangulation().n_global_levels(); AssertDimension (dofs_per_block.size(), n_levels); @@ -1186,7 +1186,7 @@ namespace MGTools if (function_map.size() == 0) return; - const unsigned int n_levels = dof.get_tria().n_global_levels(); + const unsigned int n_levels = dof.get_triangulation().n_global_levels(); (void)n_levels; @@ -1212,7 +1212,7 @@ namespace MGTools endc = dof.end(); for (; cell!=endc; ++cell) { - if (dof.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id + if (dof.get_triangulation().locally_owned_subdomain()!=numbers::invalid_subdomain_id && cell->level_subdomain_id()==numbers::artificial_subdomain_id) continue; const FiniteElement &fe = cell->get_fe(); @@ -1246,7 +1246,7 @@ namespace MGTools cell = dof.begin(), endc = dof.end(); for (; cell!=endc; ++cell) - if (dof.get_tria().locally_owned_subdomain()==numbers::invalid_subdomain_id + if (dof.get_triangulation().locally_owned_subdomain()==numbers::invalid_subdomain_id || cell->level_subdomain_id()!=numbers::artificial_subdomain_id) for (unsigned int face_no = 0; face_no < GeometryInfo::faces_per_cell; ++face_no) @@ -1395,14 +1395,14 @@ namespace MGTools std::vector &boundary_indices, const ComponentMask &component_mask) { - Assert (boundary_indices.size() == dof.get_tria().n_global_levels(), + Assert (boundary_indices.size() == dof.get_triangulation().n_global_levels(), ExcDimensionMismatch (boundary_indices.size(), - dof.get_tria().n_global_levels())); + dof.get_triangulation().n_global_levels())); std::vector > - my_boundary_indices (dof.get_tria().n_global_levels()); + my_boundary_indices (dof.get_triangulation().n_global_levels()); make_boundary_list (dof, function_map, my_boundary_indices, component_mask); - for (unsigned int i=0; i &mg_dof_handler, std::vector > &non_interface_dofs) { - Assert (non_interface_dofs.size() == mg_dof_handler.get_tria().n_global_levels(), + Assert (non_interface_dofs.size() == mg_dof_handler.get_triangulation().n_global_levels(), ExcDimensionMismatch (non_interface_dofs.size(), - mg_dof_handler.get_tria().n_global_levels())); + mg_dof_handler.get_triangulation().n_global_levels())); const FiniteElement &fe = mg_dof_handler.get_fe(); @@ -1435,8 +1435,8 @@ namespace MGTools for (; cell!=endc; ++cell) { - if (mg_dof_handler.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id - && cell->level_subdomain_id()!=mg_dof_handler.get_tria().locally_owned_subdomain()) + if (mg_dof_handler.get_triangulation().locally_owned_subdomain()!=numbers::invalid_subdomain_id + && cell->level_subdomain_id()!=mg_dof_handler.get_triangulation().locally_owned_subdomain()) continue; std::fill (cell_dofs.begin(), cell_dofs.end(), false); @@ -1485,9 +1485,9 @@ namespace MGTools extract_inner_interface_dofs (const DoFHandler &mg_dof_handler, std::vector &interface_dofs) { - Assert (interface_dofs.size() == mg_dof_handler.get_tria().n_global_levels(), + Assert (interface_dofs.size() == mg_dof_handler.get_triangulation().n_global_levels(), ExcDimensionMismatch (interface_dofs.size(), - mg_dof_handler.get_tria().n_global_levels())); + mg_dof_handler.get_triangulation().n_global_levels())); std::vector > tmp_interface_dofs(interface_dofs.size()); @@ -1508,7 +1508,7 @@ namespace MGTools { // Do not look at artificial level cells (in a serial computation we // need to ignore the level_subdomain_id() because it is never set). - if (mg_dof_handler.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id + if (mg_dof_handler.get_triangulation().locally_owned_subdomain()!=numbers::invalid_subdomain_id && cell->level_subdomain_id()==numbers::artificial_subdomain_id) continue; @@ -1526,7 +1526,7 @@ namespace MGTools neighbor = cell->neighbor(face_nr); // only process cell pairs if one or both of them are owned by me (ignore if running in serial) - if (mg_dof_handler.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id + if (mg_dof_handler.get_triangulation().locally_owned_subdomain()!=numbers::invalid_subdomain_id && neighbor->level_subdomain_id()==numbers::artificial_subdomain_id) continue; @@ -1555,7 +1555,7 @@ namespace MGTools } } - for (unsigned int l=0; l > - new_dofs(mg_dof.get_tria().n_levels(), + new_dofs(mg_dof.get_triangulation().n_levels(), std::vector(selected.size())); std::swap(ndofs, new_dofs); MGTools::count_dofs_per_block (mg_dof, ndofs); @@ -109,7 +109,7 @@ namespace if (ndofs.size() == 0) { std::vector > - new_dofs(mg_dof.get_tria().n_levels(), + new_dofs(mg_dof.get_triangulation().n_levels(), std::vector(selected.size())); std::swap(ndofs, new_dofs); MGTools::count_dofs_per_block (mg_dof, ndofs); @@ -138,7 +138,7 @@ MGTransferBlockSelect::copy_to_mg ( // first, since only one block is // selected. bool first = true; - for (unsigned int level=mg_dof_handler.get_tria().n_levels(); level != 0;) + for (unsigned int level=mg_dof_handler.get_triangulation().n_levels(); level != 0;) { --level; for (IT i= copy_indices[selected_block][level].begin(); @@ -165,7 +165,7 @@ MGTransferBlockSelect::copy_to_mg ( // multilevel block is always the // first, since only one block is selected. bool first = true; - for (unsigned int level=mg_dof_handler.get_tria().n_levels(); level != 0;) + for (unsigned int level=mg_dof_handler.get_triangulation().n_levels(); level != 0;) { --level; for (IT i= copy_indices[selected_block][level].begin(); @@ -189,7 +189,7 @@ MGTransferBlock::copy_to_mg ( { reinit_vector_by_blocks(mg_dof_handler, dst, selected, sizes); bool first = true; - for (unsigned int level=mg_dof_handler.get_tria().n_levels(); level != 0;) + for (unsigned int level=mg_dof_handler.get_triangulation().n_levels(); level != 0;) { --level; for (unsigned int block=0; block &fe = mg_dof.get_fe(); const unsigned int n_blocks = fe.n_blocks(); const unsigned int dofs_per_cell = fe.dofs_per_cell; - const unsigned int n_levels = mg_dof.get_tria().n_levels(); + const unsigned int n_levels = mg_dof.get_triangulation().n_levels(); Assert (selected.size() == n_blocks, ExcDimensionMismatch(selected.size(), n_blocks)); @@ -480,7 +480,7 @@ void MGTransferBlockSelect::build_matrices ( std::vector global_dof_indices (fe.dofs_per_cell); std::vector level_dof_indices (fe.dofs_per_cell); - for (int level=dof.get_tria().n_levels()-1; level>=0; --level) + for (int level=dof.get_triangulation().n_levels()-1; level>=0; --level) { typename DoFHandler::active_cell_iterator level_cell = mg_dof.begin_active(level); @@ -567,7 +567,7 @@ void MGTransferBlock::build_matrices ( std::vector > temp_copy_indices (n_blocks); std::vector global_dof_indices (fe.dofs_per_cell); std::vector level_dof_indices (fe.dofs_per_cell); - for (int level=dof.get_tria().n_levels()-1; level>=0; --level) + for (int level=dof.get_triangulation().n_levels()-1; level>=0; --level) { typename DoFHandler::active_cell_iterator level_cell = mg_dof.begin_active(level); diff --git a/source/multigrid/mg_transfer_component.cc b/source/multigrid/mg_transfer_component.cc index 185706e5d3..8f61f8f34a 100644 --- a/source/multigrid/mg_transfer_component.cc +++ b/source/multigrid/mg_transfer_component.cc @@ -125,7 +125,7 @@ namespace if (ndofs.size() == 0) { std::vector > - new_dofs(mg_dof.get_tria().n_levels(), + new_dofs(mg_dof.get_triangulation().n_levels(), std::vector(target_component.size())); std::swap(ndofs, new_dofs); MGTools::count_dofs_per_block (mg_dof, ndofs, target_component); @@ -194,7 +194,7 @@ namespace if (ndofs.size() == 0) { std::vector > - new_dofs(mg_dof.get_tria().n_levels(), + new_dofs(mg_dof.get_triangulation().n_levels(), std::vector(target_component.size())); std::swap(ndofs, new_dofs); MGTools::count_dofs_per_block (mg_dof, ndofs, @@ -220,7 +220,7 @@ MGTransferSelect::do_copy_to_mg ( { dst=0; - Assert(sizes.size()==mg_dof_handler.get_tria().n_levels(), + Assert(sizes.size()==mg_dof_handler.get_triangulation().n_levels(), ExcMatricesNotBuilt()); reinit_vector_by_components(mg_dof_handler, dst, @@ -239,7 +239,7 @@ MGTransferSelect::do_copy_to_mg ( // already have built. bool first = true; - for (unsigned int level=mg_dof_handler.get_tria().n_levels(); level!=0;) + for (unsigned int level=mg_dof_handler.get_triangulation().n_levels(); level!=0;) { --level; @@ -318,7 +318,7 @@ void MGTransferComponentBase::build_matrices ( const unsigned int n_components = *std::max_element(mg_target_component.begin(), mg_target_component.end()) + 1; const unsigned int dofs_per_cell = fe.dofs_per_cell; - const unsigned int n_levels = mg_dof.get_tria().n_levels(); + const unsigned int n_levels = mg_dof.get_triangulation().n_levels(); Assert (mg_component_mask.represents_n_components(fe.n_components()), ExcMessage ("Component mask has wrong size.")); @@ -506,7 +506,7 @@ void MGTransferComponentBase::build_matrices ( if (boundary_indices.size() != 0) { std::vector > - dofs_per_component(mg_dof.get_tria().n_levels(), + dofs_per_component(mg_dof.get_triangulation().n_levels(), std::vector(n_components)); MGTools::count_dofs_per_block (mg_dof, dofs_per_component, mg_target_component); @@ -612,8 +612,8 @@ void MGTransferSelect::build_matrices ( MGTransferComponentBase::build_matrices (dof, mg_dof); - interface_dofs.resize(mg_dof.get_tria().n_levels()); - for (unsigned int l=0; l::build_matrices ( std::vector temp_copy_indices; std::vector global_dof_indices (fe.dofs_per_cell); std::vector level_dof_indices (fe.dofs_per_cell); - for (int level=dof.get_tria().n_levels()-1; level>=0; --level) + for (int level=dof.get_triangulation().n_levels()-1; level>=0; --level) { copy_to_and_from_indices[level].clear(); typename DoFHandler::active_cell_iterator diff --git a/source/multigrid/mg_transfer_prebuilt.cc b/source/multigrid/mg_transfer_prebuilt.cc index 9b89e0166c..9e82e15632 100644 --- a/source/multigrid/mg_transfer_prebuilt.cc +++ b/source/multigrid/mg_transfer_prebuilt.cc @@ -115,7 +115,7 @@ template void MGTransferPrebuilt::build_matrices (const DoFHandler &mg_dof) { - const unsigned int n_levels = mg_dof.get_tria().n_global_levels(); + const unsigned int n_levels = mg_dof.get_triangulation().n_global_levels(); const unsigned int dofs_per_cell = mg_dof.get_fe().dofs_per_cell; sizes.resize(n_levels); @@ -173,8 +173,8 @@ void MGTransferPrebuilt::build_matrices for (typename DoFHandler::cell_iterator cell=mg_dof.begin(level); cell != mg_dof.end(level); ++cell) if (cell->has_children() && - ( mg_dof.get_tria().locally_owned_subdomain()==numbers::invalid_subdomain_id - || cell->level_subdomain_id()==mg_dof.get_tria().locally_owned_subdomain() + ( mg_dof.get_triangulation().locally_owned_subdomain()==numbers::invalid_subdomain_id + || cell->level_subdomain_id()==mg_dof.get_triangulation().locally_owned_subdomain() )) { cell->get_mg_dof_indices (dof_indices_parent); @@ -220,8 +220,8 @@ void MGTransferPrebuilt::build_matrices for (typename DoFHandler::cell_iterator cell=mg_dof.begin(level); cell != mg_dof.end(level); ++cell) if (cell->has_children() && - (mg_dof.get_tria().locally_owned_subdomain()==numbers::invalid_subdomain_id - || cell->level_subdomain_id()==mg_dof.get_tria().locally_owned_subdomain()) + (mg_dof.get_triangulation().locally_owned_subdomain()==numbers::invalid_subdomain_id + || cell->level_subdomain_id()==mg_dof.get_triangulation().locally_owned_subdomain()) ) { cell->get_mg_dof_indices (dof_indices_parent); @@ -301,7 +301,7 @@ MGTransferPrebuilt::fill_and_communicate_copy_indices // that will be copied into copy_indices_level_mine std::vector send_data_temp; - const unsigned int n_levels = mg_dof.get_tria().n_global_levels(); + const unsigned int n_levels = mg_dof.get_triangulation().n_global_levels(); copy_indices.resize(n_levels); copy_indices_global_mine.resize(n_levels); copy_indices_level_mine.resize(n_levels); @@ -326,7 +326,7 @@ MGTransferPrebuilt::fill_and_communicate_copy_indices for (; level_cell!=level_end; ++level_cell) { - if (mg_dof.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id + if (mg_dof.get_triangulation().locally_owned_subdomain()!=numbers::invalid_subdomain_id && (level_cell->level_subdomain_id()==numbers::artificial_subdomain_id || level_cell->subdomain_id()==numbers::artificial_subdomain_id) ) @@ -376,7 +376,7 @@ MGTransferPrebuilt::fill_and_communicate_copy_indices const dealii::parallel::distributed::Triangulation *tria = (dynamic_cast*> - (&mg_dof.get_tria())); + (&mg_dof.get_triangulation())); AssertThrow(send_data_temp.size()==0 || tria!=NULL, ExcMessage("parallel Multigrid only works with a distributed Triangulation!")); #ifdef DEAL_II_WITH_MPI diff --git a/source/numerics/data_out_dof_data.cc b/source/numerics/data_out_dof_data.cc index 5691ede97a..92a859dff4 100644 --- a/source/numerics/data_out_dof_data.cc +++ b/source/numerics/data_out_dof_data.cc @@ -861,7 +861,7 @@ attach_dof_handler (const DoFHandlerType &d) triangulation = SmartPointer > - (&d.get_tria(), typeid(*this).name()); + (&d.get_triangulation(), typeid(*this).name()); dofs = SmartPointer(&d, typeid(*this).name()); } @@ -1019,7 +1019,7 @@ add_data_vector (const VectorType &vec, Assert (vec.size() == dofs->n_dofs(), Exceptions::DataOut::ExcInvalidVectorSize (vec.size(), dofs->n_dofs(), - dofs->get_tria().n_active_cells())); + dofs->get_triangulation().n_active_cells())); internal::DataOut::DataEntryBase *new_entry = new internal::DataOut::DataEntry(dofs, &vec, &data_postprocessor); @@ -1100,9 +1100,9 @@ add_data_vector // together with its DoFHandler. if we do, we know that we have // type_dof_data, which makes things a bit simpler if (triangulation == 0) - triangulation = SmartPointer >(&dof_handler.get_tria(), typeid(*this).name()); + triangulation = SmartPointer >(&dof_handler.get_triangulation(), typeid(*this).name()); - Assert (&dof_handler.get_tria() == triangulation, + Assert (&dof_handler.get_triangulation() == triangulation, ExcMessage("The triangulation attached to the DoFHandler does not " "match with the one set previously")); diff --git a/source/numerics/data_out_stack.cc b/source/numerics/data_out_stack.cc index de75811f47..638c71cb28 100644 --- a/source/numerics/data_out_stack.cc +++ b/source/numerics/data_out_stack.cc @@ -142,7 +142,7 @@ void DataOutStack::add_data_vector (const Vectorget_tria().n_active_cells())) + (vec.size() == dof_handler->get_triangulation().n_active_cells())) { names.resize (1, name); } @@ -172,7 +172,7 @@ void DataOutStack::add_data_vector (const Vectorget_tria().n_active_cells()) && + Assert (((vec.size() == dof_handler->get_triangulation().n_active_cells()) && (names.size() == 1)) || ((vec.size() == dof_handler->n_dofs()) && @@ -205,13 +205,13 @@ void DataOutStack::add_data_vector (const Vectorn_dofs() != dof_handler->get_tria().n_active_cells()) + if (dof_handler->n_dofs() != dof_handler->get_triangulation().n_active_cells()) Assert (false, ExcVectorNotDeclared (names[0])); } // search cell data if ((vec.size() != dof_handler->n_dofs()) || - (dof_handler->n_dofs() == dof_handler->get_tria().n_active_cells())) + (dof_handler->n_dofs() == dof_handler->get_triangulation().n_active_cells())) { typename std::vector::iterator data_vector=cell_data.begin(); for (; data_vector!=cell_data.end(); ++data_vector) diff --git a/source/numerics/derivative_approximation.cc b/source/numerics/derivative_approximation.cc index 187e92bc7f..055a71e985 100644 --- a/source/numerics/derivative_approximation.cc +++ b/source/numerics/derivative_approximation.cc @@ -973,9 +973,9 @@ namespace DerivativeApproximation const unsigned int component, Vector &derivative_norm) { - Assert (derivative_norm.size() == dof_handler.get_tria().n_active_cells(), + Assert (derivative_norm.size() == dof_handler.get_triangulation().n_active_cells(), ExcVectorLengthVsNActiveCells (derivative_norm.size(), - dof_handler.get_tria().n_active_cells())); + dof_handler.get_triangulation().n_active_cells())); Assert (component < dof_handler.get_fe().n_components(), ExcIndexRange (component, 0, dof_handler.get_fe().n_components())); diff --git a/source/numerics/error_estimator_1d.cc b/source/numerics/error_estimator_1d.cc index 2fc32678f0..3c8accc129 100644 --- a/source/numerics/error_estimator_1d.cc +++ b/source/numerics/error_estimator_1d.cc @@ -221,24 +221,24 @@ estimate (const Mapping<1,spacedim> &mapping, { #ifdef DEAL_II_WITH_P4EST if (dynamic_cast*> - (&dof_handler.get_tria()) + (&dof_handler.get_triangulation()) != 0) Assert ((subdomain_id_ == numbers::invalid_subdomain_id) || (subdomain_id_ == dynamic_cast&> - (dof_handler.get_tria()).locally_owned_subdomain()), + (dof_handler.get_triangulation()).locally_owned_subdomain()), ExcMessage ("For parallel distributed triangulations, the only " "valid subdomain_id that can be passed here is the " "one that corresponds to the locally owned subdomain id.")); const types::subdomain_id subdomain_id = ((dynamic_cast*> - (&dof_handler.get_tria()) + (&dof_handler.get_triangulation()) != 0) ? dynamic_cast&> - (dof_handler.get_tria()).locally_owned_subdomain() + (dof_handler.get_triangulation()).locally_owned_subdomain() : subdomain_id_); #else @@ -295,7 +295,7 @@ estimate (const Mapping<1,spacedim> &mapping, // reserve one slot for each cell and set it to zero for (unsigned int n=0; n::PointValueHistory (const DoFHandler &dof_handler, = std::vector > (n_indep, std::vector (0)); indep_names = std::vector (); - tria_listener = dof_handler.get_tria().signals.any_change.connect (std_cxx11::bind (&PointValueHistory::tria_change_listener, + tria_listener = dof_handler.get_triangulation().signals.any_change.connect (std_cxx11::bind (&PointValueHistory::tria_change_listener, std_cxx11::ref(*this))); } @@ -123,7 +123,7 @@ PointValueHistory::PointValueHistory (const PointValueHistory &point_value_ // Presume subscribe new instance? if (have_dof_handler) { - tria_listener = dof_handler->get_tria().signals.any_change.connect (std_cxx11::bind (&PointValueHistory::tria_change_listener, + tria_listener = dof_handler->get_triangulation().signals.any_change.connect (std_cxx11::bind (&PointValueHistory::tria_change_listener, std_cxx11::ref(*this))); } } @@ -155,7 +155,7 @@ PointValueHistory::operator= (const PointValueHistory &point_value_history) // Presume subscribe new instance? if (have_dof_handler) { - tria_listener = dof_handler->get_tria().signals.any_change.connect (std_cxx11::bind (&PointValueHistory::tria_change_listener, + tria_listener = dof_handler->get_triangulation().signals.any_change.connect (std_cxx11::bind (&PointValueHistory::tria_change_listener, std_cxx11::ref(*this))); } diff --git a/source/numerics/solution_transfer.cc b/source/numerics/solution_transfer.cc index 8c4630204c..1419ce7a31 100644 --- a/source/numerics/solution_transfer.cc +++ b/source/numerics/solution_transfer.cc @@ -73,7 +73,7 @@ void SolutionTransfer::prepare_for_pure_refinem clear(); - const unsigned int n_active_cells = dof_handler->get_tria().n_active_cells(); + const unsigned int n_active_cells = dof_handler->get_triangulation().n_active_cells(); n_dofs_old=dof_handler->n_dofs(); // efficient reallocation of indices_on_cell @@ -243,7 +243,7 @@ prepare_for_coarsening_and_refinement(const std::vector &all_in) clear(); - const unsigned int n_active_cells = dof_handler->get_tria().n_active_cells(); + const unsigned int n_active_cells = dof_handler->get_triangulation().n_active_cells(); (void)n_active_cells; n_dofs_old = dof_handler->n_dofs();