]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Re-organize the inheritance structure of DoF accessor classes and unify some of the...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 1 May 2006 20:23:17 +0000 (20:23 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 1 May 2006 20:23:17 +0000 (20:23 +0000)
git-svn-id: https://svn.dealii.org/trunk@12943 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/dof_handler.h
deal.II/deal.II/include/dofs/dof_iterator_selector.h
deal.II/deal.II/include/multigrid/mg_dof_accessor.h
deal.II/deal.II/source/dofs/dof_accessor.cc
deal.II/deal.II/source/multigrid/mg_dof_accessor.cc

index 9ab0ab2d120e497aceae6b512802c75d6d287062..45563660f75ad84f86d7efee946c530e58621811 100644 (file)
@@ -43,41 +43,124 @@ template <int dim, typename Accessor> class TriaRawIterator;
 // inlining and thus faster code.
 
 
+/**
+ * This is a switch class which only declares a @p typedef. It is meant to
+ * determine which class a DoFObjectAccessor class is to be derived
+ * from. By default, <tt>DoFObjectAccessor<celldim,dim></tt> derives from
+ * the @p typedef in the general <tt>DoFObjectAccessor_Inheritance<celldim,dim></tt>
+ * class, which is <tt>TriaObjectAccessor<celldim,dim></tt>,
+ * but if <tt>celldim==dim</tt>, then the specialization <tt>DoFObjectAccessor_Inheritance<dim,dim></tt>
+ * is used which declares its local type to be <tt>CellAccessor<dim></tt>. Therefore,
+ * the inheritance is automatically chosen to be from CellAccessor if the
+ * object under consideration has full dimension, i.e. constitutes a cell.
+ *
+ * @ingroup dofs
+ * @ingroup Accessors 
+ * @author Wolfgang Bangerth, 1999
+ */
+template <int celldim, int dim>
+class DoFObjectAccessor_Inheritance 
+{
+  public:
+                                    /**
+                                     * Declaration of the @p typedef.
+                                     * See the full documentation for
+                                     * more information.
+                                     */
+    typedef TriaObjectAccessor<celldim,dim> BaseClass;
+};
+
+
+/**
+ * This is a switch class which only declares a @p typedef. It is meant to
+ * determine which class a DoFObjectAccessor class is to be derived
+ * from. By default, <tt>DoFObjectAccessor<celldim,dim></tt> derives from
+ * the @p typedef in the general <tt>DoFObjectAccessor_Inheritance<celldim,dim></tt>
+ * class, which is <tt>TriaObjectAccessor<celldim,dim></tt>,
+ * but if <tt>celldim==dim</tt>, then the specialization <tt>DoFObjectAccessor_Inheritance<dim,dim></tt>
+ * is used which declares its local type to be <tt>CellAccessor<dim></tt>. Therefore,
+ * the inheritance is automatically chosen to be from CellAccessor if the
+ * object under consideration has full dimension, i.e. constitutes a cell.
+ *
+ * @ingroup dofs
+ * @ingroup Accessors 
+ * @author Wolfgang Bangerth, 1999
+ */
+template <int dim>
+class DoFObjectAccessor_Inheritance<dim,dim>
+{
+  public:
+                                    /**
+                                     * Declaration of the @p typedef.
+                                     * See the full documentation for
+                                     * more information.
+                                     */
+    typedef CellAccessor<dim> BaseClass;
+};
+
+
+/* -------------------------------------------------------------------------- */
+
+
+
 /**
  * Define the base class for accessors to the degrees of
  * freedom. Accessors are used to, well, access the data that pertains
  * to edges, faces, and cells of a triangulation. The concept is
  * explained in more detail in connection to @ref Iterators.
  *
- * The template argument of this class refers to the type of DoF
- * handler we should work on. It can either be ::DoFHandler<dim> or
+ * The first template argument of this class refers to the structural
+ * dimension of the thing accessed: it is 1 for lines, 2 for quads, or
+ * 3 for hexes. The second argument denotes the type of DoF handler we
+ * should work on. It can either be ::DoFHandler<dim> or
  * hp::DoFHandler<dim>. The space dimension of the object we are to
  * work on is automatically extracted from the DH template argument.
  *
+ * Depending on whether the structural dimension of the object
+ * accessed equals the space dimension on which the DoF handler object
+ * operates, this class is derived from CellAccessor or
+ * TriaObjectAccessor. This means that, for example accessors to quads
+ * in 2d have access to all the mesh aspects of cells, whereas
+ * accessors to quads in 3d can only access things that make sense for
+ * faces.
+ * 
  * @ingroup dofs
  * @ingroup Accessors 
  * @author Wolfgang Bangerth, 1998
  */
-template <class DH>
-class DoFAccessor
+template <int structdim, class DH>
+class DoFAccessor : public DoFObjectAccessor_Inheritance<structdim, DH::dimension>::BaseClass
 {
   public:
                                     /**
-                                     * Constructor
+                                     * Declare a typedef to the base
+                                     * class to make accessing some
+                                     * of the exception classes
+                                     * simpler.
                                      */
-    DoFAccessor ();
+    typedef
+    typename DoFObjectAccessor_Inheritance<structdim, DH::dimension>::BaseClass
+    BaseClass;
+
+                                    /**
+                                     * Data type passed by the iterator class.
+                                     */
+    typedef DH AccessorData;
 
                                     /**
-                                     * This should be the default constructor.
-                                     * We cast away the constness of the
-                                     * pointer which clearly is EVIL but
-                                     * we can't help without making all
-                                     * functions which could somehow use
-                                     * iterators (directly or indirectly) make
-                                     * non-const, even if they preserve
-                                     * constness.
+                                     * Default constructor. Provides
+                                     * an accessor that can't be
+                                     * used.
+                                     */
+    DoFAccessor ();
+    
+                                    /**
+                                     * Constructor
                                      */
-    DoFAccessor (const DH *dof_handler);
+    DoFAccessor (const Triangulation<DH::dimension> *tria,
+                const int                 level,
+                const int                 index,
+                const DH                 *local_data);
 
                                     /**
                                      * Reset the DoF handler pointer.
@@ -95,8 +178,14 @@ class DoFAccessor
                                     /**
                                      * Copy operator.
                                      */
-    DoFAccessor<DH> &
-    operator = (const DoFAccessor<DH> &da);
+    DoFAccessor<structdim,DH> &
+    operator = (const DoFAccessor<structdim,DH> &da);
+    
+                                    /**
+                                     * Implement the copy operator needed
+                                     * for the iterator classes.
+                                     */
+    void copy_from (const DoFAccessor<structdim, DH> &a);
 
                                     /**
                                      * Exception for child classes
@@ -138,80 +227,29 @@ class DoFAccessor
     DeclException0 (ExcCantCompareIterators);
 
   protected:    
-                                    /**
-                                     *  Compare for equality.            
-                                     */
-    bool operator == (const DoFAccessor &) const;
-       
-                                    /**
-                                     * Compare for inequality.
-                                     */
-    bool operator != (const DoFAccessor &) const;
 
-  protected:
                                     /**
                                      * Store the address of the DoFHandler object
                                      * to be accessed.
                                      */
-    DH *dof_handler;  
-};
-
+    DH *dof_handler;
 
-/* -------------------------------------------------------------------------- */
-
-/**
- * This is a switch class which only declares a @p typedef. It is meant to
- * determine which class a DoFObjectAccessor class is to be derived
- * from. By default, <tt>DoFObjectAccessor<celldim,dim></tt> derives from
- * the @p typedef in the general <tt>DoFObjectAccessor_Inheritance<celldim,dim></tt>
- * class, which is <tt>TriaObjectAccessor<celldim,dim></tt>,
- * but if <tt>celldim==dim</tt>, then the specialization <tt>DoFObjectAccessor_Inheritance<dim,dim></tt>
- * is used which declares its local type to be <tt>CellAccessor<dim></tt>. Therefore,
- * the inheritance is automatically chosen to be from CellAccessor if the
- * object under consideration has full dimension, i.e. constitutes a cell.
- *
- * @ingroup dofs
- * @ingroup Accessors 
- * @author Wolfgang Bangerth, 1999
- */
-template <int celldim, int dim>
-class DoFObjectAccessor_Inheritance 
-{
-  public:
                                     /**
-                                     * Declaration of the @p typedef.
-                                     * See the full documentation for
-                                     * more information.
+                                     *  Compare for equality.            
                                      */
-    typedef TriaObjectAccessor<celldim,dim> BaseClass;
-};
-
-
-/**
- * This is a switch class which only declares a @p typedef. It is meant to
- * determine which class a DoFObjectAccessor class is to be derived
- * from. By default, <tt>DoFObjectAccessor<celldim,dim></tt> derives from
- * the @p typedef in the general <tt>DoFObjectAccessor_Inheritance<celldim,dim></tt>
- * class, which is <tt>TriaObjectAccessor<celldim,dim></tt>,
- * but if <tt>celldim==dim</tt>, then the specialization <tt>DoFObjectAccessor_Inheritance<dim,dim></tt>
- * is used which declares its local type to be <tt>CellAccessor<dim></tt>. Therefore,
- * the inheritance is automatically chosen to be from CellAccessor if the
- * object under consideration has full dimension, i.e. constitutes a cell.
- *
- * @ingroup dofs
- * @ingroup Accessors 
- * @author Wolfgang Bangerth, 1999
- */
-template <int dim>
-class DoFObjectAccessor_Inheritance<dim,dim>
-{
-  public:
+    bool operator == (const DoFAccessor &) const;
+       
                                     /**
-                                     * Declaration of the @p typedef.
-                                     * See the full documentation for
-                                     * more information.
+                                     * Compare for inequality.
                                      */
-    typedef CellAccessor<dim> BaseClass;
+    bool operator != (const DoFAccessor &) const;
+
+                                     /**
+                                      * Iterator classes need to be friends
+                                      * because they need to access operator==
+                                      * and operator!=.
+                                      */
+    template <int, typename> friend class TriaRawIterator;
 };
 
 
@@ -256,8 +294,7 @@ class DoFObjectAccessor_Inheritance<dim,dim>
  * @author Wolfgang Bangerth, 1998; Guido Kanschat, 1999
  */
 template <int celldim, class DH>
-class DoFObjectAccessor : public DoFAccessor<DH>,
-                         public TriaObjectAccessor<celldim, DH::dimension>
+class DoFObjectAccessor : public DoFAccessor<celldim, DH>
 {
   public:
                                     /**
@@ -546,31 +583,6 @@ class DoFObjectAccessor : public DoFAccessor<DH>,
                                      * access to the DoF data.
                                      */
     TriaIterator<dim,DoFObjectAccessor<celldim, DH> > child (const unsigned int) const;
-    
-                                    /**
-                                     * Implement the copy operator needed
-                                     * for the iterator classes.
-                                     */
-    void copy_from (const DoFObjectAccessor<celldim, DH> &a);
-
-  protected:    
-                                    /**
-                                     *  Compare for equality.            
-                                     */
-    bool operator == (const DoFObjectAccessor &) const;
-       
-                                    /**
-                                     * Compare for inequality.
-                                     */
-    bool operator != (const DoFObjectAccessor &) const;
-
-
-                                     /**
-                                      * Iterator classes need to be friends
-                                      * because they need to access operator==
-                                      * and operator!=.
-                                      */
-    template <int, typename> friend class TriaRawIterator;
 };
 
 
@@ -580,8 +592,7 @@ class DoFObjectAccessor : public DoFAccessor<DH>,
  * @ingroup Accessors
  */
 template <class DH>
-class DoFObjectAccessor<0, DH> : public DoFAccessor<DH>,
-                                public DoFObjectAccessor_Inheritance<0,DH::dimension>::BaseClass
+class DoFObjectAccessor<0, DH> : public DoFAccessor<0, DH>
 {
   public:
                                     /**
@@ -637,9 +648,7 @@ class DoFObjectAccessor<0, DH> : public DoFAccessor<DH>,
  * @author Wolfgang Bangerth, 1998
  */
 template <class DH>
-class DoFObjectAccessor<1, DH> :
-  public DoFAccessor<DH>,
-  public DoFObjectAccessor_Inheritance<1,DH::dimension>::BaseClass
+class DoFObjectAccessor<1, DH> : public DoFAccessor<1,DH>
 {
   public:
                                     /**
@@ -658,7 +667,7 @@ class DoFObjectAccessor<1, DH> :
                                      * Declare base class as a local typedef
                                      * for simpler access.
                                      */
-    typedef typename DoFObjectAccessor_Inheritance<1,dim>::BaseClass BaseClass;
+    typedef DoFAccessor<1,DH> BaseClass;
 
                                     /**
                                      * Default constructor, unused thus
@@ -915,31 +924,6 @@ class DoFObjectAccessor<1, DH> :
                                      * access to the DoF data.
                                      */
     TriaIterator<DH::dimension,DoFObjectAccessor<1,DH> > child (const unsigned int) const;
-    
-                                    /**
-                                     * Implement the copy operator needed
-                                     * for the iterator classes.
-                                     */
-    void copy_from (const DoFObjectAccessor<1,DH> &a);
-
-  protected:    
-                                    /**
-                                     *  Compare for equality.            
-                                     */
-    bool operator == (const DoFObjectAccessor<1,DH> &) const;
-       
-                                    /**
-                                     * Compare for inequality.
-                                     */
-    bool operator != (const DoFObjectAccessor<1,DH> &) const;
-
-
-                                     /**
-                                      * Iterator classes need to be friends
-                                      * because they need to access operator==
-                                      * and operator!=.
-                                      */
-    template <int, typename> friend class TriaRawIterator;
 };
 
 
@@ -950,9 +934,7 @@ class DoFObjectAccessor<1, DH> :
  * @ingroup Accessors
  */
 template <class DH>
-class DoFObjectAccessor<2, DH> :
-  public DoFAccessor<DH>,
-  public DoFObjectAccessor_Inheritance<2,DH::dimension>::BaseClass
+class DoFObjectAccessor<2, DH> : public DoFAccessor<2,DH>
 {
   public:
                                     /**
@@ -971,7 +953,7 @@ class DoFObjectAccessor<2, DH> :
                                      * Declare base class as a local typedef
                                      * for simpler access.
                                      */
-    typedef typename DoFObjectAccessor_Inheritance<2,dim>::BaseClass BaseClass;
+    typedef DoFAccessor<2,DH> BaseClass;
     
                                     /**
                                      * Default constructor, unused thus
@@ -1236,31 +1218,6 @@ class DoFObjectAccessor<2, DH> :
                                      */
     TriaIterator<DH::dimension,DoFObjectAccessor<2, DH> >
     child (const unsigned int) const;
-    
-                                    /**
-                                     * Implement the copy operator needed
-                                     * for the iterator classes.
-                                     */
-    void copy_from (const DoFObjectAccessor<2, DH> &a);
-
-  protected:    
-                                    /**
-                                     *  Compare for equality.            
-                                     */
-    bool operator == (const DoFObjectAccessor<2,DH> &) const;
-       
-                                    /**
-                                     * Compare for inequality.
-                                     */
-    bool operator != (const DoFObjectAccessor<2,DH> &) const;
-
-
-                                     /**
-                                      * Iterator classes need to be friends
-                                      * because they need to access operator==
-                                      * and operator!=.
-                                      */
-    template <int, typename> friend class TriaRawIterator;
 };
 
 
@@ -1271,9 +1228,7 @@ class DoFObjectAccessor<2, DH> :
  * @ingroup Accessors
  */
 template <class DH>
-class DoFObjectAccessor<3, DH> :
-  public DoFAccessor<DH>,
-  public DoFObjectAccessor_Inheritance<3,DH::dimension>::BaseClass
+class DoFObjectAccessor<3, DH> : public DoFAccessor<3,DH>
 {
   public:
                                     /**
@@ -1292,7 +1247,7 @@ class DoFObjectAccessor<3, DH> :
                                      * Declare base class as a local typedef
                                      * for simpler access.
                                      */
-    typedef typename DoFObjectAccessor_Inheritance<3,dim>::BaseClass BaseClass;
+    typedef DoFAccessor<1,DH> BaseClass;
     
                                     /**
                                      * Default constructor, unused thus
@@ -1564,31 +1519,6 @@ class DoFObjectAccessor<3, DH> :
                                      * access to the DoF data.
                                      */
     TriaIterator<DH::dimension,DoFObjectAccessor<3, DH> > child (const unsigned int) const;
-    
-                                    /**
-                                     * Implement the copy operator needed
-                                     * for the iterator classes.
-                                     */
-    void copy_from (const DoFObjectAccessor<3, DH> &a);
-
-  protected:    
-                                    /**
-                                     *  Compare for equality.            
-                                     */
-    bool operator == (const DoFObjectAccessor<3,DH> &) const;
-       
-                                    /**
-                                     * Compare for inequality.
-                                     */
-    bool operator != (const DoFObjectAccessor<3,DH> &) const;
-
-
-                                     /**
-                                      * Iterator classes need to be friends
-                                      * because they need to access operator==
-                                      * and operator!=.
-                                      */
-    template <int, typename> friend class TriaRawIterator;
 };
 
 
@@ -1629,6 +1559,14 @@ class DoFCellAccessor :  public DoFObjectAccessor<DH::dimension,DH>
                                      * classes.
                                      */
     typedef typename DoFObjectAccessor<DH::dimension,DH>::AccessorData AccessorData;
+
+                                    /**
+                                     * Declare a typedef to the base
+                                     * class to make accessing some
+                                     * of the exception classes
+                                     * simpler.
+                                     */
+    typedef DoFObjectAccessor<DH::dimension,DH> BaseClass;
     
                                     /**
                                      * Constructor
index b8810ca8cda3089a3f9a68284105082126e00a61..b88f02b6c7983eca419e09b6c65c1adde4b1b6d4 100644 (file)
 /*------------------------- Functions: DoFAccessor ---------------------------*/
 
 
-template <class DH>
-DoFAccessor<DH>::DoFAccessor ()
+template <int structdim, class DH>
+DoFAccessor<structdim,DH>::DoFAccessor ()
                 :
+               DoFObjectAccessor_Inheritance<structdim, DH::dimension>::BaseClass (0,
+                                                                                   deal_II_numbers::invalid_unsigned_int,
+                                                                                   deal_II_numbers::invalid_unsigned_int),
                dof_handler(0)
 {
   Assert (false, ExcInvalidObject());
@@ -39,18 +42,24 @@ DoFAccessor<DH>::DoFAccessor ()
 
 
 
-template <class DH>
+template <int structdim, class DH>
 inline
-DoFAccessor<DH>::DoFAccessor (const DH *dof_handler)
+DoFAccessor<structdim,DH>::DoFAccessor (const Triangulation<DH::dimension> *tria,
+                                       const int                 level,
+                                       const int                 index,
+                                       const DH                 *dof_handler)
                :
-               dof_handler(const_cast<DH*>(dof_handler))
+               DoFObjectAccessor_Inheritance<structdim, DH::dimension>::BaseClass (tria,
+                                                                                   level,
+                                                                                   index),
+                dof_handler(const_cast<DH*>(dof_handler))
 {}
 
 
 
-template <class DH>
+template <int structdim, class DH>
 void
-DoFAccessor<DH>::set_dof_handler (DH *dh)
+DoFAccessor<structdim,DH>::set_dof_handler (DH *dh)
 {
   Assert (dh != 0, ExcInvalidObject());
   this->dof_handler = dh;
@@ -58,19 +67,19 @@ DoFAccessor<DH>::set_dof_handler (DH *dh)
 
 
 
-template <class DH>
+template <int structdim, class DH>
 inline
 const DH &
-DoFAccessor<DH>::get_dof_handler () const
+DoFAccessor<structdim,DH>::get_dof_handler () const
 {
   return *this->dof_handler;
 }
 
 
-template <class DH>
+template <int structdim, class DH>
 inline
-DoFAccessor<DH> &
-DoFAccessor<DH>::operator = (const DoFAccessor<DH> &da)
+DoFAccessor<structdim,DH> &
+DoFAccessor<structdim,DH>::operator = (const DoFAccessor<structdim,DH> &da)
 {
   this->set_dof_handler (da.dof_handler);
   return *this;
@@ -78,35 +87,33 @@ DoFAccessor<DH>::operator = (const DoFAccessor<DH> &da)
 
 
 
-template <class DH>
+template <int structdim, class DH>
+void
+DoFAccessor<structdim,DH>::copy_from (const DoFAccessor<structdim,DH> &a)
+{
+  BaseClass::copy_from (a);
+  set_dof_handler (a.dof_handler);
+}
+
+
+
+template <int structdim, class DH>
 inline
 bool
-DoFAccessor<DH>::operator == (const DoFAccessor<DH> &a) const
+DoFAccessor<structdim,DH>::operator == (const DoFAccessor<structdim,DH> &a) const
 {
   Assert (this->dof_handler == a.dof_handler, ExcCantCompareIterators());
-
-                                   // there is no real data to compare, except
-                                   // to make sure that the this->dof_handler
-                                   // objects in use are the same
-  return true;
+  return (BaseClass::operator == (a));
 }
 
 
-
-template <class DH>
+template <int structdim, class DH>
 inline
 bool
-DoFAccessor<DH>::operator != (const DoFAccessor<DH> &a) const
+DoFAccessor<structdim,DH>::operator != (const DoFAccessor<structdim,DH> &a) const
 {
   Assert (this->dof_handler == a.dof_handler, ExcCantCompareIterators());
-
-                                   // there is no real data to compare, except
-                                   // to make sure that the this->dof_handler
-                                   // objects in use are the same. this is
-                                   // checked above, and apart from this there
-                                   // is no reason for us to believe that the
-                                   // two accessors are different
-  return false;
+  return (BaseClass::operator != (a));
 }
 
 
@@ -123,10 +130,7 @@ DoFObjectAccessor (const Triangulation<DH::dimension> *tria,
                    const int                 index,
                    const AccessorData       *local_data)
                 :
-                DoFAccessor<DH> (local_data),
-                DoFObjectAccessor_Inheritance<1,DH::dimension>::BaseClass (tria,
-                                                                          level,
-                                                                          index)
+                DoFAccessor<1,DH> (tria, level, index, local_data)
 {}
 
 
@@ -153,38 +157,6 @@ DoFObjectAccessor<1,DH>::child (const unsigned int i) const
 
 
 
-template <class DH>
-inline
-void
-DoFObjectAccessor<1,DH>::copy_from (const DoFObjectAccessor<1,DH> &a)
-{
-  BaseClass::copy_from (a);
-  this->set_dof_handler (a.dof_handler);
-}
-
-
-
-template <class DH>
-inline
-bool
-DoFObjectAccessor<1,DH>::operator == (const DoFObjectAccessor<1,DH> &a) const
-{
-  return (TriaObjectAccessor<1,dim>::operator == (a)
-          &&
-          DoFAccessor<DH>::operator == (a));
-}
-
-
-template <class DH>
-inline
-bool
-DoFObjectAccessor<1,DH>::operator != (const DoFObjectAccessor<1,DH> &a) const
-{
-  return (TriaObjectAccessor<1,dim>::operator != (a)
-          ||
-          DoFAccessor<DH>::operator != (a));
-}
-
 
 /*------------------------- Functions: DoFObjectAccessor<2,dim> -----------------------*/
 
@@ -195,10 +167,7 @@ DoFObjectAccessor (const Triangulation<DH::dimension> *tria,
                    const int                 index,
                    const AccessorData       *local_data)
                 :
-                DoFAccessor<DH> (local_data),
-                DoFObjectAccessor_Inheritance<2,dim>::BaseClass (tria,
-                                                                 level,
-                                                                 index)
+                DoFAccessor<2,DH> (tria, level, index, local_data)
 {}
 
 
@@ -245,40 +214,6 @@ DoFObjectAccessor<2,DH>::child (const unsigned int i) const
 
 
 
-template <class DH>
-inline
-void
-DoFObjectAccessor<2,DH>::copy_from (const DoFObjectAccessor<2,DH> &a)
-{
-  BaseClass::copy_from (a);
-  this->set_dof_handler (a.dof_handler);
-}
-
-
-
-template <class DH>
-inline
-bool
-DoFObjectAccessor<2,DH>::operator == (const DoFObjectAccessor<2,DH> &a) const
-{
-  return (TriaObjectAccessor<2,dim>::operator == (a)
-          &&
-          DoFAccessor<DH>::operator == (a));
-}
-
-
-template <class DH>
-inline
-bool
-DoFObjectAccessor<2,DH>::operator != (const DoFObjectAccessor<2,DH> &a) const
-{
-  return (TriaObjectAccessor<2,dim>::operator != (a)
-          ||
-          DoFAccessor<DH>::operator != (a));
-}
-
-
-
 /*------------------------- Functions: DoFObjectAccessor<3,dim> -----------------------*/
 
 template <class DH>
@@ -289,10 +224,7 @@ DoFObjectAccessor (const Triangulation<DH::dimension> *tria,
                    const int                 index,
                    const AccessorData       *local_data)
                 :
-                DoFAccessor<DH> (local_data),
-                DoFObjectAccessor_Inheritance<3,dim>::BaseClass (tria,
-                                                                 level,
-                                                                 index)
+                DoFAccessor<3,DH> (tria, level, index, local_data)
 {}
 
 
@@ -302,7 +234,7 @@ inline
 TriaIterator<DH::dimension,DoFObjectAccessor<1,DH> >
 DoFObjectAccessor<3,DH>::line (const unsigned int i) const
 {
-  TriaIterator<dim,TriaObjectAccessor<1,dim> > l = BaseClass::line(i);
+  TriaIterator<dim,TriaObjectAccessor<1,dim> > l = TriaObjectAccessor<3,DH::dimension>::line(i);
   return TriaIterator<dim,DoFObjectAccessor<1,DH> >
     (
       this->tria,
@@ -348,37 +280,6 @@ DoFObjectAccessor<3,DH>::child (const unsigned int i) const
 }
 
 
-template <class DH>
-void DoFObjectAccessor<3,DH>::copy_from (const DoFObjectAccessor<3,DH> &a)
-{
-  BaseClass::copy_from (a);
-  this->set_dof_handler (a.dof_handler);
-}
-
-
-
-template <class DH>
-inline
-bool
-DoFObjectAccessor<3,DH>::operator == (const DoFObjectAccessor<3,DH> &a) const
-{
-  return (TriaObjectAccessor<3,dim>::operator == (a)
-          &&
-          DoFAccessor<DH>::operator == (a));
-}
-
-
-template <class DH>
-inline
-bool
-DoFObjectAccessor<3,DH>::operator != (const DoFObjectAccessor<3,DH> &a) const
-{
-  return (TriaObjectAccessor<3,dim>::operator != (a)
-          ||
-          DoFAccessor<DH>::operator != (a));
-}
-
-
 /*--------------- Functions: DoFObjectAccessor<1,DoFHandler> -----------*/
 
 
@@ -393,10 +294,10 @@ DoFObjectAccessor<1,DoFHandler<1> >::dof_index (const unsigned int i,
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
-  Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
+  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
   Assert (i<this->dof_handler->get_fe().dofs_per_line,
          ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_line));
 
@@ -418,8 +319,8 @@ DoFObjectAccessor<1,DoFHandler<1> >::vertex_dof_index (const unsigned int vertex
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
-  Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
+  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
   Assert (vertex<2, ExcIndexRange (i,0,2));
   Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
          ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
@@ -443,11 +344,11 @@ DoFObjectAccessor<1,DoFHandler<1> >::get_dof_indices (std::vector<unsigned int>
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
-  Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
+  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, BaseClass::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());
+         BaseClass::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
                                   // sense on non-active objects if
@@ -460,7 +361,7 @@ DoFObjectAccessor<1,DoFHandler<1> >::get_dof_indices (std::vector<unsigned int>
   Assert (!this->has_children() ||
          (this->dof_handler->get_fe().dofs_per_cell ==
           2*this->dof_handler->get_fe().dofs_per_vertex),
-         DoFAccessor<DoFHandler<1> >::ExcNotActive());
+         BaseClass::ExcNotActive());
   
   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;
@@ -485,10 +386,10 @@ DoFObjectAccessor<1,DoFHandler<2> >::dof_index (const unsigned int i,
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
-  Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
+  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
   Assert (i<this->dof_handler->get_fe().dofs_per_line,
          ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_line));
 
@@ -510,8 +411,8 @@ DoFObjectAccessor<1,DoFHandler<2> >::vertex_dof_index (const unsigned int vertex
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
-  Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
+  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
   Assert (vertex<2, ExcIndexRange (i,0,2));
   Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
          ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
@@ -535,11 +436,11 @@ DoFObjectAccessor<1,DoFHandler<2> >::get_dof_indices (std::vector<unsigned int>
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
-  Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
+  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, BaseClass::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());
+         BaseClass::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
                                   // sense on non-active objects if
@@ -552,7 +453,7 @@ DoFObjectAccessor<1,DoFHandler<2> >::get_dof_indices (std::vector<unsigned int>
   Assert (!this->has_children() ||
          (this->dof_handler->get_fe().dofs_per_cell ==
           2*this->dof_handler->get_fe().dofs_per_vertex),
-         DoFAccessor<DoFHandler<2> >::ExcNotActive());
+         BaseClass::ExcNotActive());
   
   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;
@@ -577,10 +478,10 @@ DoFObjectAccessor<1,DoFHandler<3> >::dof_index (const unsigned int i,
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
-  Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
                                   // make sure a FE has been selected
                                   // and enough room was reserved
-  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
   Assert (i<this->dof_handler->get_fe().dofs_per_line,
          ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_line));
 
@@ -602,8 +503,8 @@ DoFObjectAccessor<1,DoFHandler<3> >::vertex_dof_index (const unsigned int vertex
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
-  Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
   Assert (vertex<2, ExcIndexRange (i,0,2));
   Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
          ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
@@ -627,11 +528,11 @@ DoFObjectAccessor<1,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int>
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
-  Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, BaseClass::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());
+         BaseClass::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
                                   // sense on non-active objects if
@@ -644,7 +545,7 @@ DoFObjectAccessor<1,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int>
   Assert (!this->has_children() ||
          (this->dof_handler->get_fe().dofs_per_cell ==
           2*this->dof_handler->get_fe().dofs_per_vertex),
-         DoFAccessor<DoFHandler<3> >::ExcNotActive());
+         BaseClass::ExcNotActive());
   
   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;
@@ -669,11 +570,11 @@ DoFObjectAccessor<2,DoFHandler<2> >::dof_index (const unsigned int i,
   Assert (fe_index == DoFHandler<2>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (this->dof_handler != 0,
-         DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
                                   // make sure a FE has been selected
                                   // and enough room was reserved
   Assert (&this->dof_handler->get_fe() != 0,
-         DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   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(),
@@ -695,9 +596,9 @@ DoFObjectAccessor<2,DoFHandler<2> >::vertex_dof_index (const unsigned int vertex
   Assert (fe_index == DoFHandler<2>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (this->dof_handler != 0,
-         DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
-         DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   Assert (vertex<4, ExcIndexRange (i,0,4));
   Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
          ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
@@ -721,13 +622,13 @@ DoFObjectAccessor<2,DoFHandler<2> >::get_dof_indices (std::vector<unsigned int>
   Assert (fe_index == DoFHandler<2>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (this->dof_handler != 0,
-         DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
-         DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   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());
+         BaseClass::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
                                   // sense on non-active objects if
@@ -740,7 +641,7 @@ DoFObjectAccessor<2,DoFHandler<2> >::get_dof_indices (std::vector<unsigned int>
   Assert (!this->has_children() ||
          (this->dof_handler->get_fe().dofs_per_cell ==
           4*this->dof_handler->get_fe().dofs_per_vertex),
-         DoFAccessor<DoFHandler<2> >::ExcNotActive());
+         BaseClass::ExcNotActive());
   
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
@@ -770,11 +671,11 @@ DoFObjectAccessor<2,DoFHandler<3> >::dof_index (const unsigned int i,
   Assert (fe_index == DoFHandler<3>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (this->dof_handler != 0,
-         DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
                                   // make sure a FE has been selected
                                   // and enough room was reserved
   Assert (&this->dof_handler->get_fe() != 0,
-         DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   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(),
@@ -796,9 +697,9 @@ DoFObjectAccessor<2,DoFHandler<3> >::vertex_dof_index (const unsigned int vertex
   Assert (fe_index == DoFHandler<3>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (this->dof_handler != 0,
-         DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
-         DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   Assert (vertex<4, ExcIndexRange (i,0,4));
   Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
          ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
@@ -822,13 +723,13 @@ DoFObjectAccessor<2,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int>
   Assert (fe_index == DoFHandler<3>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (this->dof_handler != 0,
-         DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
-         DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   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());
+         BaseClass::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
                                   // sense on non-active objects if
@@ -841,7 +742,7 @@ DoFObjectAccessor<2,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int>
   Assert (!this->has_children() ||
          (this->dof_handler->get_fe().dofs_per_cell ==
           4*this->dof_handler->get_fe().dofs_per_vertex),
-         DoFAccessor<DoFHandler<3> >::ExcNotActive());
+         BaseClass::ExcNotActive());
   
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
@@ -876,11 +777,11 @@ DoFObjectAccessor<3,DoFHandler<3> >::dof_index (const unsigned int i,
   Assert (fe_index == DoFHandler<3>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (this->dof_handler != 0,
-         DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
                                   // make sure a FE has been selected
                                   // and enough room was reserved
   Assert (&this->dof_handler->get_fe() != 0,
-         DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   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(),
@@ -902,9 +803,9 @@ DoFObjectAccessor<3,DoFHandler<3> >::vertex_dof_index (const unsigned int vertex
   Assert (fe_index == DoFHandler<3>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (this->dof_handler != 0,
-         DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
-         DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   Assert (vertex<8, ExcIndexRange (i,0,8));
   Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
          ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
@@ -928,14 +829,14 @@ DoFObjectAccessor<3,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int>
   Assert (fe_index == DoFHandler<3>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (this->dof_handler != 0,
-         DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
-         DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   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());
+         BaseClass::ExcVectorDoesNotMatch());
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
@@ -950,7 +851,7 @@ DoFObjectAccessor<3,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int>
   Assert (!this->has_children() ||
          (this->dof_handler->get_fe().dofs_per_cell ==
           8*this->dof_handler->get_fe().dofs_per_vertex),
-         DoFAccessor<DoFHandler<3> >::ExcNotActive());
+         BaseClass::ExcNotActive());
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
   
@@ -1095,11 +996,11 @@ DoFObjectAccessor<1,hp::DoFHandler<1> >::get_dof_indices (std::vector<unsigned i
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
-  Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
+  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
   Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
                                 this->dof_handler->get_fe()[fe_index].dofs_per_line),
-         DoFAccessor<hp::DoFHandler<1> >::ExcVectorDoesNotMatch());
+         BaseClass::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
                                   // sense on non-active objects if
@@ -1112,7 +1013,7 @@ DoFObjectAccessor<1,hp::DoFHandler<1> >::get_dof_indices (std::vector<unsigned i
   Assert (!this->has_children() ||
          (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
           2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
-         DoFAccessor<hp::DoFHandler<1> >::ExcNotActive());
+         BaseClass::ExcNotActive());
   
   const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
                     dofs_per_line   = this->dof_handler->get_fe()[fe_index].dofs_per_line;
@@ -1150,11 +1051,11 @@ DoFObjectAccessor<1,hp::DoFHandler<2> >::get_dof_indices (std::vector<unsigned i
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
-  Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
+  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
   Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
                                 this->dof_handler->get_fe()[fe_index].dofs_per_line),
-         DoFAccessor<hp::DoFHandler<2> >::ExcVectorDoesNotMatch());
+         BaseClass::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
                                   // sense on non-active objects if
@@ -1167,7 +1068,7 @@ DoFObjectAccessor<1,hp::DoFHandler<2> >::get_dof_indices (std::vector<unsigned i
   Assert (!this->has_children() ||
          (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
           2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
-         DoFAccessor<hp::DoFHandler<2> >::ExcNotActive());
+         BaseClass::ExcNotActive());
   
   const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
                     dofs_per_line   = this->dof_handler->get_fe()[fe_index].dofs_per_line;
@@ -1205,11 +1106,11 @@ DoFObjectAccessor<1,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned i
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
-  Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
+  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
   Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
                                 this->dof_handler->get_fe()[fe_index].dofs_per_line),
-         DoFAccessor<hp::DoFHandler<3> >::ExcVectorDoesNotMatch());
+         BaseClass::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
                                   // sense on non-active objects if
@@ -1222,7 +1123,7 @@ DoFObjectAccessor<1,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned i
   Assert (!this->has_children() ||
          (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
           2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
-         DoFAccessor<hp::DoFHandler<3> >::ExcNotActive());
+         BaseClass::ExcNotActive());
   
   const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
                     dofs_per_line   = this->dof_handler->get_fe()[fe_index].dofs_per_line;
@@ -1359,13 +1260,13 @@ DoFObjectAccessor<2,hp::DoFHandler<2> >::get_dof_indices (std::vector<unsigned i
                                                          const unsigned int         fe_index) const
 {
   Assert (this->dof_handler != 0,
-         DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
-         DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   Assert (dof_indices.size() == (4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
                                 4*this->dof_handler->get_fe()[fe_index].dofs_per_line +
                                 this->dof_handler->get_fe()[fe_index].dofs_per_quad),
-         DoFAccessor<hp::DoFHandler<2> >::ExcVectorDoesNotMatch());
+         BaseClass::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
                                   // sense on non-active objects if
@@ -1378,7 +1279,7 @@ DoFObjectAccessor<2,hp::DoFHandler<2> >::get_dof_indices (std::vector<unsigned i
   Assert (!this->has_children() ||
          (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
           4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
-         DoFAccessor<hp::DoFHandler<2> >::ExcNotActive());
+         BaseClass::ExcNotActive());
   
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
@@ -1406,13 +1307,13 @@ DoFObjectAccessor<2,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned i
                                                          const unsigned int         fe_index) const
 {
   Assert (this->dof_handler != 0,
-         DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
-         DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   Assert (dof_indices.size() == (4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
                                 4*this->dof_handler->get_fe()[fe_index].dofs_per_line +
                                 this->dof_handler->get_fe()[fe_index].dofs_per_quad),
-         DoFAccessor<hp::DoFHandler<3> >::ExcVectorDoesNotMatch());
+         BaseClass::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
                                   // sense on non-active objects if
@@ -1425,7 +1326,7 @@ DoFObjectAccessor<2,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned i
   Assert (!this->has_children() ||
          (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
           4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
-         DoFAccessor<hp::DoFHandler<3> >::ExcNotActive());
+         BaseClass::ExcNotActive());
   
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
@@ -1489,14 +1390,14 @@ DoFObjectAccessor<3,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned i
                                                          const unsigned int         fe_index) const
 {
   Assert (this->dof_handler != 0,
-         DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
-         DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
+         BaseClass::ExcInvalidObject());
   Assert (dof_indices.size() == (8*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
                                 12*this->dof_handler->get_fe()[fe_index].dofs_per_line +
                                 6*this->dof_handler->get_fe()[fe_index].dofs_per_quad +
                                 this->dof_handler->get_fe()[fe_index].dofs_per_hex),
-         DoFAccessor<hp::DoFHandler<3> >::ExcVectorDoesNotMatch());
+         BaseClass::ExcVectorDoesNotMatch());
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
@@ -1511,7 +1412,7 @@ DoFObjectAccessor<3,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned i
   Assert (!this->has_children() ||
          (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
           8*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
-         DoFAccessor<hp::DoFHandler<3> >::ExcNotActive());
+         BaseClass::ExcNotActive());
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
   
@@ -1761,7 +1662,7 @@ inline
 void
 DoFCellAccessor<DH>::set_active_fe_index (const unsigned int i)
 {
-  Assert (i == 0, typename DoFAccessor<DH>::ExcInvalidObject());
+  Assert (i == 0, typename BaseClass::BaseClass::ExcInvalidObject());
 }
 
 
@@ -1855,7 +1756,7 @@ void
 DoFCellAccessor<hp::DoFHandler<1> >::set_active_fe_index (const unsigned int i)
 {
   Assert (this->dof_handler != 0,
-          DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
+          BaseClass::ExcInvalidObject());
   Assert (static_cast<unsigned int>(this->present_level) <
           this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
@@ -1877,7 +1778,7 @@ void
 DoFCellAccessor<hp::DoFHandler<2> >::set_active_fe_index (const unsigned int i)
 {
   Assert (this->dof_handler != 0,
-          DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
+          BaseClass::ExcInvalidObject());
   Assert (static_cast<unsigned int>(this->present_level) <
           this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
@@ -1899,7 +1800,7 @@ void
 DoFCellAccessor<hp::DoFHandler<3> >::set_active_fe_index (const unsigned int i)
 {
   Assert (this->dof_handler != 0,
-          DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
+          BaseClass::ExcInvalidObject());
   Assert (static_cast<unsigned int>(this->present_level) <
           this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
@@ -1923,17 +1824,6 @@ DoFCellAccessor<DH>::
 distribute_local_to_global (const Vector<number> &local_source,
                            OutputVector         &global_destination) const
 {
-                                  // since the exception classes are
-                                  // from a template dependent base
-                                  // class, we have to fully qualify
-                                  // them. to work around more
-                                  // trouble, typedef the template
-                                  // dependent base class to a
-                                  // non-template dependent name and
-                                  // use that to specify the
-                                  // qualified exception names
-  typedef DoFAccessor<DH> BaseClass;
-  
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (&this->get_fe() != 0,
@@ -1966,17 +1856,6 @@ DoFCellAccessor<DH>::
 distribute_local_to_global (const FullMatrix<number> &local_source,
                            OutputMatrix             &global_destination) const
 {
-                                  // since the exception classes are
-                                  // from a template dependent base
-                                  // class, we have to fully qualify
-                                  // them. to work around more
-                                  // trouble, typedef the template
-                                  // dependent base class to a
-                                  // non-template dependent name and
-                                  // use that to specify the
-                                  // qualified exception names
-  typedef DoFAccessor<DH> BaseClass;
-  
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (&this->get_fe() != 0,
index d509fc5800eb0a10f19e7e7eb9dc861c1bfb172f..8353b7df5ba7e1483a5ba3da095de51e6a911480 100644 (file)
@@ -1071,7 +1071,7 @@ class DoFHandler  :  public Subscriptor
                                     /*
                                      * Make accessor objects friends.
                                      */
-    template <class DH> friend class DoFAccessor;
+    template <int structdim, class DH> friend class DoFAccessor;
 
                                     /*
                                      * Make accessor objects friends.
index d4e825a1fa02b536f0187ea3473a2873627620e5..7e02a538313c19460152de242e5a07d16ff10c41 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef __deal2__dof_iterator_selector_h
 #define __deal2__dof_iterator_selector_h
 
-template <class DH> class DoFAccessor;
+template <int structdim, class DH> class DoFAccessor;
 template <class DH> class DoFCellAccessor;
 template <int celldim, class DH> class DoFObjectAccessor;
 template <int dim> class FiniteElement;
index 434ce7982068e7ae539c8bc83067b8b22299ea4d..54125e9195ab0be28be252decca35a73938ca690 100644 (file)
@@ -80,7 +80,7 @@ class MGDoFAccessor {
                                      * Reset the DoF handler pointer.
                                      */
     void set_mg_dof_handler (MGDoFHandler<dim> *dh) {
-       typedef DoFAccessor<DoFHandler<dim> > BaseClass;
+       typedef DoFAccessor<dim,DoFHandler<dim> > BaseClass;
       Assert (dh != 0, typename BaseClass::ExcInvalidObject());
       mg_dof_handler = dh;
     };
@@ -235,6 +235,16 @@ class MGDoFObjectAccessor<1, dim> :  public MGDoFAccessor<dim>,
                                     public MGDoFObjectAccessor_Inheritance<1, dim>::BaseClass
 {
   public:
+                                    /**
+                                     * Declare a typedef to the base
+                                     * class to make accessing some
+                                     * of the exception classes
+                                     * simpler.
+                                     */    
+    typedef
+    typename MGDoFObjectAccessor_Inheritance<1, dim>::BaseClass
+    BaseClass;
+
                                     /**
                                      * Declare the data type that this accessor
                                      * class expects to get passed from the
@@ -351,6 +361,16 @@ class MGDoFObjectAccessor<2, dim> :  public MGDoFAccessor<dim>,
                                     public MGDoFObjectAccessor_Inheritance<2, dim>::BaseClass
 {
   public:
+                                    /**
+                                     * Declare a typedef to the base
+                                     * class to make accessing some
+                                     * of the exception classes
+                                     * simpler.
+                                     */    
+    typedef
+    typename MGDoFObjectAccessor_Inheritance<2, dim>::BaseClass
+    BaseClass;
+
                                     /**
                                      * Declare the data type that this accessor
                                      * class expects to get passed from the
@@ -476,6 +496,17 @@ class MGDoFObjectAccessor<3, dim> :  public MGDoFAccessor<dim>,
                                     public MGDoFObjectAccessor_Inheritance<3, dim>::BaseClass
 {
   public:
+                                    /**
+                                     * Declare a typedef to the base
+                                     * class to make accessing some
+                                     * of the exception classes
+                                     * simpler.
+                                     */    
+    typedef
+    typename MGDoFObjectAccessor_Inheritance<3, dim>::BaseClass
+    BaseClass;
+
+    
                                     /**
                                      * Declare the data type that this accessor
                                      * class expects to get passed from the
index ea20d141f275c616c18130e4338a77dcf5f6e8ea..c95bf0490bb320f6aa7ffc5d64b97679e3361e16 100644 (file)
@@ -41,8 +41,6 @@ void DoFObjectAccessor<1, DH>::set_dof_index (const unsigned int i,
 {
   Assert (fe_index == DoFHandler<1>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
-  typedef DoFAccessor<DH> BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
                                   // make sure a FE has been selected
@@ -70,17 +68,6 @@ void DoFObjectAccessor<1, DH>::set_vertex_dof_index (const unsigned int vertex,
 {
   Assert (fe_index == DoFHandler<1>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
-                                  // since the exception classes are
-                                  // from a template dependent base
-                                  // class, we have to fully qualify
-                                  // them. to work around more
-                                  // trouble, typedef the template
-                                  // dependent base class to a
-                                  // non-template dependent name and
-                                  // use that to specify the
-                                  // qualified exception names
-  typedef DoFAccessor<DH> BaseClass;
-  
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
@@ -107,8 +94,6 @@ void DoFObjectAccessor<2, DH>::set_dof_index (const unsigned int i,
 {
   Assert (fe_index == DoFHandler<1>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
-  typedef DoFAccessor<DH> BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
                                   // make sure a FE has been selected
@@ -133,8 +118,6 @@ DoFObjectAccessor<2, DH>::set_vertex_dof_index (const unsigned int vertex,
 {
   Assert (fe_index == DoFHandler<1>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
-  typedef DoFAccessor<DH> BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
@@ -161,8 +144,6 @@ void DoFObjectAccessor<3, DH>::set_dof_index (const unsigned int i,
 {
   Assert (fe_index == DoFHandler<1>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
-  typedef DoFAccessor<DH> BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
                                   // make sure a FE has been selected
@@ -186,8 +167,6 @@ void DoFObjectAccessor<3, DH>::set_vertex_dof_index (const unsigned int vertex,
 {
   Assert (fe_index == DoFHandler<1>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
-  typedef DoFAccessor<DH> BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
@@ -336,8 +315,8 @@ DoFCellAccessor<DoFHandler<1> >::update_cell_dof_indices_cache () const
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           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 != 0, BaseClass::ExcInvalidObject());
+  Assert (&this->get_fe() != 0, BaseClass::ExcInvalidObject());
 
                                   // check as in documentation that
                                   // cell is either active, or dofs
@@ -413,8 +392,8 @@ DoFCellAccessor<DoFHandler<2> >::update_cell_dof_indices_cache () const
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           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 != 0, BaseClass::ExcInvalidObject());
+  Assert (&this->get_fe() != 0, BaseClass::ExcInvalidObject());
 
                                   // check as in documentation that
                                   // cell is either active, or dofs
@@ -493,8 +472,8 @@ DoFCellAccessor<DoFHandler<3> >::update_cell_dof_indices_cache () const
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           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 != 0, BaseClass::ExcInvalidObject());
+  Assert (&this->get_fe() != 0, BaseClass::ExcInvalidObject());
 
                                   // check as in documentation that
                                   // cell is either active, or dofs
@@ -622,8 +601,6 @@ get_interpolated_dof_values (const InputVector &values,
   const FiniteElement<dim> &fe            = this->get_fe();
   const unsigned int        dofs_per_cell = fe.dofs_per_cell;
   
-  typedef DoFAccessor<DH> BaseClass;
-  
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (&fe != 0,
@@ -740,8 +717,7 @@ set_dof_values_by_interpolation (const Vector<number> &local_values,
                                 OutputVector         &values) const
 {
   const unsigned int dofs_per_cell = this->get_fe().dofs_per_cell;
-  typedef DoFAccessor<DH> BaseClass;
-  
+
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (&this->get_fe() != 0,
@@ -1026,13 +1002,15 @@ set_dof_values_by_interpolation<PETScWrappers::BlockVector,float>
 #endif
 
 
-template class DoFAccessor<DoFHandler<deal_II_dimension> >;
-
 #if deal_II_dimension == 1
+template class DoFAccessor<1, DoFHandler<1> >;
 template class DoFObjectAccessor<1, DoFHandler<1> >;
 #endif
 
 #if deal_II_dimension == 2
+template class DoFAccessor<1, DoFHandler<2> >;
+template class DoFAccessor<2, DoFHandler<2> >;
+
 template class DoFObjectAccessor<1, DoFHandler<2> >;
 template class DoFObjectAccessor<2, DoFHandler<2> >;
 
@@ -1042,6 +1020,10 @@ template class TriaActiveIterator<2,DoFObjectAccessor<1, DoFHandler<2> > >;
 #endif
 
 #if deal_II_dimension == 3
+template class DoFAccessor<1, DoFHandler<3> >;
+template class DoFAccessor<2, DoFHandler<3> >;
+template class DoFAccessor<3, DoFHandler<3> >;
+
 template class DoFObjectAccessor<1, DoFHandler<3> >;
 template class DoFObjectAccessor<2, DoFHandler<3> >;
 template class DoFObjectAccessor<3, DoFHandler<3> >;
@@ -1311,13 +1293,15 @@ set_dof_values_by_interpolation<PETScWrappers::BlockVector,float>
 #endif
 
 
-template class DoFAccessor<hp::DoFHandler<deal_II_dimension> >;
-
 #if deal_II_dimension == 1
+template class DoFAccessor<1, hp::DoFHandler<1> >;
 template class DoFObjectAccessor<1, hp::DoFHandler<1> >;
 #endif
 
 #if deal_II_dimension == 2
+template class DoFAccessor<1, hp::DoFHandler<2> >;
+template class DoFAccessor<2, hp::DoFHandler<2> >;
+
 template class DoFObjectAccessor<1, hp::DoFHandler<2> >;
 template class DoFObjectAccessor<2, hp::DoFHandler<2> >;
 
@@ -1328,6 +1312,10 @@ template class TriaActiveIterator<2,DoFObjectAccessor<1, hp::DoFHandler<2> > >;
 
 
 #if deal_II_dimension == 3
+template class DoFAccessor<1, hp::DoFHandler<3> >;
+template class DoFAccessor<2, hp::DoFHandler<3> >;
+template class DoFAccessor<3, hp::DoFHandler<3> >;
+
 template class DoFObjectAccessor<1, hp::DoFHandler<3> >;
 template class DoFObjectAccessor<2, hp::DoFHandler<3> >;
 template class DoFObjectAccessor<3, hp::DoFHandler<3> >;
index 2ce43ab85c6ef5bb9fa91785d06f7eb3c2bb8dfd..51b2ff6a9e19bd266889ced599ccddd34b1f1a5c 100644 (file)
@@ -40,8 +40,6 @@ MGDoFObjectAccessor<1, dim>::MGDoFObjectAccessor (const Triangulation<dim> *tria
 template <int dim>
 unsigned int MGDoFObjectAccessor<1, dim>::mg_dof_index (const unsigned int i) const
 {
-  typedef DoFAccessor<DoFHandler<dim> > BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,
@@ -62,8 +60,6 @@ template <int dim>
 void MGDoFObjectAccessor<1, dim>::set_mg_dof_index (const unsigned int i,
                                                    const unsigned int index) const
 {
-  typedef DoFAccessor<DoFHandler<dim> > BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,
@@ -84,8 +80,6 @@ template <int dim>
 unsigned int MGDoFObjectAccessor<1, dim>::mg_vertex_dof_index (const unsigned int vertex,
                                                               const unsigned int i) const
 {
-  typedef DoFAccessor<DoFHandler<dim> > BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,
@@ -106,8 +100,6 @@ void MGDoFObjectAccessor<1, dim>::set_mg_vertex_dof_index (const unsigned int ve
                                                           const unsigned int i,
                                                           const unsigned int index) const
 {
-  typedef DoFAccessor<DoFHandler<dim> > BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,
@@ -127,8 +119,6 @@ template <int dim>
 void
 MGDoFObjectAccessor<1, dim>::get_mg_dof_indices (std::vector<unsigned int> &dof_indices) const
 {
-  typedef DoFAccessor<DoFHandler<dim> > BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,
@@ -159,8 +149,6 @@ void
 MGDoFObjectAccessor<1,dim>::get_mg_dof_values (const Vector<number> &values,
                                               Vector<number>       &dof_values) const
 {
-  typedef DoFAccessor<DoFHandler<1> > BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,
@@ -227,8 +215,6 @@ MGDoFObjectAccessor<2, dim>::MGDoFObjectAccessor (const Triangulation<dim> *tria
 template <int dim>
 unsigned int MGDoFObjectAccessor<2, dim>::mg_dof_index (const unsigned int i) const
 {
-  typedef DoFAccessor<DoFHandler<dim> > BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,
@@ -249,8 +235,6 @@ template <int dim>
 void MGDoFObjectAccessor<2, dim>::set_mg_dof_index (const unsigned int i,
                                                    const unsigned int index) const
 {
-  typedef DoFAccessor<DoFHandler<dim> > BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,
@@ -271,8 +255,6 @@ template <int dim>
 unsigned int MGDoFObjectAccessor<2, dim>::mg_vertex_dof_index (const unsigned int vertex,
                                                               const unsigned int i) const
 {
-  typedef DoFAccessor<DoFHandler<dim> > BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,
@@ -293,8 +275,6 @@ void MGDoFObjectAccessor<2, dim>::set_mg_vertex_dof_index (const unsigned int ve
                                                           const unsigned int i,
                                                           const unsigned int index) const
 {
-  typedef DoFAccessor<DoFHandler<dim> > BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,
@@ -314,9 +294,6 @@ template <int dim>
 void
 MGDoFObjectAccessor<2, dim>::get_mg_dof_indices (std::vector<unsigned int> &dof_indices) const
 {
-  typedef DoFAccessor<DoFHandler<dim> > BaseClass;
-  typedef DoFAccessor<DoFHandler<2> > BaseClass2D;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,
@@ -326,7 +303,7 @@ MGDoFObjectAccessor<2, dim>::get_mg_dof_indices (std::vector<unsigned int> &dof_
   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),
-         typename BaseClass2D::ExcVectorDoesNotMatch());
+         typename BaseClass::ExcVectorDoesNotMatch());
 
   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,
@@ -352,8 +329,6 @@ void
 MGDoFObjectAccessor<2,dim>::get_mg_dof_values (const Vector<number> &values,
                                               Vector<number>       &dof_values) const
 {
-  typedef DoFAccessor<DoFHandler<2> > BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,
@@ -440,8 +415,6 @@ MGDoFObjectAccessor<3, dim>::MGDoFObjectAccessor (const Triangulation<dim> *tria
 template <int dim>
 unsigned int MGDoFObjectAccessor<3, dim>::mg_dof_index (const unsigned int i) const
 {
-  typedef DoFAccessor<DoFHandler<dim> > BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,
@@ -462,8 +435,6 @@ template <int dim>
 void MGDoFObjectAccessor<3, dim>::set_mg_dof_index (const unsigned int i,
                                                    const unsigned int index) const
 {
-  typedef DoFAccessor<DoFHandler<dim> > BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,
@@ -484,8 +455,6 @@ template <int dim>
 unsigned int MGDoFObjectAccessor<3, dim>::mg_vertex_dof_index (const unsigned int vertex,
                                                               const unsigned int i) const
 {
-  typedef DoFAccessor<DoFHandler<dim> > BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,
@@ -506,8 +475,6 @@ void MGDoFObjectAccessor<3, dim>::set_mg_vertex_dof_index (const unsigned int ve
                                                           const unsigned int i,
                                                           const unsigned int index) const
 {
-  typedef DoFAccessor<DoFHandler<dim> > BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,
@@ -527,9 +494,6 @@ template <int dim>
 void
 MGDoFObjectAccessor<3, dim>::get_mg_dof_indices (std::vector<unsigned int> &dof_indices) const
 {
-  typedef DoFAccessor<DoFHandler<dim> > BaseClass;
-  typedef DoFAccessor<DoFHandler<3> > BaseClass3D;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,
@@ -540,7 +504,7 @@ MGDoFObjectAccessor<3, dim>::get_mg_dof_indices (std::vector<unsigned int> &dof_
                                 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),
-         typename BaseClass3D::ExcVectorDoesNotMatch());
+         typename BaseClass::ExcVectorDoesNotMatch());
 
   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,
@@ -570,8 +534,6 @@ void
 MGDoFObjectAccessor<3,dim>::get_mg_dof_values (const Vector<number> &values,
                                               Vector<number>       &dof_values) const
 {
-  typedef DoFAccessor<DoFHandler<3> > BaseClass;
-
   Assert (this->dof_handler != 0,
          typename BaseClass::ExcInvalidObject());
   Assert (this->mg_dof_handler != 0,

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.