mg_dof_handler = dh;
};
+ /**
+ * Exception for child classes
+ */
+ DeclException0 (ExcInvalidObject);
+
/**
* Copy operator.
*/
};
-template <int celldim, int dim, typename BaseClass>
+/* -------------------------------------------------------------------------- */
+
+/**
+ * This is a switch class which only declares a #typdef#. It is meant to
+ * determine which class a #MGDoFObjectAccessor# class is to be derived
+ * from. By default, #MGDoFObjectAccessor<celldim,dim># derives from
+ * the #typedef# in the general #MGDoFObjectAccessor_Inheritance<celldim,dim>#
+ * class, which is #DoFObjectAccessor<celldim,dim>#,
+ * but if #celldim==dim#, then the specialization #MGDoFObjectAccessor_Inheritance<dim,dim>#
+ * is used which declares its local type to be #DoFCellAccessor<dim>#. Therefore,
+ * the inheritance is automatically chosen to be from #DoFCellAccessor# if the
+ * object under consideration has full dimension, i.e. constitutes a cell.
+ *
+ * @author Wolfgang Bangerth, 1999
+ */
+template <int celldim, int dim>
+class MGDoFObjectAccessor_Inheritance
+{
+ /**
+ * Declaration of the #typedef#.
+ * See the full documentation for
+ * more information.
+ */
+ typedef DoFObjectAccessor<celldim,dim> BaseClass;
+};
+
+
+
+/**
+ * This is a switch class which only declares a #typdef#. It is meant to
+ * determine which class a #DoFObjectAccessor# class is to be derived
+ * from. By default, #DoFObjectAccessor<celldim,dim># derives from
+ * the #typedef# in the general #DoFObjectAccessor_Inheritance<celldim,dim>#
+ * class, which is #TriaObjectAccessor<celldim,dim>#,
+ * but if #celldim==dim#, then the specialization #TriaObjectAccessor<dim,dim>#
+ * is used which declares its local type to be #CellAccessor<dim>#. Therefore,
+ * the inheritance is automatically chosen to be from #CellAccessor# if the
+ * object under consideration has full dimension, i.e. constitutes a cell.
+ *
+ * @author Wolfgang Bangerth, 1999
+ */
+template <int dim>
+class MGDoFObjectAccessor_Inheritance<dim,dim>
+{
+ /**
+ * Declaration of the #typedef#.
+ * See the full documentation for
+ * more information.
+ */
+ typedef DoFCellAccessor<dim> BaseClass;
+};
+
+
+
+
+/* -------------------------------------------------------------------------- */
+
+
+
+/**
+ * Common template for line, quad, hex.
+ *
+ * Internal: inheritance is necessary for the general template due to
+ * a compiler error.
+ * @author Guido Kanschat, 1999
+ */
+template <int celldim, int dim>
class MGDoFObjectAccessor : public MGDoFAccessor<dim>,
- public DoFObjectAccessor<celldim, dim>
+ public MGDoFObjectAccessor_Inheritance<celldim, dim>::BaseClass
{};
+
/**
* Closure class.
*/
-template<int dim, typename BaseClass>
-class MGDoFObjectAccessor<0, dim, BaseClass>
+template<int dim>
+class MGDoFObjectAccessor<0, dim>
{
public:
- typedef void* AccessorData;
+ typedef void AccessorData;
+
+ /**
+ * Constructor. Should never be called
+ * and thus throws an error.
+ */
MGDoFObjectAccessor (Triangulation<dim> *,
- const int,
- const int,
- const AccessorData *)
- {}
+ const int,
+ const int,
+ const AccessorData *)
+ {
+ Assert (false, ExcInternalError());
+ }
};
*
* \subsection{Notes about the class hierarchy structure}
*
- * The class hierarchy seems to be a bit confused here. The reason for this is
- * that we would really like to derive a #DoFLineAccessor# from a #LineAccessor#.
- * Unfortunately, we would run into problems, if we wanted a #DoFLineAccessor#
- * in one spatial dimension, in which case a line is also a cell. The traditional
- * solution would be to declare a #DoFCellAccessor<1># which is derived from
- * #DoFObjectAccessor<1, 1># and #CellAccessor<1># (the #DoFObjectAccessor<1, dim># cannot
- * itself be derived from #CellAccessor<dim># since a line is not a cell
- * unless in one space dimension), but since a #DoFLineAccessor# and a
- * #CellAccessor# are both derived from #TriaAccessor#, we would have to make
- * the last derivation virtual.
- *
- * Since we want to avoid virtual inheritance since this involves another
- * indirection in every member variable access, we chose another way: we
- * pass a second template parameter to a #DoFLineAccessor# which tells it
- * which class to be derived from: if we are in one spatial dimension, the
- * base class is to be #CellAccessor<1>#, in two or more dimensions it
- * is a #TriaObjectAccessor<1, dim>#, i.e. am accessor to lines without the missing
- * functionality needed for cells (neighbors, etc.).
- *
- * This way we can declare a #DoFCellAccessor# in one dimension by deriving
- * from #DoFObjectAccessor<1, 1,CellAccessor<1> >#, thus getting the cell
- * functionality through the #DoFLineAccessor# instead of through a virtual
- * multiple inheritance of #DoFLineAccessor# and #CellAccessor<1>#.
- *
- * The same concept is used with #DoFObjectAccessor<2, dim># classes etc.
+ * Inheritance from #MGDoFObjectAccessor_Inheritance<1,dim>::BaseClass# yields
+ * inheritance from #DoFCellAccessor<1># if #dim==1# and from
+ * #TriaObjectAccessor<1,dim># for all other #dim# values. Thus, an object
+ * of this class shares all features of cells in one dimension, but behaves
+ * like an ordinary line in all other cases.
*
* @author Wolfgang Bangerth, 1998
*/
-template <int dim, typename BaseClass>
-class MGDoFObjectAccessor<1, dim, BaseClass> : public MGDoFAccessor<dim>,
- public DoFObjectAccessor<1, dim>
+template <int dim>
+class MGDoFObjectAccessor<1, dim> : public MGDoFAccessor<dim>,
+ public MGDoFObjectAccessor_Inheritance<1, dim>::BaseClass
{
public:
/**
* to a #MGDoFHandler<dim># object.
*/
MGDoFObjectAccessor (Triangulation<dim> *tria,
- const int level,
- const int index,
- const AccessorData *local_data);
+ const int level,
+ const int index,
+ const AccessorData *local_data);
/**
* Return the index of the #i#th degree
* class returns a line accessor without
* access to the MG data.
*/
- TriaIterator<dim,MGDoFObjectAccessor<1, dim,BaseClass> > child (const unsigned int) const;
+ TriaIterator<dim,MGDoFObjectAccessor<1, dim> > child (const unsigned int) const;
/**
* Implement the copy operator needed
* for the iterator classes.
*/
- void copy_from (const MGDoFObjectAccessor<1, dim,BaseClass> &a);
+ void copy_from (const MGDoFObjectAccessor<1, dim> &a);
};
*
* @see DoFLineAccessor
*/
-template <int dim, typename BaseClass>
-class MGDoFObjectAccessor<2, dim, BaseClass> : public MGDoFAccessor<dim>,
- public DoFObjectAccessor<2, dim> {
+template <int dim>
+class MGDoFObjectAccessor<2, dim> : public MGDoFAccessor<dim>,
+ public MGDoFObjectAccessor_Inheritance<2, dim>::BaseClass
+{
public:
/**
* Declare the data type that this accessor
* Return a pointer to the #i#th line
* bounding this #Quad#.
*/
- TriaIterator<dim,MGDoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
+ TriaIterator<dim,MGDoFObjectAccessor<1, dim> >
line (const unsigned int i) const;
/**
* class returns a quad accessor without
* access to the DoF data.
*/
- TriaIterator<dim,MGDoFObjectAccessor<2, dim, BaseClass> > child (const unsigned int) const;
+ TriaIterator<dim,MGDoFObjectAccessor<2, dim> >
+ child (const unsigned int) const;
/**
* Implement the copy operator needed
* for the iterator classes.
*/
- void copy_from (const MGDoFObjectAccessor<2, dim,BaseClass> &a);
+ void copy_from (const MGDoFObjectAccessor<2, dim> &a);
};
*
* @see DoFLineAccessor
*/
-template <int dim, typename BaseClass>
-class MGDoFObjectAccessor<3, dim, BaseClass> : public MGDoFAccessor<dim>,
- public DoFObjectAccessor<3, dim>
+template <int dim>
+class MGDoFObjectAccessor<3, dim> : public MGDoFAccessor<dim>,
+ public MGDoFObjectAccessor_Inheritance<3, dim>::BaseClass
{
public:
/**
* Return a pointer to the #i#th line
* bounding this #Hex#.
*/
- TriaIterator<dim,MGDoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
+ TriaIterator<dim,MGDoFObjectAccessor<1, dim> >
line (const unsigned int i) const;
/**
* Return a pointer to the #i#th quad
* bounding this #Hex#.
*/
- TriaIterator<dim,MGDoFObjectAccessor<2, dim,TriaObjectAccessor<2, dim> > >
+ TriaIterator<dim,MGDoFObjectAccessor<2, dim> >
quad (const unsigned int i) const;
/**
* class returns a hex accessor without
* access to the DoF data.
*/
- TriaIterator<dim,MGDoFObjectAccessor<3, dim,BaseClass> > child (const unsigned int) const;
+ TriaIterator<dim,MGDoFObjectAccessor<3, dim> > child (const unsigned int) const;
/**
* Implement the copy operator needed
* for the iterator classes.
*/
- void copy_from (const MGDoFObjectAccessor<3, dim,BaseClass> &a);
+ void copy_from (const MGDoFObjectAccessor<3, dim> &a);
};
* @author Wolfgang Bangerth, 1998
*/
template <int dim>
-class MGDoFCellAccessor : public MGDoFObjectAccessor<dim, dim, CellAccessor<dim> > {
+class MGDoFCellAccessor : public MGDoFObjectAccessor<dim, dim> {
public:
/**
* Type of faces.
*/
typedef
- TriaIterator<dim, MGDoFObjectAccessor<dim-1, dim,TriaObjectAccessor<dim-1, dim> > >
+ TriaIterator<dim, MGDoFObjectAccessor<dim-1, dim> >
face_iterator;
/**
* Declare the data type that this accessor
* class expects to get passed from the
* iterator classes.
*/
- typedef typename
- MGDoFObjectAccessor<dim, dim, CellAccessor<dim> >::AccessorData
- AccessorData;
+ typedef typename MGDoFObjectAccessor<dim, dim>::AccessorData AccessorData;
/**
* Constructor
const int level,
const int index,
const AccessorData *local_data) :
- MGDoFObjectAccessor<dim, dim, CellAccessor<dim> > (tria,level,index,local_data) {};
+ MGDoFObjectAccessor<dim, dim> (tria,level,index,local_data) {};
/**
* Return the #i#th neighbor as a MGDoF cell
*/
class MGDoFDimensionInfo<2> {
public:
- typedef TriaRawIterator<2,MGDoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > > raw_line_iterator;
- typedef TriaIterator<2,MGDoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > > line_iterator;
- typedef TriaActiveIterator<2,MGDoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > > active_line_iterator;
+ typedef TriaRawIterator<2,MGDoFObjectAccessor<1, 2> > raw_line_iterator;
+ typedef TriaIterator<2,MGDoFObjectAccessor<1, 2> > line_iterator;
+ typedef TriaActiveIterator<2,MGDoFObjectAccessor<1, 2> > active_line_iterator;
- typedef TriaRawIterator<2,MGDoFCellAccessor<2> > raw_quad_iterator;
- typedef TriaIterator<2,MGDoFCellAccessor<2> > quad_iterator;
- typedef TriaActiveIterator<2,MGDoFCellAccessor<2> > active_quad_iterator;
+ typedef TriaRawIterator<2,MGDoFCellAccessor<2> > raw_quad_iterator;
+ typedef TriaIterator<2,MGDoFCellAccessor<2> > quad_iterator;
+ typedef TriaActiveIterator<2,MGDoFCellAccessor<2> > active_quad_iterator;
typedef void * raw_hex_iterator;
typedef void * hex_iterator;
*/
class MGDoFDimensionInfo<3> {
public:
- typedef TriaRawIterator<3,MGDoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > > raw_line_iterator;
- typedef TriaIterator<3,MGDoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > > line_iterator;
- typedef TriaActiveIterator<3,MGDoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > > active_line_iterator;
+ typedef TriaRawIterator<3,MGDoFObjectAccessor<1, 3> > raw_line_iterator;
+ typedef TriaIterator<3,MGDoFObjectAccessor<1, 3> > line_iterator;
+ typedef TriaActiveIterator<3,MGDoFObjectAccessor<1, 3> > active_line_iterator;
- typedef TriaRawIterator<3,MGDoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > > raw_quad_iterator;
- typedef TriaIterator<3,MGDoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > > quad_iterator;
- typedef TriaActiveIterator<3,MGDoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > > active_quad_iterator;
+ typedef TriaRawIterator<3,MGDoFObjectAccessor<2, 3> > raw_quad_iterator;
+ typedef TriaIterator<3,MGDoFObjectAccessor<2, 3> > quad_iterator;
+ typedef TriaActiveIterator<3,MGDoFObjectAccessor<2, 3> > active_quad_iterator;
typedef TriaRawIterator<3,MGDoFCellAccessor<3> > raw_hex_iterator;
typedef TriaIterator<3,MGDoFCellAccessor<3> > hex_iterator;
*/
vector<unsigned int> mg_used_dofs;
- friend class MGDoFObjectAccessor<1, dim, TriaObjectAccessor<1, dim> >;
- friend class MGDoFObjectAccessor<1, dim, CellAccessor<dim> >;
- friend class MGDoFObjectAccessor<2, dim, TriaObjectAccessor<2, dim> >;
- friend class MGDoFObjectAccessor<2, dim, CellAccessor<dim> >;
- friend class MGDoFObjectAccessor<3, dim, TriaObjectAccessor<3, dim> >;
- friend class MGDoFObjectAccessor<3, dim, CellAccessor<dim> >;
+ friend class MGDoFObjectAccessor<1, dim>;
+ friend class MGDoFObjectAccessor<2, dim>;
+ friend class MGDoFObjectAccessor<3, dim>;
};
mg_dof_handler = dh;
};
+ /**
+ * Exception for child classes
+ */
+ DeclException0 (ExcInvalidObject);
+
/**
* Copy operator.
*/
};
-template <int celldim, int dim, typename BaseClass>
+/* -------------------------------------------------------------------------- */
+
+/**
+ * This is a switch class which only declares a #typdef#. It is meant to
+ * determine which class a #MGDoFObjectAccessor# class is to be derived
+ * from. By default, #MGDoFObjectAccessor<celldim,dim># derives from
+ * the #typedef# in the general #MGDoFObjectAccessor_Inheritance<celldim,dim>#
+ * class, which is #DoFObjectAccessor<celldim,dim>#,
+ * but if #celldim==dim#, then the specialization #MGDoFObjectAccessor_Inheritance<dim,dim>#
+ * is used which declares its local type to be #DoFCellAccessor<dim>#. Therefore,
+ * the inheritance is automatically chosen to be from #DoFCellAccessor# if the
+ * object under consideration has full dimension, i.e. constitutes a cell.
+ *
+ * @author Wolfgang Bangerth, 1999
+ */
+template <int celldim, int dim>
+class MGDoFObjectAccessor_Inheritance
+{
+ /**
+ * Declaration of the #typedef#.
+ * See the full documentation for
+ * more information.
+ */
+ typedef DoFObjectAccessor<celldim,dim> BaseClass;
+};
+
+
+
+/**
+ * This is a switch class which only declares a #typdef#. It is meant to
+ * determine which class a #DoFObjectAccessor# class is to be derived
+ * from. By default, #DoFObjectAccessor<celldim,dim># derives from
+ * the #typedef# in the general #DoFObjectAccessor_Inheritance<celldim,dim>#
+ * class, which is #TriaObjectAccessor<celldim,dim>#,
+ * but if #celldim==dim#, then the specialization #TriaObjectAccessor<dim,dim>#
+ * is used which declares its local type to be #CellAccessor<dim>#. Therefore,
+ * the inheritance is automatically chosen to be from #CellAccessor# if the
+ * object under consideration has full dimension, i.e. constitutes a cell.
+ *
+ * @author Wolfgang Bangerth, 1999
+ */
+template <int dim>
+class MGDoFObjectAccessor_Inheritance<dim,dim>
+{
+ /**
+ * Declaration of the #typedef#.
+ * See the full documentation for
+ * more information.
+ */
+ typedef DoFCellAccessor<dim> BaseClass;
+};
+
+
+
+
+/* -------------------------------------------------------------------------- */
+
+
+
+/**
+ * Common template for line, quad, hex.
+ *
+ * Internal: inheritance is necessary for the general template due to
+ * a compiler error.
+ * @author Guido Kanschat, 1999
+ */
+template <int celldim, int dim>
class MGDoFObjectAccessor : public MGDoFAccessor<dim>,
- public DoFObjectAccessor<celldim, dim>
+ public MGDoFObjectAccessor_Inheritance<celldim, dim>::BaseClass
{};
+
/**
* Closure class.
*/
-template<int dim, typename BaseClass>
-class MGDoFObjectAccessor<0, dim, BaseClass>
+template<int dim>
+class MGDoFObjectAccessor<0, dim>
{
public:
- typedef void* AccessorData;
+ typedef void AccessorData;
+
+ /**
+ * Constructor. Should never be called
+ * and thus throws an error.
+ */
MGDoFObjectAccessor (Triangulation<dim> *,
- const int,
- const int,
- const AccessorData *)
- {}
+ const int,
+ const int,
+ const AccessorData *)
+ {
+ Assert (false, ExcInternalError());
+ }
};
*
* \subsection{Notes about the class hierarchy structure}
*
- * The class hierarchy seems to be a bit confused here. The reason for this is
- * that we would really like to derive a #DoFLineAccessor# from a #LineAccessor#.
- * Unfortunately, we would run into problems, if we wanted a #DoFLineAccessor#
- * in one spatial dimension, in which case a line is also a cell. The traditional
- * solution would be to declare a #DoFCellAccessor<1># which is derived from
- * #DoFObjectAccessor<1, 1># and #CellAccessor<1># (the #DoFObjectAccessor<1, dim># cannot
- * itself be derived from #CellAccessor<dim># since a line is not a cell
- * unless in one space dimension), but since a #DoFLineAccessor# and a
- * #CellAccessor# are both derived from #TriaAccessor#, we would have to make
- * the last derivation virtual.
- *
- * Since we want to avoid virtual inheritance since this involves another
- * indirection in every member variable access, we chose another way: we
- * pass a second template parameter to a #DoFLineAccessor# which tells it
- * which class to be derived from: if we are in one spatial dimension, the
- * base class is to be #CellAccessor<1>#, in two or more dimensions it
- * is a #TriaObjectAccessor<1, dim>#, i.e. am accessor to lines without the missing
- * functionality needed for cells (neighbors, etc.).
- *
- * This way we can declare a #DoFCellAccessor# in one dimension by deriving
- * from #DoFObjectAccessor<1, 1,CellAccessor<1> >#, thus getting the cell
- * functionality through the #DoFLineAccessor# instead of through a virtual
- * multiple inheritance of #DoFLineAccessor# and #CellAccessor<1>#.
- *
- * The same concept is used with #DoFObjectAccessor<2, dim># classes etc.
+ * Inheritance from #MGDoFObjectAccessor_Inheritance<1,dim>::BaseClass# yields
+ * inheritance from #DoFCellAccessor<1># if #dim==1# and from
+ * #TriaObjectAccessor<1,dim># for all other #dim# values. Thus, an object
+ * of this class shares all features of cells in one dimension, but behaves
+ * like an ordinary line in all other cases.
*
* @author Wolfgang Bangerth, 1998
*/
-template <int dim, typename BaseClass>
-class MGDoFObjectAccessor<1, dim, BaseClass> : public MGDoFAccessor<dim>,
- public DoFObjectAccessor<1, dim>
+template <int dim>
+class MGDoFObjectAccessor<1, dim> : public MGDoFAccessor<dim>,
+ public MGDoFObjectAccessor_Inheritance<1, dim>::BaseClass
{
public:
/**
* to a #MGDoFHandler<dim># object.
*/
MGDoFObjectAccessor (Triangulation<dim> *tria,
- const int level,
- const int index,
- const AccessorData *local_data);
+ const int level,
+ const int index,
+ const AccessorData *local_data);
/**
* Return the index of the #i#th degree
* class returns a line accessor without
* access to the MG data.
*/
- TriaIterator<dim,MGDoFObjectAccessor<1, dim,BaseClass> > child (const unsigned int) const;
+ TriaIterator<dim,MGDoFObjectAccessor<1, dim> > child (const unsigned int) const;
/**
* Implement the copy operator needed
* for the iterator classes.
*/
- void copy_from (const MGDoFObjectAccessor<1, dim,BaseClass> &a);
+ void copy_from (const MGDoFObjectAccessor<1, dim> &a);
};
*
* @see DoFLineAccessor
*/
-template <int dim, typename BaseClass>
-class MGDoFObjectAccessor<2, dim, BaseClass> : public MGDoFAccessor<dim>,
- public DoFObjectAccessor<2, dim> {
+template <int dim>
+class MGDoFObjectAccessor<2, dim> : public MGDoFAccessor<dim>,
+ public MGDoFObjectAccessor_Inheritance<2, dim>::BaseClass
+{
public:
/**
* Declare the data type that this accessor
* Return a pointer to the #i#th line
* bounding this #Quad#.
*/
- TriaIterator<dim,MGDoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
+ TriaIterator<dim,MGDoFObjectAccessor<1, dim> >
line (const unsigned int i) const;
/**
* class returns a quad accessor without
* access to the DoF data.
*/
- TriaIterator<dim,MGDoFObjectAccessor<2, dim, BaseClass> > child (const unsigned int) const;
+ TriaIterator<dim,MGDoFObjectAccessor<2, dim> >
+ child (const unsigned int) const;
/**
* Implement the copy operator needed
* for the iterator classes.
*/
- void copy_from (const MGDoFObjectAccessor<2, dim,BaseClass> &a);
+ void copy_from (const MGDoFObjectAccessor<2, dim> &a);
};
*
* @see DoFLineAccessor
*/
-template <int dim, typename BaseClass>
-class MGDoFObjectAccessor<3, dim, BaseClass> : public MGDoFAccessor<dim>,
- public DoFObjectAccessor<3, dim>
+template <int dim>
+class MGDoFObjectAccessor<3, dim> : public MGDoFAccessor<dim>,
+ public MGDoFObjectAccessor_Inheritance<3, dim>::BaseClass
{
public:
/**
* Return a pointer to the #i#th line
* bounding this #Hex#.
*/
- TriaIterator<dim,MGDoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
+ TriaIterator<dim,MGDoFObjectAccessor<1, dim> >
line (const unsigned int i) const;
/**
* Return a pointer to the #i#th quad
* bounding this #Hex#.
*/
- TriaIterator<dim,MGDoFObjectAccessor<2, dim,TriaObjectAccessor<2, dim> > >
+ TriaIterator<dim,MGDoFObjectAccessor<2, dim> >
quad (const unsigned int i) const;
/**
* class returns a hex accessor without
* access to the DoF data.
*/
- TriaIterator<dim,MGDoFObjectAccessor<3, dim,BaseClass> > child (const unsigned int) const;
+ TriaIterator<dim,MGDoFObjectAccessor<3, dim> > child (const unsigned int) const;
/**
* Implement the copy operator needed
* for the iterator classes.
*/
- void copy_from (const MGDoFObjectAccessor<3, dim,BaseClass> &a);
+ void copy_from (const MGDoFObjectAccessor<3, dim> &a);
};
* @author Wolfgang Bangerth, 1998
*/
template <int dim>
-class MGDoFCellAccessor : public MGDoFObjectAccessor<dim, dim, CellAccessor<dim> > {
+class MGDoFCellAccessor : public MGDoFObjectAccessor<dim, dim> {
public:
/**
* Type of faces.
*/
typedef
- TriaIterator<dim, MGDoFObjectAccessor<dim-1, dim,TriaObjectAccessor<dim-1, dim> > >
+ TriaIterator<dim, MGDoFObjectAccessor<dim-1, dim> >
face_iterator;
/**
* Declare the data type that this accessor
* class expects to get passed from the
* iterator classes.
*/
- typedef typename
- MGDoFObjectAccessor<dim, dim, CellAccessor<dim> >::AccessorData
- AccessorData;
+ typedef typename MGDoFObjectAccessor<dim, dim>::AccessorData AccessorData;
/**
* Constructor
const int level,
const int index,
const AccessorData *local_data) :
- MGDoFObjectAccessor<dim, dim, CellAccessor<dim> > (tria,level,index,local_data) {};
+ MGDoFObjectAccessor<dim, dim> (tria,level,index,local_data) {};
/**
* Return the #i#th neighbor as a MGDoF cell
*/
class MGDoFDimensionInfo<2> {
public:
- typedef TriaRawIterator<2,MGDoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > > raw_line_iterator;
- typedef TriaIterator<2,MGDoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > > line_iterator;
- typedef TriaActiveIterator<2,MGDoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > > active_line_iterator;
+ typedef TriaRawIterator<2,MGDoFObjectAccessor<1, 2> > raw_line_iterator;
+ typedef TriaIterator<2,MGDoFObjectAccessor<1, 2> > line_iterator;
+ typedef TriaActiveIterator<2,MGDoFObjectAccessor<1, 2> > active_line_iterator;
- typedef TriaRawIterator<2,MGDoFCellAccessor<2> > raw_quad_iterator;
- typedef TriaIterator<2,MGDoFCellAccessor<2> > quad_iterator;
- typedef TriaActiveIterator<2,MGDoFCellAccessor<2> > active_quad_iterator;
+ typedef TriaRawIterator<2,MGDoFCellAccessor<2> > raw_quad_iterator;
+ typedef TriaIterator<2,MGDoFCellAccessor<2> > quad_iterator;
+ typedef TriaActiveIterator<2,MGDoFCellAccessor<2> > active_quad_iterator;
typedef void * raw_hex_iterator;
typedef void * hex_iterator;
*/
class MGDoFDimensionInfo<3> {
public:
- typedef TriaRawIterator<3,MGDoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > > raw_line_iterator;
- typedef TriaIterator<3,MGDoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > > line_iterator;
- typedef TriaActiveIterator<3,MGDoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > > active_line_iterator;
+ typedef TriaRawIterator<3,MGDoFObjectAccessor<1, 3> > raw_line_iterator;
+ typedef TriaIterator<3,MGDoFObjectAccessor<1, 3> > line_iterator;
+ typedef TriaActiveIterator<3,MGDoFObjectAccessor<1, 3> > active_line_iterator;
- typedef TriaRawIterator<3,MGDoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > > raw_quad_iterator;
- typedef TriaIterator<3,MGDoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > > quad_iterator;
- typedef TriaActiveIterator<3,MGDoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > > active_quad_iterator;
+ typedef TriaRawIterator<3,MGDoFObjectAccessor<2, 3> > raw_quad_iterator;
+ typedef TriaIterator<3,MGDoFObjectAccessor<2, 3> > quad_iterator;
+ typedef TriaActiveIterator<3,MGDoFObjectAccessor<2, 3> > active_quad_iterator;
typedef TriaRawIterator<3,MGDoFCellAccessor<3> > raw_hex_iterator;
typedef TriaIterator<3,MGDoFCellAccessor<3> > hex_iterator;
*/
vector<unsigned int> mg_used_dofs;
- friend class MGDoFObjectAccessor<1, dim, TriaObjectAccessor<1, dim> >;
- friend class MGDoFObjectAccessor<1, dim, CellAccessor<dim> >;
- friend class MGDoFObjectAccessor<2, dim, TriaObjectAccessor<2, dim> >;
- friend class MGDoFObjectAccessor<2, dim, CellAccessor<dim> >;
- friend class MGDoFObjectAccessor<3, dim, TriaObjectAccessor<3, dim> >;
- friend class MGDoFObjectAccessor<3, dim, CellAccessor<dim> >;
+ friend class MGDoFObjectAccessor<1, dim>;
+ friend class MGDoFObjectAccessor<2, dim>;
+ friend class MGDoFObjectAccessor<3, dim>;
};
/* ------------------------ MGDoFLineAccessor --------------------------- */
-template <int dim, typename BaseClass>
-MGDoFObjectAccessor<1, dim,BaseClass>::MGDoFObjectAccessor (Triangulation<dim> *tria,
+template <int dim>
+MGDoFObjectAccessor<1, dim>::MGDoFObjectAccessor (Triangulation<dim> *tria,
const int level,
const int index,
const AccessorData *local_data) :
MGDoFAccessor<dim> (local_data),
- DoFObjectAccessor<1, dim>(tria,level,index,local_data) {};
+ MGDoFObjectAccessor_Inheritance<1,dim>::BaseClass(tria,level,index,local_data) {};
-template <int dim, typename BaseClass>
-int MGDoFObjectAccessor<1, dim,BaseClass>::mg_dof_index (const unsigned int i) const {
+template <int dim>
+int MGDoFObjectAccessor<1, dim>::mg_dof_index (const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
// make sure a FE has been selected
-template <int dim, typename BaseClass>
-void MGDoFObjectAccessor<1, dim,BaseClass>::set_mg_dof_index (const unsigned int i,
+template <int dim>
+void MGDoFObjectAccessor<1, dim>::set_mg_dof_index (const unsigned int i,
const int index) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
-int MGDoFObjectAccessor<1, dim,BaseClass>::mg_vertex_dof_index (const unsigned int vertex,
+template <int dim>
+int MGDoFObjectAccessor<1, dim>::mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
-void MGDoFObjectAccessor<1, dim,BaseClass>::set_mg_vertex_dof_index (const unsigned int vertex,
+template <int dim>
+void MGDoFObjectAccessor<1, dim>::set_mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i,
const int index) const {
Assert (dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
+template <int dim>
void
-MGDoFObjectAccessor<1, dim,BaseClass>::get_mg_dof_indices (vector<int> &dof_indices) const {
+MGDoFObjectAccessor<1, dim>::get_mg_dof_indices (vector<int> &dof_indices) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
Assert (dof_indices.size() == (2*dof_handler->get_fe().dofs_per_vertex +
dof_handler->get_fe().dofs_per_line),
- ExcVectorDoesNotMatch());
+ DoFAccessor<dim>::ExcVectorDoesNotMatch());
const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex,
dofs_per_line = dof_handler->get_fe().dofs_per_line;
-template <int dim, typename BaseClass>
-TriaIterator<dim,MGDoFObjectAccessor<1, dim,BaseClass> >
-MGDoFObjectAccessor<1, dim,BaseClass>::child (const unsigned int i) const {
- TriaIterator<dim,MGDoFObjectAccessor<1, dim,BaseClass> > q (tria,
+template <int dim>
+TriaIterator<dim,MGDoFObjectAccessor<1, dim> >
+MGDoFObjectAccessor<1, dim>::child (const unsigned int i) const {
+ TriaIterator<dim,MGDoFObjectAccessor<1, dim> > q (tria,
present_level+1,
child_index (i),
mg_dof_handler);
-template <int dim, typename BaseClass>
+template <int dim>
void
-MGDoFObjectAccessor<1, dim,BaseClass>::copy_from (const MGDoFObjectAccessor<1, dim,BaseClass> &a)
+MGDoFObjectAccessor<1, dim>::copy_from (const MGDoFObjectAccessor<1, dim> &a)
{
DoFObjectAccessor<1, dim>::copy_from (a);
set_mg_dof_handler (a.mg_dof_handler);
/* ------------------------ MGDoFQuadAccessor --------------------------- */
-template <int dim, typename BaseClass>
-MGDoFObjectAccessor<2, dim,BaseClass>::MGDoFObjectAccessor (Triangulation<dim> *tria,
- const int level,
- const int index,
- const AccessorData *local_data) :
+template <int dim>
+MGDoFObjectAccessor<2, dim>::MGDoFObjectAccessor (Triangulation<dim> *tria,
+ const int level,
+ const int index,
+ const AccessorData *local_data) :
MGDoFAccessor<dim> (local_data),
- DoFObjectAccessor<2, dim>(tria,level,index,local_data)
+ MGDoFObjectAccessor_Inheritance<2,dim>::BaseClass(tria,level,index,local_data)
{};
-template <int dim, typename BaseClass>
+template <int dim>
inline
-int MGDoFObjectAccessor<2, dim,BaseClass>::mg_dof_index (const unsigned int i) const {
+int MGDoFObjectAccessor<2, dim>::mg_dof_index (const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
// make sure a FE has been selected
-template <int dim, typename BaseClass>
-void MGDoFObjectAccessor<2, dim,BaseClass>::set_mg_dof_index (const unsigned int i,
+template <int dim>
+void MGDoFObjectAccessor<2, dim>::set_mg_dof_index (const unsigned int i,
const int index) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
+template <int dim>
inline
-int MGDoFObjectAccessor<2, dim,BaseClass>::mg_vertex_dof_index (const unsigned int vertex,
+int MGDoFObjectAccessor<2, dim>::mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
-void MGDoFObjectAccessor<2, dim,BaseClass>::set_mg_vertex_dof_index (const unsigned int vertex,
+template <int dim>
+void MGDoFObjectAccessor<2, dim>::set_mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i,
const int index) const {
Assert (dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
+template <int dim>
void
-MGDoFObjectAccessor<2, dim,BaseClass>::get_mg_dof_indices (vector<int> &dof_indices) const {
+MGDoFObjectAccessor<2, dim>::get_mg_dof_indices (vector<int> &dof_indices) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
Assert (dof_indices.size() == (4*dof_handler->get_fe().dofs_per_vertex +
4*dof_handler->get_fe().dofs_per_line +
dof_handler->get_fe().dofs_per_quad),
- ExcVectorDoesNotMatch());
+ DoFAccessor<2>::ExcVectorDoesNotMatch());
const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex,
dofs_per_line = dof_handler->get_fe().dofs_per_line,
-template <int dim, typename BaseClass>
-TriaIterator<dim,MGDoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
-MGDoFObjectAccessor<2, dim,BaseClass>::line (const unsigned int i) const {
+template <int dim>
+TriaIterator<dim,MGDoFObjectAccessor<1, dim> >
+MGDoFObjectAccessor<2, dim>::line (const unsigned int i) const {
Assert (i<4, ExcIndexRange (i, 0, 4));
- return TriaIterator<dim,MGDoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
+ return TriaIterator<dim,MGDoFObjectAccessor<1, dim> >
(
tria,
present_level,
-template <int dim, typename BaseClass>
-TriaIterator<dim,MGDoFObjectAccessor<2, dim,BaseClass> >
-MGDoFObjectAccessor<2, dim,BaseClass>::child (const unsigned int i) const {
- TriaIterator<dim,MGDoFObjectAccessor<2, dim,BaseClass> > q (tria,
+template <int dim>
+TriaIterator<dim,MGDoFObjectAccessor<2, dim> >
+MGDoFObjectAccessor<2, dim>::child (const unsigned int i) const {
+ TriaIterator<dim,MGDoFObjectAccessor<2, dim> > q (tria,
present_level+1,
child_index (i),
mg_dof_handler);
-template <int dim, typename BaseClass>
+template <int dim>
void
-MGDoFObjectAccessor<2, dim,BaseClass>::copy_from (const MGDoFObjectAccessor<2, dim,BaseClass> &a) {
+MGDoFObjectAccessor<2, dim>::copy_from (const MGDoFObjectAccessor<2, dim> &a) {
DoFObjectAccessor<2, dim>::copy_from (a);
set_mg_dof_handler (a.mg_dof_handler);
};
/* ------------------------ MGDoFHexAccessor --------------------------- */
-template <int dim, typename BaseClass>
-MGDoFObjectAccessor<3, dim,BaseClass>::MGDoFObjectAccessor (Triangulation<dim> *tria,
+template <int dim>
+MGDoFObjectAccessor<3, dim>::MGDoFObjectAccessor (Triangulation<dim> *tria,
const int level,
const int index,
const AccessorData *local_data) :
MGDoFAccessor<dim> (local_data),
- DoFObjectAccessor<3, dim>(tria,level,index,local_data) {};
+ MGDoFObjectAccessor_Inheritance<2,dim>::BaseClass(tria,level,index,local_data) {};
-template <int dim, typename BaseClass>
+template <int dim>
inline
-int MGDoFObjectAccessor<3, dim,BaseClass>::mg_dof_index (const unsigned int i) const {
+int MGDoFObjectAccessor<3, dim>::mg_dof_index (const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
// make sure a FE has been selected
-template <int dim, typename BaseClass>
-void MGDoFObjectAccessor<3, dim,BaseClass>::set_mg_dof_index (const unsigned int i,
+template <int dim>
+void MGDoFObjectAccessor<3, dim>::set_mg_dof_index (const unsigned int i,
const int index) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
+template <int dim>
inline
-int MGDoFObjectAccessor<3, dim,BaseClass>::mg_vertex_dof_index (const unsigned int vertex,
+int MGDoFObjectAccessor<3, dim>::mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
-void MGDoFObjectAccessor<3, dim,BaseClass>::set_mg_vertex_dof_index (const unsigned int vertex,
+template <int dim>
+void MGDoFObjectAccessor<3, dim>::set_mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i,
const int index) const {
Assert (dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
+template <int dim>
void
-MGDoFObjectAccessor<3, dim,BaseClass>::get_mg_dof_indices (vector<int> &dof_indices) const {
+MGDoFObjectAccessor<3, dim>::get_mg_dof_indices (vector<int> &dof_indices) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
-TriaIterator<dim,MGDoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
-MGDoFObjectAccessor<3, dim,BaseClass>::line (const unsigned int i) const {
+template <int dim>
+TriaIterator<dim,MGDoFObjectAccessor<1, dim> >
+MGDoFObjectAccessor<3, dim>::line (const unsigned int i) const {
Assert (i<12, ExcIndexRange (i, 0, 12));
- return TriaIterator<dim,MGDoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
+ return TriaIterator<dim,MGDoFObjectAccessor<1, dim> >
(
tria,
present_level,
-template <int dim, typename BaseClass>
-TriaIterator<dim,MGDoFObjectAccessor<2, dim,TriaObjectAccessor<2, dim> > >
-MGDoFObjectAccessor<3, dim,BaseClass>::quad (const unsigned int i) const {
+template <int dim>
+TriaIterator<dim,MGDoFObjectAccessor<2, dim> >
+MGDoFObjectAccessor<3, dim>::quad (const unsigned int i) const {
Assert (i<12, ExcIndexRange (i, 0, 6));
- return TriaIterator<dim,MGDoFObjectAccessor<2, dim,TriaObjectAccessor<2, dim> > >
+ return TriaIterator<dim,MGDoFObjectAccessor<2, dim> >
(
tria,
present_level,
-template <int dim, typename BaseClass>
-TriaIterator<dim,MGDoFObjectAccessor<3, dim,BaseClass> >
-MGDoFObjectAccessor<3, dim,BaseClass>::child (const unsigned int i) const {
- TriaIterator<dim,MGDoFObjectAccessor<3, dim,BaseClass> > q (tria,
- present_level+1,
- child_index (i),
- mg_dof_handler);
+template <int dim>
+TriaIterator<dim,MGDoFObjectAccessor<3, dim> >
+MGDoFObjectAccessor<3, dim>::child (const unsigned int i) const {
+ TriaIterator<dim,MGDoFObjectAccessor<3, dim> > q (tria,
+ present_level+1,
+ child_index (i),
+ mg_dof_handler);
#ifdef DEBUG
if (q.state() != past_the_end)
-template <int dim, typename BaseClass>
+template <int dim>
void
-MGDoFObjectAccessor<3, dim,BaseClass>::copy_from (const MGDoFObjectAccessor<3, dim,BaseClass> &a) {
+MGDoFObjectAccessor<3, dim>::copy_from (const MGDoFObjectAccessor<3, dim> &a) {
DoFObjectAccessor<3, dim>::copy_from (a);
set_mg_dof_handler (a.mg_dof_handler);
};
void
MGDoFCellAccessor<2>::get_mg_dof_values (const Vector<double> &values,
Vector<double> &dof_values) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<2>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<2>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<2>::ExcInvalidObject());
Assert (dof_values.size() == dof_handler->get_fe().total_dofs,
- ExcVectorDoesNotMatch());
+ DoFAccessor<2>::ExcVectorDoesNotMatch());
Assert (values.size() == mg_dof_handler->n_dofs(present_level),
- ExcVectorDoesNotMatch());
+ DoFAccessor<2>::ExcVectorDoesNotMatch());
const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex,
dofs_per_line = dof_handler->get_fe().dofs_per_line,
// explicit instantiations
#if deal_II_dimension == 1
-template class MGDoFObjectAccessor<1, 1,CellAccessor<1> >;
+template class MGDoFObjectAccessor<1, 1>;
template class MGDoFCellAccessor<1>;
template class TriaRawIterator<1,MGDoFCellAccessor<1> >;
#endif
#if deal_II_dimension == 2
-template class MGDoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> >;
-template class MGDoFObjectAccessor<2, 2,TriaObjectAccessor<2, 2> >;
-template class MGDoFObjectAccessor<2, 2,CellAccessor<2> >;
+template class MGDoFObjectAccessor<1, 2>;
+template class MGDoFObjectAccessor<2, 2>;
template class MGDoFCellAccessor<2>;
-template class TriaRawIterator<2,MGDoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > >;
-template class TriaRawIterator<2,MGDoFCellAccessor<2> >;
-template class TriaIterator<2,MGDoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > >;
-template class TriaIterator<2,MGDoFCellAccessor<2> >;
-template class TriaActiveIterator<2,MGDoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > >;
+template class TriaRawIterator <2,MGDoFObjectAccessor<1, 2> >;
+template class TriaIterator <2,MGDoFObjectAccessor<1, 2> >;
+template class TriaActiveIterator<2,MGDoFObjectAccessor<1, 2> >;
+
+template class TriaRawIterator <2,MGDoFCellAccessor<2> >;
+template class TriaIterator <2,MGDoFCellAccessor<2> >;
template class TriaActiveIterator<2,MGDoFCellAccessor<2> >;
#endif
#if deal_II_dimension == 3
-template class MGDoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> >;
-template class MGDoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> >;
-template class MGDoFObjectAccessor<3, 3,TriaObjectAccessor<3, 3> >;
-template class MGDoFObjectAccessor<3, 3,CellAccessor<3> >;
+template class MGDoFObjectAccessor<1, 3>;
+template class MGDoFObjectAccessor<2, 3>;
+template class MGDoFObjectAccessor<3, 3>;
template class MGDoFCellAccessor<3>;
-template class TriaRawIterator<3,MGDoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > >;
-template class TriaRawIterator<3,MGDoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > >;
-template class TriaRawIterator<3,MGDoFObjectAccessor<3, 3,TriaObjectAccessor<3, 3> > >;
-template class TriaRawIterator<3,MGDoFCellAccessor<3> >;
-template class TriaIterator<3,MGDoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > >;
-template class TriaIterator<3,MGDoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > >;
-template class TriaIterator<3,MGDoFCellAccessor<3> >;
-template class TriaActiveIterator<3,MGDoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > >;
-template class TriaActiveIterator<3,MGDoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > >;
+template class TriaRawIterator <3,MGDoFObjectAccessor<1, 3> >;
+template class TriaIterator <3,MGDoFObjectAccessor<1, 3> >;
+template class TriaActiveIterator<3,MGDoFObjectAccessor<1, 3> >;
+
+template class TriaRawIterator <3,MGDoFObjectAccessor<2, 3> >;
+template class TriaIterator <3,MGDoFObjectAccessor<2, 3> >;
+template class TriaActiveIterator<3,MGDoFObjectAccessor<2, 3> >;
+
+template class TriaRawIterator <3,MGDoFCellAccessor<3> >;
+template class TriaIterator <3,MGDoFCellAccessor<3> >;
template class TriaActiveIterator<3,MGDoFCellAccessor<3> >;
#endif
/* ------------------------ MGDoFLineAccessor --------------------------- */
-template <int dim, typename BaseClass>
-MGDoFObjectAccessor<1, dim,BaseClass>::MGDoFObjectAccessor (Triangulation<dim> *tria,
+template <int dim>
+MGDoFObjectAccessor<1, dim>::MGDoFObjectAccessor (Triangulation<dim> *tria,
const int level,
const int index,
const AccessorData *local_data) :
MGDoFAccessor<dim> (local_data),
- DoFObjectAccessor<1, dim>(tria,level,index,local_data) {};
+ MGDoFObjectAccessor_Inheritance<1,dim>::BaseClass(tria,level,index,local_data) {};
-template <int dim, typename BaseClass>
-int MGDoFObjectAccessor<1, dim,BaseClass>::mg_dof_index (const unsigned int i) const {
+template <int dim>
+int MGDoFObjectAccessor<1, dim>::mg_dof_index (const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
// make sure a FE has been selected
-template <int dim, typename BaseClass>
-void MGDoFObjectAccessor<1, dim,BaseClass>::set_mg_dof_index (const unsigned int i,
+template <int dim>
+void MGDoFObjectAccessor<1, dim>::set_mg_dof_index (const unsigned int i,
const int index) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
-int MGDoFObjectAccessor<1, dim,BaseClass>::mg_vertex_dof_index (const unsigned int vertex,
+template <int dim>
+int MGDoFObjectAccessor<1, dim>::mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
-void MGDoFObjectAccessor<1, dim,BaseClass>::set_mg_vertex_dof_index (const unsigned int vertex,
+template <int dim>
+void MGDoFObjectAccessor<1, dim>::set_mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i,
const int index) const {
Assert (dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
+template <int dim>
void
-MGDoFObjectAccessor<1, dim,BaseClass>::get_mg_dof_indices (vector<int> &dof_indices) const {
+MGDoFObjectAccessor<1, dim>::get_mg_dof_indices (vector<int> &dof_indices) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
Assert (dof_indices.size() == (2*dof_handler->get_fe().dofs_per_vertex +
dof_handler->get_fe().dofs_per_line),
- ExcVectorDoesNotMatch());
+ DoFAccessor<dim>::ExcVectorDoesNotMatch());
const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex,
dofs_per_line = dof_handler->get_fe().dofs_per_line;
-template <int dim, typename BaseClass>
-TriaIterator<dim,MGDoFObjectAccessor<1, dim,BaseClass> >
-MGDoFObjectAccessor<1, dim,BaseClass>::child (const unsigned int i) const {
- TriaIterator<dim,MGDoFObjectAccessor<1, dim,BaseClass> > q (tria,
+template <int dim>
+TriaIterator<dim,MGDoFObjectAccessor<1, dim> >
+MGDoFObjectAccessor<1, dim>::child (const unsigned int i) const {
+ TriaIterator<dim,MGDoFObjectAccessor<1, dim> > q (tria,
present_level+1,
child_index (i),
mg_dof_handler);
-template <int dim, typename BaseClass>
+template <int dim>
void
-MGDoFObjectAccessor<1, dim,BaseClass>::copy_from (const MGDoFObjectAccessor<1, dim,BaseClass> &a)
+MGDoFObjectAccessor<1, dim>::copy_from (const MGDoFObjectAccessor<1, dim> &a)
{
DoFObjectAccessor<1, dim>::copy_from (a);
set_mg_dof_handler (a.mg_dof_handler);
/* ------------------------ MGDoFQuadAccessor --------------------------- */
-template <int dim, typename BaseClass>
-MGDoFObjectAccessor<2, dim,BaseClass>::MGDoFObjectAccessor (Triangulation<dim> *tria,
- const int level,
- const int index,
- const AccessorData *local_data) :
+template <int dim>
+MGDoFObjectAccessor<2, dim>::MGDoFObjectAccessor (Triangulation<dim> *tria,
+ const int level,
+ const int index,
+ const AccessorData *local_data) :
MGDoFAccessor<dim> (local_data),
- DoFObjectAccessor<2, dim>(tria,level,index,local_data)
+ MGDoFObjectAccessor_Inheritance<2,dim>::BaseClass(tria,level,index,local_data)
{};
-template <int dim, typename BaseClass>
+template <int dim>
inline
-int MGDoFObjectAccessor<2, dim,BaseClass>::mg_dof_index (const unsigned int i) const {
+int MGDoFObjectAccessor<2, dim>::mg_dof_index (const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
// make sure a FE has been selected
-template <int dim, typename BaseClass>
-void MGDoFObjectAccessor<2, dim,BaseClass>::set_mg_dof_index (const unsigned int i,
+template <int dim>
+void MGDoFObjectAccessor<2, dim>::set_mg_dof_index (const unsigned int i,
const int index) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
+template <int dim>
inline
-int MGDoFObjectAccessor<2, dim,BaseClass>::mg_vertex_dof_index (const unsigned int vertex,
+int MGDoFObjectAccessor<2, dim>::mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
-void MGDoFObjectAccessor<2, dim,BaseClass>::set_mg_vertex_dof_index (const unsigned int vertex,
+template <int dim>
+void MGDoFObjectAccessor<2, dim>::set_mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i,
const int index) const {
Assert (dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
+template <int dim>
void
-MGDoFObjectAccessor<2, dim,BaseClass>::get_mg_dof_indices (vector<int> &dof_indices) const {
+MGDoFObjectAccessor<2, dim>::get_mg_dof_indices (vector<int> &dof_indices) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
Assert (dof_indices.size() == (4*dof_handler->get_fe().dofs_per_vertex +
4*dof_handler->get_fe().dofs_per_line +
dof_handler->get_fe().dofs_per_quad),
- ExcVectorDoesNotMatch());
+ DoFAccessor<2>::ExcVectorDoesNotMatch());
const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex,
dofs_per_line = dof_handler->get_fe().dofs_per_line,
-template <int dim, typename BaseClass>
-TriaIterator<dim,MGDoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
-MGDoFObjectAccessor<2, dim,BaseClass>::line (const unsigned int i) const {
+template <int dim>
+TriaIterator<dim,MGDoFObjectAccessor<1, dim> >
+MGDoFObjectAccessor<2, dim>::line (const unsigned int i) const {
Assert (i<4, ExcIndexRange (i, 0, 4));
- return TriaIterator<dim,MGDoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
+ return TriaIterator<dim,MGDoFObjectAccessor<1, dim> >
(
tria,
present_level,
-template <int dim, typename BaseClass>
-TriaIterator<dim,MGDoFObjectAccessor<2, dim,BaseClass> >
-MGDoFObjectAccessor<2, dim,BaseClass>::child (const unsigned int i) const {
- TriaIterator<dim,MGDoFObjectAccessor<2, dim,BaseClass> > q (tria,
+template <int dim>
+TriaIterator<dim,MGDoFObjectAccessor<2, dim> >
+MGDoFObjectAccessor<2, dim>::child (const unsigned int i) const {
+ TriaIterator<dim,MGDoFObjectAccessor<2, dim> > q (tria,
present_level+1,
child_index (i),
mg_dof_handler);
-template <int dim, typename BaseClass>
+template <int dim>
void
-MGDoFObjectAccessor<2, dim,BaseClass>::copy_from (const MGDoFObjectAccessor<2, dim,BaseClass> &a) {
+MGDoFObjectAccessor<2, dim>::copy_from (const MGDoFObjectAccessor<2, dim> &a) {
DoFObjectAccessor<2, dim>::copy_from (a);
set_mg_dof_handler (a.mg_dof_handler);
};
/* ------------------------ MGDoFHexAccessor --------------------------- */
-template <int dim, typename BaseClass>
-MGDoFObjectAccessor<3, dim,BaseClass>::MGDoFObjectAccessor (Triangulation<dim> *tria,
+template <int dim>
+MGDoFObjectAccessor<3, dim>::MGDoFObjectAccessor (Triangulation<dim> *tria,
const int level,
const int index,
const AccessorData *local_data) :
MGDoFAccessor<dim> (local_data),
- DoFObjectAccessor<3, dim>(tria,level,index,local_data) {};
+ MGDoFObjectAccessor_Inheritance<2,dim>::BaseClass(tria,level,index,local_data) {};
-template <int dim, typename BaseClass>
+template <int dim>
inline
-int MGDoFObjectAccessor<3, dim,BaseClass>::mg_dof_index (const unsigned int i) const {
+int MGDoFObjectAccessor<3, dim>::mg_dof_index (const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
// make sure a FE has been selected
-template <int dim, typename BaseClass>
-void MGDoFObjectAccessor<3, dim,BaseClass>::set_mg_dof_index (const unsigned int i,
+template <int dim>
+void MGDoFObjectAccessor<3, dim>::set_mg_dof_index (const unsigned int i,
const int index) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
+template <int dim>
inline
-int MGDoFObjectAccessor<3, dim,BaseClass>::mg_vertex_dof_index (const unsigned int vertex,
+int MGDoFObjectAccessor<3, dim>::mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
-void MGDoFObjectAccessor<3, dim,BaseClass>::set_mg_vertex_dof_index (const unsigned int vertex,
+template <int dim>
+void MGDoFObjectAccessor<3, dim>::set_mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i,
const int index) const {
Assert (dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
+template <int dim>
void
-MGDoFObjectAccessor<3, dim,BaseClass>::get_mg_dof_indices (vector<int> &dof_indices) const {
+MGDoFObjectAccessor<3, dim>::get_mg_dof_indices (vector<int> &dof_indices) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (mg_dof_handler != 0, ExcInvalidObject());
Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
-TriaIterator<dim,MGDoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
-MGDoFObjectAccessor<3, dim,BaseClass>::line (const unsigned int i) const {
+template <int dim>
+TriaIterator<dim,MGDoFObjectAccessor<1, dim> >
+MGDoFObjectAccessor<3, dim>::line (const unsigned int i) const {
Assert (i<12, ExcIndexRange (i, 0, 12));
- return TriaIterator<dim,MGDoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
+ return TriaIterator<dim,MGDoFObjectAccessor<1, dim> >
(
tria,
present_level,
-template <int dim, typename BaseClass>
-TriaIterator<dim,MGDoFObjectAccessor<2, dim,TriaObjectAccessor<2, dim> > >
-MGDoFObjectAccessor<3, dim,BaseClass>::quad (const unsigned int i) const {
+template <int dim>
+TriaIterator<dim,MGDoFObjectAccessor<2, dim> >
+MGDoFObjectAccessor<3, dim>::quad (const unsigned int i) const {
Assert (i<12, ExcIndexRange (i, 0, 6));
- return TriaIterator<dim,MGDoFObjectAccessor<2, dim,TriaObjectAccessor<2, dim> > >
+ return TriaIterator<dim,MGDoFObjectAccessor<2, dim> >
(
tria,
present_level,
-template <int dim, typename BaseClass>
-TriaIterator<dim,MGDoFObjectAccessor<3, dim,BaseClass> >
-MGDoFObjectAccessor<3, dim,BaseClass>::child (const unsigned int i) const {
- TriaIterator<dim,MGDoFObjectAccessor<3, dim,BaseClass> > q (tria,
- present_level+1,
- child_index (i),
- mg_dof_handler);
+template <int dim>
+TriaIterator<dim,MGDoFObjectAccessor<3, dim> >
+MGDoFObjectAccessor<3, dim>::child (const unsigned int i) const {
+ TriaIterator<dim,MGDoFObjectAccessor<3, dim> > q (tria,
+ present_level+1,
+ child_index (i),
+ mg_dof_handler);
#ifdef DEBUG
if (q.state() != past_the_end)
-template <int dim, typename BaseClass>
+template <int dim>
void
-MGDoFObjectAccessor<3, dim,BaseClass>::copy_from (const MGDoFObjectAccessor<3, dim,BaseClass> &a) {
+MGDoFObjectAccessor<3, dim>::copy_from (const MGDoFObjectAccessor<3, dim> &a) {
DoFObjectAccessor<3, dim>::copy_from (a);
set_mg_dof_handler (a.mg_dof_handler);
};
void
MGDoFCellAccessor<2>::get_mg_dof_values (const Vector<double> &values,
Vector<double> &dof_values) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<2>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<2>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<2>::ExcInvalidObject());
Assert (dof_values.size() == dof_handler->get_fe().total_dofs,
- ExcVectorDoesNotMatch());
+ DoFAccessor<2>::ExcVectorDoesNotMatch());
Assert (values.size() == mg_dof_handler->n_dofs(present_level),
- ExcVectorDoesNotMatch());
+ DoFAccessor<2>::ExcVectorDoesNotMatch());
const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex,
dofs_per_line = dof_handler->get_fe().dofs_per_line,
// explicit instantiations
#if deal_II_dimension == 1
-template class MGDoFObjectAccessor<1, 1,CellAccessor<1> >;
+template class MGDoFObjectAccessor<1, 1>;
template class MGDoFCellAccessor<1>;
template class TriaRawIterator<1,MGDoFCellAccessor<1> >;
#endif
#if deal_II_dimension == 2
-template class MGDoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> >;
-template class MGDoFObjectAccessor<2, 2,TriaObjectAccessor<2, 2> >;
-template class MGDoFObjectAccessor<2, 2,CellAccessor<2> >;
+template class MGDoFObjectAccessor<1, 2>;
+template class MGDoFObjectAccessor<2, 2>;
template class MGDoFCellAccessor<2>;
-template class TriaRawIterator<2,MGDoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > >;
-template class TriaRawIterator<2,MGDoFCellAccessor<2> >;
-template class TriaIterator<2,MGDoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > >;
-template class TriaIterator<2,MGDoFCellAccessor<2> >;
-template class TriaActiveIterator<2,MGDoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > >;
+template class TriaRawIterator <2,MGDoFObjectAccessor<1, 2> >;
+template class TriaIterator <2,MGDoFObjectAccessor<1, 2> >;
+template class TriaActiveIterator<2,MGDoFObjectAccessor<1, 2> >;
+
+template class TriaRawIterator <2,MGDoFCellAccessor<2> >;
+template class TriaIterator <2,MGDoFCellAccessor<2> >;
template class TriaActiveIterator<2,MGDoFCellAccessor<2> >;
#endif
#if deal_II_dimension == 3
-template class MGDoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> >;
-template class MGDoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> >;
-template class MGDoFObjectAccessor<3, 3,TriaObjectAccessor<3, 3> >;
-template class MGDoFObjectAccessor<3, 3,CellAccessor<3> >;
+template class MGDoFObjectAccessor<1, 3>;
+template class MGDoFObjectAccessor<2, 3>;
+template class MGDoFObjectAccessor<3, 3>;
template class MGDoFCellAccessor<3>;
-template class TriaRawIterator<3,MGDoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > >;
-template class TriaRawIterator<3,MGDoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > >;
-template class TriaRawIterator<3,MGDoFObjectAccessor<3, 3,TriaObjectAccessor<3, 3> > >;
-template class TriaRawIterator<3,MGDoFCellAccessor<3> >;
-template class TriaIterator<3,MGDoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > >;
-template class TriaIterator<3,MGDoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > >;
-template class TriaIterator<3,MGDoFCellAccessor<3> >;
-template class TriaActiveIterator<3,MGDoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > >;
-template class TriaActiveIterator<3,MGDoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > >;
+template class TriaRawIterator <3,MGDoFObjectAccessor<1, 3> >;
+template class TriaIterator <3,MGDoFObjectAccessor<1, 3> >;
+template class TriaActiveIterator<3,MGDoFObjectAccessor<1, 3> >;
+
+template class TriaRawIterator <3,MGDoFObjectAccessor<2, 3> >;
+template class TriaIterator <3,MGDoFObjectAccessor<2, 3> >;
+template class TriaActiveIterator<3,MGDoFObjectAccessor<2, 3> >;
+
+template class TriaRawIterator <3,MGDoFCellAccessor<3> >;
+template class TriaIterator <3,MGDoFCellAccessor<3> >;
template class TriaActiveIterator<3,MGDoFCellAccessor<3> >;
#endif