]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
replace two unnecessarily virtual functions by inline
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 15 Aug 2011 12:19:02 +0000 (12:19 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 15 Aug 2011 12:19:02 +0000 (12:19 +0000)
provide standard implementation for base_element() such that only FESystem reimplements it

git-svn-id: https://svn.dealii.org/trunk@24072 0785d39b-7218-0410-832d-ea1e28bc413d

18 files changed:
deal.II/include/deal.II/fe/fe.h
deal.II/include/deal.II/fe/fe_abf.h
deal.II/include/deal.II/fe/fe_base.h
deal.II/include/deal.II/fe/fe_dgp_nonparametric.h
deal.II/include/deal.II/fe/fe_nothing.h
deal.II/include/deal.II/fe/fe_poly.h
deal.II/include/deal.II/fe/fe_poly.templates.h
deal.II/include/deal.II/fe/fe_poly_face.h
deal.II/include/deal.II/fe/fe_poly_face.templates.h
deal.II/include/deal.II/fe/fe_poly_tensor.h
deal.II/include/deal.II/fe/fe_system.h
deal.II/source/fe/fe.cc
deal.II/source/fe/fe_abf.cc
deal.II/source/fe/fe_data.cc
deal.II/source/fe/fe_dgp_nonparametric.cc
deal.II/source/fe/fe_nothing.cc
deal.II/source/fe/fe_poly_tensor.cc
deal.II/source/fe/fe_system.cc

index 813609cb2d7ee484ee51d65a3408bb876ef725b2..8312954bc2260132d99f9a8e833413dfc671cfa3 100644 (file)
@@ -1,7 +1,7 @@
 //---------------------------------------------------------------------------
 //    $Id$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -1421,32 +1421,31 @@ class FiniteElement : public Subscriptor,
                                      * element is equal to the
                                      * multiplicity.
                                      */
-    virtual unsigned int n_base_elements () const = 0;
+    unsigned int n_base_elements () const;
 
                                     /**
                                      * Access to base element
                                      * objects. If the element is
-                                     * scalar, then
+                                     * atomic, then
                                      * <code>base_element(0)</code> is
                                      * @p this.
                                      */
     virtual
     const FiniteElement<dim,spacedim> &
-    base_element (const unsigned int index) const = 0;
+    base_element (const unsigned int index) const;
 
                                      /**
                                       * This index denotes how often
                                       * the base element @p index is
                                       * used in a composed element. If
-                                      * the element is scalar, then
+                                      * the element is atomic, then
                                       * the result is always equal to
                                       * one. See the documentation for
                                       * the n_base_elements()
                                       * function for more details.
                                       */
-    virtual
     unsigned int
-    element_multiplicity (const unsigned int index) const = 0;
+    element_multiplicity (const unsigned int index) const;
     
                                      /**
                                       * Return for shape function
@@ -2344,10 +2343,11 @@ class FiniteElement : public Subscriptor,
 
                                     /**
                                      * For each base element, store
-                                     * the first block in a block
+                                     * the number of blocks generated
+                                     * by the base and the first block in a block
                                      * vector it will generate.
                                      */
-    std::vector<unsigned int> first_block_of_base_table;
+    BlockIndices base_to_block_indices;
     
                                     /**
                                      * The base element establishing
@@ -2648,6 +2648,26 @@ FiniteElement<dim,spacedim>::system_to_component_index (const unsigned int index
 
 
 
+template <int dim, int spacedim>  
+inline
+unsigned int
+FiniteElement<dim,spacedim>::n_base_elements () const
+{
+  return base_to_block_indices.size();
+}
+
+
+
+template <int dim, int spacedim>
+inline
+unsigned int
+FiniteElement<dim,spacedim>::element_multiplicity (const unsigned int index) const
+{
+  return base_to_block_indices.block_size(index);
+}
+
+
+
 template <int dim, int spacedim>  
 inline
 unsigned int
@@ -2723,10 +2743,7 @@ inline
 unsigned int
 FiniteElement<dim,spacedim>::first_block_of_base (const unsigned int index) const
 {
-  Assert(index < first_block_of_base_table.size(),
-        ExcIndexRange(index, 0, first_block_of_base_table.size()));
-
-  return first_block_of_base_table[index];
+  return base_to_block_indices.block_start(index);
 }
 
 
@@ -2749,15 +2766,7 @@ inline
 std::pair<unsigned int,unsigned int>
 FiniteElement<dim,spacedim>::block_to_base_index (const unsigned int index) const
 {
-  Assert(index < this->n_blocks(),
-        ExcIndexRange(index, 0, this->n_blocks()));
-  
-  for (int i=first_block_of_base_table.size()-1; i>=0; --i)
-    if (first_block_of_base_table[i] <= index)
-      return std::pair<unsigned int, unsigned int>(static_cast<unsigned int> (i),
-                                                  index - first_block_of_base_table[i]);
-  return std::make_pair(numbers::invalid_unsigned_int,
-                       numbers::invalid_unsigned_int);
+  return base_to_block_indices.global_to_local(index);
 }
 
 
index 90a58ee9332cac5247ffe6497bc9d61a5e909070..46a4e73af01e18b97e95cc3aa6a03ab8b177da00 100644 (file)
@@ -1,7 +1,7 @@
 //---------------------------------------------------------------------------
 //    $Id$
 //
-//    Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010 by the deal.II authors
+//    Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010, 2011 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -113,35 +113,6 @@ class FE_ABF : public FE_PolyTensor<PolynomialsABF<dim>, dim>
                                      * values.
                                      */
     virtual std::string get_name () const;
-
-
-                                    /**
-                                     * Number of base elements in a
-                                     * mixed discretization. Here,
-                                     * this is of course equal to
-                                     * one.
-                                     */
-    virtual unsigned int n_base_elements () const;
-    
-                                    /**
-                                     * Access to base element
-                                     * objects. Since this element is
-                                     * atomic, <tt>base_element(0)</tt> is
-                                     * @p this, and all other
-                                     * indices throw an error.
-                                     */
-    virtual const FiniteElement<dim> &
-    base_element (const unsigned int index) const;
-
-                                     /**
-                                      * Multiplicity of base element
-                                      * @p index. Since this is an
-                                      * atomic element,
-                                      * <tt>element_multiplicity(0)</tt>
-                                      * returns one, and all other
-                                      * indices will throw an error.
-                                      */
-    virtual unsigned int element_multiplicity (const unsigned int index) const;
     
                                     /**
                                      * Check whether a shape function
index aa0b4e45669ddc5ec4f54f809b7df0080939e9db..4d63b986eb7b1caed5a5341042b1dee90fde059e 100644 (file)
@@ -392,19 +392,7 @@ class FiniteElementData
                                      * base element.
                                      */
     const unsigned int components;
-                                    /**
-                                     * The number of vector blocks a
-                                     * BlockVector for this element
-                                     * should contain. For primitive
-                                     * elements, this is equal to
-                                     * #components, but for vector
-                                     * valued base elements it may
-                                     * differ. Actually, in systems
-                                     * this is the sum of the base
-                                     * element multiplicities.
-                                     */
-    const unsigned int blocks;
-
+    
                                     /**
                                      * Maximal polynomial degree of a
                                      * shape function in a single
@@ -417,6 +405,17 @@ class FiniteElementData
                                      */
     const Conformity conforming_space;
 
+                                    /**
+                                     * Storage for an object
+                                     * describing the sizes of each
+                                     * block of a compound
+                                     * element. For an element which
+                                     * is not an FESystem, this
+                                     * contains only a single block
+                                     * with length #dofs_per_cell.
+                                     */
+    BlockIndices block_indices_data;
+    
                                     /**
                                      * Default
                                      * constructor. Constructs an
@@ -449,8 +448,7 @@ class FiniteElementData
                                      * @param conformity The finite
                                      * element space has continuity
                                      * of this Sobolev space.
-                                     * @param n_blocks Number of
-                                     * vector blocks.
+                                     * @param n_blocks obsolete and ignored.
                                      */
     FiniteElementData (const std::vector<unsigned int> &dofs_per_object,
                       const unsigned int n_components,
@@ -529,6 +527,11 @@ class FiniteElementData
                                      */
     unsigned int n_blocks () const;
 
+                                    /**
+                                     * Detailed infromation on block sizes.
+                                     */
+    const BlockIndices& block_indices() const;
+    
                                     /**
                                      * Return whether the entire
                                      * finite element is primitive,
@@ -830,12 +833,22 @@ FiniteElementData<dim>::set_primitivity (const bool value)
 }
 
 
+template <int dim>
+inline
+const BlockIndices&
+FiniteElementData<dim>::block_indices () const
+{
+  return block_indices_data;
+}
+
+
+
 template <int dim>
 inline
 unsigned int
 FiniteElementData<dim>::n_blocks () const
 {
-  return blocks;
+  return block_indices_data.size();
 }
 
 
index 3fc60d425b022d29ef495cc2c679d52753e3901f..5047392fafce345018f988d82de6c4b94eebbb74 100644 (file)
@@ -1,7 +1,7 @@
 //---------------------------------------------------------------------------
 //    $Id$
 //
-//    Copyright (C) 2002, 2003, 2004, 2005, 2006, 2010 by the deal.II authors
+//    Copyright (C) 2002, 2003, 2004, 2005, 2006, 2010, 2011 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -180,34 +180,6 @@ class FE_DGPNonparametric : public FiniteElement<dim,spacedim>
                                      * constructor.
                                      */
     unsigned int get_degree () const;
-
-                                    /**
-                                     * Number of base elements in a
-                                     * mixed discretization. Since
-                                     * this is a scalar element,
-                                     * return one.
-                                     */
-    virtual unsigned int n_base_elements () const;
-    
-                                    /**
-                                     * Access to base element
-                                     * objects. Since this element is
-                                     * scalar, <tt>base_element(0)</tt> is
-                                     * @p this, and all other
-                                     * indices throw an error.
-                                     */
-    virtual const FiniteElement<dim,spacedim> &
-    base_element (const unsigned int index) const;
-
-                                     /**
-                                      * Multiplicity of base element
-                                      * @p index. Since this is a
-                                      * scalar element,
-                                      * <tt>element_multiplicity(0)</tt>
-                                      * returns one, and all other
-                                      * indices will throw an error.
-                                      */
-    virtual unsigned int element_multiplicity (const unsigned int index) const;
     
                                     /**
                                      * Return the matrix
index f34d8ec7c7aee156dab4c46e1262af6e0f87352b..39ebbd2aa8086bbaa59434dbc1fcfc6dce7a599f 100644 (file)
@@ -105,41 +105,7 @@ class FE_Nothing : public FiniteElement<dim>
     virtual
     std::string
     get_name() const;
-
-                                     /**
-                                      * Number of base elements in a
-                                      * mixed discretization. In this case
-                                      * we only have one.
-                                      */
-    virtual
-    unsigned int
-    n_base_elements () const;
     
-                                     /**
-                                      * Access to base element
-                                      * objects. Since the element is
-                                      * scalar, then
-                                      * <code>base_element(0)</code> is
-                                      * @p this.
-                                      */
-    virtual
-    const FiniteElement<dim> &
-    base_element (const unsigned int index) const;
-
-                                     /**
-                                      * This index denotes how often
-                                      * the base element @p index is
-                                      * used in a composed element. If
-                                      * the element is scalar, then
-                                      * the result is always equal to
-                                      * one. See the documentation for
-                                      * the n_base_elements()
-                                      * function for more details.
-                                      */
-    virtual
-    unsigned int
-    element_multiplicity (const unsigned int index) const;
-
                                      /**
                                       * Determine the values a finite
                                       * element should compute on
index 5baf05488b205d9128ecfe3748edc70562f40557..b5a44dce4a8a7314a8c4fbf06f6ac2c07576e343 100644 (file)
@@ -1,7 +1,7 @@
 //---------------------------------------------------------------------------
 //    $Id$
 //
-//    Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 by the deal.II authors
+//    Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -177,38 +177,7 @@ class FE_Poly : public FiniteElement<dim,spacedim>
                                      */
     virtual Tensor<2,dim> shape_grad_grad_component (const unsigned int i,
                                                     const Point<dim> &p,
-                                                    const unsigned int component) const;
-
-                                     /**
-                                     * Number of base elements in a
-                                     * mixed discretization. Since
-                                     * this is a scalar element,
-                                     * return one.
-                                     */
-    virtual unsigned int n_base_elements () const;
-    
-                                    /**
-                                     * Access to base element
-                                     * objects. Since this element is
-                                     * scalar,
-                                     * <tt>base_element(0)</tt> is
-                                     * <tt>this</tt>, and all other
-                                     * indices throw an error.
-                                     */
-    virtual const FiniteElement<dim,spacedim> &
-    base_element (const unsigned int index) const;
-
-                                     /**
-                                      * Multiplicity of base element
-                                      * <tt>index</tt>. Since this is
-                                      * a scalar element,
-                                      * <tt>element_multiplicity(0)</tt>
-                                      * returns one, and all other
-                                      * indices will throw an error.
-                                      */
-    virtual unsigned int element_multiplicity (const unsigned int index) const;
-
-    
+                                                    const unsigned int component) const;    
   protected:
       
     virtual
index 60c62025c861807d53886634e80f9f859913ef62..f24c672e14a75d3c3d1a6a83cb56a324272403ac 100644 (file)
@@ -622,34 +622,4 @@ FE_Poly<POLY,dim,spacedim>::fill_fe_subface_values (const Mapping<dim,spacedim>
     this->compute_2nd (mapping, cell, offset, mapping_data, fe_data, data);
 }
 
-
-
-template <class POLY, int dim, int spacedim>
-unsigned int
-FE_Poly<POLY,dim,spacedim>::n_base_elements () const
-{
-  return 1;
-}
-
-
-
-template <class POLY, int dim, int spacedim>
-const FiniteElement<dim,spacedim> &
-FE_Poly<POLY,dim,spacedim>::base_element (const unsigned int index) const
-{
-  Assert (index==0, ExcIndexRange(index, 0, 1));
-  return *this;
-}
-
-
-
-template <class POLY, int dim, int spacedim>
-unsigned int
-FE_Poly<POLY,dim,spacedim>::element_multiplicity (const unsigned int index) const
-{
-  Assert (index==0, ExcIndexRange(index, 0, 1));
-  return 1;
-}
-
-
 DEAL_II_NAMESPACE_CLOSE
index 1a3f3ad72d559746429e113da645e87b27a854ec..81ae307bbf47a5c20c362aff76085d4a0db4a981 100644 (file)
@@ -1,7 +1,7 @@
 //---------------------------------------------------------------------------
 //    $Id$
 //
-//    Copyright (C) 2009, 2010 by the deal.II authors
+//    Copyright (C) 2009, 2010, 2011 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -169,36 +169,6 @@ class FE_PolyFace : public FiniteElement<dim,spacedim>
 //    virtual Tensor<2,dim> shape_grad_grad_component (const unsigned int i,
 //                                                  const Point<dim> &p,
 //                                                  const unsigned int component) const;
-
-                                     /**
-                                     * Number of base elements in a
-                                     * mixed discretization. Since
-                                     * this is a scalar element,
-                                     * return one.
-                                     */
-    virtual unsigned int n_base_elements () const;
-    
-                                    /**
-                                     * Access to base element
-                                     * objects. Since this element is
-                                     * scalar,
-                                     * <tt>base_element(0)</tt> is
-                                     * <tt>this</tt>, and all other
-                                     * indices throw an error.
-                                     */
-    virtual const FiniteElement<dim,spacedim> &
-    base_element (const unsigned int index) const;
-
-                                     /**
-                                      * Multiplicity of base element
-                                      * <tt>index</tt>. Since this is
-                                      * a scalar element,
-                                      * <tt>element_multiplicity(0)</tt>
-                                      * returns one, and all other
-                                      * indices will throw an error.
-                                      */
-    virtual unsigned int element_multiplicity (const unsigned int index) const;
-
     
   protected:
       
index edc9cdcab032e6d545a9565ab945de63b3929991..8ffc3b989760226ed5ffd13fec670216396d0456 100644 (file)
@@ -254,34 +254,4 @@ FE_PolyFace<POLY,dim,spacedim>::fill_fe_subface_values (
   Assert (!(flags & update_hessians), ExcNotImplemented());
 }
 
-
-
-template <class POLY, int dim, int spacedim>
-unsigned int
-FE_PolyFace<POLY,dim,spacedim>::n_base_elements () const
-{
-  return 1;
-}
-
-
-
-template <class POLY, int dim, int spacedim>
-const FiniteElement<dim,spacedim> &
-FE_PolyFace<POLY,dim,spacedim>::base_element (const unsigned int index) const
-{
-  Assert (index==0, ExcIndexRange(index, 0, 1));
-  return *this;
-}
-
-
-
-template <class POLY, int dim, int spacedim>
-unsigned int
-FE_PolyFace<POLY,dim,spacedim>::element_multiplicity (const unsigned int index) const
-{
-  Assert (index==0, ExcIndexRange(index, 0, 1));
-  return 1;
-}
-
-
 DEAL_II_NAMESPACE_CLOSE
index c4227025281d09fbd6dff842e18ddc159367d842..e4cb56b4089be5d45de5d5709bc1646a17eba603 100644 (file)
@@ -162,36 +162,7 @@ class FE_PolyTensor : public FiniteElement<dim,spacedim>
     virtual Tensor<2,dim> shape_grad_grad_component (const unsigned int i,
                                                     const Point<dim> &p,
                                                     const unsigned int component) const;
-
-                                     /**
-                                     * Number of base elements in a
-                                     * mixed discretization. Since
-                                     * this is not a composed element,
-                                     * return one.
-                                     */
-    virtual unsigned int n_base_elements () const;
     
-                                    /**
-                                     * Access to base element
-                                     * objects. Since this element is
-                                     * not composed of several elements,
-                                     * <tt>base_element(0)</tt> is
-                                     * <tt>this</tt>, and all other
-                                     * indices throw an error.
-                                     */
-    virtual const FiniteElement<dim,spacedim> &
-    base_element (const unsigned int index) const;
-
-                                     /**
-                                      * Multiplicity of base element
-                                      * <tt>index</tt>. Since this is
-                                      * not a composed element,
-                                      * <tt>element_multiplicity(0)</tt>
-                                      * returns one, and all other
-                                      * indices will throw an error.
-                                      */
-    virtual unsigned int element_multiplicity (const unsigned int index) const;
-
                                     /**
                                      * Given <tt>flags</tt>,
                                      * determines the values which
index 839d11996f1af47ff0980c2c5da8e09b7feff351..38c7109688222b31338118502f3d87ab5f1ec1ff 100644 (file)
@@ -424,26 +424,7 @@ class FESystem : public FiniteElement<dim,spacedim>
     virtual void
     get_interpolation_matrix (const FiniteElement<dim,spacedim> &source,
                              FullMatrix<double>           &matrix) const;
-
-                                     /**
-                                     * Number of different base
-                                     * elements of this object.
-                                     *
-                                     * Since these objects can have
-                                     * multiplicity and subobjects
-                                     * themselves, this may be
-                                     * smaller than the total number
-                                     * of finite elements composed
-                                     * into this structure.
-                                     */
-    virtual unsigned int n_base_elements () const;
-
-                                    /**
-                                     * How often is a composing
-                                     * element used.
-                                     */
-    virtual unsigned int element_multiplicity (const unsigned int index) const;
-
+    
                                     /**
                                      * Access to a composing
                                      * element. The index needs to be
index 7b632cb9cc641023341c95b009e4c3d7c014e013..a61a2cb5defe0767a1b7c558d845a218fc256ee0 100644 (file)
@@ -204,7 +204,7 @@ FiniteElement<dim,spacedim>::FiniteElement (
                                   // Fill with default value; may be
                                   // changed by constructor of
                                   // derived class.
-  first_block_of_base_table.resize(1,0);
+  base_to_block_indices.reinit(1,1);
 
                                   // initialize the restriction and
                                   // prolongation matrices. the default
@@ -1150,6 +1150,9 @@ const FiniteElement<dim,spacedim>&
 FiniteElement<dim,spacedim>::base_element(const unsigned index) const
 {
   Assert (index==0, ExcIndexRange(index,0,1));
+                                  // This function should not be
+                                  // called for a system element
+  Assert (base_to_block_indices.size() == 1, ExcInternalError());
   return *this;
 }
 
index ffc5a3ee8cf8b056b0cf1968a2214ffcfa9c7b2f..9b9a7a29c865f81f298ea0073bb2f3d2c6aefd19 100644 (file)
@@ -511,38 +511,6 @@ FE_ABF<dim>::update_each (const UpdateFlags flags) const
 // Data field initialization
 //---------------------------------------------------------------------------
 
-
-
-
-template <int dim>
-unsigned int
-FE_ABF<dim>::n_base_elements () const
-{
-  return 1;
-}
-
-
-
-template <int dim>
-const FiniteElement<dim> &
-FE_ABF<dim>::base_element (const unsigned int index) const
-{
-  Assert (index==0, ExcIndexRange(index, 0, 1));
-  return *this;
-}
-
-
-
-template <int dim>
-unsigned int
-FE_ABF<dim>::element_multiplicity (const unsigned int index) const
-{
-  Assert (index==0, ExcIndexRange(index, 0, 1));
-  return 1;
-}
-
-
-
 template <int dim>
 bool
 FE_ABF<dim>::has_support_on_face (const unsigned int shape_index,
index 0e7c26927d27ba01e929564b128e3eb747e66b64..edf723fa4107fb77c0e2ad2f4b648040f883e250 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2010 by the deal.II authors
+//    Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2010, 2011 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -32,7 +32,6 @@ FiniteElementData<dim>::FiniteElementData ()
                dofs_per_face(0),
                dofs_per_cell (0),
                components(0),
-               blocks(0),
                degree(0),
                conforming_space(unknown),
                cached_primitivity(false)
@@ -46,7 +45,7 @@ FiniteElementData (const std::vector<unsigned int> &dofs_per_object,
                    const unsigned int n_components,
                    const unsigned int degree,
                   const Conformity conformity,
-                  const unsigned int n_blocks)
+                  const unsigned int)
                 :
                dofs_per_vertex(dofs_per_object[0]),
                dofs_per_line(dofs_per_object[1]),
@@ -77,10 +76,9 @@ FiniteElementData (const std::vector<unsigned int> &dofs_per_object,
                               GeometryInfo<dim>::quads_per_cell * dofs_per_quad +
                               GeometryInfo<dim>::hexes_per_cell * dofs_per_hex),
                components(n_components),
-               blocks(n_blocks == numbers::invalid_unsigned_int
-                      ? n_components : n_blocks),
                degree(degree),
-               conforming_space(conformity)
+               conforming_space(conformity),
+               block_indices_data(1, dofs_per_cell)
 {
   Assert(dofs_per_object.size()==dim+1, ExcDimensionMismatch(dofs_per_object.size()-1,dim));
 }
index 392d83c5e290cbf63845c2c13f17acbca4ad110e..1df24ade4dfbeaffafdd4803149708705d099d2b 100644 (file)
@@ -413,35 +413,6 @@ FE_DGPNonparametric<dim,spacedim>::fill_fe_subface_values (
 
 
 
-template <int dim, int spacedim>
-unsigned int
-FE_DGPNonparametric<dim,spacedim>::n_base_elements () const
-{
-  return 1;
-}
-
-
-
-template <int dim, int spacedim>
-const FiniteElement<dim,spacedim> &
-FE_DGPNonparametric<dim,spacedim>::base_element (const unsigned int index) const
-{
-  Assert (index==0, ExcIndexRange(index, 0, 1));
-  return *this;
-}
-
-
-
-template <int dim, int spacedim>
-unsigned int
-FE_DGPNonparametric<dim,spacedim>::element_multiplicity (const unsigned int index) const
-{
-  Assert (index==0, ExcIndexRange(index, 0, 1));
-  return 1;
-}
-
-
-
 template <int dim, int spacedim>
 void
 FE_DGPNonparametric<dim,spacedim>::
index 0c109f8d88268783d01778a24ac38e1b83d08a57..8b5d72c9097e2fc82ba11654d9a6084eeb227625 100644 (file)
@@ -59,35 +59,6 @@ FE_Nothing<dim>::get_name () const
 
 
 
-template <int dim>
-unsigned int
-FE_Nothing<dim>::n_base_elements () const
-{
-  return 1;
-}
-
-
-
-template <int dim>
-const FiniteElement<dim> &
-FE_Nothing<dim>::base_element (const unsigned int index) const
-{
-  Assert (index==0, ExcIndexRange(index, 0, 1));
-  return *this;
-}
-
-
-
-template <int dim>
-unsigned int
-FE_Nothing<dim>::element_multiplicity (const unsigned int index) const
-{
-  Assert (index==0, ExcIndexRange(index, 0, 1));
-  return 1;
-}
-
-
-
 template <int dim>
 UpdateFlags
 FE_Nothing<dim>::update_once (const UpdateFlags /*flags*/) const
