+
+/* -------------------------------------------------------------------------- */
+
+/**
+ * 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 celldim, int dim>
+class DoFObjectAccessor_Inheritance
+{
+ /**
+ * Declaaration of the #typedef#.
+ * See the full documentation for
+ * more information.
+ */
+ typedef TriaObjectAccessor<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 DoFObjectAccessor_Inheritance<dim,dim>
+{
+ /**
+ * Declaaration of the #typedef#.
+ * See the full documentation for
+ * more information.
+ */
+ typedef CellAccessor<dim> BaseClass;
+};
+
+
+
+
+/* -------------------------------------------------------------------------- */
+
+
+
/**
* Common template for line, quad, hex.
*
* a compiler error.
* @author Guido Kanschat, 1999
*/
-template<int celldim, int dim, typename BaseClass>
+template<int celldim, int dim>
class DoFObjectAccessor : public DoFAccessor<dim>,
- public BaseClass
+ public DoFObjectAccessor_Inheritance<celldim,dim>::BaseClass
{};
+
/**
* Closure class.
*/
-template<int dim, typename BaseClass>
-class DoFObjectAccessor<0, dim, BaseClass> : public DoFAccessor<dim>,
- public BaseClass
+template<int dim>
+class DoFObjectAccessor<0, dim> : public DoFAccessor<dim>,
+ public DoFObjectAccessor_Inheritance<0,dim>::BaseClass
{
public:
typedef void AccessorData;
+
+ /**
+ * Constructor. Should never be called
+ * ans thus throws an error.
+ */
DoFObjectAccessor (Triangulation<dim> *,
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 #DoFQuadAccessor# classes etc.
+ * Inheritance from #DoFObjectAccessor_Inheritance<1,dim>::BaseClass# yields
+ * inheritance from #CellAccessor<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 DoFObjectAccessor<1, dim, BaseClass> : public DoFAccessor<dim>,
- public BaseClass
+template <int dim>
+class DoFObjectAccessor<1, dim> : public DoFAccessor<dim>,
+ public DoFObjectAccessor_Inheritance<1,dim>::BaseClass
{
public:
/**
const int index,
const AccessorData *local_data) :
DoFAccessor<dim> (local_data),
- BaseClass(tria,level,index) {};
+ DoFObjectAccessor_Inheritance<1,dim>::BaseClass (tria,level,index) {};
/**
* Return the index of the #i#th degree
* class returns a line accessor without
* access to the DoF data.
*/
- TriaIterator<dim,DoFObjectAccessor<1, dim,BaseClass> > child (const unsigned int) const;
+ TriaIterator<dim,DoFObjectAccessor<1,dim> > child (const unsigned int) const;
/**
* Distribute a local (cell based) vector
* Implement the copy operator needed
* for the iterator classes.
*/
- void copy_from (const DoFObjectAccessor<1, dim,BaseClass> &a);
+ void copy_from (const DoFObjectAccessor<1,dim> &a);
};
*
* @see DoFLineAccessor
*/
-template <int dim, typename BaseClass>
-class DoFObjectAccessor<2, dim, BaseClass> : public DoFAccessor<dim>,
- public BaseClass
+template <int dim>
+class DoFObjectAccessor<2, dim> : public DoFAccessor<dim>,
+ public DoFObjectAccessor_Inheritance<2,dim>::BaseClass
{
public:
/**
const int index,
const AccessorData *local_data) :
DoFAccessor<dim> (local_data),
- BaseClass (tria,level,index) {};
+ DoFObjectAccessor_Inheritance<2,dim>::BaseClass (tria,level,index) {};
/**
* Return the index of the #i#th degree
* Return a pointer to the #i#th line
* bounding this #Quad#.
*/
- TriaIterator<dim,DoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
+ TriaIterator<dim,DoFObjectAccessor<1, dim> >
line (const unsigned int i) const;
/**
* class returns a quad accessor without
* access to the DoF data.
*/
- TriaIterator<dim,DoFObjectAccessor<2, dim, BaseClass> > child (const unsigned int) const;
+ TriaIterator<dim,DoFObjectAccessor<2, dim> >
+ child (const unsigned int) const;
/**
* Distribute a local (cell based) vector
* Implement the copy operator needed
* for the iterator classes.
*/
- void copy_from (const DoFObjectAccessor<2, dim,BaseClass> &a);
+ void copy_from (const DoFObjectAccessor<2, dim> &a);
};
/**
- * Grant access to the degrees of freedom located on quads.
+ * Grant access to the degrees of freedom located on hexes.
*
* @see DoFLineAccessor
*/
-template <int dim, typename BaseClass>
-class DoFObjectAccessor<3, dim, BaseClass> : public DoFAccessor<dim>,
- public BaseClass
+template <int dim>
+class DoFObjectAccessor<3, dim> : public DoFAccessor<dim>,
+ public DoFObjectAccessor_Inheritance<3,dim>::BaseClass
{
public:
/**
const int index,
const AccessorData *local_data) :
DoFAccessor<dim> (local_data),
- BaseClass (tria,level,index) {};
+ DoFObjectAccessor_Inheritance<3,dim>::BaseClass (tria,level,index) {};
/**
* Return the index of the #i#th degree
* Return a pointer to the #i#th line
* bounding this #Hex#.
*/
- TriaIterator<dim,DoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
+ TriaIterator<dim,DoFObjectAccessor<1, dim> >
line (const unsigned int i) const;
/**
* Return a pointer to the #i#th quad
* bounding this #Hex#.
*/
- TriaIterator<dim,DoFObjectAccessor<2, dim,TriaObjectAccessor<2, dim> > >
+ TriaIterator<dim,DoFObjectAccessor<2, dim> >
quad (const unsigned int i) const;
/**
* class returns a hex accessor without
* access to the DoF data.
*/
- TriaIterator<dim,DoFObjectAccessor<3, dim,BaseClass> > child (const unsigned int) const;
+ TriaIterator<dim,DoFObjectAccessor<3, dim> > child (const unsigned int) const;
/**
* Distribute a local (cell based) vector
* Implement the copy operator needed
* for the iterator classes.
*/
- void copy_from (const DoFObjectAccessor<3, dim,BaseClass> &a);
+ void copy_from (const DoFObjectAccessor<3, dim> &a);
};
* rather than #CellAccessor# objects (the latter function was inherited
* from the #CellAccessor<dim># class).
*
+ * Note that since for the class we derive from, i.e. #DoFObjectAccessor<dim,dim>#,
+ * the two template parameters are equal, the base class is actually derived from
+ * #CellAccessor#, which makes the functions of this class available to the
+ * #DoFCellAccessor# class as well.
+ *
* @author Wolfgang Bangerth, 1998
*/
template <int dim>
-class DoFCellAccessor : public DoFObjectAccessor<dim, dim, CellAccessor<dim> > {
+class DoFCellAccessor : public DoFObjectAccessor<dim, dim> {
public:
- /**
- * Type of faces.
- */
- typedef
- TriaIterator<dim, DoFObjectAccessor<dim-1, dim,TriaObjectAccessor<dim-1, dim> > >
- face_iterator;
-
/**
* Declare the data type that this accessor
* class expects to get passed from the
* iterator classes.
*/
- typedef typename DoFObjectAccessor<dim, dim, CellAccessor<dim> >::AccessorData AccessorData;
+ typedef typename DoFObjectAccessor<dim, dim>::AccessorData AccessorData;
/**
* Constructor
const int level,
const int index,
const AccessorData *local_data) :
- DoFObjectAccessor<dim, dim, CellAccessor<dim> > (tria,level,index,local_data) {};
+ DoFObjectAccessor<dim, dim> (tria,level,index,local_data) {};
/**
* Return the #i#th neighbor as a DoF cell
* class returns a cell accessor without
* access to the DoF data.
*/
- TriaIterator<dim,DoFCellAccessor<dim> > neighbor (const unsigned int) const;
+ TriaIterator<dim,DoFCellAccessor<dim> >
+ neighbor (const unsigned int) const;
/**
* Return the #i#th child as a DoF cell
* class returns a cell accessor without
* access to the DoF data.
*/
- TriaIterator<dim,DoFCellAccessor<dim> > child (const unsigned int) const;
+ TriaIterator<dim,DoFCellAccessor<dim> >
+ child (const unsigned int) const;
/**
* Return an iterator to the #i#th face
* This function is not implemented in 1D,
* and maps to DoFObjectAccessor<2, dim>::line in 2D.
*/
- face_iterator
+ TriaIterator<dim, DoFObjectAccessor<dim-1, dim> >
face (const unsigned int i) const;
/**
/*------------------------- Functions: DoFLineAccessor -----------------------*/
-template <int dim, typename BaseClass>
+template <int dim>
inline
-int DoFObjectAccessor<1, dim,BaseClass>::dof_index (const unsigned int i) const {
+int DoFObjectAccessor<1, dim>::dof_index (const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
-template <int dim, typename BaseClass>
+template <int dim>
inline
-int DoFObjectAccessor<1, dim,BaseClass>::vertex_dof_index (const unsigned int vertex,
+int DoFObjectAccessor<1, dim>::vertex_dof_index (const unsigned int vertex,
const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
+template <int dim>
inline
void
-DoFObjectAccessor<1, dim,BaseClass>::get_dof_indices (vector<int> &dof_indices) const {
+DoFObjectAccessor<1, dim>::get_dof_indices (vector<int> &dof_indices) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
Assert (dof_indices.size() == (2*dof_handler->get_fe().dofs_per_vertex +
-template <int dim, typename BaseClass>
+template <int dim>
inline
-TriaIterator<dim,DoFObjectAccessor<1, dim,BaseClass> >
-DoFObjectAccessor<1, dim,BaseClass>::child (const unsigned int i) const {
- TriaIterator<dim,DoFObjectAccessor<1, dim,BaseClass> > q (tria,
+TriaIterator<dim,DoFObjectAccessor<1, dim> >
+DoFObjectAccessor<1, dim>::child (const unsigned int i) const {
+ TriaIterator<dim,DoFObjectAccessor<1, dim> > q (tria,
present_level+1,
child_index (i),
dof_handler);
-template <int dim, typename BaseClass>
+template <int dim>
inline
void
-DoFObjectAccessor<1, dim,BaseClass>::copy_from (const DoFObjectAccessor<1, dim,BaseClass> &a) {
- BaseClass::copy_from (a);
+DoFObjectAccessor<1, dim>::copy_from (const DoFObjectAccessor<1, dim> &a) {
+ DoFObjectAccessor_Inheritance<1,dim>::BaseClass::copy_from (a);
set_dof_handler (a.dof_handler);
};
/*------------------------- Functions: DoFObjectAccessor<2, dim> -----------------------*/
-template <int dim, typename BaseClass>
+template <int dim>
inline
-int DoFObjectAccessor<2, dim,BaseClass>::dof_index (const unsigned int i) const {
+int DoFObjectAccessor<2, dim>::dof_index (const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
-template <int dim, typename BaseClass>
+template <int dim>
inline
-int DoFObjectAccessor<2, dim,BaseClass>::vertex_dof_index (const unsigned int vertex,
+int DoFObjectAccessor<2, dim>::vertex_dof_index (const unsigned int vertex,
const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
+template <int dim>
inline
void
-DoFObjectAccessor<2, dim,BaseClass>::get_dof_indices (vector<int> &dof_indices) const {
+DoFObjectAccessor<2, dim>::get_dof_indices (vector<int> &dof_indices) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
Assert (dof_indices.size() == (4*dof_handler->get_fe().dofs_per_vertex +
-template <int dim, typename BaseClass>
+template <int dim>
inline
-TriaIterator<dim,DoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
-DoFObjectAccessor<2, dim,BaseClass>::line (const unsigned int i) const {
+TriaIterator<dim,DoFObjectAccessor<1, dim> >
+DoFObjectAccessor<2, dim>::line (const unsigned int i) const {
Assert (i<4, ExcIndexRange (i, 0, 4));
- return TriaIterator<dim,DoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
+ return TriaIterator<dim,DoFObjectAccessor<1, dim> >
(
tria,
present_level,
-template <int dim, typename BaseClass>
+template <int dim>
inline
-TriaIterator<dim,DoFObjectAccessor<2, dim,BaseClass> >
-DoFObjectAccessor<2, dim,BaseClass>::child (const unsigned int i) const {
- TriaIterator<dim,DoFObjectAccessor<2, dim,BaseClass> > q (tria,
- present_level+1,
- child_index (i),
- dof_handler);
+TriaIterator<dim,DoFObjectAccessor<2, dim> >
+DoFObjectAccessor<2, dim>::child (const unsigned int i) const {
+ TriaIterator<dim,DoFObjectAccessor<2, dim> > q (tria,
+ present_level+1,
+ child_index (i),
+ dof_handler);
#ifdef DEBUG
if (q.state() != past_the_end)
-template <int dim, typename BaseClass>
+template <int dim>
inline
void
-DoFObjectAccessor<2, dim,BaseClass>::copy_from (const DoFObjectAccessor<2, dim,BaseClass> &a) {
- BaseClass::copy_from (a);
+DoFObjectAccessor<2, dim>::copy_from (const DoFObjectAccessor<2, dim> &a) {
+ DoFObjectAccessor_Inheritance<2,dim>::BaseClass::copy_from (a);
set_dof_handler (a.dof_handler);
};
/*------------------------- Functions: DoFObjectAccessor -----------------------*/
-template <int dim, typename BaseClass>
+template <int dim>
inline
-int DoFObjectAccessor<3, dim,BaseClass>::dof_index (const unsigned int i) const {
+int DoFObjectAccessor<3, dim>::dof_index (const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
-template <int dim, typename BaseClass>
+template <int dim>
inline
-int DoFObjectAccessor<3, dim,BaseClass>::vertex_dof_index (const unsigned int vertex,
+int DoFObjectAccessor<3, dim>::vertex_dof_index (const unsigned int vertex,
const unsigned int i) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
+template <int dim>
inline
void
-DoFObjectAccessor<3, dim,BaseClass>::get_dof_indices (vector<int> &dof_indices) const {
+DoFObjectAccessor<3, dim>::get_dof_indices (vector<int> &dof_indices) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
Assert (dof_indices.size() == (8*dof_handler->get_fe().dofs_per_vertex +
-template <int dim, typename BaseClass>
+template <int dim>
inline
-TriaIterator<dim,DoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
-DoFObjectAccessor<3, dim,BaseClass>::line (const unsigned int i) const {
- TriaIterator<dim,TriaObjectAccessor<1, dim> > l = BaseClass::line(i);
- return TriaIterator<dim,DoFObjectAccessor<1, dim,TriaObjectAccessor<1, dim> > >
+TriaIterator<dim,DoFObjectAccessor<1, dim> >
+DoFObjectAccessor<3, dim>::line (const unsigned int i) const {
+ TriaIterator<dim,TriaObjectAccessor<1, dim> > l = DoFObjectAccessor_Inheritance<3,dim>::BaseClass::line(i);
+ return TriaIterator<dim,DoFObjectAccessor<1, dim> >
(
tria,
present_level,
-template <int dim, typename BaseClass>
+template <int dim>
inline
-TriaIterator<dim,DoFObjectAccessor<2, dim,TriaObjectAccessor<2, dim> > >
-DoFObjectAccessor<3, dim,BaseClass>::quad (const unsigned int i) const {
+TriaIterator<dim,DoFObjectAccessor<2, dim> >
+DoFObjectAccessor<3, dim>::quad (const unsigned int i) const {
Assert (i<6, ExcIndexRange (i, 0, 6));
- return TriaIterator<dim,DoFObjectAccessor<2, dim,TriaObjectAccessor<2, dim> > >
+ return TriaIterator<dim,DoFObjectAccessor<2, dim> >
(
tria,
present_level,
-template <int dim, typename BaseClass>
+template <int dim>
inline
-TriaIterator<dim,DoFObjectAccessor<3, dim,BaseClass> >
-DoFObjectAccessor<3, dim,BaseClass>::child (const unsigned int i) const {
- TriaIterator<dim,DoFObjectAccessor<3, dim,BaseClass> > q (tria,
- present_level+1,
- child_index (i),
- dof_handler);
+TriaIterator<dim,DoFObjectAccessor<3, dim> >
+DoFObjectAccessor<3, dim>::child (const unsigned int i) const {
+ TriaIterator<dim,DoFObjectAccessor<3, dim> > q (tria,
+ present_level+1,
+ child_index (i),
+ dof_handler);
#ifdef DEBUG
if (q.state() != past_the_end)
-template <int dim, typename BaseClass>
-void DoFObjectAccessor<3, dim,BaseClass>::copy_from (const DoFObjectAccessor<3, dim,BaseClass> &a) {
- BaseClass::copy_from (a);
+template <int dim>
+void DoFObjectAccessor<3, dim>::copy_from (const DoFObjectAccessor<3, dim> &a) {
+ DoFObjectAccessor_Inheritance<3,dim>::BaseClass::copy_from (a);
set_dof_handler (a.dof_handler);
};
*/
class DoFDimensionInfo<2> {
public:
- typedef TriaRawIterator<2,DoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > > raw_line_iterator;
- typedef TriaIterator<2,DoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > > line_iterator;
- typedef TriaActiveIterator<2,DoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > > active_line_iterator;
+ typedef TriaRawIterator<2,DoFObjectAccessor<1, 2> > raw_line_iterator;
+ typedef TriaIterator<2,DoFObjectAccessor<1, 2> > line_iterator;
+ typedef TriaActiveIterator<2,DoFObjectAccessor<1, 2> > active_line_iterator;
- typedef TriaRawIterator<2,DoFCellAccessor<2> > raw_quad_iterator;
- typedef TriaIterator<2,DoFCellAccessor<2> > quad_iterator;
- typedef TriaActiveIterator<2,DoFCellAccessor<2> > active_quad_iterator;
+ typedef TriaRawIterator<2,DoFCellAccessor<2> > raw_quad_iterator;
+ typedef TriaIterator<2,DoFCellAccessor<2> > quad_iterator;
+ typedef TriaActiveIterator<2,DoFCellAccessor<2> > active_quad_iterator;
typedef void * raw_hex_iterator;
typedef void * hex_iterator;
*/
class DoFDimensionInfo<3> {
public:
- typedef TriaRawIterator<3,DoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > > raw_line_iterator;
- typedef TriaIterator<3,DoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > > line_iterator;
- typedef TriaActiveIterator<3,DoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > > active_line_iterator;
+ typedef TriaRawIterator<3,DoFObjectAccessor<1, 3> > raw_line_iterator;
+ typedef TriaIterator<3,DoFObjectAccessor<1, 3> > line_iterator;
+ typedef TriaActiveIterator<3,DoFObjectAccessor<1, 3> > active_line_iterator;
- typedef TriaRawIterator<3,DoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > > raw_quad_iterator;
- typedef TriaIterator<3,DoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > > quad_iterator;
- typedef TriaActiveIterator<3,DoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > > active_quad_iterator;
+ typedef TriaRawIterator<3,DoFObjectAccessor<2, 3> > raw_quad_iterator;
+ typedef TriaIterator<3,DoFObjectAccessor<2, 3> > quad_iterator;
+ typedef TriaActiveIterator<3,DoFObjectAccessor<2, 3> > active_quad_iterator;
- typedef TriaRawIterator<3,DoFCellAccessor<3> > raw_hex_iterator;
- typedef TriaIterator<3,DoFCellAccessor<3> > hex_iterator;
- typedef TriaActiveIterator<3,DoFCellAccessor<3> > active_hex_iterator;
+ typedef TriaRawIterator<3,DoFCellAccessor<3> > raw_hex_iterator;
+ typedef TriaIterator<3,DoFCellAccessor<3> > hex_iterator;
+ typedef TriaActiveIterator<3,DoFCellAccessor<3> > active_hex_iterator;
typedef raw_hex_iterator raw_cell_iterator;
typedef hex_iterator cell_iterator;
vector<int> vertex_dofs;
- friend class DoFObjectAccessor<1, dim, TriaObjectAccessor<1, dim> >;
- friend class DoFObjectAccessor<1, dim, CellAccessor<dim> >;
- friend class DoFObjectAccessor<2, dim, TriaObjectAccessor<2, dim> >;
- friend class DoFObjectAccessor<2, dim, CellAccessor<dim> >;
- friend class DoFObjectAccessor<3, dim, TriaObjectAccessor<3, dim> >;
- friend class DoFObjectAccessor<3, dim, CellAccessor<dim> >;
+ friend class DoFObjectAccessor<1, dim>;
+ friend class DoFObjectAccessor<2, dim>;
+ friend class DoFObjectAccessor<3, dim>;
};
template <int celldim, int dim, typename BaseClass>
class MGDoFObjectAccessor : public MGDoFAccessor<dim>,
- public DoFObjectAccessor<celldim, dim, BaseClass>
+ public DoFObjectAccessor<celldim, dim>
{};
*/
template <int dim, typename BaseClass>
class MGDoFObjectAccessor<1, dim, BaseClass> : public MGDoFAccessor<dim>,
- public DoFObjectAccessor<1, dim, BaseClass>
+ public DoFObjectAccessor<1, dim>
{
public:
/**
* @see DoFLineAccessor
*/
template <int dim, typename BaseClass>
-class MGDoFObjectAccessor<2, dim, BaseClass> : public MGDoFAccessor<dim>, public DoFObjectAccessor<2, dim, BaseClass> {
+class MGDoFObjectAccessor<2, dim, BaseClass> : public MGDoFAccessor<dim>,
+ public DoFObjectAccessor<2, dim> {
public:
/**
* Declare the data type that this accessor
*/
template <int dim, typename BaseClass>
class MGDoFObjectAccessor<3, dim, BaseClass> : public MGDoFAccessor<dim>,
- public DoFObjectAccessor<3, dim, BaseClass>
+ public DoFObjectAccessor<3, dim>
{
public:
/**
template <int celldim, int dim, typename BaseClass>
class MGDoFObjectAccessor : public MGDoFAccessor<dim>,
- public DoFObjectAccessor<celldim, dim, BaseClass>
+ public DoFObjectAccessor<celldim, dim>
{};
*/
template <int dim, typename BaseClass>
class MGDoFObjectAccessor<1, dim, BaseClass> : public MGDoFAccessor<dim>,
- public DoFObjectAccessor<1, dim, BaseClass>
+ public DoFObjectAccessor<1, dim>
{
public:
/**
* @see DoFLineAccessor
*/
template <int dim, typename BaseClass>
-class MGDoFObjectAccessor<2, dim, BaseClass> : public MGDoFAccessor<dim>, public DoFObjectAccessor<2, dim, BaseClass> {
+class MGDoFObjectAccessor<2, dim, BaseClass> : public MGDoFAccessor<dim>,
+ public DoFObjectAccessor<2, dim> {
public:
/**
* Declare the data type that this accessor
*/
template <int dim, typename BaseClass>
class MGDoFObjectAccessor<3, dim, BaseClass> : public MGDoFAccessor<dim>,
- public DoFObjectAccessor<3, dim, BaseClass>
+ public DoFObjectAccessor<3, dim>
{
public:
/**
-template <int dim, typename BaseClass>
-void DoFObjectAccessor<1, dim,BaseClass>::set_dof_index (const unsigned int i,
- const int index) const {
+template <int dim>
+void DoFObjectAccessor<1, dim>::set_dof_index (const unsigned int i,
+ const int index) const {
Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
-template <int dim, typename BaseClass>
-void DoFObjectAccessor<1, dim,BaseClass>::set_vertex_dof_index (const unsigned int vertex,
- const unsigned int i,
- const int index) const {
+template <int dim>
+void DoFObjectAccessor<1, dim>::set_vertex_dof_index (const unsigned int vertex,
+ const unsigned int i,
+ const int index) const {
Assert (dof_handler != 0, ExcInvalidObject());
Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
Assert (vertex<2, ExcIndexRange (i,0,2));
-template <int dim, typename BaseClass>
-void DoFObjectAccessor<1, dim,BaseClass>::
+template <int dim>
+void DoFObjectAccessor<1, dim>::
distribute_local_to_global (const Vector<double> &local_source,
Vector<double> &global_destination) const {
Assert (dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
-void DoFObjectAccessor<1, dim,BaseClass>::
+template <int dim>
+void DoFObjectAccessor<1, dim>::
distribute_local_to_global (const FullMatrix<double> &local_source,
SparseMatrix<double> &global_destination) const {
Assert (dof_handler != 0, ExcInvalidObject());
/*------------------------- Functions: DoFQuadAccessor -----------------------*/
-template <int dim, typename BaseClass>
-void DoFObjectAccessor<2, dim,BaseClass>::set_dof_index (const unsigned int i,
- const int index) const {
+template <int dim>
+void DoFObjectAccessor<2, dim>::set_dof_index (const unsigned int i,
+ const int index) const {
Assert (dof_handler != 0, ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
-template <int dim, typename BaseClass>
-void DoFObjectAccessor<2, dim,BaseClass>::set_vertex_dof_index (const unsigned int vertex,
+template <int dim>
+void DoFObjectAccessor<2, dim>::set_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>
-void DoFObjectAccessor<2, dim,BaseClass>::
+template <int dim>
+void DoFObjectAccessor<2, dim>::
distribute_local_to_global (const Vector<double> &local_source,
Vector<double> &global_destination) const {
Assert (dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
-void DoFObjectAccessor<2, dim,BaseClass>::
+template <int dim>
+void DoFObjectAccessor<2, dim>::
distribute_local_to_global (const FullMatrix<double> &local_source,
SparseMatrix<double> &global_destination) const {
Assert (dof_handler != 0, ExcInvalidObject());
/*------------------------- Functions: DoFObjectAccessor -----------------------*/
-template <int dim, typename BaseClass>
-void DoFObjectAccessor<3, dim,BaseClass>::set_dof_index (const unsigned int i,
+template <int dim>
+void DoFObjectAccessor<3, dim>::set_dof_index (const unsigned int i,
const int index) const {
Assert (dof_handler != 0, ExcInvalidObject());
// make sure a FE has been selected
-template <int dim, typename BaseClass>
-void DoFObjectAccessor<3, dim,BaseClass>::set_vertex_dof_index (const unsigned int vertex,
+template <int dim>
+void DoFObjectAccessor<3, dim>::set_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>
-void DoFObjectAccessor<3, dim,BaseClass>::
+template <int dim>
+void DoFObjectAccessor<3, dim>::
distribute_local_to_global (const Vector<double> &local_source,
Vector<double> &global_destination) const {
Assert (dof_handler != 0, ExcInvalidObject());
-template <int dim, typename BaseClass>
-void DoFObjectAccessor<3, dim,BaseClass>::
+template <int dim>
+void DoFObjectAccessor<3, dim>::
distribute_local_to_global (const FullMatrix<double> &local_source,
SparseMatrix<double> &global_destination) const {
Assert (dof_handler != 0, ExcInvalidObject());
#if deal_II_dimension == 1
template <>
-DoFCellAccessor<1>::face_iterator
+TriaIterator<1, DoFObjectAccessor<0,1> >
DoFCellAccessor<1>::face (const unsigned int) const
{
Assert (false, ExcNotUsefulForThisDimension());
- return face_iterator();
+ return TriaIterator<1, DoFObjectAccessor<0,1> >();
};
#if deal_II_dimension == 2
template <>
-DoFCellAccessor<2>::face_iterator
+TriaIterator<2, DoFObjectAccessor<1,2> >
DoFCellAccessor<2>::face (const unsigned int i) const
{
return line(i);
template <typename number>
void
DoFCellAccessor<dim>::get_dof_values (const Vector<number> &values,
- Vector<number> &local_values) const
+ Vector<number> &local_values) const
{
Assert (dim==2, ExcInternalError());
#if deal_II_dimension == 3
template <>
-DoFCellAccessor<3>::face_iterator
+TriaIterator<3, DoFObjectAccessor<2, 3> >
DoFCellAccessor<3>::face (const unsigned int i) const
{
return quad(i);
#if deal_II_dimension == 1
-template class DoFObjectAccessor<1, 1,CellAccessor<1> >;
+template class DoFObjectAccessor<1, 1>;
template class DoFCellAccessor<1>;
template class TriaRawIterator<1,DoFCellAccessor<1> >;
#endif
#if deal_II_dimension == 2
-template class DoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> >;
-template class DoFObjectAccessor<2, 2,TriaObjectAccessor<2, 2> >;
-template class DoFObjectAccessor<2, 2,CellAccessor<2> >;
+template class DoFObjectAccessor<1, 2>;
+template class DoFObjectAccessor<2, 2>;
template class DoFCellAccessor<2>;
-template class TriaRawIterator<2,DoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > >;
-template class TriaRawIterator<2,DoFObjectAccessor<2, 2,TriaObjectAccessor<2, 2> > >;
-template class TriaRawIterator<2,DoFCellAccessor<2> >;
-template class TriaIterator<2,DoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > >;
-template class TriaIterator<2,DoFCellAccessor<2> >;
-template class TriaActiveIterator<2,DoFObjectAccessor<1, 2,TriaObjectAccessor<1, 2> > >;
+template class TriaRawIterator <2,DoFObjectAccessor<1, 2> >;
+template class TriaIterator <2,DoFObjectAccessor<1, 2> >;
+template class TriaActiveIterator<2,DoFObjectAccessor<1, 2> >;
+template class TriaRawIterator <2,DoFCellAccessor<2> >;
+template class TriaIterator <2,DoFCellAccessor<2> >;
template class TriaActiveIterator<2,DoFCellAccessor<2> >;
#endif
#if deal_II_dimension == 3
-template class DoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> >;
-template class DoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> >;
-template class DoFObjectAccessor<3, 3,TriaObjectAccessor<3, 3> >;
-template class DoFObjectAccessor<3, 3,CellAccessor<3> >;
+template class DoFObjectAccessor<1, 3>;
+template class DoFObjectAccessor<2, 3>;
template class DoFCellAccessor<3>;
-template class TriaRawIterator<3,DoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > >;
-template class TriaRawIterator<3,DoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > >;
-template class TriaRawIterator<3,DoFObjectAccessor<3, 3,TriaObjectAccessor<3, 3> > >;
-template class TriaRawIterator<3,DoFCellAccessor<3> >;
-template class TriaIterator<3,DoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > >;
-template class TriaIterator<3,DoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > >;
-template class TriaIterator<3,DoFCellAccessor<3> >;
-template class TriaActiveIterator<3,DoFObjectAccessor<1, 3,TriaObjectAccessor<1, 3> > >;
-template class TriaActiveIterator<3,DoFObjectAccessor<2, 3,TriaObjectAccessor<2, 3> > >;
+template class TriaRawIterator <3,DoFObjectAccessor<1, 3> >;
+template class TriaIterator <3,DoFObjectAccessor<1, 3> >;
+template class TriaActiveIterator<3,DoFObjectAccessor<1, 3> >;
+template class TriaRawIterator <3,DoFObjectAccessor<2, 3> >;
+template class TriaIterator <3,DoFObjectAccessor<2, 3> >;
+template class TriaActiveIterator<3,DoFObjectAccessor<2, 3> >;
+template class TriaRawIterator <3,DoFCellAccessor<3> >;
+template class TriaIterator <3,DoFCellAccessor<3> >;
template class TriaActiveIterator<3,DoFCellAccessor<3> >;
#endif
const int index,
const AccessorData *local_data) :
MGDoFAccessor<dim> (local_data),
- DoFObjectAccessor<1, dim,BaseClass>(tria,level,index,local_data) {};
+ DoFObjectAccessor<1, dim>(tria,level,index,local_data) {};
void
MGDoFObjectAccessor<1, dim,BaseClass>::copy_from (const MGDoFObjectAccessor<1, dim,BaseClass> &a)
{
- DoFObjectAccessor<1, dim,BaseClass>::copy_from (a);
+ DoFObjectAccessor<1, dim>::copy_from (a);
set_mg_dof_handler (a.mg_dof_handler);
};
const int index,
const AccessorData *local_data) :
MGDoFAccessor<dim> (local_data),
- DoFObjectAccessor<2, dim,BaseClass>(tria,level,index,local_data)
+ DoFObjectAccessor<2, dim>(tria,level,index,local_data)
{};
template <int dim, typename BaseClass>
void
MGDoFObjectAccessor<2, dim,BaseClass>::copy_from (const MGDoFObjectAccessor<2, dim,BaseClass> &a) {
- DoFObjectAccessor<2, dim,BaseClass>::copy_from (a);
+ DoFObjectAccessor<2, dim>::copy_from (a);
set_mg_dof_handler (a.mg_dof_handler);
};
const int index,
const AccessorData *local_data) :
MGDoFAccessor<dim> (local_data),
- DoFObjectAccessor<3, dim,BaseClass>(tria,level,index,local_data) {};
+ DoFObjectAccessor<3, dim>(tria,level,index,local_data) {};
template <int dim, typename BaseClass>
void
MGDoFObjectAccessor<3, dim,BaseClass>::copy_from (const MGDoFObjectAccessor<3, dim,BaseClass> &a) {
- DoFObjectAccessor<3, dim,BaseClass>::copy_from (a);
+ DoFObjectAccessor<3, dim>::copy_from (a);
set_mg_dof_handler (a.mg_dof_handler);
};
const int index,
const AccessorData *local_data) :
MGDoFAccessor<dim> (local_data),
- DoFObjectAccessor<1, dim,BaseClass>(tria,level,index,local_data) {};
+ DoFObjectAccessor<1, dim>(tria,level,index,local_data) {};
void
MGDoFObjectAccessor<1, dim,BaseClass>::copy_from (const MGDoFObjectAccessor<1, dim,BaseClass> &a)
{
- DoFObjectAccessor<1, dim,BaseClass>::copy_from (a);
+ DoFObjectAccessor<1, dim>::copy_from (a);
set_mg_dof_handler (a.mg_dof_handler);
};
const int index,
const AccessorData *local_data) :
MGDoFAccessor<dim> (local_data),
- DoFObjectAccessor<2, dim,BaseClass>(tria,level,index,local_data)
+ DoFObjectAccessor<2, dim>(tria,level,index,local_data)
{};
template <int dim, typename BaseClass>
void
MGDoFObjectAccessor<2, dim,BaseClass>::copy_from (const MGDoFObjectAccessor<2, dim,BaseClass> &a) {
- DoFObjectAccessor<2, dim,BaseClass>::copy_from (a);
+ DoFObjectAccessor<2, dim>::copy_from (a);
set_mg_dof_handler (a.mg_dof_handler);
};
const int index,
const AccessorData *local_data) :
MGDoFAccessor<dim> (local_data),
- DoFObjectAccessor<3, dim,BaseClass>(tria,level,index,local_data) {};
+ DoFObjectAccessor<3, dim>(tria,level,index,local_data) {};
template <int dim, typename BaseClass>
void
MGDoFObjectAccessor<3, dim,BaseClass>::copy_from (const MGDoFObjectAccessor<3, dim,BaseClass> &a) {
- DoFObjectAccessor<3, dim,BaseClass>::copy_from (a);
+ DoFObjectAccessor<3, dim>::copy_from (a);
set_mg_dof_handler (a.mg_dof_handler);
};