]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Split off a few functions that will have to be implemented differently for hp and...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 27 Apr 2006 05:01:34 +0000 (05:01 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 27 Apr 2006 05:01:34 +0000 (05:01 +0000)
git-svn-id: https://svn.dealii.org/trunk@12919 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/dof_accessor.h
deal.II/deal.II/include/dofs/dof_accessor.templates.h
deal.II/deal.II/include/dofs/hp_dof_handler.h
deal.II/deal.II/source/dofs/dof_accessor.cc

index 63761b4c65ff4a726d8adb204e6849a362006b5b..80f0967a7cfa391d413421a4562df0bb178ac79d 100644 (file)
@@ -417,35 +417,6 @@ class DoFObjectAccessor : public DoFAccessor<DH>,
     void set_dof_values (const Vector<number> &local_values,
                         OutputVector         &values) const;
                          
-
-                                     /**
-                                      * Return the finite element that
-                                      * is used on the cell pointed to
-                                      * by this iterator. For non-hp
-                                      * DoF handlers, this is of
-                                      * course always the same
-                                      * element, independent of the
-                                      * cell we are presently on, but
-                                      * for hp DoF handlers, this may
-                                      * change from cell to cell.
-                                      */
-    const FiniteElement<dim> &
-    get_fe () const;
-    
-                                     /**
-                                     *  Returns the index inside the
-                                     *  hp::FECollection of the FiniteElement
-                                     *  used for this cell.
-                                     */
-    unsigned int active_fe_index () const;
-
-                                     /**
-                                     *  Sets the index of the FiniteElement used for
-                                     *  this cell.
-                                     */
-    void set_active_fe_index (const unsigned int i);
-
-
                                     /**
                                      *  Pointer to the <i>i</i>th line
                                      *  bounding this Object.
@@ -718,34 +689,6 @@ class DoFObjectAccessor<1, DH> :
     void set_dof_values (const Vector<number> &local_values,
                         OutputVector         &values) const;
 
-
-                                     /**
-                                      * Return the finite element that
-                                      * is used on the cell pointed to
-                                      * by this iterator. For non-hp
-                                      * DoF handlers, this is of
-                                      * course always the same
-                                      * element, independent of the
-                                      * cell we are presently on, but
-                                      * for hp DoF handlers, this may
-                                      * change from cell to cell.
-                                      */
-    const FiniteElement<DH::dimension> &
-    get_fe () const;
-    
-                                     /**
-                                     *  Returns the index inside the
-                                     *  hp::FECollection of the FiniteElement
-                                     *  used for this cell.
-                                     */
-    unsigned int active_fe_index () const;
-
-                                     /**
-                                     *  Sets the index of the FiniteElement used for
-                                     *  this cell.
-                                     */
-    void set_active_fe_index (const unsigned int i);
-
                                     /**
                                      * Return the @p ith child as a DoF line
                                      * iterator. This function is needed since
@@ -949,34 +892,6 @@ class DoFObjectAccessor<2, DH> :
     void set_dof_values (const Vector<number> &local_values,
                         OutputVector         &values) const;
 
-
-                                     /**
-                                      * Return the finite element that
-                                      * is used on the cell pointed to
-                                      * by this iterator. For non-hp
-                                      * DoF handlers, this is of
-                                      * course always the same
-                                      * element, independent of the
-                                      * cell we are presently on, but
-                                      * for hp DoF handlers, this may
-                                      * change from cell to cell.
-                                      */
-    const FiniteElement<DH::dimension> &
-    get_fe () const;
-    
-                                     /**
-                                     *  Returns the index inside the
-                                     *  hp::FECollection of the FiniteElement
-                                     *  used for this cell.
-                                     */
-    unsigned int active_fe_index () const;
-
-                                     /**
-                                     *  Sets the index of the FiniteElement used for
-                                     *  this cell.
-                                     */
-    void set_active_fe_index (const unsigned int i);
-
                                     /**
                                      *  Return a pointer to the @p ith line
                                      *  bounding this @p Quad.
@@ -1188,34 +1103,6 @@ class DoFObjectAccessor<3, DH> :
     void set_dof_values (const Vector<number> &local_values,
                         OutputVector         &values) const;
 
-
-                                     /**
-                                      * Return the finite element that
-                                      * is used on the cell pointed to
-                                      * by this iterator. For non-hp
-                                      * DoF handlers, this is of
-                                      * course always the same
-                                      * element, independent of the
-                                      * cell we are presently on, but
-                                      * for hp DoF handlers, this may
-                                      * change from cell to cell.
-                                      */
-    const FiniteElement<DH::dimension> &
-    get_fe () const;
-
-                                     /**
-                                     *  Returns the index inside the
-                                     *  hp::FECollection of the FiniteElement
-                                     *  used for this cell.
-                                     */
-    unsigned int active_fe_index () const;
-
-                                     /**
-                                     *  Sets the index of the FiniteElement used for
-                                     *  this cell.
-                                     */
-    void set_active_fe_index (const unsigned int i);
-
                                     /**
                                      *  Return a pointer to the @p ith line
                                      *  bounding this @p Hex.
@@ -1566,6 +1453,33 @@ class DoFCellAccessor :  public DoFObjectAccessor<DH::dimension,DH>
                                      */
     void get_dof_indices (std::vector<unsigned int> &dof_indices) const;
 
+                                     /**
+                                      * Return the finite element that
+                                      * is used on the cell pointed to
+                                      * by this iterator. For non-hp
+                                      * DoF handlers, this is of
+                                      * course always the same
+                                      * element, independent of the
+                                      * cell we are presently on, but
+                                      * for hp DoF handlers, this may
+                                      * change from cell to cell.
+                                      */
+    const FiniteElement<DH::dimension> &
+    get_fe () const;
+
+                                     /**
+                                     *  Returns the index inside the
+                                     *  hp::FECollection of the FiniteElement
+                                     *  used for this cell.
+                                     */
+    unsigned int active_fe_index () const;
+
+                                     /**
+                                     *  Sets the index of the FiniteElement used for
+                                     *  this cell.
+                                     */
+    void set_active_fe_index (const unsigned int i);
+
                                     /**
                                      * Distribute a local (cell
                                      * based) vector to a global one
@@ -1633,25 +1547,6 @@ template <>
 TriaIterator<3, DoFObjectAccessor<2,DoFHandler<3> > >
 DoFCellAccessor<DoFHandler<3> >::face (const unsigned int i) const;
 
-template <>
-const FiniteElement<1> &
-DoFObjectAccessor<1,hp::DoFHandler<1> >::get_fe () const;
-template <>
-const FiniteElement<2> &
-DoFObjectAccessor<1,hp::DoFHandler<2> >::get_fe () const;
-template <>
-const FiniteElement<3> &
-DoFObjectAccessor<1,hp::DoFHandler<3> >::get_fe () const;
-template <>
-const FiniteElement<2> &
-DoFObjectAccessor<2,hp::DoFHandler<2> >::get_fe () const;
-template <>
-const FiniteElement<3> &
-DoFObjectAccessor<2,hp::DoFHandler<3> >::get_fe () const;
-template <>
-const FiniteElement<3> &
-DoFObjectAccessor<3,hp::DoFHandler<3> >::get_fe () const;
-
 template <>
 void DoFObjectAccessor<1,hp::DoFHandler<1> >::set_dof_index (const unsigned int,
                                                             const unsigned int) const;
@@ -1673,43 +1568,34 @@ void DoFObjectAccessor<3,hp::DoFHandler<3> >::set_dof_index (const unsigned int,
 
 
 template <>
-unsigned int
-DoFObjectAccessor<1,hp::DoFHandler<1> >::active_fe_index () const;
+const FiniteElement<1> &
+DoFCellAccessor<hp::DoFHandler<1> >::get_fe () const;
 template <>
-unsigned int
-DoFObjectAccessor<1,hp::DoFHandler<2> >::active_fe_index () const;
+const FiniteElement<2> &
+DoFCellAccessor<hp::DoFHandler<2> >::get_fe () const;
 template <>
-unsigned int
-DoFObjectAccessor<1,hp::DoFHandler<3> >::active_fe_index () const;
+const FiniteElement<3> &
+DoFCellAccessor<hp::DoFHandler<3> >::get_fe () const;
+
 template <>
 unsigned int
-DoFObjectAccessor<2,hp::DoFHandler<2> >::active_fe_index () const;
+DoFCellAccessor<hp::DoFHandler<1> >::active_fe_index () const;
 template <>
 unsigned int
-DoFObjectAccessor<2,hp::DoFHandler<3> >::active_fe_index () const;
+DoFCellAccessor<hp::DoFHandler<2> >::active_fe_index () const;
 template <>
 unsigned int
-DoFObjectAccessor<3,hp::DoFHandler<3> >::active_fe_index () const;
+DoFCellAccessor<hp::DoFHandler<3> >::active_fe_index () const;
 
 template <>
 void
-DoFObjectAccessor<1,hp::DoFHandler<1> >::set_active_fe_index (const unsigned int i);
-template <>
-void
-DoFObjectAccessor<1,hp::DoFHandler<2> >::set_active_fe_index (const unsigned int i);
+DoFCellAccessor<hp::DoFHandler<1> >::set_active_fe_index (const unsigned int i);
 template <>
 void
-DoFObjectAccessor<1,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int i);
+DoFCellAccessor<hp::DoFHandler<2> >::set_active_fe_index (const unsigned int i);
 template <>
 void
-DoFObjectAccessor<2,hp::DoFHandler<2> >::set_active_fe_index (const unsigned int i);
-template <>
-void
-DoFObjectAccessor<2,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int i);
-template <>
-void
-DoFObjectAccessor<3,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int i);
-
+DoFCellAccessor<hp::DoFHandler<3> >::set_active_fe_index (const unsigned int i);
 
 template <>
 void
index ec2209b1dea2294e7e2909ac5915328a0cba864b..9552b1007d3b9b0dc20821503e48fcd01f69b1a7 100644 (file)
@@ -150,37 +150,6 @@ DoFObjectAccessor<1,DH>::child (const unsigned int i) const
 
 
 
-template <class DH>
-inline
-const FiniteElement<DH::dimension> &
-DoFObjectAccessor<1,DH>::get_fe () const
-{
-  return *this->dof_handler->selected_fe;
-}
-
-
-
-template <class DH>
-inline
-unsigned int
-DoFObjectAccessor<1,DH>::active_fe_index () const
-{
-  return 0;
-}
-
-
-
-template <class DH>
-inline
-void
-DoFObjectAccessor<1,DH>::set_active_fe_index (const unsigned int i)
-{
-  typedef DoFAccessor<DH> BaseClass;
-  Assert (i == 0, typename BaseClass::ExcInvalidObject());
-}
-
-
-
 template <class DH>
 inline
 void
@@ -273,37 +242,6 @@ DoFObjectAccessor<2,DH>::child (const unsigned int i) const
 
 
 
-template <class DH>
-inline
-const FiniteElement<DH::dimension> &
-DoFObjectAccessor<2,DH>::get_fe () const
-{
-  return *this->dof_handler->selected_fe;
-}
-
-
-
-template <class DH>
-inline
-unsigned int
-DoFObjectAccessor<2,DH>::active_fe_index () const
-{
-  return 0;
-}
-
-
-
-template <class DH>
-inline
-void
-DoFObjectAccessor<2,DH>::set_active_fe_index (const unsigned int i)
-{
-  typedef DoFAccessor<DH> BaseClass;
-  Assert (i == 0, typename BaseClass::ExcInvalidObject());
-}
-
-
-
 template <class DH>
 inline
 void
@@ -407,37 +345,6 @@ DoFObjectAccessor<3,DH>::child (const unsigned int i) const
 }
 
 
-template <class DH>
-inline
-const FiniteElement<DH::dimension> &
-DoFObjectAccessor<3,DH>::get_fe () const
-{
-  return *this->dof_handler->selected_fe;
-}
-
-
-
-template <class DH>
-inline
-unsigned int
-DoFObjectAccessor<3,DH>::active_fe_index () const
-{
-  return 0;
-}
-
-
-
-template <class DH>
-inline
-void
-DoFObjectAccessor<3,DH>::set_active_fe_index (const unsigned int i)
-{
-  typedef DoFAccessor<DH> BaseClass;
-  Assert (i == 0, typename BaseClass::ExcInvalidObject());
-}
-
-
-
 template <class DH>
 void DoFObjectAccessor<3,DH>::copy_from (const DoFObjectAccessor<3,DH> &a)
 {
@@ -483,12 +390,12 @@ DoFObjectAccessor<1,DoFHandler<1> >::dof_index (const unsigned int i) const
   Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_line,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
+  Assert (i<this->dof_handler->get_fe().dofs_per_line,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_line));
 
   return this->dof_handler->levels[this->present_level]
-    ->line_dofs[this->present_index*this->get_fe().dofs_per_line+i];
+    ->line_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_line+i];
 }
 
 
@@ -503,13 +410,13 @@ DoFObjectAccessor<1,DoFHandler<1> >::vertex_dof_index (const unsigned int vertex
           ExcMessage ("DoFHandler not initialized"));
 
   Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
   Assert (vertex<2, ExcIndexRange (i,0,2));
-  Assert (i<this->get_fe().dofs_per_vertex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+  Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
 
   const unsigned int dof_number = (this->vertex_index(vertex) *
-                                  this->get_fe().dofs_per_vertex +
+                                  this->dof_handler->get_fe().dofs_per_vertex +
                                   i);
   return this->dof_handler->vertex_dofs[dof_number];
 }
@@ -525,9 +432,9 @@ DoFObjectAccessor<1,DoFHandler<1> >::get_dof_indices (std::vector<unsigned int>
           ExcMessage ("DoFHandler not initialized"));
 
   Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
-  Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex +
-                                this->get_fe().dofs_per_line),
+  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
+  Assert (dof_indices.size() == (2*this->dof_handler->get_fe().dofs_per_vertex +
+                                this->dof_handler->get_fe().dofs_per_line),
          DoFAccessor<DoFHandler<1> >::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
@@ -539,12 +446,12 @@ DoFObjectAccessor<1,DoFHandler<1> >::get_dof_indices (std::vector<unsigned int>
                                   // not allocated for this
                                   // non-active thing
   Assert (!this->has_children() ||
-         (this->get_fe().dofs_per_cell ==
-          2*this->get_fe().dofs_per_vertex),
+         (this->dof_handler->get_fe().dofs_per_cell ==
+          2*this->dof_handler->get_fe().dofs_per_vertex),
          DoFAccessor<DoFHandler<1> >::ExcNotActive());
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line;
   std::vector<unsigned int>::iterator next = dof_indices.begin();
   for (unsigned int vertex=0; vertex<2; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -566,12 +473,12 @@ DoFObjectAccessor<1,DoFHandler<2> >::dof_index (const unsigned int i) const
   Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_line,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
+  Assert (i<this->dof_handler->get_fe().dofs_per_line,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_line));
 
   return this->dof_handler->levels[this->present_level]
-    ->line_dofs[this->present_index*this->get_fe().dofs_per_line+i];
+    ->line_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_line+i];
 }
 
 
@@ -586,13 +493,13 @@ DoFObjectAccessor<1,DoFHandler<2> >::vertex_dof_index (const unsigned int vertex
           ExcMessage ("DoFHandler not initialized"));
 
   Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
   Assert (vertex<2, ExcIndexRange (i,0,2));
-  Assert (i<this->get_fe().dofs_per_vertex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+  Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
 
   const unsigned int dof_number = (this->vertex_index(vertex) *
-                                  this->get_fe().dofs_per_vertex +
+                                  this->dof_handler->get_fe().dofs_per_vertex +
                                   i);
   return this->dof_handler->vertex_dofs[dof_number];
 }
@@ -608,9 +515,9 @@ DoFObjectAccessor<1,DoFHandler<2> >::get_dof_indices (std::vector<unsigned int>
           ExcMessage ("DoFHandler not initialized"));
 
   Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
-  Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex +
-                                this->get_fe().dofs_per_line),
+  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
+  Assert (dof_indices.size() == (2*this->dof_handler->get_fe().dofs_per_vertex +
+                                this->dof_handler->get_fe().dofs_per_line),
          DoFAccessor<DoFHandler<2> >::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
@@ -622,12 +529,12 @@ DoFObjectAccessor<1,DoFHandler<2> >::get_dof_indices (std::vector<unsigned int>
                                   // not allocated for this
                                   // non-active thing
   Assert (!this->has_children() ||
-         (this->get_fe().dofs_per_cell ==
-          2*this->get_fe().dofs_per_vertex),
+         (this->dof_handler->get_fe().dofs_per_cell ==
+          2*this->dof_handler->get_fe().dofs_per_vertex),
          DoFAccessor<DoFHandler<2> >::ExcNotActive());
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line;
   std::vector<unsigned int>::iterator next = dof_indices.begin();
   for (unsigned int vertex=0; vertex<2; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -649,12 +556,12 @@ DoFObjectAccessor<1,DoFHandler<3> >::dof_index (const unsigned int i) const
   Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_line,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+  Assert (i<this->dof_handler->get_fe().dofs_per_line,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_line));
 
   return this->dof_handler->levels[this->present_level]
-    ->line_dofs[this->present_index*this->get_fe().dofs_per_line+i];
+    ->line_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_line+i];
 }
 
 
@@ -669,13 +576,13 @@ DoFObjectAccessor<1,DoFHandler<3> >::vertex_dof_index (const unsigned int vertex
           ExcMessage ("DoFHandler not initialized"));
 
   Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
   Assert (vertex<2, ExcIndexRange (i,0,2));
-  Assert (i<this->get_fe().dofs_per_vertex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+  Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
 
   const unsigned int dof_number = (this->vertex_index(vertex) *
-                                  this->get_fe().dofs_per_vertex +
+                                  this->dof_handler->get_fe().dofs_per_vertex +
                                   i);
   return this->dof_handler->vertex_dofs[dof_number];
 }
@@ -691,9 +598,9 @@ DoFObjectAccessor<1,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int>
           ExcMessage ("DoFHandler not initialized"));
 
   Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
-  Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex +
-                                this->get_fe().dofs_per_line),
+  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+  Assert (dof_indices.size() == (2*this->dof_handler->get_fe().dofs_per_vertex +
+                                this->dof_handler->get_fe().dofs_per_line),
          DoFAccessor<DoFHandler<3> >::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
@@ -705,12 +612,12 @@ DoFObjectAccessor<1,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int>
                                   // not allocated for this
                                   // non-active thing
   Assert (!this->has_children() ||
-         (this->get_fe().dofs_per_cell ==
-          2*this->get_fe().dofs_per_vertex),
+         (this->dof_handler->get_fe().dofs_per_cell ==
+          2*this->dof_handler->get_fe().dofs_per_vertex),
          DoFAccessor<DoFHandler<3> >::ExcNotActive());
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line;
   std::vector<unsigned int>::iterator next = dof_indices.begin();
   for (unsigned int vertex=0; vertex<2; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -732,15 +639,15 @@ DoFObjectAccessor<2,DoFHandler<2> >::dof_index (const unsigned int i) const
          DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_quad,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+  Assert (i<this->dof_handler->get_fe().dofs_per_quad,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_quad));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
   return this->dof_handler->levels[this->present_level]
-    ->quad_dofs[this->present_index*this->get_fe().dofs_per_quad+i];
+    ->quad_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_quad+i];
 }
 
 
@@ -753,16 +660,16 @@ DoFObjectAccessor<2,DoFHandler<2> >::vertex_dof_index (const unsigned int vertex
 {
   Assert (this->dof_handler != 0,
          DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
   Assert (vertex<4, ExcIndexRange (i,0,4));
-  Assert (i<this->get_fe().dofs_per_vertex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+  Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
   const unsigned int dof_number = (this->vertex_index(vertex) *
-                                  this->get_fe().dofs_per_vertex +
+                                  this->dof_handler->get_fe().dofs_per_vertex +
                                   i);
   return this->dof_handler->vertex_dofs[dof_number];
 }
@@ -776,11 +683,11 @@ DoFObjectAccessor<2,DoFHandler<2> >::get_dof_indices (std::vector<unsigned int>
 {
   Assert (this->dof_handler != 0,
          DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
-  Assert (dof_indices.size() == (4*this->get_fe().dofs_per_vertex +
-                                4*this->get_fe().dofs_per_line +
-                                this->get_fe().dofs_per_quad),
+  Assert (dof_indices.size() == (4*this->dof_handler->get_fe().dofs_per_vertex +
+                                4*this->dof_handler->get_fe().dofs_per_line +
+                                this->dof_handler->get_fe().dofs_per_quad),
          DoFAccessor<DoFHandler<2> >::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
@@ -792,16 +699,16 @@ DoFObjectAccessor<2,DoFHandler<2> >::get_dof_indices (std::vector<unsigned int>
                                   // not allocated for this
                                   // non-active thing
   Assert (!this->has_children() ||
-         (this->get_fe().dofs_per_cell ==
-          4*this->get_fe().dofs_per_vertex),
+         (this->dof_handler->get_fe().dofs_per_cell ==
+          4*this->dof_handler->get_fe().dofs_per_vertex),
          DoFAccessor<DoFHandler<2> >::ExcNotActive());
   
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line,
-                    dofs_per_quad   = this->get_fe().dofs_per_quad;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line,
+                    dofs_per_quad   = this->dof_handler->get_fe().dofs_per_quad;
   std::vector<unsigned int>::iterator next = dof_indices.begin();
   for (unsigned int vertex=0; vertex<4; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -824,15 +731,15 @@ DoFObjectAccessor<2,DoFHandler<3> >::dof_index (const unsigned int i) const
          DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_quad,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+  Assert (i<this->dof_handler->get_fe().dofs_per_quad,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_quad));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
   return this->dof_handler->levels[this->present_level]
-    ->quad_dofs[this->present_index*this->get_fe().dofs_per_quad+i];
+    ->quad_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_quad+i];
 }
 
 
@@ -845,16 +752,16 @@ DoFObjectAccessor<2,DoFHandler<3> >::vertex_dof_index (const unsigned int vertex
 {
   Assert (this->dof_handler != 0,
          DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
   Assert (vertex<4, ExcIndexRange (i,0,4));
-  Assert (i<this->get_fe().dofs_per_vertex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+  Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
   const unsigned int dof_number = (this->vertex_index(vertex) *
-                                  this->get_fe().dofs_per_vertex +
+                                  this->dof_handler->get_fe().dofs_per_vertex +
                                   i);
   return this->dof_handler->vertex_dofs[dof_number];
 }
@@ -868,11 +775,11 @@ DoFObjectAccessor<2,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int>
 {
   Assert (this->dof_handler != 0,
          DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
-  Assert (dof_indices.size() == (4*this->get_fe().dofs_per_vertex +
-                                4*this->get_fe().dofs_per_line +
-                                this->get_fe().dofs_per_quad),
+  Assert (dof_indices.size() == (4*this->dof_handler->get_fe().dofs_per_vertex +
+                                4*this->dof_handler->get_fe().dofs_per_line +
+                                this->dof_handler->get_fe().dofs_per_quad),
          DoFAccessor<DoFHandler<3> >::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
@@ -884,16 +791,16 @@ DoFObjectAccessor<2,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int>
                                   // not allocated for this
                                   // non-active thing
   Assert (!this->has_children() ||
-         (this->get_fe().dofs_per_cell ==
-          4*this->get_fe().dofs_per_vertex),
+         (this->dof_handler->get_fe().dofs_per_cell ==
+          4*this->dof_handler->get_fe().dofs_per_vertex),
          DoFAccessor<DoFHandler<3> >::ExcNotActive());
   
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line,
-                    dofs_per_quad   = this->get_fe().dofs_per_quad;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line,
+                    dofs_per_quad   = this->dof_handler->get_fe().dofs_per_quad;
   std::vector<unsigned int>::iterator next = dof_indices.begin();
   for (unsigned int vertex=0; vertex<4; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -921,15 +828,15 @@ DoFObjectAccessor<3,DoFHandler<3> >::dof_index (const unsigned int i) const
          DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_hex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_hex));
+  Assert (i<this->dof_handler->get_fe().dofs_per_hex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_hex));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
   return this->dof_handler->levels[this->present_level]
-    ->hex_dofs[this->present_index*this->get_fe().dofs_per_hex+i];
+    ->hex_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_hex+i];
 }
 
 
@@ -942,16 +849,16 @@ DoFObjectAccessor<3,DoFHandler<3> >::vertex_dof_index (const unsigned int vertex
 {
   Assert (this->dof_handler != 0,
          DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
   Assert (vertex<8, ExcIndexRange (i,0,8));
-  Assert (i<this->get_fe().dofs_per_vertex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+  Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
   const unsigned int dof_number = (this->vertex_index(vertex) *
-                                  this->get_fe().dofs_per_vertex +
+                                  this->dof_handler->get_fe().dofs_per_vertex +
                                   i);
   return this->dof_handler->vertex_dofs[dof_number];
 }
@@ -965,12 +872,12 @@ DoFObjectAccessor<3,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int>
 {
   Assert (this->dof_handler != 0,
          DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
-  Assert (dof_indices.size() == (8*this->get_fe().dofs_per_vertex +
-                                12*this->get_fe().dofs_per_line +
-                                6*this->get_fe().dofs_per_quad +
-                                this->get_fe().dofs_per_hex),
+  Assert (dof_indices.size() == (8*this->dof_handler->get_fe().dofs_per_vertex +
+                                12*this->dof_handler->get_fe().dofs_per_line +
+                                6*this->dof_handler->get_fe().dofs_per_quad +
+                                this->dof_handler->get_fe().dofs_per_hex),
          DoFAccessor<DoFHandler<3> >::ExcVectorDoesNotMatch());
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
@@ -984,16 +891,16 @@ DoFObjectAccessor<3,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int>
                                   // not allocated for this
                                   // non-active thing
   Assert (!this->has_children() ||
-         (this->get_fe().dofs_per_cell ==
-          8*this->get_fe().dofs_per_vertex),
+         (this->dof_handler->get_fe().dofs_per_cell ==
+          8*this->dof_handler->get_fe().dofs_per_vertex),
          DoFAccessor<DoFHandler<3> >::ExcNotActive());
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line,
-                    dofs_per_quad   = this->get_fe().dofs_per_quad,
-                    dofs_per_hex    = this->get_fe().dofs_per_hex;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line,
+                    dofs_per_quad   = this->dof_handler->get_fe().dofs_per_quad,
+                    dofs_per_hex    = this->dof_handler->get_fe().dofs_per_hex;
   std::vector<unsigned int>::iterator next = dof_indices.begin();
   for (unsigned int vertex=0; vertex<8; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -1022,13 +929,13 @@ DoFObjectAccessor<1,hp::DoFHandler<1> >::vertex_dof_index (const unsigned int ve
           ExcMessage ("hp::DoFHandler not initialized"));
 
   Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0, DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
   Assert (vertex<2, ExcIndexRange (i,0,2));
-  Assert (i<this->get_fe().dofs_per_vertex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_vertex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_vertex));
 
   const unsigned int dof_number = (this->vertex_index(vertex) *
-                                  this->get_fe().dofs_per_vertex +
+                                  this->dof_handler->get_fe()[0].dofs_per_vertex +
                                   i);
   return this->dof_handler->vertex_dofs[dof_number];
 }
@@ -1045,13 +952,13 @@ DoFObjectAccessor<1,hp::DoFHandler<2> >::vertex_dof_index (const unsigned int ve
           ExcMessage ("hp::DoFHandler not initialized"));
 
   Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0, DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
   Assert (vertex<2, ExcIndexRange (i,0,2));
-  Assert (i<this->get_fe().dofs_per_vertex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_vertex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_vertex));
 
   const unsigned int dof_number = (this->vertex_index(vertex) *
-                                  this->get_fe().dofs_per_vertex +
+                                  this->dof_handler->get_fe()[0].dofs_per_vertex +
                                   i);
   return this->dof_handler->vertex_dofs[dof_number];
 }
@@ -1067,13 +974,13 @@ DoFObjectAccessor<1,hp::DoFHandler<3> >::vertex_dof_index (const unsigned int ve
           ExcMessage ("hp::DoFHandler not initialized"));
 
   Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0, DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
   Assert (vertex<2, ExcIndexRange (i,0,2));
-  Assert (i<this->get_fe().dofs_per_vertex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_vertex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_vertex));
 
   const unsigned int dof_number = (this->vertex_index(vertex) *
-                                  this->get_fe().dofs_per_vertex +
+                                  this->dof_handler->get_fe()[0].dofs_per_vertex +
                                   i);
   return this->dof_handler->vertex_dofs[dof_number];
 }
@@ -1087,16 +994,16 @@ DoFObjectAccessor<2,hp::DoFHandler<2> >::vertex_dof_index (const unsigned int ve
 {
   Assert (this->dof_handler != 0,
          DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
   Assert (vertex<4, ExcIndexRange (i,0,4));
-  Assert (i<this->get_fe().dofs_per_vertex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_vertex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_vertex));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("hp::DoFHandler not initialized"));
 
   const unsigned int dof_number = (this->vertex_index(vertex) *
-                                  this->get_fe().dofs_per_vertex +
+                                  this->dof_handler->get_fe()[0].dofs_per_vertex +
                                   i);
   return this->dof_handler->vertex_dofs[dof_number];
 }
@@ -1111,16 +1018,16 @@ DoFObjectAccessor<2,hp::DoFHandler<3> >::vertex_dof_index (const unsigned int ve
 {
   Assert (this->dof_handler != 0,
          DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
   Assert (vertex<4, ExcIndexRange (i,0,4));
-  Assert (i<this->get_fe().dofs_per_vertex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_vertex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_vertex));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("hp::DoFHandler not initialized"));
 
   const unsigned int dof_number = (this->vertex_index(vertex) *
-                                  this->get_fe().dofs_per_vertex +
+                                  this->dof_handler->get_fe()[0].dofs_per_vertex +
                                   i);
   return this->dof_handler->vertex_dofs[dof_number];
 }
@@ -1135,16 +1042,16 @@ DoFObjectAccessor<3,hp::DoFHandler<3> >::vertex_dof_index (const unsigned int ve
 {
   Assert (this->dof_handler != 0,
          DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
   Assert (vertex<4, ExcIndexRange (i,0,4));
-  Assert (i<this->get_fe().dofs_per_vertex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_vertex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_vertex));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("hp::DoFHandler not initialized"));
 
   const unsigned int dof_number = (this->vertex_index(vertex) *
-                                  this->get_fe().dofs_per_vertex +
+                                  this->dof_handler->get_fe()[0].dofs_per_vertex +
                                   i);
   return this->dof_handler->vertex_dofs[dof_number];
 }
@@ -1173,9 +1080,9 @@ DoFObjectAccessor<1,hp::DoFHandler<1> >::dof_index (const unsigned int i) const
           ExcMessage ("DoFHandler not initialized"));
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0, BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_line,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_line,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_line));
 
                                   // for lines in 1d, we only have to
                                   // take care of the offset, no
@@ -1203,9 +1110,9 @@ DoFObjectAccessor<1,hp::DoFHandler<1> >::get_dof_indices (std::vector<unsigned i
           ExcMessage ("DoFHandler not initialized"));
 
   Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0, DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
-  Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex +
-                                this->get_fe().dofs_per_line),
+  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
+  Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[0].dofs_per_vertex +
+                                this->dof_handler->get_fe()[0].dofs_per_line),
          DoFAccessor<hp::DoFHandler<1> >::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
@@ -1217,12 +1124,12 @@ DoFObjectAccessor<1,hp::DoFHandler<1> >::get_dof_indices (std::vector<unsigned i
                                   // not allocated for this
                                   // non-active thing
   Assert (!this->has_children() ||
-         (this->get_fe().dofs_per_cell ==
-          2*this->get_fe().dofs_per_vertex),
+         (this->dof_handler->get_fe()[0].dofs_per_cell ==
+          2*this->dof_handler->get_fe()[0].dofs_per_vertex),
          DoFAccessor<hp::DoFHandler<1> >::ExcNotActive());
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe()[0].dofs_per_line;
   std::vector<unsigned int>::iterator next = dof_indices.begin();
   for (unsigned int vertex=0; vertex<2; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -1254,9 +1161,9 @@ DoFObjectAccessor<1,hp::DoFHandler<2> >::dof_index (const unsigned int i) const
           ExcMessage ("DoFHandler not initialized"));
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0, BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_line,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_line,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_line));
 
   const unsigned int offset = this->dof_handler->levels[this->present_level]
                              ->dof_line_index_offset[this->present_index];
@@ -1280,9 +1187,9 @@ DoFObjectAccessor<1,hp::DoFHandler<2> >::get_dof_indices (std::vector<unsigned i
           ExcMessage ("DoFHandler not initialized"));
 
   Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0, DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
-  Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex +
-                                this->get_fe().dofs_per_line),
+  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
+  Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[0].dofs_per_vertex +
+                                this->dof_handler->get_fe()[0].dofs_per_line),
          DoFAccessor<hp::DoFHandler<2> >::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
@@ -1294,12 +1201,12 @@ DoFObjectAccessor<1,hp::DoFHandler<2> >::get_dof_indices (std::vector<unsigned i
                                   // not allocated for this
                                   // non-active thing
   Assert (!this->has_children() ||
-         (this->get_fe().dofs_per_cell ==
-          2*this->get_fe().dofs_per_vertex),
+         (this->dof_handler->get_fe()[0].dofs_per_cell ==
+          2*this->dof_handler->get_fe()[0].dofs_per_vertex),
          DoFAccessor<hp::DoFHandler<2> >::ExcNotActive());
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe()[0].dofs_per_line;
   std::vector<unsigned int>::iterator next = dof_indices.begin();
   for (unsigned int vertex=0; vertex<2; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -1331,9 +1238,9 @@ DoFObjectAccessor<1,hp::DoFHandler<3> >::dof_index (const unsigned int i) const
           ExcMessage ("DoFHandler not initialized"));
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0, BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_line,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_line,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_line));
 
   const unsigned int offset = this->dof_handler->levels[this->present_level]
                              ->dof_line_index_offset[this->present_index];
@@ -1357,9 +1264,9 @@ DoFObjectAccessor<1,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned i
           ExcMessage ("DoFHandler not initialized"));
 
   Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0, DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
-  Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex +
-                                this->get_fe().dofs_per_line),
+  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
+  Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[0].dofs_per_vertex +
+                                this->dof_handler->get_fe()[0].dofs_per_line),
          DoFAccessor<hp::DoFHandler<3> >::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
@@ -1371,12 +1278,12 @@ DoFObjectAccessor<1,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned i
                                   // not allocated for this
                                   // non-active thing
   Assert (!this->has_children() ||
-         (this->get_fe().dofs_per_cell ==
-          2*this->get_fe().dofs_per_vertex),
+         (this->dof_handler->get_fe()[0].dofs_per_cell ==
+          2*this->dof_handler->get_fe()[0].dofs_per_vertex),
          DoFAccessor<hp::DoFHandler<3> >::ExcNotActive());
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe()[0].dofs_per_line;
   std::vector<unsigned int>::iterator next = dof_indices.begin();
   for (unsigned int vertex=0; vertex<2; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -1401,10 +1308,10 @@ DoFObjectAccessor<1,hp::DoFHandler<1> >::set_dof_index (const unsigned int i,
           ExcMessage ("DoFHandler not initialized"));
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_line,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_line,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_line));
 
                                   // for lines in 1d, we only have to
                                   // take care of the offset, no
@@ -1437,10 +1344,10 @@ DoFObjectAccessor<1, hp::DoFHandler<2> >::set_dof_index (const unsigned int i,
           ExcMessage ("DoFHandler not initialized"));
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_line,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_line,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_line));
 
 //TODO:[?] In two dimension it could happen that we have different active_fe_indices
 // on a line between to cells. Hence we have to differentiate between these two cases.
@@ -1473,10 +1380,10 @@ DoFObjectAccessor<1, hp::DoFHandler<3> >::set_dof_index (const unsigned int i,
           ExcMessage ("DoFHandler not initialized"));
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_line,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_line,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_line));
 
   const unsigned int offset = this->dof_handler->levels[this->present_level]
                               ->dof_line_index_offset[this->present_index];
@@ -1492,129 +1399,6 @@ DoFObjectAccessor<1, hp::DoFHandler<3> >::set_dof_index (const unsigned int i,
 
 
 
-template <>
-inline
-const FiniteElement<1> &
-DoFObjectAccessor<1,hp::DoFHandler<1> >::get_fe () const
-{
-  return (*dof_handler->finite_elements)[active_fe_index ()];
-}
-
-
-
-template <>
-inline
-const FiniteElement<2> &
-DoFObjectAccessor<1,hp::DoFHandler<2> >::get_fe () const
-{
-  Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
-                            "associated with active_fe_indices and corresponding "
-                            "finite element objects"));
-  return (*dof_handler->finite_elements)[0];
-}
-
-
-
-template <>
-inline
-const FiniteElement<3> &
-DoFObjectAccessor<1,hp::DoFHandler<3> >::get_fe () const
-{
-  Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
-                            "associated with active_fe_indices and corresponding "
-                            "finite element objects"));
-  return (*dof_handler->finite_elements)[0];
-}
-
-
-
-template <>
-inline
-unsigned int
-DoFObjectAccessor<1,hp::DoFHandler<1> >::active_fe_index () const
-{
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-  Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
-         this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
-         ExcIndexRange (this->present_index, 0,
-                        this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
-  return this->dof_handler->levels[this->present_level]
-    ->active_fe_indices[this->present_index];
-}
-
-
-
-template <>
-inline
-unsigned int
-DoFObjectAccessor<1,hp::DoFHandler<2> >::active_fe_index () const
-{
-  Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
-                            "associated with active_fe_indices and corresponding "
-                            "finite element objects"));
-  return 0;
-}
-
-
-
-template <>
-inline
-unsigned int
-DoFObjectAccessor<1,hp::DoFHandler<3> >::active_fe_index () const
-{
-  Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
-                            "associated with active_fe_indices and corresponding "
-                            "finite element objects"));
-  return 0;
-}
-
-
-
-template <>
-inline
-void
-DoFObjectAccessor<1,hp::DoFHandler<1> >::set_active_fe_index (const unsigned int i)
-{
-  Assert (this->dof_handler != 0, ExcInvalidObject());
-  Assert (static_cast<unsigned int>(this->present_level) <
-          this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-  Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
-         this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
-         ExcIndexRange (this->present_index, 0,
-                        this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
-  Assert (i < this->dof_handler->finite_elements->size (),
-          ExcIndexRange(i, 0, this->dof_handler->finite_elements->size ()));
-  this->dof_handler->levels[this->present_level]
-    ->active_fe_indices[this->present_index] = i;
-}
-
-
-
-template <>
-inline
-void
-DoFObjectAccessor<1,hp::DoFHandler<2> >::set_active_fe_index (const unsigned int)
-{
-  Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
-                            "associated with active_fe_indices and corresponding "
-                            "finite element objects"));
-}
-
-
-
-template <>
-inline
-void
-DoFObjectAccessor<1,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int)
-{
-  Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
-                            "associated with active_fe_indices and corresponding "
-                            "finite element objects"));
-}
-
-
 /*------------- Functions: DoFObjectAccessor<2,hp::DoFHandler> -------------*/
 
 template <>
@@ -1629,10 +1413,10 @@ unsigned int DoFObjectAccessor<2,hp::DoFHandler<2> >::dof_index (const unsigned
           ExcMessage ("DoFHandler not initialized"));
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_quad,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_quad,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_quad));
 
                                   // for quads in 2d, we only have to
                                   // take care of the offset, no