index 6fb07c5602ed51ff809f6f4250e11b47f9898557..f3de047eb8decab3f7f421edba62a91caf618262 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors
+//    Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -969,34 +969,6 @@ FE_PolyTensor<POLY,dim,spacedim>::fill_fe_subface_values (
 
 
 
-template <class POLY, int dim, int spacedim>
-unsigned int
-FE_PolyTensor<POLY,dim,spacedim>::n_base_elements () const
-{
-  return 1;
-}
-
-
-
-template <class POLY, int dim, int spacedim>
-const FiniteElement<dim,spacedim> &
-FE_PolyTensor<POLY,dim,spacedim>::base_element (const unsigned int index) const
-{
-  Assert (index==0, ExcIndexRange(index, 0, 1));
-  return *this;
-}
-
-
-
-template <class POLY, int dim, int spacedim>
-unsigned int
-FE_PolyTensor<POLY,dim,spacedim>::element_multiplicity (const unsigned int index) const
-{
-  Assert (index==0, ExcIndexRange(index, 0, 1));
-  return 1;
-}
-
-
 template <class POLY, int dim, int spacedim>
 UpdateFlags
 FE_PolyTensor<POLY,dim,spacedim>::update_once (const UpdateFlags flags) const
index 1f063c86a5293454febb2f0f6876778440d1ec51..9f3caf63ac0883c3f16c897dea938dd4729c0e81 100644 (file)
@@ -154,6 +154,8 @@ FESystem<dim,spacedim>::FESystem (const FiniteElement<dim,spacedim> &fe,
                                    compute_nonzero_components(fe, n_elements)),
                 base_elements(1)
 {
+  this->base_to_block_indices.reinit(0, 0);
+  this->base_to_block_indices.push_back(n_elements);
   base_elements[0] = ElementPair(fe.clone(), n_elements);
   base_elements[0].first->subscribe (typeid(*this).name());
   initialize ();
@@ -173,11 +175,13 @@ FESystem<dim,spacedim>::FESystem (const FiniteElement<dim,spacedim> &fe1,
                                                               fe2, n2)),
                 base_elements(2)
 {
+  this->base_to_block_indices.reinit(0, 0);
+  this->base_to_block_indices.push_back(n1);
+  this->base_to_block_indices.push_back(n2);
   base_elements[0] = ElementPair(fe1.clone(), n1);
   base_elements[0].first->subscribe (typeid(*this).name());
   base_elements[1] = ElementPair(fe2.clone(), n2);
   base_elements[1].first->subscribe (typeid(*this).name());
-  this->first_block_of_base_table.push_back(n1);
   initialize ();
 }
 
