From ff180072dbba81f8aece22d6c1488d736cb128cc Mon Sep 17 00:00:00 2001 From: bangerth Date: Mon, 6 Dec 2010 00:26:45 +0000 Subject: [PATCH] Neighborship information is unreliable in the codim-1 case for 1d meshes. Avoid using it. git-svn-id: https://svn.dealii.org/trunk@22921 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/dofs/dof_handler_policy.cc | 55 ++++++++--------------- 1 file changed, 19 insertions(+), 36 deletions(-) diff --git a/deal.II/source/dofs/dof_handler_policy.cc b/deal.II/source/dofs/dof_handler_policy.cc index 5e56150a94..8f2e46db9a 100644 --- a/deal.II/source/dofs/dof_handler_policy.cc +++ b/deal.II/source/dofs/dof_handler_policy.cc @@ -65,43 +65,26 @@ namespace internal { // distribute dofs of vertices - for (unsigned int v=0; v::vertices_per_cell; ++v) - { - typename DoFHandler<1,spacedim>::cell_iterator - neighbor = cell->neighbor(v); - - if (neighbor.state() == IteratorState::valid) - { - // find true neighbor; may be its - // a child of @p{neighbor} - while (neighbor->has_children()) - neighbor = neighbor->child(v==0 ? 1 : 0); - - // has neighbor already been processed? - if (neighbor->user_flag_set()) - // copy dofs + if (dof_handler.get_fe().dofs_per_vertex > 0) + for (unsigned int v=0; v::vertices_per_cell; ++v) + { + if (cell->vertex_dof_index (v,0) == + DoFHandler<1,spacedim>::invalid_dof_index) + for (unsigned int d=0; + dset_vertex_dof_index (0, d, - neighbor->vertex_dof_index (1, d)); - else - for (unsigned int d=0; - dset_vertex_dof_index (1, d, - neighbor->vertex_dof_index (0, d)); - - // next neighbor - continue; + Assert ((cell->vertex_dof_index (v,d) == + DoFHandler<1,spacedim>::invalid_dof_index), + ExcInternalError()); + cell->set_vertex_dof_index (v, d, next_free_dof++); } - } - - // otherwise: create dofs newly - for (unsigned int d=0; - dset_vertex_dof_index (v, d, next_free_dof++); - } + else + for (unsigned int d=0; + dvertex_dof_index (v,d) != + DoFHandler<1,spacedim>::invalid_dof_index), + ExcInternalError()); + } // dofs of line for (unsigned int d=0; @@ -1558,7 +1541,7 @@ namespace internal &number_cache .n_locally_owned_dofs_per_processor[n_cpus], 0 ); - + tr->load_user_flags(user_flags); } #endif -- 2.39.5