@@ -1663,10 +1447,10 @@ unsigned int DoFObjectAccessor<2,hp::DoFHandler<3> >::dof_index (const unsigned
           ExcMessage ("DoFHandler not initialized"));
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_quad,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_quad,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_quad));
 
   const unsigned int offset = this->dof_handler->levels[this->present_level]
                              ->dof_quad_index_offset[this->present_index];
@@ -1695,10 +1479,10 @@ DoFObjectAccessor<2, hp::DoFHandler<2> >::set_dof_index (const unsigned int i,
           ExcMessage ("DoFHandler not initialized"));
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_quad,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_quad,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_quad));
 
                                   // for quads in 2d, we only have to
                                   // take care of the offset, no
@@ -1731,10 +1515,10 @@ DoFObjectAccessor<2, hp::DoFHandler<3> >::set_dof_index (const unsigned int i,
           ExcMessage ("DoFHandler not initialized"));
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_quad,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_quad,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_quad));
 
   const unsigned int offset = this->dof_handler->levels[this->present_level]
                               ->dof_quad_index_offset[this->present_index];
@@ -1756,11 +1540,11 @@ DoFObjectAccessor<2,hp::DoFHandler<2> >::get_dof_indices (std::vector<unsigned i
 {
   Assert (this->dof_handler != 0,
          DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
-  Assert (dof_indices.size() == (4*this->get_fe().dofs_per_vertex +
-                                4*this->get_fe().dofs_per_line +
-                                this->get_fe().dofs_per_quad),
+  Assert (dof_indices.size() == (4*this->dof_handler->get_fe()[0].dofs_per_vertex +
+                                4*this->dof_handler->get_fe()[0].dofs_per_line +
+                                this->dof_handler->get_fe()[0].dofs_per_quad),
          DoFAccessor<hp::DoFHandler<2> >::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
@@ -1772,16 +1556,16 @@ DoFObjectAccessor<2,hp::DoFHandler<2> >::get_dof_indices (std::vector<unsigned i
                                   // not allocated for this
                                   // non-active thing
   Assert (!this->has_children() ||
-         (this->get_fe().dofs_per_cell ==
-          4*this->get_fe().dofs_per_vertex),
+         (this->dof_handler->get_fe()[0].dofs_per_cell ==
+          4*this->dof_handler->get_fe()[0].dofs_per_vertex),
          DoFAccessor<hp::DoFHandler<2> >::ExcNotActive());
   
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line,
-                    dofs_per_quad   = this->get_fe().dofs_per_quad;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe()[0].dofs_per_line,
+                    dofs_per_quad   = this->dof_handler->get_fe()[0].dofs_per_quad;
   std::vector<unsigned int>::iterator next = dof_indices.begin();
   for (unsigned int vertex=0; vertex<4; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -1802,11 +1586,11 @@ DoFObjectAccessor<2,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned i
 {
   Assert (this->dof_handler != 0,
          DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
-  Assert (dof_indices.size() == (4*this->get_fe().dofs_per_vertex +
-                                4*this->get_fe().dofs_per_line +
-                                this->get_fe().dofs_per_quad),
+  Assert (dof_indices.size() == (4*this->dof_handler->get_fe()[0].dofs_per_vertex +
+                                4*this->dof_handler->get_fe()[0].dofs_per_line +
+                                this->dof_handler->get_fe()[0].dofs_per_quad),
          DoFAccessor<hp::DoFHandler<3> >::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
@@ -1818,16 +1602,16 @@ DoFObjectAccessor<2,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned i
                                   // not allocated for this
                                   // non-active thing
   Assert (!this->has_children() ||
-         (this->get_fe().dofs_per_cell ==
-          4*this->get_fe().dofs_per_vertex),
+         (this->dof_handler->get_fe()[0].dofs_per_cell ==
+          4*this->dof_handler->get_fe()[0].dofs_per_vertex),
          DoFAccessor<hp::DoFHandler<3> >::ExcNotActive());
   
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line,
-                    dofs_per_quad   = this->get_fe().dofs_per_quad;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe()[0].dofs_per_line,
+                    dofs_per_quad   = this->dof_handler->get_fe()[0].dofs_per_quad;
   std::vector<unsigned int>::iterator next = dof_indices.begin();
   for (unsigned int vertex=0; vertex<4; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -1841,93 +1625,6 @@ DoFObjectAccessor<2,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned i
 
 
 
-template <>
-inline
-const FiniteElement<2> &
-DoFObjectAccessor<2,hp::DoFHandler<2> >::get_fe () const
-{
-  return (*dof_handler->finite_elements)[active_fe_index ()];
-}
-
-
-
-template <>
-inline
-const FiniteElement<3> &
-DoFObjectAccessor<2,hp::DoFHandler<3> >::get_fe () const
-{
-  Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
-                            "associated with active_fe_indices and corresponding "
-                            "finite element objects"));
-  return (*dof_handler->finite_elements)[0];
-}
-
-
-
-
-template <>
-inline
-unsigned int
-DoFObjectAccessor<2,hp::DoFHandler<2> >::active_fe_index () const
-{
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-  Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
-         this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
-         ExcIndexRange (this->present_index, 0,
-                        this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
-  return this->dof_handler->levels[this->present_level]
-    ->active_fe_indices[this->present_index];
-}
-
-
-
-
-template <>
-inline
-unsigned int
-DoFObjectAccessor<2,hp::DoFHandler<3> >::active_fe_index () const
-{
-  Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
-                            "associated with active_fe_indices and corresponding "
-                            "finite element objects"));
-  return 0;
-}
-
-
-
-template <>
-inline
-void
-DoFObjectAccessor<2,hp::DoFHandler<2> >::set_active_fe_index (const unsigned int i)
-{
-  Assert (this->dof_handler != 0, ExcInvalidObject());
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-  Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
-         this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
-         ExcIndexRange (this->present_index, 0,
-                        this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
-  Assert (i < this->dof_handler->finite_elements->size (),
-          ExcIndexRange(i, 0, this->dof_handler->finite_elements->size ()));
-
-  this->dof_handler->levels[this->present_level]
-    ->active_fe_indices[this->present_index] = i;
-}
-
-
-
-template <>
-inline
-void
-DoFObjectAccessor<2,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int)
-{
-  Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
-                            "associated with active_fe_indices and corresponding "
-                            "finite element objects"));
-}
 
 
 /*------------- Functions: DoFObjectAccessor<3,hp::DoFHandler> -------------*/
@@ -1945,10 +1642,10 @@ DoFObjectAccessor<3,hp::DoFHandler<3> >::dof_index (const unsigned int i) const
           ExcMessage ("DoFHandler not initialized"));
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_hex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_hex));
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_hex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_hex));
 
                                   // for hexes in 3d, we only have to
                                   // take care of the offset, no
@@ -1981,10 +1678,10 @@ DoFObjectAccessor<3, hp::DoFHandler<3> >::set_dof_index (const unsigned int i,
           ExcMessage ("DoFHandler not initialized"));
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_hex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_hex));
+  Assert (i<this->dof_handler->get_fe()[0].dofs_per_hex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_hex));
 
                                   // for hexes in 3d, we only have to
                                   // take care of the offset, no
