From: kayser-herold Date: Thu, 27 Jul 2006 19:36:22 +0000 (+0000) Subject: Implement line dof identities X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73d697fe4a5064779cf8db260d78ce1927d6d8e8;p=dealii-svn.git Implement line dof identities git-svn-id: https://svn.dealii.org/trunk@13454 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/fe_q.cc b/deal.II/deal.II/source/fe/fe_q.cc index d25befe7a4..62e1dedaa5 100644 --- a/deal.II/deal.II/source/fe/fe_q.cc +++ b/deal.II/deal.II/source/fe/fe_q.cc @@ -20,7 +20,6 @@ #include - // namespace for some functions that are used in this file. they are // specific to numbering conventions used for the FE_Q element, and // are thus not very interesting to the outside world. we'd like to @@ -513,10 +512,46 @@ hp_vertex_dof_identities (const FiniteElement &fe_other) const template std::vector > FE_Q:: -hp_line_dof_identities (const FiniteElement &/*fe_other*/) const +hp_line_dof_identities (const FiniteElement &fe_other) const { - Assert (false, ExcNotImplemented()); - return std::vector > (); + // we can presently only compute + // these identities if both FEs are + // FE_Qs. in that case, there + // should be exactly one single DoF + // of each FE at a vertex, and they + // should have identical value + const FE_Q *fe_q_other = dynamic_cast*>(&fe_other); + if (fe_q_other != 0) + { + // dofs are located along + // lines, so two dofs are + // identical if they are + // located at identical + // positions. note that for + // elements of orders p and q, + // nodes are located on edges + // at locations (i+1)/p and + // (j+1)/q, so we need to find + // those combinations i,j for + // which (i+1)/p == (j+1)/q, + // i.e. (i+1)*q == (j+1)*p + const unsigned int p = this->degree; + const unsigned int q = fe_q_other->degree; + + std::vector > identities; + + for (unsigned int i=0; i > (); + } }