Assert (false, ExcInternalError());
}
+ /**
+ * Constructor. Should never be
+ * called and thus produces an
+ * error.
+ */
+ template <int structdim2, int dim2, int spacedim2>
+ TriaAccessor (const TriaAccessor<structdim2,dim2,spacedim2> &)
+ {
+ Assert (false, ExcInternalError());
+ }
+
+ /**
+ * Constructor. Should never be
+ * called and thus produces an
+ * error.
+ */
+ template <int structdim2, int dim2, int spacedim2>
+ TriaAccessor (const InvalidAccessor<structdim2,dim2,spacedim2> &)
+ {
+ Assert (false, ExcInternalError());
+ }
+
/**
* Boundary indicator of this
* object.
-template <>
-inline
-TriaIterator<TriaAccessor<0, 1, 1> >
-CellAccessor<1,1>::face (const unsigned int) const
-{
- Assert (false, ExcImpossibleInDim(1));
- return TriaIterator<TriaAccessor<0, 1, 1> >();
-}
-
-
-
-template <>
-inline
-TriaIterator<TriaAccessor<0, 1, 2> >
-CellAccessor<1,2>::face (const unsigned int) const
-{
- Assert (false, ExcImpossibleInDim(1));
- return TriaIterator<TriaAccessor<0, 1, 2> >();
-}
-
-
-template <>
-inline
-Triangulation<2,2>::face_iterator
-CellAccessor<2,2>::face (const unsigned int i) const
-{
- return this->line(i);
-}
-
-template <>
-inline
-Triangulation<2,3>::face_iterator
-CellAccessor<2,3>::face (const unsigned int i) const
-{
- return this->line(i);
-}
-
-
-
-template <>
+template <int dim, int spacedim>
inline
-Triangulation<3>::face_iterator
-CellAccessor<3,3>::face (const unsigned int i) const
+TriaIterator<TriaAccessor<dim-1, dim, spacedim> >
+CellAccessor<dim,spacedim>::face (const unsigned int i) const
{
- return this->quad(i);
-}
-
+ switch (dim)
+ {
+ case 1:
+ {
+ Assert (false, ExcImpossibleInDim(1));
+ return TriaIterator<InvalidAccessor<dim-1,dim,spacedim> >();
+ }
+ case 2:
+ return this->line(i);
-template <>
-inline
-unsigned int
-CellAccessor<1,1>::face_index (const unsigned int) const
-{
- Assert (false, ExcImpossibleInDim(1));
- return numbers::invalid_unsigned_int;
-}
+ case 3:
+ return this->quad(i);
-template <>
-inline
-unsigned int
-CellAccessor<1,2>::face_index (const unsigned int) const
-{
- Assert (false, ExcImpossibleInDim(1));
- return numbers::invalid_unsigned_int;
+ default:
+ return TriaIterator<TriaAccessor<dim-1,dim,dim> >();
+ }
}
-template <>
-inline
-unsigned int
-CellAccessor<2,2>::face_index (const unsigned int i) const
-{
- return this->line_index(i);
-}
-template <>
+template <int dim, int spacedim>
inline
unsigned int
-CellAccessor<2,3>::face_index (const unsigned int i) const
+CellAccessor<dim,spacedim>::face_index (const unsigned int i) const
{
- return this->line_index(i);
-}
-
-
+ switch (dim)
+ {
+ case 1:
+ {
+ Assert (false, ExcImpossibleInDim(1));
+ return numbers::invalid_unsigned_int;
+ }
-template <>
-inline
-unsigned int
-CellAccessor<3,3>::face_index (const unsigned int i) const
-{
- return this->quad_index(i);
+ case 2:
+ return this->line_index(i);
+
+ case 3:
+ return this->quad_index(i);
+
+ default:
+ return numbers::invalid_unsigned_int;
+ }
}