@@ -2010,12 +1707,12 @@ DoFObjectAccessor<3,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned i
 {
   Assert (this->dof_handler != 0,
          DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
-  Assert (dof_indices.size() == (8*this->get_fe().dofs_per_vertex +
-                                12*this->get_fe().dofs_per_line +
-                                6*this->get_fe().dofs_per_quad +
-                                this->get_fe().dofs_per_hex),
+  Assert (dof_indices.size() == (8*this->dof_handler->get_fe()[0].dofs_per_vertex +
+                                12*this->dof_handler->get_fe()[0].dofs_per_line +
+                                6*this->dof_handler->get_fe()[0].dofs_per_quad +
+                                this->dof_handler->get_fe()[0].dofs_per_hex),
          DoFAccessor<hp::DoFHandler<3> >::ExcVectorDoesNotMatch());
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
@@ -2029,16 +1726,16 @@ DoFObjectAccessor<3,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned i
                                   // not allocated for this
                                   // non-active thing
   Assert (!this->has_children() ||
-         (this->get_fe().dofs_per_cell ==
-          8*this->get_fe().dofs_per_vertex),
+         (this->dof_handler->get_fe()[0].dofs_per_cell ==
+          8*this->dof_handler->get_fe()[0].dofs_per_vertex),
          DoFAccessor<hp::DoFHandler<3> >::ExcNotActive());
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line,
-                    dofs_per_quad   = this->get_fe().dofs_per_quad,
-                    dofs_per_hex    = this->get_fe().dofs_per_hex;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe()[0].dofs_per_line,
+                    dofs_per_quad   = this->dof_handler->get_fe()[0].dofs_per_quad,
+                    dofs_per_hex    = this->dof_handler->get_fe()[0].dofs_per_hex;
   std::vector<unsigned int>::iterator next = dof_indices.begin();
   for (unsigned int vertex=0; vertex<8; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -2055,53 +1752,6 @@ DoFObjectAccessor<3,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned i
 
 
 
-template <>
-inline
-const FiniteElement<3> &
-DoFObjectAccessor<3,hp::DoFHandler<3> >::get_fe () const
-{
-  return (*dof_handler->finite_elements)[active_fe_index ()];
-}
-
-
-
-template <>
-inline
-unsigned int
-DoFObjectAccessor<3,hp::DoFHandler<3> >::active_fe_index () const
-{
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-  Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
-         this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
-         ExcIndexRange (this->present_index, 0,
-                        this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
-  return this->dof_handler->levels[this->present_level]
-    ->active_fe_indices[this->present_index];
-}
-
-
-
-template <>
-inline
-void
-DoFObjectAccessor<3,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int i)
-{
-  Assert (this->dof_handler != 0, ExcInvalidObject());
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-  Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
-         this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
-         ExcIndexRange (this->present_index, 0,
-                        this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
-  Assert (i < this->dof_handler->finite_elements->size (),
-          ExcIndexRange(i, 0, this->dof_handler->finite_elements->size ()));
-
-  this->dof_handler->levels[this->present_level]
-    ->active_fe_indices[this->present_index] = i;
-}
-
-
 
 /*------------------------- Functions: DoFCellAccessor -----------------------*/
 
@@ -2288,6 +1938,185 @@ get_dof_indices (std::vector<unsigned int> &dof_indices) const
 
 
 
+template <class DH>
+inline
+const FiniteElement<DH::dimension> &
+DoFCellAccessor<DH>::get_fe () const
+{
+  return this->dof_handler->get_fe();
+}
+
+
+
+template <class DH>
+inline
+unsigned int
+DoFCellAccessor<DH>::active_fe_index () const
+{
+  return 0;
+}
+
+
+
+template <class DH>
+inline
+void
+DoFCellAccessor<DH>::set_active_fe_index (const unsigned int i)
+{
+  Assert (i == 0, typename DoFAccessor<DH>::ExcInvalidObject());
+}
+
+
+
+
+
+template <>
+inline
+const FiniteElement<1> &
+DoFCellAccessor<hp::DoFHandler<1> >::get_fe () const
+{
+  return this->dof_handler->get_fe()[active_fe_index ()];
+}
+
+
+
+template <>
+inline
+const FiniteElement<2> &
+DoFCellAccessor<hp::DoFHandler<2> >::get_fe () const
+{
+  return this->dof_handler->get_fe()[active_fe_index ()];
+}
+
+
+
+template <>
+inline
+const FiniteElement<3> &
+DoFCellAccessor<hp::DoFHandler<3> >::get_fe () const
+{
+  return this->dof_handler->get_fe()[active_fe_index ()];
+}
+
+
+
+template <>
+inline
+unsigned int
+DoFCellAccessor<hp::DoFHandler<1> >::active_fe_index () const
+{
+  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
+          ExcMessage ("DoFHandler not initialized"));
+  Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
+         this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
+         ExcIndexRange (this->present_index, 0,
+                        this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
+  return this->dof_handler->levels[this->present_level]
+    ->active_fe_indices[this->present_index];
+}
+
+
+
+template <>
+inline
+unsigned int
+DoFCellAccessor<hp::DoFHandler<2> >::active_fe_index () const
+{
+  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
+          ExcMessage ("DoFHandler not initialized"));
+  Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
+         this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
+         ExcIndexRange (this->present_index, 0,
+                        this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
+  return this->dof_handler->levels[this->present_level]
+    ->active_fe_indices[this->present_index];
+}
+
+
+
+template <>
+inline
+unsigned int
+DoFCellAccessor<hp::DoFHandler<3> >::active_fe_index () const
+{
+  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
+          ExcMessage ("DoFHandler not initialized"));
+  Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
+         this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
+         ExcIndexRange (this->present_index, 0,
+                        this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
+  return this->dof_handler->levels[this->present_level]
+    ->active_fe_indices[this->present_index];
+}
+
+
+
+template <>
+inline
+void
+DoFCellAccessor<hp::DoFHandler<1> >::set_active_fe_index (const unsigned int i)
+{
+  Assert (this->dof_handler != 0,
+          DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
+  Assert (static_cast<unsigned int>(this->present_level) <
+          this->dof_handler->levels.size(),
+          ExcMessage ("DoFHandler not initialized"));
+  Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
+         this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
+         ExcIndexRange (this->present_index, 0,
+                        this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
+  Assert (i < this->dof_handler->get_fe().size (),
+          ExcIndexRange(i, 0, this->dof_handler->get_fe().size ()));
+  this->dof_handler->levels[this->present_level]
+    ->active_fe_indices[this->present_index] = i;
+}
+
+
+
+template <>
+inline
+void
+DoFCellAccessor<hp::DoFHandler<2> >::set_active_fe_index (const unsigned int i)
+{
+  Assert (this->dof_handler != 0,
+          DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
+  Assert (static_cast<unsigned int>(this->present_level) <
+          this->dof_handler->levels.size(),
+          ExcMessage ("DoFHandler not initialized"));
+  Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
+         this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
+         ExcIndexRange (this->present_index, 0,
+                        this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
+  Assert (i < this->dof_handler->get_fe().size (),
+          ExcIndexRange(i, 0, this->dof_handler->get_fe().size ()));
+  this->dof_handler->levels[this->present_level]
+    ->active_fe_indices[this->present_index] = i;
+}
+
+
+
+template <>
+inline
+void
+DoFCellAccessor<hp::DoFHandler<3> >::set_active_fe_index (const unsigned int i)
+{
+  Assert (this->dof_handler != 0,
+          DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
+  Assert (static_cast<unsigned int>(this->present_level) <
+          this->dof_handler->levels.size(),
+          ExcMessage ("DoFHandler not initialized"));
+  Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
+         this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
+         ExcIndexRange (this->present_index, 0,
+                        this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
+  Assert (i < this->dof_handler->get_fe().size (),
+          ExcIndexRange(i, 0, this->dof_handler->get_fe().size ()));
+  this->dof_handler->levels[this->present_level]
+    ->active_fe_indices[this->present_index] = i;
+}
+
+
+
 template <>
 inline
 void
@@ -2323,8 +2152,7 @@ distribute_local_to_global (const Vector<number> &local_source,
          typename BaseClass::ExcInvalidObject());
   Assert (&this->get_fe() != 0,
          typename BaseClass::ExcInvalidObject());
-  Assert (local_source.size() == (2*this->get_fe().dofs_per_vertex +
-                                 this->get_fe().dofs_per_line),
+  Assert (local_source.size() == this->get_fe().dofs_per_cell,
          typename BaseClass::ExcVectorDoesNotMatch());
   Assert (this->dof_handler->n_dofs() == global_destination.size(),
          typename BaseClass::ExcVectorDoesNotMatch());
@@ -2367,8 +2195,7 @@ distribute_local_to_global (const FullMatrix<number> &local_source,
          typename BaseClass::ExcInvalidObject());
   Assert (&this->get_fe() != 0,
          typename BaseClass::ExcInvalidObject());
-  Assert (local_source.m() == (2*this->get_fe().dofs_per_vertex +
-                               this->get_fe().dofs_per_line),
+  Assert (local_source.m() == this->get_fe().dofs_per_cell,
          typename BaseClass::ExcVectorDoesNotMatch());
   Assert (local_source.m() == local_source.n(),
          typename BaseClass::ExcMatrixDoesNotMatch());
index 6b1a7acc35404febb8aeb07cd0001d9b06f5188c..319720da783f8c1ededa6e1e6a35897e073583c4 100644 (file)
@@ -1042,6 +1042,11 @@ namespace hp
                                         * Make accessor objects friends.
                                         */
       template <int dim1, class DH> friend class ::DoFObjectAccessor;
+
+                                       /**
+                                        * Make accessor objects friends.
+                                        */
+      template <class DH> friend class ::DoFCellAccessor;
   };
 
 
index 8c57ae088c0b9d887904523372635e90e6c1ab1f..49ea3e727769c53174f5d5634d42ae817e1162b5 100644 (file)
@@ -36,7 +36,7 @@
 
 template <class DH>
 void DoFObjectAccessor<1, DH>::set_dof_index (const unsigned int i,
-                                                  const unsigned int index) const
+                                              const unsigned int index) const
 {
   typedef DoFAccessor<DH> BaseClass;
 
@@ -44,21 +44,24 @@ void DoFObjectAccessor<1, DH>::set_dof_index (const unsigned int i,
          typename BaseClass::ExcInvalidObject());
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          typename BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_line,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+  Assert (i<this->dof_handler->get_fe().dofs_per_line,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_line));
 
   this->dof_handler->levels[this->present_level]
-    ->line_dofs[this->present_index*this->get_fe().dofs_per_line+i] = index;
+    ->line_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_line+i]
+    = index;
 }
 
 
 
+
+
 template <class DH>
 void DoFObjectAccessor<1, DH>::set_vertex_dof_index (const unsigned int vertex,
-                                                         const unsigned int i,
-                                                         const unsigned int index) const
+                                                     const unsigned int i,
+                                                     const unsigned int index) const
 
 {
                                   // since the exception classes are
@@ -74,14 +77,14 @@ void DoFObjectAccessor<1, DH>::set_vertex_dof_index (const unsigned int vertex,
   
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (vertex<2, ExcIndexRange (i,0,2));
-  Assert (i<this->get_fe().dofs_per_vertex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+  Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
 
   const unsigned int dof_number = (this->vertex_index(vertex) *
-                                  this->get_fe().dofs_per_vertex +
+                                  this->dof_handler->get_fe().dofs_per_vertex +
                                   i);
   this->dof_handler->vertex_dofs[dof_number] = index;
 }
@@ -92,24 +95,24 @@ template <class DH>
 template <class InputVector, typename number>
 void
 DoFObjectAccessor<1,DH>::get_dof_values (const InputVector &values,
-                                            Vector<number>    &local_values) const
+                                         Vector<number>    &local_values) const
 {
   typedef DoFAccessor<DH> BaseClass;
 
   Assert (dim==1, ExcInternalError());
   
   Assert (this->dof_handler != 0, typename BaseClass::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          typename BaseClass::ExcInvalidObject());
-  Assert (local_values.size() == this->get_fe().dofs_per_cell,
+  Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
          typename BaseClass::ExcVectorDoesNotMatch());
   Assert (values.size() == this->dof_handler->n_dofs(),
          typename BaseClass::ExcVectorDoesNotMatch());
   Assert (this->has_children() == false,
          typename BaseClass::ExcNotActive());
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line;
   typename Vector<number>::iterator next_local_value=local_values.begin();
   for (unsigned int vertex=0; vertex<2; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -127,24 +130,24 @@ template <class DH>
 template <class OutputVector, typename number>
 void
 DoFObjectAccessor<1,DH>::set_dof_values (const Vector<number> &local_values,
-                                            OutputVector         &values) const
+                                         OutputVector         &values) const
 {
   typedef DoFAccessor<DH> BaseClass;
 
   Assert (dim==1, ExcInternalError());
   
   Assert (this->dof_handler != 0, typename BaseClass::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          typename BaseClass::ExcInvalidObject());
-  Assert (local_values.size() == this->get_fe().dofs_per_cell,
+  Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
          typename BaseClass::ExcVectorDoesNotMatch());
   Assert (values.size() == this->dof_handler->n_dofs(),
          typename BaseClass::ExcVectorDoesNotMatch());
   Assert (this->has_children() == false,
          typename BaseClass::ExcNotActive());
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line;
   typename Vector<number>::const_iterator next_local_value=local_values.begin();
   for (unsigned int vertex=0; vertex<2; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -157,12 +160,13 @@ DoFObjectAccessor<1,DH>::set_dof_values (const Vector<number> &local_values,
 }
 
 
+
 /*------------------------- Functions: DoFObjectAccessor<2,dim> -----------------------*/
 
 
 template <class DH>
 void DoFObjectAccessor<2, DH>::set_dof_index (const unsigned int i,
-                                                  const unsigned int index) const
+                                              const unsigned int index) const
 {
   typedef DoFAccessor<DH> BaseClass;
 
@@ -170,13 +174,13 @@ void DoFObjectAccessor<2, DH>::set_dof_index (const unsigned int i,
          typename BaseClass::ExcInvalidObject());
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          typename BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_quad,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+  Assert (i<this->dof_handler->get_fe().dofs_per_quad,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_quad));
 
   this->dof_handler->levels[this->present_level]
-    ->quad_dofs[this->present_index*this->get_fe().dofs_per_quad+i] = index;
+    ->quad_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_quad+i] = index;
 }
 
 
@@ -184,21 +188,21 @@ void DoFObjectAccessor<2, DH>::set_dof_index (const unsigned int i,
 template <class DH>
 void
 DoFObjectAccessor<2, DH>::set_vertex_dof_index (const unsigned int vertex,
-                                                    const unsigned int i,
-                                                    const unsigned int index) const
+                                                const unsigned int i,
+                                                const unsigned int index) const
 {
   typedef DoFAccessor<DH> BaseClass;
 
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (vertex<4, ExcIndexRange (i,0,4));
-  Assert (i<this->get_fe().dofs_per_vertex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+  Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
 
   const unsigned int dof_number = (this->vertex_index(vertex) *
-                                  this->get_fe().dofs_per_vertex +
+                                  this->dof_handler->get_fe().dofs_per_vertex +
                                   i);
   this->dof_handler->vertex_dofs[dof_number] = index;
 }
@@ -209,7 +213,7 @@ template <class DH>
 template <class InputVector, typename number>
 void
 DoFObjectAccessor<2,DH>::get_dof_values (const InputVector &values,
-                                            Vector<number>    &local_values) const
+                                         Vector<number>    &local_values) const
 {
   typedef DoFAccessor<DH> BaseClass;
 
@@ -217,18 +221,18 @@ DoFObjectAccessor<2,DH>::get_dof_values (const InputVector &values,
   
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          typename BaseClass::ExcInvalidObject());
-  Assert (local_values.size() == this->get_fe().dofs_per_cell,
+  Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
          typename BaseClass::ExcVectorDoesNotMatch());
   Assert (values.size() == this->dof_handler->n_dofs(),
          typename BaseClass::ExcVectorDoesNotMatch());
   Assert (this->has_children() == false,
          typename BaseClass::ExcNotActive());
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line,
-                    dofs_per_quad   = this->get_fe().dofs_per_quad;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line,
+                    dofs_per_quad   = this->dof_handler->get_fe().dofs_per_quad;
   typename Vector<number>::iterator next_local_value=local_values.begin();
   for (unsigned int vertex=0; vertex<4; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -249,7 +253,7 @@ template <class DH>
 template <class OutputVector, typename number>
 void
 DoFObjectAccessor<2,DH>::set_dof_values (const Vector<number> &local_values,
-                                            OutputVector         &values) const
+                                         OutputVector         &values) const
 {
   typedef DoFAccessor<DH> BaseClass;
 
@@ -257,18 +261,18 @@ DoFObjectAccessor<2,DH>::set_dof_values (const Vector<number> &local_values,
   
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          typename BaseClass::ExcInvalidObject());
-  Assert (local_values.size() == this->get_fe().dofs_per_cell,
+  Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
          typename BaseClass::ExcVectorDoesNotMatch());
   Assert (values.size() == this->dof_handler->n_dofs(),
          typename BaseClass::ExcVectorDoesNotMatch());
   Assert (this->has_children() == false,
          typename BaseClass::ExcNotActive());
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line,
-                    dofs_per_quad   = this->get_fe().dofs_per_quad;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line,
+                    dofs_per_quad   = this->dof_handler->get_fe().dofs_per_quad;
   typename Vector<number>::const_iterator next_local_value=local_values.begin();
   for (unsigned int vertex=0; vertex<4; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -289,7 +293,7 @@ DoFObjectAccessor<2,DH>::set_dof_values (const Vector<number> &local_values,
 
 template <class DH>
 void DoFObjectAccessor<3, DH>::set_dof_index (const unsigned int i,
-                                                  const unsigned int index) const
+                                              const unsigned int index) const
 {
   typedef DoFAccessor<DH> BaseClass;
 
@@ -297,35 +301,35 @@ void DoFObjectAccessor<3, DH>::set_dof_index (const unsigned int i,
          typename BaseClass::ExcInvalidObject());
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          typename BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_hex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_hex));
+  Assert (i<this->dof_handler->get_fe().dofs_per_hex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_hex));
 
   this->dof_handler->levels[this->present_level]
-    ->hex_dofs[this->present_index*this->get_fe().dofs_per_hex+i] = index;
+    ->hex_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_hex+i] = index;
 }
 
 
 
 template <class DH>
 void DoFObjectAccessor<3, DH>::set_vertex_dof_index (const unsigned int vertex,
-                                                         const unsigned int i,
-                                                         const unsigned int index) const
+                                                     const unsigned int i,
+                                                     const unsigned int index) const
 {
   typedef DoFAccessor<DH> BaseClass;
 
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (vertex<8,
          ExcIndexRange (i,0,8));
-  Assert (i<this->get_fe().dofs_per_vertex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+  Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
 
   const unsigned int dof_number = (this->vertex_index(vertex) *
-                                  this->get_fe().dofs_per_vertex +
+                                  this->dof_handler->get_fe().dofs_per_vertex +
                                   i);
   this->dof_handler->vertex_dofs[dof_number] = index;
 }
@@ -336,7 +340,7 @@ template <class DH>
 template <class InputVector, typename number>
 void
 DoFObjectAccessor<3,DH>::get_dof_values (const InputVector &values,
-                                            Vector<number>    &local_values) const
+                                         Vector<number>    &local_values) const
 {
   typedef DoFAccessor<DH> BaseClass;
 
@@ -344,19 +348,19 @@ DoFObjectAccessor<3,DH>::get_dof_values (const InputVector &values,
 
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
-  Assert (&this->get_fe() != 0, 
+  Assert (&this->dof_handler->get_fe() != 0, 
          typename BaseClass::ExcInvalidObject());
-  Assert (local_values.size() == this->get_fe().dofs_per_cell,
+  Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
          typename BaseClass::ExcVectorDoesNotMatch());
   Assert (values.size() == this->dof_handler->n_dofs(),
          typename BaseClass::ExcVectorDoesNotMatch());
   Assert (this->has_children() == false,
          typename BaseClass::ExcNotActive());
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line,
-                    dofs_per_quad   = this->get_fe().dofs_per_quad,
-                    dofs_per_hex    = this->get_fe().dofs_per_hex;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line,
+                    dofs_per_quad   = this->dof_handler->get_fe().dofs_per_quad,
+                    dofs_per_hex    = this->dof_handler->get_fe().dofs_per_hex;
   typename Vector<number>::iterator next_local_value = local_values.begin();
   for (unsigned int vertex=0; vertex<GeometryInfo<3>::vertices_per_cell; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -380,7 +384,7 @@ template <class DH>
 template <class OutputVector, typename number>
 void
 DoFObjectAccessor<3,DH>::set_dof_values (const Vector<number> &local_values,
-                                            OutputVector         &values) const
+                                         OutputVector         &values) const
 {
   typedef DoFAccessor<DH> BaseClass;
 
@@ -388,19 +392,19 @@ DoFObjectAccessor<3,DH>::set_dof_values (const Vector<number> &local_values,
 
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
-  Assert (&this->get_fe() != 0,
+  Assert (&this->dof_handler->get_fe() != 0,
          typename BaseClass::ExcInvalidObject());
-  Assert (local_values.size() == this->get_fe().dofs_per_cell,
+  Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
          typename BaseClass::ExcVectorDoesNotMatch());
   Assert (values.size() == this->dof_handler->n_dofs(),
          typename BaseClass::ExcVectorDoesNotMatch());
   Assert (this->has_children() == false,
          typename BaseClass::ExcNotActive());
   
-  const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->get_fe().dofs_per_line,
-                    dofs_per_quad   = this->get_fe().dofs_per_quad,
-                    dofs_per_hex    = this->get_fe().dofs_per_hex;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line,
+                    dofs_per_quad   = this->dof_handler->get_fe().dofs_per_quad,
+                    dofs_per_hex    = this->dof_handler->get_fe().dofs_per_hex;
   typename Vector<number>::const_iterator next_local_value=local_values.begin();
   for (unsigned int vertex=0; vertex<GeometryInfo<dim>::vertices_per_cell; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
@@ -419,6 +423,184 @@ DoFObjectAccessor<3,DH>::set_dof_values (const Vector<number> &local_values,
 }
 
 
+
+// --------------- hp::DoFHandler specializations for 1d objects -----------
+
+
+template <>
+void DoFObjectAccessor<1, hp::DoFHandler<1> >::set_vertex_dof_index (const unsigned int /*vertex*/,
+                                                                     const unsigned int /*i*/,
+                                                                     const unsigned int /*index*/) const
+{
+  Assert (false, ExcInternalError());
+}
+
+template <>
+void DoFObjectAccessor<1, hp::DoFHandler<2> >::set_vertex_dof_index (const unsigned int /*vertex*/,
+                                                                     const unsigned int /*i*/,
+                                                                     const unsigned int /*index*/) const
+{
+  Assert (false, ExcInternalError());
+}
+
+template <>
+void DoFObjectAccessor<1, hp::DoFHandler<3> >::set_vertex_dof_index (const unsigned int /*vertex*/,
+                                                                     const unsigned int /*i*/,
+                                                                     const unsigned int /*index*/) const
+{
+  Assert (false, ExcInternalError());
+}
+
+
+template <>
+template <class InputVector, typename number>
+void
+DoFObjectAccessor<1,hp::DoFHandler<1> >::get_dof_values (const InputVector &/*values*/,
+                                                         Vector<number>    &/*local_values*/) const
+{
+  Assert (false, ExcNotImplemented());
+}
+
+template <>
+template <class InputVector, typename number>
+void
+DoFObjectAccessor<1,hp::DoFHandler<2> >::get_dof_values (const InputVector &/*values*/,
+                                                         Vector<number>    &/*local_values*/) const
+{
+  Assert (false, ExcNotImplemented());
+}
+
+template <>
+template <class InputVector, typename number>
+void
+DoFObjectAccessor<1,hp::DoFHandler<3> >::get_dof_values (const InputVector &/*values*/,
+                                                         Vector<number>    &/*local_values*/) const
+{
+  Assert (false, ExcNotImplemented());
+}
+
+
+template <>
+template <class OutputVector, typename number>
+void
+DoFObjectAccessor<1,hp::DoFHandler<1> >::set_dof_values (const Vector<number> &/*local_values*/,
+                                                         OutputVector         &/*values*/) const
+{
+  Assert (false, ExcNotImplemented());
+}
+
+template <>
+template <class OutputVector, typename number>
+void
+DoFObjectAccessor<1,hp::DoFHandler<2> >::set_dof_values (const Vector<number> &/*local_values*/,
+                                                         OutputVector         &/*values*/) const
+{
+  Assert (false, ExcNotImplemented());
+}
+
+template <>
+template <class OutputVector, typename number>
+void
+DoFObjectAccessor<1,hp::DoFHandler<3> >::set_dof_values (const Vector<number> &/*local_values*/,
+                                                         OutputVector         &/*values*/) const
+{
+  Assert (false, ExcNotImplemented());
+}
+
+
+
+
+// --------------- hp::DoFHandler specializations for 2d objects -----------
+
+
+template <>
+void DoFObjectAccessor<2, hp::DoFHandler<2> >::set_vertex_dof_index (const unsigned int /*vertex*/,
+                                                                     const unsigned int /*i*/,
+                                                                     const unsigned int /*index*/) const
+{
+  Assert (false, ExcInternalError());
+}
+
+template <>
+void DoFObjectAccessor<2, hp::DoFHandler<3> >::set_vertex_dof_index (const unsigned int /*vertex*/,
+                                                                     const unsigned int /*i*/,
+                                                                     const unsigned int /*index*/) const
+{
+  Assert (false, ExcInternalError());
+}
+
+
+template <>
+template <class InputVector, typename number>
+void
+DoFObjectAccessor<2,hp::DoFHandler<2> >::get_dof_values (const InputVector &/*values*/,
+                                                         Vector<number>    &/*local_values*/) const
+{
+  Assert (false, ExcNotImplemented());
+}
+
+template <>
+template <class InputVector, typename number>
+void
+DoFObjectAccessor<2,hp::DoFHandler<3> >::get_dof_values (const InputVector &/*values*/,
+                                                         Vector<number>    &/*local_values*/) const
+{
+  Assert (false, ExcNotImplemented());
+}
+
+
+template <>
+template <class OutputVector, typename number>
+void
+DoFObjectAccessor<2,hp::DoFHandler<2> >::set_dof_values (const Vector<number> &/*local_values*/,
+                                                         OutputVector         &/*values*/) const
+{
+  Assert (false, ExcNotImplemented());
+}
+
+template <>
+template <class OutputVector, typename number>
+void
+DoFObjectAccessor<2,hp::DoFHandler<3> >::set_dof_values (const Vector<number> &/*local_values*/,
+                                                         OutputVector         &/*values*/) const
+{
+  Assert (false, ExcNotImplemented());
+}
+
+
+
+
+// --------------- hp::DoFHandler specializations for 3d objects -----------
+
+
+template <>
+void DoFObjectAccessor<3, hp::DoFHandler<3> >::set_vertex_dof_index (const unsigned int /*vertex*/,
+                                                                     const unsigned int /*i*/,
+                                                                     const unsigned int /*index*/) const
+{
+  Assert (false, ExcInternalError());
+}
+
+template <>
+template <class InputVector, typename number>
+void
+DoFObjectAccessor<3,hp::DoFHandler<3> >::get_dof_values (const InputVector &/*values*/,
+                                                         Vector<number>    &/*local_values*/) const
+{
+  Assert (false, ExcNotImplemented());
+}
+
+template <>
+template <class OutputVector, typename number>
+void
+DoFObjectAccessor<3,hp::DoFHandler<3> >::set_dof_values (const Vector<number> &/*local_values*/,
+                                                         OutputVector         &/*values*/) const
+{
+  Assert (false, ExcNotImplemented());
+}
+
+
+
 /*------------------------- Functions: DoFCellAccessor -----------------------*/
 
 
@@ -785,8 +967,8 @@ get_interpolated_dof_values (const InputVector &values,
             else
               if (tmp2(i) != 0)
                 interpolated_values(i) = tmp2(i);
-       };
-    };
+       }
+    }
 }
 
 
@@ -827,8 +1009,8 @@ set_dof_values_by_interpolation (const Vector<number> &local_values,
          this->get_fe().get_prolongation_matrix(child)
             .vmult (tmp, local_values);
          this->child(child)->set_dof_values_by_interpolation (tmp, values);
-       };
-    };
+       }
+    }
 }
 
 

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.