From: guido Date: Thu, 4 Mar 1999 16:29:17 +0000 (+0000) Subject: base elements also in FiniteElement<> X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1de2afba998fe8d96f9d531a38658871f090b5d;p=dealii-svn.git base elements also in FiniteElement<> git-svn-id: https://svn.dealii.org/trunk@949 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 188b11f66a..bc8c05745a 100644 --- a/deal.II/deal.II/include/fe/fe.h +++ b/deal.II/deal.II/include/fe/fe.h @@ -98,8 +98,7 @@ class FiniteElementData * Default constructor. Constructs an element * which is not so useful. Checking * #total_dofs# is therefore a good way to - * check if something went wrong. - */ + * check if something went wrong. */ FiniteElementData (); /** @@ -732,7 +731,8 @@ class FiniteElementBase : * @author Wolfgang Bangerth, 1998 */ template -class FiniteElement : public FiniteElementBase { +class FiniteElement : public FiniteElementBase +{ public: /** * Constructor @@ -1316,6 +1316,25 @@ class FiniteElement : public FiniteElementBase { const Boundary &boundary, FullMatrix &local_mass_matrix) const =0; + /** + * Number of base elements in a mixed + * discretization. This function returns + * 1 for simple elements. + */ + virtual unsigned int n_base_elements() const; + + /** + * Access to base element + * objects. By default, + * #base_element(0)# is #this#. + * This function is overloaded by + * system elements to allow + * access to the different + * components of mixed + * discretizations. + */ + virtual const FiniteElement& base_element(unsigned index) const; + /** * Exception */ @@ -1338,7 +1357,7 @@ class FiniteElement : public FiniteElementBase { DeclException1 (ExcComputationNotUseful, int, << "The computation you required from this function is not " - << "feasable or not probable in the present dimension (" + << "feasible or not probable in the present dimension (" << arg1 << ") because it would be prohibitively expensive."); }; diff --git a/deal.II/deal.II/include/fe/fe_system.h b/deal.II/deal.II/include/fe/fe_system.h index 1dca911bb1..19e51b3aaa 100644 --- a/deal.II/deal.II/include/fe/fe_system.h +++ b/deal.II/deal.II/include/fe/fe_system.h @@ -68,7 +68,8 @@ * @author Wolfgang Bangerth, Guido Kanschat, 1999 */ template -class FESystem : public FiniteElement +class FESystem // + : public FiniteElement { /** * Copy constructor prohibited. @@ -346,7 +347,7 @@ class FESystem : public FiniteElement * of finite elements composed * into this structure. */ - unsigned n_base_elements() const; + virtual unsigned n_base_elements() const; /** * How often is a composing element used. @@ -369,7 +370,7 @@ class FESystem : public FiniteElement * by index. * */ - const FiniteElement& base_element(unsigned index) const; + virtual const FiniteElement& base_element(unsigned index) const; private: