From: kayser-herold Date: Fri, 28 Jul 2006 16:46:00 +0000 (+0000) Subject: Added a method "hp_constraints_are_implemented" which returns a flag X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1835a75021ef2c8c4fd85ef9224050ec4d3f9532;p=dealii-svn.git Added a method "hp_constraints_are_implemented" which returns a flag indicating wheter the FiniteElement already supports the new style of hanging node matrices. git-svn-id: https://svn.dealii.org/trunk@13472 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/fe/fe.h b/deal.II/deal.II/include/fe/fe.h index 37aaef223e..86bd91386a 100644 --- a/deal.II/deal.II/include/fe/fe.h +++ b/deal.II/deal.II/include/fe/fe.h @@ -874,6 +874,47 @@ class FiniteElement : public Subscriptor, */ bool constraints_are_implemented () const; + + /** + * Return whether this element + * implements its hanging node + * constraints in the new way, + * which has to be used to make + * elements "hp compatible". + * That means, the element properly + * implements the + * get_face_interpolation_matrix + * and get_subface_interpolation_matrix + * methods. Therefore the return + * value also indicates whether a call + * to the @p get_face_interpolation_matrix + * method and the @p get_subface_interpolation_matrix + * method will generate an error or not. + * + * Currently the main purpose + * of this function is to + * allow the make_hanging_node_constraints + * method to decide wheter the + * new procedures, which are supposed + * to work in the hp framework + * can be used, or if the old + * well verified but not hp capable + * functions should be used. + * Once, the transition to the new + * scheme for computing the + * interface constraints is completed, + * this function will probably mostly + * superfluous. + * + * Derived classes should implement + * this function accordingly. The + * default assumption is that a + * finite element does not provide + * hp capable face interpolation. + */ + virtual bool hp_constraints_are_implemented () const; + + /** * Return the matrix * interpolating from the given @@ -929,7 +970,6 @@ class FiniteElement : public Subscriptor, virtual void get_face_interpolation_matrix (const FiniteElement &source, FullMatrix &matrix) const; - //@} /** diff --git a/deal.II/deal.II/include/fe/fe_q.h b/deal.II/deal.II/include/fe/fe_q.h index a3e6915032..92b0873fad 100644 --- a/deal.II/deal.II/include/fe/fe_q.h +++ b/deal.II/deal.II/include/fe/fe_q.h @@ -327,8 +327,24 @@ class FE_Q : public FE_Poly,dim> const unsigned int subface, FullMatrix &matrix) const; //@} + + /** + * Return whether this element + * implements its hanging node + * constraints in the new way, + * which has to be used to make + * elements "hp compatible". + * + * For the FE_Q class the + * result is always true, as + * it implements the complete + * set of functions necessary + * for hp capability. + */ + virtual bool hp_constraints_are_implemented () const; + /** * Check for non-zero values on a face. * diff --git a/deal.II/deal.II/source/fe/fe.cc b/deal.II/deal.II/source/fe/fe.cc index dcc9cc824b..fc87a263c1 100644 --- a/deal.II/deal.II/source/fe/fe.cc +++ b/deal.II/deal.II/source/fe/fe.cc @@ -383,6 +383,15 @@ FiniteElement::constraints_are_implemented () const +template +bool +FiniteElement::hp_constraints_are_implemented () const +{ + return (this->dofs_per_face == 0); +} + + + template const FullMatrix & FiniteElement::constraints () const diff --git a/deal.II/deal.II/source/fe/fe_q.cc b/deal.II/deal.II/source/fe/fe_q.cc index fb7606b83b..34bfa21f0d 100644 --- a/deal.II/deal.II/source/fe/fe_q.cc +++ b/deal.II/deal.II/source/fe/fe_q.cc @@ -528,6 +528,15 @@ get_subface_interpolation_matrix (const FiniteElement &x_source_fe, #endif + +template +bool +FE_Q::hp_constraints_are_implemented () const +{ + return true; +} + + template std::vector > FE_Q::