From: wolf Date: Mon, 16 Sep 2002 13:28:47 +0000 (+0000) Subject: Fix some of the last things. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edc13e4f6f0b01bdbbd7246d460421ca750ec925;p=dealii-svn.git Fix some of the last things. git-svn-id: https://svn.dealii.org/trunk@6427 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/fe/fe_nedelec.h b/deal.II/deal.II/include/fe/fe_nedelec.h index a637ae39a9..f31e88b0d8 100644 --- a/deal.II/deal.II/include/fe/fe_nedelec.h +++ b/deal.II/deal.II/include/fe/fe_nedelec.h @@ -30,6 +30,10 @@ template class MappingQ; * element. * * + * @sect3{Restriction on transformations} + * + * @sect3{Prolongation and restriction matrices} + * * @sect3{Numbering of the degrees of freedom (DoFs)} * * Nedelec elements have their degrees of freedom on edges, with shape @@ -80,7 +84,7 @@ template class MappingQ; * implemented there. * * - * @author Anna Schneebeli, Wolfgang Bangerth, 2002 + * @author Wolfgang Bangerth, Anna Schneebeli, 2002 */ template class FE_Nedelec : public FiniteElement diff --git a/deal.II/deal.II/source/fe/fe_nedelec.cc b/deal.II/deal.II/source/fe/fe_nedelec.cc index 1d9cf5cfc4..cb82c10661 100644 --- a/deal.II/deal.II/source/fe/fe_nedelec.cc +++ b/deal.II/deal.II/source/fe/fe_nedelec.cc @@ -29,8 +29,7 @@ FE_Nedelec::FE_Nedelec (const unsigned int degree) : FiniteElement (FiniteElementData(get_dpo_vector(degree), dim), -//TODO: I'd think this element is actually additive in the restriction - std::vector (dim,false), + std::vector (FiniteElementData(get_dpo_vector(degree),dim).dofs_per_cell,false), std::vector >(FiniteElementData(get_dpo_vector(degree),dim).dofs_per_cell, std::vector(dim,true))), degree(degree) @@ -86,24 +85,72 @@ FE_Nedelec::FE_Nedelec (const unsigned int degree) { case 1: { -//TODO: check! - // DoF on bottom line - // of coarse cell will - // be mean value of - // bottom DoFs on the - // two adjacent child - // cells - this->restriction[0](0,0) = 0.5; - this->restriction[1](0,0) = 0.5; - // same for other DoFs - this->restriction[1](1,1) = 0.5; - this->restriction[2](1,1) = 0.5; - - this->restriction[2](2,2) = 0.5; - this->restriction[3](2,2) = 0.5; - - this->restriction[3](3,3) = 0.5; - this->restriction[0](3,3) = 0.5; + // this is a strange + // element, since it is + // both additive and + // then it is also + // not. ideally, we + // would like to have + // the value of the + // shape function on + // the coarse line to + // be the mean value of + // that on the two + // child ones. thus, + // one should make it + // additive. however, + // additivity only + // works if an element + // does not have any + // continuity + // requirements, since + // otherwise degrees of + // freedom are shared + // between adjacent + // elements, and when + // we make the element + // additive, that would + // mean that we end up + // adding up + // contributions not + // only from the child + // cells of this cell, + // but also from the + // child cells of the + // neighbor, and since + // we cannot know + // whether there even + // exists a neighbor we + // cannot simply make + // the element + // additive. + // + // so, until someone + // comes along with a + // better alternative, + // we do the following: + // make the element + // non-additive, and + // simply pick the + // value of one of the + // child lines for the + // value of the mother + // line (note that we + // have to multiply by + // two, since the shape + // functions scale with + // the inverse + // Jacobian). we thus + // throw away the + // information of one + // of the child lines, + // but there seems to + // be no other way than + // that... + this->restriction[0](0,0) = 2.; + this->restriction[1](1,1) = 2.; + this->restriction[3](2,2) = 2.; + this->restriction[0](3,3) = 2.; break; }; @@ -138,42 +185,14 @@ FE_Nedelec::FE_Nedelec (const unsigned int degree) { // same principle as in // 2d - this->restriction[0](0,0) = 0.5; - this->restriction[1](0,0) = 0.5; - - this->restriction[1](1,1) = 0.5; - this->restriction[2](1,1) = 0.5; - - this->restriction[2](2,2) = 0.5; - this->restriction[3](2,2) = 0.5; - - this->restriction[3](3,3) = 0.5; - this->restriction[0](3,3) = 0.5; - - this->restriction[4](4,4) = 0.5; - this->restriction[5](4,4) = 0.5; - - this->restriction[5](5,5) = 0.5; - this->restriction[6](5,5) = 0.5; - - this->restriction[6](6,6) = 0.5; - this->restriction[7](6,6) = 0.5; - - this->restriction[7](7,7) = 0.5; - this->restriction[4](7,7) = 0.5; - - - this->restriction[1](8,8) = 0.5; - this->restriction[5](8,8) = 0.5; - - this->restriction[2](9,9) = 0.5; - this->restriction[6](9,9) = 0.5; - - this->restriction[3](10,10) = 0.5; - this->restriction[7](10,10) = 0.5; - - this->restriction[0](11,11) = 0.5; - this->restriction[5](11,11) = 0.5; + this->restriction[0](0,0) = 2.; + this->restriction[1](1,1) = 2.; + this->restriction[2](2,2) = 2.; + this->restriction[3](3,3) = 2.; + this->restriction[4](4,4) = 2.; + this->restriction[5](5,5) = 2.; + this->restriction[6](6,6) = 2.; + this->restriction[7](7,7) = 2.; break; };