From 4b520247503f37e3c3c535b5ec9065565d3200fd Mon Sep 17 00:00:00 2001 From: kayser-herold Date: Thu, 27 Jul 2006 19:38:05 +0000 Subject: [PATCH] Implement line dof identities git-svn-id: https://svn.dealii.org/trunk@13457 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/dofs/hp_dof_handler.cc | 72 ++++++++++++++++--- 1 file changed, 63 insertions(+), 9 deletions(-) diff --git a/deal.II/deal.II/source/dofs/hp_dof_handler.cc b/deal.II/deal.II/source/dofs/hp_dof_handler.cc index ffc74f793c..8198c0d3cd 100644 --- a/deal.II/deal.II/source/dofs/hp_dof_handler.cc +++ b/deal.II/deal.II/source/dofs/hp_dof_handler.cc @@ -2130,13 +2130,12 @@ namespace hp // value std::vector new_dof_indices (used_dofs, deal_II_numbers::invalid_unsigned_int); + typedef + std::vector > DoFIdentities; // Step 2a: do so for vertices { - typedef - std::vector > Identities; - - Table<2,boost::shared_ptr > + Table<2,boost::shared_ptr > vertex_dof_identities (finite_elements->size(), finite_elements->size()); @@ -2170,10 +2169,10 @@ namespace hp if (vertex_dof_identities[first_fe_index][other_fe_index] == 0) vertex_dof_identities[first_fe_index][other_fe_index] = - boost::shared_ptr - (new Identities((*finite_elements)[first_fe_index] - .hp_vertex_dof_identities - ((*finite_elements)[other_fe_index]))); + boost::shared_ptr + (new DoFIdentities((*finite_elements)[first_fe_index] + .hp_vertex_dof_identities + ((*finite_elements)[other_fe_index]))); // then loop // through the @@ -2199,7 +2198,7 @@ namespace hp // lower, to avoid // circular // reasoning. - Identities &identities + DoFIdentities &identities = *vertex_dof_identities[first_fe_index][other_fe_index]; for (unsigned int i=0; i 1) + { + Table<2,boost::shared_ptr > + line_dof_identities (finite_elements->size(), + finite_elements->size()); + + for (line_iterator line=begin_line(); line!=end_line(); ++line) + if (line->n_active_fe_indices() > 1) + { + const unsigned int n_active_fe_indices + = line->n_active_fe_indices (); + const unsigned int + first_fe_index = line->nth_active_fe_index (0); + + for (unsigned int f=1; fnth_active_fe_index (f); + + if (line_dof_identities[first_fe_index][other_fe_index] == 0) + line_dof_identities[first_fe_index][other_fe_index] + = + boost::shared_ptr + (new DoFIdentities((*finite_elements)[first_fe_index] + .hp_line_dof_identities + ((*finite_elements)[other_fe_index]))); + + DoFIdentities &identities + = *line_dof_identities[first_fe_index][other_fe_index]; + for (unsigned int i=0; idof_index (identities[i].first, first_fe_index); + const unsigned int higher_dof_index + = line->dof_index (identities[i].second, other_fe_index); + + Assert ((new_dof_indices[higher_dof_index] == + deal_II_numbers::invalid_unsigned_int) + || + (new_dof_indices[higher_dof_index] == + lower_dof_index), + ExcInternalError()); + + new_dof_indices[higher_dof_index] = lower_dof_index; + } + } + } + } // finally restore the user flags -- 2.39.5