@@ -201,14 +205,16 @@ FESystem<dim,spacedim>::FESystem (const FiniteElement<dim,spacedim> &fe1,
                                                               fe3, n3)),
                 base_elements(3)
 {
+  this->base_to_block_indices.reinit(0, 0);
+  this->base_to_block_indices.push_back(n1);
+  this->base_to_block_indices.push_back(n2);
+  this->base_to_block_indices.push_back(n3);
   base_elements[0] = ElementPair(fe1.clone(), n1);
   base_elements[0].first->subscribe (typeid(*this).name());
   base_elements[1] = ElementPair(fe2.clone(), n2);
   base_elements[1].first->subscribe (typeid(*this).name());
   base_elements[2] = ElementPair(fe3.clone(), n3);
   base_elements[2].first->subscribe (typeid(*this).name());
-  this->first_block_of_base_table.push_back(n1);
-  this->first_block_of_base_table.push_back(n1+n2);
   initialize ();
 }
 
@@ -236,6 +242,11 @@ FESystem<dim,spacedim>::FESystem (const FiniteElement<dim,spacedim> &fe1,
                                                          fe4 ,n4)),
   base_elements(4)
 {
+  this->base_to_block_indices.reinit(0, 0);
+  this->base_to_block_indices.push_back(n1);
+  this->base_to_block_indices.push_back(n2);
+  this->base_to_block_indices.push_back(n3);
+  this->base_to_block_indices.push_back(n4);
   base_elements[0] = ElementPair(fe1.clone(), n1);
   base_elements[0].first->subscribe (typeid(*this).name());
   base_elements[1] = ElementPair(fe2.clone(), n2);
@@ -244,9 +255,6 @@ FESystem<dim,spacedim>::FESystem (const FiniteElement<dim,spacedim> &fe1,
   base_elements[2].first->subscribe (typeid(*this).name());
   base_elements[3] = ElementPair(fe4.clone(), n4);
   base_elements[3].first->subscribe (typeid(*this).name());
-  this->first_block_of_base_table.push_back(n1);
-  this->first_block_of_base_table.push_back(n1+n2);
-  this->first_block_of_base_table.push_back(n1+n2+n3);
   initialize ();
 }
 
@@ -278,6 +286,13 @@ FESystem<dim,spacedim>::FESystem (const FiniteElement<dim,spacedim> &fe1,
                                                          fe5, n5)),
   base_elements(5)
 {
+  this->base_to_block_indices.reinit(0, 0);
+  this->base_to_block_indices.push_back(n1);
+  this->base_to_block_indices.push_back(n2);
+  this->base_to_block_indices.push_back(n3);
+  this->base_to_block_indices.push_back(n4);
+  this->base_to_block_indices.push_back(n5);
+  
   base_elements[0] = ElementPair(fe1.clone(), n1);
   base_elements[0].first->subscribe (typeid(*this).name());
   base_elements[1] = ElementPair(fe2.clone(), n2);
@@ -288,10 +303,6 @@ FESystem<dim,spacedim>::FESystem (const FiniteElement<dim,spacedim> &fe1,
   base_elements[3].first->subscribe (typeid(*this).name());
   base_elements[4] = ElementPair(fe5.clone(), n5);
   base_elements[4].first->subscribe (typeid(*this).name());
-  this->first_block_of_base_table.push_back(n1);
-  this->first_block_of_base_table.push_back(n1+n2);
-  this->first_block_of_base_table.push_back(n1+n2+n3);
-  this->first_block_of_base_table.push_back(n1+n2+n3+n4);
   initialize ();
 }
 
@@ -325,12 +336,12 @@ FESystem<dim,spacedim>::get_name () const
   std::ostringstream namebuf;
 
   namebuf << "FESystem<" << dim << ">[";
-  for (unsigned int i=0; i<n_base_elements(); ++i)
+  for (unsigned int i=0; i< this->n_base_elements(); ++i)
     {
       namebuf << base_element(i).get_name();
-      if (element_multiplicity(i) != 1)
-       namebuf << '^' << element_multiplicity(i);
-      if (i != n_base_elements()-1)
+      if (this->element_multiplicity(i) != 1)
+       namebuf << '^' << this->element_multiplicity(i);
+      if (i != this->n_base_elements()-1)
        namebuf << '-';
     }
   namebuf << ']';
@@ -344,43 +355,43 @@ template <int dim, int spacedim>
 FiniteElement<dim,spacedim>*
 FESystem<dim,spacedim>::clone() const
 {
-  switch (n_base_elements())
+  switch (this->n_base_elements())
     {
     case 1:
       return new FESystem(base_element(0),
-                         element_multiplicity(0));
+                         this->element_multiplicity(0));
     case 2:
       return new FESystem(base_element(0),
-                         element_multiplicity(0),
+                         this->element_multiplicity(0),
                          base_element(1),
-                         element_multiplicity(1));
+                         this->element_multiplicity(1));
     case 3:
       return new FESystem(base_element(0),
-                         element_multiplicity(0),
+                         this->element_multiplicity(0),
                          base_element(1),
-                         element_multiplicity(1),
+                         this->element_multiplicity(1),
                          base_element(2),
-                         element_multiplicity(2));
+                         this->element_multiplicity(2));
     case 4:
       return new FESystem(base_element(0),
-                         element_multiplicity(0),
+                         this->element_multiplicity(0),
                          base_element(1),
-                         element_multiplicity(1),
+                         this->element_multiplicity(1),
                          base_element(2),
-                         element_multiplicity(2),
+                         this->element_multiplicity(2),
                          base_element(3),
-                         element_multiplicity(3));
+                         this->element_multiplicity(3));
     case 5:
       return new FESystem(base_element(0),
-                         element_multiplicity(0),
+                         this->element_multiplicity(0),
                          base_element(1),
-                         element_multiplicity(1),
+                         this->element_multiplicity(1),
                          base_element(2),
-                         element_multiplicity(2),
+                         this->element_multiplicity(2),
                          base_element(3),
-                         element_multiplicity(3),
+                         this->element_multiplicity(3),
                          base_element(4),
-                         element_multiplicity(4));
+                         this->element_multiplicity(4));
       default:
                          Assert(false, ExcNotImplemented());
     }
