* argument is assumed to be a pointer
* to a @ref{DoFHandler} object.
*/
- DoFObjectAccessor (Triangulation<dim> *tria,
+ DoFObjectAccessor (const Triangulation<dim> *tria,
const int level,
const int index,
const AccessorData *local_data) :
* argument is assumed to be a pointer
* to a @ref{DoFHandler} object.
*/
- DoFObjectAccessor (Triangulation<dim> *tria,
+ DoFObjectAccessor (const Triangulation<dim> *tria,
const int level,
const int index,
const AccessorData *local_data) :
* argument is assumed to be a pointer
* to a @ref{DoFHandler} object.
*/
- DoFObjectAccessor (Triangulation<dim> *tria,
+ DoFObjectAccessor (const Triangulation<dim> *tria,
const int level,
const int index,
const AccessorData *local_data) :
* argument is assumed to be a pointer
* to a @ref{DoFHandler} object.
*/
- DoFObjectAccessor (Triangulation<dim> *tria,
+ DoFObjectAccessor (const Triangulation<dim> *tria,
const int level,
const int index,
const AccessorData *local_data) :
/**
* Constructor
*/
- DoFCellAccessor (Triangulation<dim> *tria,
+ DoFCellAccessor (const Triangulation<dim> *tria,
const int level,
const int index,
const AccessorData *local_data) :
* only callable from friend
* classes.
*/
- TriaAccessor (Triangulation<dim> *parent = 0,
+ TriaAccessor (const Triangulation<dim> *parent = 0,
const int level = -1,
const int index = -1,
const AccessorData * = 0) :
* Pointer to the triangulation which
* we act on.
*/
- Triangulation<dim> *tria;
+ const Triangulation<dim> *tria;
template <int anydim, typename Accessor> friend class TriaRawIterator;
template <int anydim, typename Accessor> friend class TriaIterator;
* By default, an illegal
* accessor is constructed.
*/
- TriaObjectAccessor (Triangulation<dim> *parent = 0,
+ TriaObjectAccessor (const Triangulation<dim> *parent = 0,
const int level = -1,
const int index = -1,
const AccessorData *local_data = 0) :
int vertex_index (const unsigned int i) const;
/**
- * Reference (not an iterator!)
+ * Const reference (not an iterator!)
* to the @p{i}th vertex.
*/
Point<dim> & vertex (const unsigned int i) const;
* Constructor. Should never be called and
* thus produces an error.
*/
- TriaObjectAccessor (Triangulation<dim> *parent = 0,
+ TriaObjectAccessor (const Triangulation<dim> *parent = 0,
const int level = -1,
const int index = -1,
const AccessorData *local_data = 0) :
/**
* Constructor.
*/
- TriaObjectAccessor (Triangulation<dim> *parent = 0,
+ TriaObjectAccessor (const Triangulation<dim> *parent = 0,
const int level = -1,
const int index = -1,
const AccessorData *local_data = 0) :
/**
* Constructor.
*/
- TriaObjectAccessor (Triangulation<dim> *parent = 0,
+ TriaObjectAccessor (const Triangulation<dim> *parent = 0,
const int level = -1,
const int index = -1,
const AccessorData *local_data = 0) :
/**
* Constructor.
*/
- TriaObjectAccessor (Triangulation<dim> *parent = 0,
+ TriaObjectAccessor (const Triangulation<dim> *parent = 0,
const int level = -1,
const int index = -1,
const AccessorData *local_data = 0) :
/**
* Constructor.
*/
- CellAccessor (Triangulation<dim> *parent = 0,
+ CellAccessor (const Triangulation<dim> *parent = 0,
const int level = -1,
const int index = -1,
const AccessorData *local_data = 0) :
* of a type declared by the accessor
* class.
*/
- TriaRawIterator (Triangulation<dim> *parent,
+ TriaRawIterator (const Triangulation<dim> *parent,
const int level,
const int index,
const typename AccessorType::AccessorData *local_data = 0);
* used, the debug version raises
* an error!
*/
- TriaIterator (Triangulation<dim> *parent,
+ TriaIterator (const Triangulation<dim> *parent,
const int level,
const int index,
const typename Accessor::AccessorData *local_data = 0);
* active, the debug version raises
* an error!
*/
- TriaActiveIterator (Triangulation<dim> *parent,
+ TriaActiveIterator (const Triangulation<dim> *parent,
const int level,
const int index,
const typename Accessor::AccessorData *local_data = 0);
template <int dim, typename Accessor>
inline
-TriaRawIterator<dim,Accessor>::TriaRawIterator (Triangulation<dim> *parent,
+TriaRawIterator<dim,Accessor>::TriaRawIterator (const Triangulation<dim> *parent,
const int level,
const int index,
const typename Accessor::AccessorData *local_data) :
template <int dim, typename Accessor>
inline
-TriaIterator<dim,Accessor>::TriaIterator (Triangulation<dim> *parent,
+TriaIterator<dim,Accessor>::TriaIterator (const Triangulation<dim> *parent,
const int level,
const int index,
const typename Accessor::AccessorData *local_data) :
template <int dim, typename Accessor>
inline
-TriaActiveIterator<dim,Accessor>::TriaActiveIterator (Triangulation<dim> *parent,
+TriaActiveIterator<dim,Accessor>::TriaActiveIterator (const Triangulation<dim> *parent,
const int level,
const int index,
const typename Accessor::AccessorData *local_data) :
* Constructor. Should never be called
* and thus throws an error.
*/
- MGDoFObjectAccessor (Triangulation<dim> *,
+ MGDoFObjectAccessor (const Triangulation<dim> *,
const int,
const int,
const AccessorData *)
* argument is assumed to be a pointer
* to a @p{MGDoFHandler<dim>} object.
*/
- MGDoFObjectAccessor (Triangulation<dim> *tria,
+ MGDoFObjectAccessor (const Triangulation<dim> *tria,
const int level,
const int index,
const AccessorData *local_data);
* argument is assumed to be a pointer
* to a @ref{DoFHandler} object.
*/
- MGDoFObjectAccessor (Triangulation<dim> *tria,
+ MGDoFObjectAccessor (const Triangulation<dim> *tria,
const int level,
const int index,
const AccessorData *local_data);
* argument is assumed to be a pointer
* to a @ref{DoFHandler} object.
*/
- MGDoFObjectAccessor (Triangulation<dim> *tria,
+ MGDoFObjectAccessor (const Triangulation<dim> *tria,
const int level,
const int index,
const AccessorData *local_data);
/**
* Constructor
*/
- MGDoFCellAccessor (Triangulation<dim> *tria,
+ MGDoFCellAccessor (const Triangulation<dim> *tria,
const int level,
const int index,
const AccessorData *local_data) :
Point<dim> &
TriaObjectAccessor<1, dim>::vertex (const unsigned int i) const
{
- return this->tria->vertices[vertex_index(i)];
+ return const_cast<Point<dim> &> (this->tria->vertices[vertex_index(i)]);
};
Point<dim> &
TriaObjectAccessor<2, dim>::vertex (const unsigned int i) const
{
- return this->tria->vertices[vertex_index(i)];
+ return const_cast<Point<dim> &> (this->tria->vertices[vertex_index(i)]);
};
Point<dim> &
TriaObjectAccessor<3, dim>::vertex (const unsigned int i) const
{
- return this->tria->vertices[vertex_index(i)];
+ return const_cast<Point<dim> &> (this->tria->vertices[vertex_index(i)]);
};
/* ------------------------ MGDoFLineAccessor --------------------------- */
template <int dim>
-MGDoFObjectAccessor<1, dim>::MGDoFObjectAccessor (Triangulation<dim> *tria,
+MGDoFObjectAccessor<1, dim>::MGDoFObjectAccessor (const Triangulation<dim> *tria,
const int level,
const int index,
const AccessorData *local_data) :
/* ------------------------ MGDoFQuadAccessor --------------------------- */
template <int dim>
-MGDoFObjectAccessor<2, dim>::MGDoFObjectAccessor (Triangulation<dim> *tria,
+MGDoFObjectAccessor<2, dim>::MGDoFObjectAccessor (const Triangulation<dim> *tria,
const int level,
const int index,
const AccessorData *local_data) :
/* ------------------------ MGDoFHexAccessor --------------------------- */
template <int dim>
-MGDoFObjectAccessor<3, dim>::MGDoFObjectAccessor (Triangulation<dim> *tria,
+MGDoFObjectAccessor<3, dim>::MGDoFObjectAccessor (const Triangulation<dim> *tria,
const int level,
const int index,
const AccessorData *local_data) :