@@ -547,9 +558,9 @@ FESystem<dim,spacedim>::shape_grad_grad_component (const unsigned int i,
 
 template <int dim, int spacedim>
 void
-FESystem<dim,spacedim>::
-get_interpolation_matrix (const FiniteElement<dim,spacedim> &x_source_fe,
-                         FullMatrix<double>           &interpolation_matrix) const
+FESystem<dim,spacedim>::get_interpolation_matrix (
+  const FiniteElement<dim,spacedim> &x_source_fe,
+  FullMatrix<double>           &interpolation_matrix) const
 {
   Assert (interpolation_matrix.m() == this->dofs_per_cell,
          ExcDimensionMismatch (interpolation_matrix.m(),
@@ -579,14 +590,14 @@ get_interpolation_matrix (const FiniteElement<dim,spacedim> &x_source_fe,
 
                                    // condition 2: same number of
                                    // basis elements
-  AssertThrow (n_base_elements() == source_fe.n_base_elements(),
+  AssertThrow (this->n_base_elements() == source_fe.n_base_elements(),
                typename FEL::
                ExcInterpolationNotImplemented());
 
                                    // condition 3: same number of
                                    // basis elements
-  for (unsigned int i=0; i<n_base_elements(); ++i)
-    AssertThrow (element_multiplicity(i) ==
+  for (unsigned int i=0; i< this->n_base_elements(); ++i)
+    AssertThrow (this->element_multiplicity(i) ==
                  source_fe.element_multiplicity(i),
                  typename FEL::
                  ExcInterpolationNotImplemented());
@@ -604,8 +615,8 @@ get_interpolation_matrix (const FiniteElement<dim,spacedim> &x_source_fe,
                                    // continuing and assembling the
                                    // one big matrix from the small
                                    // ones of the base elements
-  std::vector<FullMatrix<double> > base_matrices (n_base_elements());
-  for (unsigned int i=0; i<n_base_elements(); ++i)
+  std::vector<FullMatrix<double> > base_matrices (this->n_base_elements());
+  for (unsigned int i=0; i<this->n_base_elements(); ++i)
     {
       base_matrices[i].reinit (base_element(i).dofs_per_cell,
                                source_fe.base_element(i).dofs_per_cell);
@@ -644,7 +655,7 @@ FESystem<dim,spacedim>::update_once (const UpdateFlags flags) const
   UpdateFlags out = update_default;
                                   // generate maximal set of flags
                                   // that are necessary
-  for (unsigned int base_no=0; base_no<n_base_elements(); ++base_no)
+  for (unsigned int base_no=0; base_no<this->n_base_elements(); ++base_no)
     out |= base_element(base_no).update_once(flags);
   return out;
 }
@@ -658,7 +669,7 @@ FESystem<dim,spacedim>::update_each (const UpdateFlags flags) const
   UpdateFlags out = update_default;
                                   // generate maximal set of flags
                                   // that are necessary
-  for (unsigned int base_no=0; base_no<n_base_elements(); ++base_no)
+  for (unsigned int base_no=0; base_no<this->n_base_elements(); ++base_no)
     out |= base_element(base_no).update_each(flags);
 
                                   // second derivatives are handled
@@ -685,7 +696,7 @@ FESystem<dim,spacedim>::get_data (const UpdateFlags      flags_,
                                  const Quadrature<dim> &quadrature) const
 {
   UpdateFlags flags = flags_;
-  InternalData* data = new InternalData(n_base_elements());
+  InternalData* data = new InternalData(this->n_base_elements());
 
   data->update_once = update_once (flags);
   data->update_each = update_each (flags);
@@ -708,7 +719,7 @@ FESystem<dim,spacedim>::get_data (const UpdateFlags      flags_,
 
                                   // get data objects from each of
                                   // the base elements and store them
-  for (unsigned int base_no=0; base_no<n_base_elements(); ++base_no)
+  for (unsigned int base_no=0; base_no<this->n_base_elements(); ++base_no)
     {
       typename Mapping<dim,spacedim>::InternalDataBase *base_fe_data_base =
        base_element(base_no).get_data(sub_flags, mapping, quadrature);
@@ -772,7 +783,7 @@ FESystem<dim,spacedim>::get_face_data (
   const Quadrature<dim-1> &quadrature) const
 {
   UpdateFlags flags = flags_;
-  InternalData* data = new InternalData(n_base_elements());
+  InternalData* data = new InternalData(this->n_base_elements());
 
   data->update_once = update_once (flags);
   data->update_each = update_each (flags);
@@ -786,7 +797,7 @@ FESystem<dim,spacedim>::get_face_data (
       data->initialize_2nd (this, mapping, QProjector<dim>::project_to_all_faces(quadrature));
     }
 
-  for (unsigned int base_no=0; base_no<n_base_elements(); ++base_no)
+  for (unsigned int base_no=0; base_no<this->n_base_elements(); ++base_no)
     {
       typename Mapping<dim,spacedim>::InternalDataBase *base_fe_data_base =
        base_element(base_no).get_face_data(sub_flags, mapping, quadrature);
@@ -824,7 +835,7 @@ FESystem<dim,spacedim>::get_subface_data (
   const Quadrature<dim-1> &quadrature) const
 {
   UpdateFlags flags = flags_;
-  InternalData* data = new InternalData(n_base_elements());
+  InternalData* data = new InternalData(this->n_base_elements());
 
   data->update_once = update_once (flags);
   data->update_each = update_each (flags);
@@ -838,7 +849,7 @@ FESystem<dim,spacedim>::get_subface_data (
       data->initialize_2nd (this, mapping, QProjector<dim>::project_to_all_subfaces(quadrature));
     }
 
-  for (unsigned int base_no=0; base_no<n_base_elements(); ++base_no)
+  for (unsigned int base_no=0; base_no<this->n_base_elements(); ++base_no)
     {
       typename Mapping<dim,spacedim>::InternalDataBase *base_fe_data_base =
        base_element(base_no).get_subface_data(sub_flags, mapping, quadrature);
@@ -884,14 +895,14 @@ FESystem<dim,spacedim>::fill_fe_values (
 
 template <int dim, int spacedim>
 void
-FESystem<dim,spacedim>::
-fill_fe_face_values (const Mapping<dim,spacedim>                   &mapping,
-                     const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                     const unsigned int                    face_no,
-                     const Quadrature<dim-1>              &quadrature,
-                     typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-                     typename Mapping<dim,spacedim>::InternalDataBase &fe_data,
-                     FEValuesData<dim,spacedim>                    &data) const
+FESystem<dim,spacedim>::fill_fe_face_values (
+  const Mapping<dim,spacedim>                   &mapping,
+  const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+  const unsigned int                    face_no,
+  const Quadrature<dim-1>              &quadrature,
+  typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
+  typename Mapping<dim,spacedim>::InternalDataBase &fe_data,
+  FEValuesData<dim,spacedim>                    &data) const
 {
   compute_fill (mapping, cell, face_no, invalid_face_number, quadrature,
                 CellSimilarity::none, mapping_data, fe_data, data);
@@ -968,7 +979,7 @@ FESystem<dim,spacedim>::compute_fill (
                                           // (and: how should it know
                                           // of their existence,
                                           // after all).
-         for (unsigned int base_no=0; base_no<n_base_elements(); ++base_no)
+         for (unsigned int base_no=0; base_no<this->n_base_elements(); ++base_no)
            {
                                               // Pointer needed to get
                                               // the update flags of the
@@ -1041,7 +1052,7 @@ FESystem<dim,spacedim>::compute_fill (
 
                                        // let base elements update the
                                        // necessary data
-      for (unsigned int base_no=0; base_no<n_base_elements(); ++base_no)
+      for (unsigned int base_no=0; base_no<this->n_base_elements(); ++base_no)
        {
          const FiniteElement<dim,spacedim> &
             base_fe      = base_element(base_no);
@@ -1233,14 +1244,19 @@ FESystem<dim,spacedim>::build_cell_tables()
   this->face_system_to_component_table.resize(this->dofs_per_face);
 
   unsigned total_index = 0;
-  for (unsigned int base=0; base < n_base_elements(); ++base)
-    for (unsigned int m = 0; m < element_multiplicity(base); ++m)
-      for (unsigned int k=0; k<base_element(base).n_components(); ++k)
-       this->component_to_base_table[total_index++]
-         = std::make_pair(std::make_pair(base,k), m);
+  this->block_indices_data.reinit(0,0);
+  
+  for (unsigned int base=0; base < this->n_base_elements(); ++base)
+    for (unsigned int m = 0; m < this->element_multiplicity(base); ++m)
+      {
+       this->block_indices_data.push_back(base_element(base).dofs_per_cell);
+       for (unsigned int k=0; k<base_element(base).n_components(); ++k)
+         this->component_to_base_table[total_index++]
+           = std::make_pair(std::make_pair(base,k), m);
+      }
   Assert (total_index == this->component_to_base_table.size(),
          ExcInternalError());
-
+  
                                   // Initialize index tables.
                                   // Multi-component base elements
                                   // have to be thought of. For
@@ -1261,8 +1277,8 @@ FESystem<dim,spacedim>::build_cell_tables()
        ++vertex_number)
     {
       unsigned comp_start = 0;
-      for(unsigned int base=0; base<n_base_elements(); ++base)
-       for (unsigned int m=0; m<element_multiplicity(base);
+      for(unsigned int base=0; base<this->n_base_elements(); ++base)
+       for (unsigned int m=0; m<this->element_multiplicity(base);
             ++m, comp_start+=base_element(base).n_components())
          for (unsigned int local_index = 0;
               local_index < base_element(base).dofs_per_vertex;
@@ -1298,8 +1314,8 @@ FESystem<dim,spacedim>::build_cell_tables()
         ++line_number)
       {
        unsigned comp_start = 0;
-       for (unsigned int base=0; base<n_base_elements(); ++base)
-         for (unsigned int m=0; m<element_multiplicity(base);
+       for (unsigned int base=0; base<this->n_base_elements(); ++base)
+         for (unsigned int m=0; m<this->element_multiplicity(base);
               ++m, comp_start+=base_element(base).n_components())
            for (unsigned int local_index = 0;
                 local_index < base_element(base).dofs_per_line;
@@ -1336,8 +1352,8 @@ FESystem<dim,spacedim>::build_cell_tables()
         ++quad_number)
       {
        unsigned int comp_start = 0;
-       for (unsigned int base=0; base<n_base_elements(); ++base)
-         for (unsigned int m=0; m<element_multiplicity(base);
+       for (unsigned int base=0; base<this->n_base_elements(); ++base)
+         for (unsigned int m=0; m<this->element_multiplicity(base);
               ++m, comp_start += base_element(base).n_components())
            for (unsigned int local_index = 0;
                 local_index < base_element(base).dofs_per_quad;
@@ -1374,8 +1390,8 @@ FESystem<dim,spacedim>::build_cell_tables()
         ++hex_number)
       {
        unsigned int comp_start = 0;
-       for(unsigned int base=0; base<n_base_elements(); ++base)
-         for (unsigned int m=0; m<element_multiplicity(base);
+       for(unsigned int base=0; base<this->n_base_elements(); ++base)
+         for (unsigned int m=0; m<this->element_multiplicity(base);
               ++m, comp_start+=base_element(base).n_components())
            for (unsigned int local_index = 0;
                 local_index < base_element(base).dofs_per_hex;
@@ -1431,8 +1447,8 @@ FESystem<dim,spacedim>::build_face_tables()
        ++vertex_number)
     {
       unsigned int comp_start = 0;
-      for(unsigned int base=0; base<n_base_elements(); ++base)
-       for (unsigned int m=0; m<element_multiplicity(base);
+      for(unsigned int base=0; base<this->n_base_elements(); ++base)
+       for (unsigned int m=0; m<this->element_multiplicity(base);
             ++m, comp_start += base_element(base).n_components())
          for (unsigned int local_index = 0;
               local_index < base_element(base).dofs_per_vertex;
@@ -1497,8 +1513,8 @@ FESystem<dim,spacedim>::build_face_tables()
         ++line_number)
       {
        unsigned comp_start = 0;
-       for(unsigned base = 0; base < n_base_elements(); ++base)
-         for (unsigned m=0; m<element_multiplicity(base);
+       for(unsigned base = 0; base < this->n_base_elements(); ++base)
+         for (unsigned m=0; m<this->element_multiplicity(base);
               ++m, comp_start += base_element(base).n_components())
            for (unsigned local_index = 0;
                 local_index < base_element(base).dofs_per_line;
@@ -1543,8 +1559,8 @@ FESystem<dim,spacedim>::build_face_tables()
         ++quad_number)
       {
        unsigned comp_start = 0;
-       for(unsigned base=0; base<n_base_elements(); ++base)
-         for (unsigned m=0; m<element_multiplicity(base);
+       for(unsigned base=0; base<this->n_base_elements(); ++base)
+         for (unsigned m=0; m<this->element_multiplicity(base);
               ++m, comp_start += base_element(base).n_components())
            for (unsigned local_index = 0;
                 local_index < base_element(base).dofs_per_quad;
@@ -1601,7 +1617,7 @@ void FESystem<dim,spacedim>::build_interface_constraints ()
                                    // composed element empty as well;
                                    // however, the rest of the element
                                    // is usable
-  for (unsigned int base=0; base<n_base_elements(); ++base)
+  for (unsigned int base=0; base<this->n_base_elements(); ++base)
     if (base_element(base).constraints_are_implemented() == false)
       return;
 
@@ -1872,7 +1888,7 @@ void FESystem<dim,spacedim>::initialize ()
       bool do_restriction = true;
       bool do_prolongation = true;
 
-      for (unsigned int i=0; i<n_base_elements(); ++i)
+      for (unsigned int i=0; i<this->n_base_elements(); ++i)
        {
          if (base_element(i).restriction[ref_case-1][0].n() == 0)
            do_restriction = false;
@@ -2004,7 +2020,7 @@ initialize_unit_support_points ()
                                   // an empty array to
                                   // demonstrate that
                                   // fact
-  for (unsigned int base_el=0; base_el<n_base_elements(); ++base_el)
+  for (unsigned int base_el=0; base_el<this->n_base_elements(); ++base_el)
     if (!base_element(base_el).has_support_points())
       {
        this->unit_support_points.resize(0);
@@ -2021,7 +2037,7 @@ initialize_unit_support_points ()
       const unsigned int
        base       = this->system_to_base_table[i].first.first,
        base_index = this->system_to_base_table[i].second;
-      Assert (base<n_base_elements(), ExcInternalError());
+      Assert (base<this->n_base_elements(), ExcInternalError());
       Assert (base_index<base_element(base).unit_support_points.size(),
              ExcInternalError());
       this->unit_support_points[i] = base_element(base).unit_support_points[base_index];
@@ -2055,7 +2071,7 @@ initialize_unit_face_support_points ()
                                   // or not. this is, for example, the case
                                   // for the stable Stokes element Q(p)^dim
                                   // \times DGP(p-1).
-  for (unsigned int base_el=0; base_el<n_base_elements(); ++base_el)
+  for (unsigned int base_el=0; base_el<this->n_base_elements(); ++base_el)
     if (!base_element(base_el).has_support_points()
        &&
        (base_element(base_el).dofs_per_face > 0))
@@ -2102,11 +2118,11 @@ FESystem<dim,spacedim>::initialize_quad_dof_index_permutation ()
                                   // element, copy the shift information of
                                   // the base elements
   unsigned int index = 0;
-  for (unsigned int b=0; b<n_base_elements();++b)
+  for (unsigned int b=0; b<this->n_base_elements();++b)
     {
       const Table<2,int> &temp
        = this->base_element(b).adjust_quad_dof_index_for_face_orientation_table;
-      for (unsigned int c=0; c<element_multiplicity(b); ++c)
+      for (unsigned int c=0; c<this->element_multiplicity(b); ++c)
        {
          for (unsigned int i=0; i<temp.size(0); ++i)
            for (unsigned int j=0; j<8; ++j)
@@ -2123,11 +2139,11 @@ FESystem<dim,spacedim>::initialize_quad_dof_index_permutation ()
   Assert (this->adjust_line_dof_index_for_line_orientation_table.size()==
          this->dofs_per_line, ExcInternalError());
   index = 0;
-  for (unsigned int b=0; b<n_base_elements();++b)
+  for (unsigned int b=0; b<this->n_base_elements();++b)
     {
       const std::vector<int> &temp2
        = this->base_element(b).adjust_line_dof_index_for_line_orientation_table;
-      for (unsigned int c=0; c<element_multiplicity(b); ++c)
+      for (unsigned int c=0; c<this->element_multiplicity(b); ++c)
        {
          std::copy(temp2.begin(), temp2.end(),
                    this->adjust_line_dof_index_for_line_orientation_table.begin()
@@ -2146,7 +2162,7 @@ bool
 FESystem<dim,spacedim>::
 hp_constraints_are_implemented () const
 {
-  for (unsigned int b=0; b<n_base_elements(); ++b)
+  for (unsigned int b=0; b<this->n_base_elements(); ++b)
     if (base_element(b).hp_constraints_are_implemented() == false)
       return false;
 
@@ -2247,7 +2263,7 @@ get_face_interpolation_matrix (const FiniteElement<dim,spacedim> &x_source_fe,
                                       // or if have to move on to the
                                       // next base element
       ++multiplicity;
-      if (multiplicity == element_multiplicity(base_index))
+      if (multiplicity == this->element_multiplicity(base_index))
        {
          multiplicity = 0;
          ++base_index;
@@ -2264,7 +2280,7 @@ get_face_interpolation_matrix (const FiniteElement<dim,spacedim> &x_source_fe,
                                       // of the present element. if so,
                                       // we should have reached the end
                                       // of the other one as well
-      if (base_index == n_base_elements())
+      if (base_index == this->n_base_elements())
        {
          Assert (base_index_other == fe_other_system->n_base_elements(),
                  ExcInternalError());
@@ -2376,7 +2392,7 @@ get_subface_interpolation_matrix (const FiniteElement<dim,spacedim> &x_source_fe
                                       // or if have to move on to the
                                       // next base element
       ++multiplicity;
-      if (multiplicity == element_multiplicity(base_index))
+      if (multiplicity == this->element_multiplicity(base_index))
        {
          multiplicity = 0;
          ++base_index;
@@ -2393,7 +2409,7 @@ get_subface_interpolation_matrix (const FiniteElement<dim,spacedim> &x_source_fe
                                       // of the present element. if so,
                                       // we should have reached the end
                                       // of the other one as well
-      if (base_index == n_base_elements())
+      if (base_index == this->n_base_elements())
        {
          Assert (base_index_other == fe_other_system->n_base_elements(),
                  ExcInternalError());
@@ -2500,7 +2516,7 @@ FESystem<dim,spacedim>::hp_object_dof_identities (const FiniteElement<dim,spaced
                                           // or if have to move on to the
                                           // next base element
          ++multiplicity;
-         if (multiplicity == element_multiplicity(base_index))
+         if (multiplicity == this->element_multiplicity(base_index))
            {
              multiplicity = 0;
              ++base_index;
@@ -2517,7 +2533,7 @@ FESystem<dim,spacedim>::hp_object_dof_identities (const FiniteElement<dim,spaced
                                           // of the present element. if so,
                                           // we should have reached the end
                                           // of the other one as well
-         if (base_index == n_base_elements())
+         if (base_index == this->n_base_elements())
            {
              Assert (base_index_other == fe_other_system->n_base_elements(),
                      ExcInternalError());
@@ -3371,26 +3387,6 @@ FESystem<dim,spacedim>::base_element (const unsigned int index) const
 
 
 
-template <int dim, int spacedim>
-unsigned int
-FESystem<dim,spacedim>::n_base_elements () const
-{
-  return base_elements.size();
-}
-
-
-
-template <int dim, int spacedim>
-unsigned int
-FESystem<dim,spacedim>::element_multiplicity (const unsigned int index) const
-{
-  Assert (index < base_elements.size(),
-         ExcIndexRange(index, 0, base_elements.size()));
-  return base_elements[index].second;
-}
-
-
-
 template <int dim, int spacedim>
 bool
 FESystem<dim,spacedim>::has_support_on_face (const unsigned int shape_index,

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.