Assert ((q.state() == IteratorState::past_the_end)
||
q->used(),
- typename TriaAccessor<DH::dimension>::ExcUnusedCellAsChild());
+ TriaAccessorExceptions::ExcUnusedCellAsChild());
return q;
}
#ifdef DEBUG
if (q.state() != IteratorState::past_the_end)
- Assert (q->used(), typename TriaAccessor<dim>::ExcUnusedCellAsNeighbor());
+ Assert (q->used(), TriaAccessorExceptions::ExcUnusedCellAsNeighbor());
#endif
return q;
}
#ifdef DEBUG
if (q.state() != IteratorState::past_the_end)
- Assert (q->used(), typename TriaAccessor<dim>::ExcUnusedCellAsChild());
+ Assert (q->used(), TriaAccessorExceptions::ExcUnusedCellAsChild());
#endif
return q;
}
// so is now on by default.
+/**
+ * A namespace that contains exception classes used by the accessor classes.
+ */
+namespace TriaAccessorExceptions
+{
+ /**
+ * @ingroup Exceptions
+ */
+ DeclException0 (ExcCellNotUsed);
+ /**
+ * @ingroup Exceptions
+ */
+ DeclException1 (ExcInvalidNeighbor,
+ int,
+ << "Neighbor indices must be between 0 and 2^dim-1, but "
+ << "yours was " << arg1);
+ /**
+ * @ingroup Exceptions
+ */
+ DeclException0 (ExcCellHasNoChildren);
+ /**
+ * @ingroup Exceptions
+ */
+ DeclException0 (ExcUnusedCellAsChild);
+ /**
+ * @ingroup Exceptions
+ */
+ DeclException1 (ExcCantSetChildren,
+ int,
+ << "You can only set the child index if the cell has no "
+ << "children, or clear it. The given "
+ << "index was " << arg1 << " (-1 means: clear children)");
+ /**
+ * @ingroup Exceptions
+ */
+ DeclException0 (ExcUnusedCellAsNeighbor);
+ /**
+ * @ingroup Exceptions
+ */
+ DeclException0 (ExcUncaughtCase);
+ /**
+ * @ingroup Exceptions
+ */
+ DeclException0 (ExcDereferenceInvalidObject);
+ /**
+ * @ingroup Exceptions
+ */
+ DeclException0 (ExcCantCompareIterators);
+ /**
+ * @ingroup Exceptions
+ */
+ DeclException0 (ExcNeighborIsCoarser);
+ /**
+ * @ingroup Exceptions
+ */
+ DeclException0 (ExcNeighborIsNotCoarser);
+ /**
+ * @ingroup Exceptions
+ */
+ DeclException0 (ExcFacesHaveNoLevel);
+}
+
+
/**
* Implements the accessor class used by TriaRawIterator and derived
* classes.
const Triangulation<dim> & get_triangulation () const;
/*@}*/
-
- /**@name Exceptions for derived classes
- */
- /*@{*/
- /**
- * @ingroup Exceptions
- */
- DeclException0 (ExcCellNotUsed);
- /**
- * @ingroup Exceptions
- */
- DeclException1 (ExcInvalidNeighbor,
- int,
- << "Neighbor indices must be between 0 and 2^dim-1, but "
- << "yours was " << arg1);
- /**
- * @ingroup Exceptions
- */
- DeclException0 (ExcCellHasNoChildren);
- /**
- * @ingroup Exceptions
- */
- DeclException0 (ExcUnusedCellAsChild);
- /**
- * @ingroup Exceptions
- */
- DeclException1 (ExcCantSetChildren,
- int,
- << "You can only set the child index if the cell has no "
- << "children, or clear it. The given "
- << "index was " << arg1 << " (-1 means: clear children)");
- /**
- * @ingroup Exceptions
- */
- DeclException0 (ExcUnusedCellAsNeighbor);
- /**
- * @ingroup Exceptions
- */
- DeclException0 (ExcUncaughtCase);
- /**
- * @ingroup Exceptions
- */
- DeclException0 (ExcDereferenceInvalidObject);
- /**
- * @ingroup Exceptions
- */
- DeclException0 (ExcCantCompareIterators);
- /**
- * @ingroup Exceptions
- */
- DeclException0 (ExcNeighborIsCoarser);
- /**
- * @ingroup Exceptions
- */
- DeclException0 (ExcNeighborIsNotCoarser);
- /**
- * @ingroup Exceptions
- */
- DeclException0 (ExcFacesHaveNoLevel);
- /*@}*/
-
protected:
/**
* Used to store the level
bool
TriaAccessor<dim>::operator == (const TriaAccessor<dim> &a) const
{
- Assert (tria == a.tria, ExcCantCompareIterators());
+ Assert (tria == a.tria, TriaAccessorExceptions::ExcCantCompareIterators());
return ((present_index == a.present_index) &&
(present_level == a.present_level));
}
bool
TriaAccessor<dim>::operator != (const TriaAccessor<dim> &a) const
{
- Assert (tria == a.tria, ExcCantCompareIterators());
+ Assert (tria == a.tria, TriaAccessorExceptions::ExcCantCompareIterators());
return ((present_index != a.present_index) ||
(present_level != a.present_level));
}
int
TriaObjectAccessor<1,dim>::level () const
{
- Assert(dim==1, typename TriaAccessor<dim>::ExcFacesHaveNoLevel());
+ Assert(dim==1, TriaAccessorExceptions::ExcFacesHaveNoLevel());
return TriaAccessor<dim>::level();
}
TriaObjectAccessor<1,dim>::used () const
{
Assert (this->state() == IteratorState::valid,
- typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
+ TriaAccessorExceptions::ExcDereferenceInvalidObject());
return lines().used[this->present_index];
}
bool
TriaObjectAccessor<1,dim>::user_flag_set () const
{
- Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
return lines().user_flags[this->present_index];
}
void
TriaObjectAccessor<1,dim>::set_user_flag () const
{
- Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
lines().user_flags[this->present_index] = true;
}
void
TriaObjectAccessor<1,dim>::clear_user_flag () const
{
- Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
lines().user_flags[this->present_index] = false;
}
TriaObjectAccessor<1,dim>::has_children () const
{
Assert (this->state() == IteratorState::valid,
- typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
+ TriaAccessorExceptions::ExcDereferenceInvalidObject());
return (lines().children[this->present_index] != -1);
}
TriaObjectAccessor<1,dim>::child_index (unsigned const int i) const
{
Assert (i<2, ExcIndexRange(i,0,2));
- Assert (has_children(), typename TriaAccessor<dim>::ExcCellHasNoChildren());
+ Assert (has_children(), TriaAccessorExceptions::ExcCellHasNoChildren());
return lines().children[this->present_index]+i;
}
q (this->tria, next_level, child_index (i));
Assert ((q.state() == IteratorState::past_the_end) || q->used(),
- typename TriaAccessor<dim>::ExcUnusedCellAsChild());
+ TriaAccessorExceptions::ExcUnusedCellAsChild());
return q;
}
unsigned int
TriaObjectAccessor<1,dim>::n_children () const
{
- Assert (has_children()==true, TriaAccessor<1>::ExcCellHasNoChildren());
+ Assert (has_children()==true, TriaAccessorExceptions::ExcCellHasNoChildren());
return GeometryInfo<1>::children_per_cell;
}
int
TriaObjectAccessor<2,dim>::level () const
{
- Assert(dim==2, typename TriaAccessor<dim>::ExcFacesHaveNoLevel());
+ Assert(dim==2, TriaAccessorExceptions::ExcFacesHaveNoLevel());
return TriaAccessor<dim>::level();
}
TriaObjectAccessor<2,dim>::used () const
{
Assert (this->state() == IteratorState::valid,
- typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
+ TriaAccessorExceptions::ExcDereferenceInvalidObject());
return quads().used[this->present_index];
}
bool
TriaObjectAccessor<2,dim>::user_flag_set () const
{
- Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
return quads().user_flags[this->present_index];
}
void
TriaObjectAccessor<2,dim>::set_user_flag () const
{
- Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
quads().user_flags[this->present_index] = true;
}
void
TriaObjectAccessor<2,dim>::clear_user_flag () const
{
- Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
quads().user_flags[this->present_index] = false;
}
TriaObjectAccessor<2,dim>::has_children () const
{
Assert (this->state() == IteratorState::valid,
- typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
+ TriaAccessorExceptions::ExcDereferenceInvalidObject());
return (quads().children[this->present_index] != -1);
}
int TriaObjectAccessor<2,dim>::child_index (const unsigned int i) const
{
Assert (i<4, ExcIndexRange(i,0,4));
- Assert (has_children(), typename TriaAccessor<dim>::ExcCellHasNoChildren());
+ Assert (has_children(), TriaAccessorExceptions::ExcCellHasNoChildren());
return quads().children[this->present_index]+i;
}
q (this->tria, next_level, child_index (i));
Assert ((q.state() == IteratorState::past_the_end) || q->used(),
- typename TriaAccessor<dim>::ExcUnusedCellAsChild());
+ TriaAccessorExceptions::ExcUnusedCellAsChild());
return q;
}
unsigned int
TriaObjectAccessor<2,dim>::n_children () const
{
- Assert (has_children()==true, TriaAccessor<2>::ExcCellHasNoChildren());
+ Assert (has_children()==true, TriaAccessorExceptions::ExcCellHasNoChildren());
return GeometryInfo<2>::children_per_cell;
}
bool
TriaObjectAccessor<2,3>::line_orientation (const unsigned int line) const
{
- // we cannot usae the quads() function here,
+ // we cannot use the quads() function here,
// since it returns a reference to
// TriaObjects<Quad>, but we need a
// (reference to) TriaObjectsQuad3D
- const int dim=3;
- Assert (used(), TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
Assert (line<GeometryInfo<2>::lines_per_cell,
ExcIndexRange (line, 0, GeometryInfo<2>::lines_per_cell));
Assert (this->present_index * GeometryInfo<2>::lines_per_cell + line
bool
TriaObjectAccessor<3,3>::used () const
{
- const int dim=3;
Assert (this->state() == IteratorState::valid,
- TriaAccessor<dim>::ExcDereferenceInvalidObject());
+ TriaAccessorExceptions::ExcDereferenceInvalidObject());
return this->tria->levels[this->present_level]->hexes.used[this->present_index];
}
bool
TriaObjectAccessor<3,3>::user_flag_set () const
{
- const int dim=3;
- Assert (this->used(), TriaAccessor<dim>::ExcCellNotUsed());
- return this->tria->levels[this->present_level]->hexes.user_flags[this->present_index];
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
+ return this->tria->levels[this->present_level]->hexes.user_flags[this->present_index];
}
void
TriaObjectAccessor<3,3>::set_user_flag () const
{
- const int dim=3;
- Assert (this->used(), TriaAccessor<dim>::ExcCellNotUsed());
- this->tria->levels[this->present_level]->hexes.user_flags[this->present_index] = true;
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
+ this->tria->levels[this->present_level]->hexes.user_flags[this->present_index] = true;
}
inline
void TriaObjectAccessor<3,3>::clear_user_flag () const
{
- const int dim=3;
- Assert (this->used(), TriaAccessor<dim>::ExcCellNotUsed());
- this->tria->levels[this->present_level]->hexes.user_flags[this->present_index] = false;
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
+ this->tria->levels[this->present_level]->hexes.user_flags[this->present_index] = false;
}
TriaIterator<dim,TriaObjectAccessor<1,dim> >
TriaObjectAccessor<3,dim>::line (const unsigned int i) const
{
- Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
return
TriaIterator<dim,TriaObjectAccessor<1,dim> >
(
TriaIterator<dim,TriaObjectAccessor<2,dim> >
TriaObjectAccessor<3,dim>::quad (const unsigned int i) const
{
- Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
return
TriaIterator<dim,TriaObjectAccessor<2,dim> >
(
bool
TriaObjectAccessor<3,3>::has_children () const
{
- const int dim=3;
Assert (this->state() == IteratorState::valid,
- TriaAccessor<dim>::ExcDereferenceInvalidObject());
+ TriaAccessorExceptions::ExcDereferenceInvalidObject());
return (this->tria->levels[this->present_level]->hexes.children[this->present_index] != -1);
}
inline
int TriaObjectAccessor<3,3>::child_index (const unsigned int i) const
{
- const int dim=3;
Assert (i<8, ExcIndexRange(i,0,8));
- Assert (has_children(), TriaAccessor<dim>::ExcCellHasNoChildren());
+ Assert (has_children(), TriaAccessorExceptions::ExcCellHasNoChildren());
return this->tria->levels[this->present_level]->hexes.children[this->present_index]+i;
}
TriaIterator<dim,TriaObjectAccessor<3,dim> > q (this->tria, this->present_level+1, child_index (i));
Assert ((q.state() == IteratorState::past_the_end) || q->used(),
- TriaAccessor<dim>::ExcUnusedCellAsChild());
+ TriaAccessorExceptions::ExcUnusedCellAsChild());
return q;
}
unsigned int
TriaObjectAccessor<3,dim>::n_children () const
{
- Assert (has_children()==true, TriaAccessor<3>::ExcCellHasNoChildren());
+ Assert (has_children()==true, TriaAccessorExceptions::ExcCellHasNoChildren());
return GeometryInfo<3>::children_per_cell;
}
TriaObjectAccessor<3, 3>::
face_orientation (const unsigned int face) const
{
- const int dim=3;
- Assert (used(), TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
Assert (face<GeometryInfo<3>::faces_per_cell,
ExcIndexRange (face, 0, GeometryInfo<3>::faces_per_cell));
Assert (this->present_index * GeometryInfo<3>::faces_per_cell + face
TriaObjectAccessor<3, 3>::
face_flip (const unsigned int face) const
{
- const int dim=3;
- Assert (used(), TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
Assert (face<GeometryInfo<3>::faces_per_cell,
ExcIndexRange (face, 0, GeometryInfo<3>::faces_per_cell));
Assert (this->present_index * GeometryInfo<3>::faces_per_cell + face
TriaObjectAccessor<3, 3>::
face_rotation (const unsigned int face) const
{
- const int dim=3;
- Assert (used(), TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
Assert (face<GeometryInfo<3>::faces_per_cell,
ExcIndexRange (face, 0, GeometryInfo<3>::faces_per_cell));
Assert (this->present_index * GeometryInfo<3>::faces_per_cell + face
line_orientation (const unsigned int line) const
{
const int dim=3;
- Assert (used(), TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
Assert (line<GeometryInfo<3>::lines_per_cell,
ExcIndexRange (line, 0, GeometryInfo<3>::lines_per_cell));
CellAccessor<dim>::neighbor_index (const unsigned int i) const
{
Assert (i<GeometryInfo<dim>::faces_per_cell,
- typename TriaAccessor<dim>::ExcInvalidNeighbor(i));
+ TriaAccessorExceptions::ExcInvalidNeighbor(i));
return this->tria->levels[this->present_level]->
neighbors[this->present_index*GeometryInfo<dim>::faces_per_cell+i].second;
}
CellAccessor<dim>::neighbor_level (const unsigned int i) const
{
Assert (i<GeometryInfo<dim>::faces_per_cell,
- typename TriaAccessor<dim>::ExcInvalidNeighbor(i));
+ TriaAccessorExceptions::ExcInvalidNeighbor(i));
return this->tria->levels[this->present_level]->
neighbors[this->present_index*GeometryInfo<dim>::faces_per_cell+i].first;
}
bool
CellAccessor<dim>::refine_flag_set () const
{
- Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
// cells flagged for refinement must be active
// (the @p set_refine_flag function checks this,
// but activity may change when refinement is
bool
CellAccessor<dim>::coarsen_flag_set () const
{
- Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
// cells flagged for coarsening must be active
// (the @p set_refine_flag function checks this,
// but activity may change when refinement is
q (this->tria, neighbor_level (i), neighbor_index (i));
Assert ((q.state() == IteratorState::past_the_end) || q->used(),
- typename TriaAccessor<dim>::ExcUnusedCellAsNeighbor());
+ TriaAccessorExceptions::ExcUnusedCellAsNeighbor());
return q;
}
q (this->tria, this->present_level+1, this->child_index (i));
Assert ((q.state() == IteratorState::past_the_end) || q->used(),
- typename TriaAccessor<dim>::ExcUnusedCellAsChild());
+ TriaAccessorExceptions::ExcUnusedCellAsChild());
return q;
}
void TriaObjectAccessor<1, dim>::set_used_flag () const
{
Assert (this->state() == IteratorState::valid,
- typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
+ TriaAccessorExceptions::ExcDereferenceInvalidObject());
lines().used[this->present_index] = true;
}
void TriaObjectAccessor<1, dim>::clear_used_flag () const
{
Assert (this->state() == IteratorState::valid,
- typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
+ TriaAccessorExceptions::ExcDereferenceInvalidObject());
lines().used[this->present_index] = false;
}
template <int dim>
void TriaObjectAccessor<1, dim>::set_user_pointer (void *p) const
{
- Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
lines().user_pointers[this->present_index] = p;
}
template <int dim>
void TriaObjectAccessor<1, dim>::clear_user_pointer () const
{
- Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
lines().user_pointers[this->present_index] = 0;
}
template <int dim>
void * TriaObjectAccessor<1, dim>::user_pointer () const
{
- Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
return lines().user_pointers[this->present_index];
}
template <int dim>
void TriaObjectAccessor<1, dim>::set_children (const int index) const
{
- Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
Assert ((index==-1) ||
(!has_children() && (index>=0)),
- typename TriaAccessor<dim>::ExcCantSetChildren(index));
+ TriaAccessorExceptions::ExcCantSetChildren(index));
lines().children[this->present_index] = index;
}
unsigned char TriaObjectAccessor<1, dim>::boundary_indicator () const
{
Assert (dim>=2, ExcImpossibleInDim(dim));
- Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
return lines().material_id[this->present_index];
}
void TriaObjectAccessor<1, dim>::set_boundary_indicator (const unsigned char boundary_ind) const
{
Assert (dim>=2, ExcImpossibleInDim(dim));
- Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
lines().material_id[this->present_index] = boundary_ind;
}
TriaObjectAccessor<2, dim>::set_used_flag () const
{
Assert (this->state() == IteratorState::valid,
- typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
+ TriaAccessorExceptions::ExcDereferenceInvalidObject());
quads().used[this->present_index] = true;
}
void TriaObjectAccessor<2, dim>::clear_used_flag () const
{
Assert (this->state() == IteratorState::valid,
- typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
+ TriaAccessorExceptions::ExcDereferenceInvalidObject());
quads().used[this->present_index] = false;
}
template <int dim>
void TriaObjectAccessor<2, dim>::set_user_pointer (void *p) const
{
- Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
quads().user_pointers[this->present_index] = p;
}
template <int dim>
void TriaObjectAccessor<2, dim>::clear_user_pointer () const
{
- Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
quads().user_pointers[this->present_index] = 0;
}
template <int dim>
void * TriaObjectAccessor<2, dim>::user_pointer () const
{
- Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
return quads().user_pointers[this->present_index];
}
void TriaObjectAccessor<2, dim>::set_children (const int index) const
{
Assert (used(),
- typename TriaAccessor<dim>::ExcCellNotUsed());
+ TriaAccessorExceptions::ExcCellNotUsed());
Assert ((index==-1) ||
(!has_children() && (index>=0)),
- typename TriaAccessor<dim>::ExcCantSetChildren(index));
+ TriaAccessorExceptions::ExcCantSetChildren(index));
quads().children[this->present_index] = index;
}
unsigned char TriaObjectAccessor<2, dim>::boundary_indicator () const
{
Assert (dim>2, ExcImpossibleInDim(dim));
- Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
return quads().material_id[this->present_index];
}
void TriaObjectAccessor<2, dim>::set_boundary_indicator (const unsigned char boundary_ind) const
{
Assert (dim>2, ExcImpossibleInDim(dim));
- Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
quads().material_id[this->present_index] = boundary_ind;
}
const bool orientation) const
{
const int dim=3;
- Assert (used(), TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
Assert (line<GeometryInfo<dim>::lines_per_face,
ExcIndexRange (line, 0, GeometryInfo<3>::lines_per_face));
Assert (this->present_index * GeometryInfo<dim>::lines_per_face + line
template <>
void TriaObjectAccessor<3, 3>::set_used_flag () const
{
- const int dim=3;
Assert (this->state() == IteratorState::valid,
- TriaAccessor<dim>::ExcDereferenceInvalidObject());
+ TriaAccessorExceptions::ExcDereferenceInvalidObject());
this->tria->levels[this->present_level]->hexes.used[this->present_index] = true;
}
template <>
void TriaObjectAccessor<3, 3>::clear_used_flag () const
{
- const int dim=3;
Assert (this->state() == IteratorState::valid,
- TriaAccessor<dim>::ExcDereferenceInvalidObject());
+ TriaAccessorExceptions::ExcDereferenceInvalidObject());
this->tria->levels[this->present_level]->hexes.used[this->present_index] = false;
}
template <>
void TriaObjectAccessor<3, 3>::set_user_pointer (void *p) const
{
- const int dim=3;
- Assert (used(), TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
this->tria->levels[this->present_level]->hexes.user_pointers[this->present_index] = p;
}
template <>
void TriaObjectAccessor<3, 3>::clear_user_pointer () const
{
- const int dim=3;
- Assert (used(), TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
this->tria->levels[this->present_level]->hexes.user_pointers[this->present_index] = 0;
}
template <>
void * TriaObjectAccessor<3, 3>::user_pointer () const
{
- const int dim=3;
- Assert (used(), TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
return this->tria->levels[this->present_level]->hexes.user_pointers[this->present_index];
}
template <>
void TriaObjectAccessor<3, 3>::set_children (const int index) const
{
- const int dim=3;
- Assert (used(), TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
Assert ((index==-1) ||
(!has_children() && (index>=0)),
- TriaAccessor<dim>::ExcCantSetChildren(index));
+ TriaAccessorExceptions::ExcCantSetChildren(index));
this->tria->levels[this->present_level]->hexes.children[this->present_index] = index;
}
set_face_orientation (const unsigned int face,
const bool orientation) const
{
- const int dim=3;
- Assert (used(), TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
Assert (face<GeometryInfo<3>::faces_per_cell,
ExcIndexRange (face, 0, GeometryInfo<3>::faces_per_cell));
Assert (this->present_index * GeometryInfo<3>::faces_per_cell + face
set_face_flip (const unsigned int face,
const bool flip) const
{
- const int dim=3;
- Assert (used(), TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
Assert (face<GeometryInfo<3>::faces_per_cell,
ExcIndexRange (face, 0, GeometryInfo<3>::faces_per_cell));
Assert (this->present_index * GeometryInfo<3>::faces_per_cell + face
set_face_rotation (const unsigned int face,
const bool rotation) const
{
- const int dim=3;
- Assert (used(), TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (used(), TriaAccessorExceptions::ExcCellNotUsed());
Assert (face<GeometryInfo<3>::faces_per_cell,
ExcIndexRange (face, 0, GeometryInfo<3>::faces_per_cell));
Assert (this->present_index * GeometryInfo<3>::faces_per_cell + face
template <>
unsigned char CellAccessor<1>::material_id () const
{
- Assert (this->used(), TriaAccessor<1>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
return lines().material_id[this->present_index];
}
template <>
void CellAccessor<1>::set_material_id (const unsigned char mat_id) const
{
- Assert (this->used(), TriaAccessor<1>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
lines().material_id[this->present_index] = mat_id;
}
template <>
unsigned char CellAccessor<2>::material_id () const
{
- Assert (this->used(), TriaAccessor<2>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
return quads().material_id[this->present_index];
}
template <>
void CellAccessor<2>::set_material_id (const unsigned char mat_id) const
{
- Assert (this->used(), TriaAccessor<2>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
quads().material_id[this->present_index] = mat_id;
}
template <>
unsigned char CellAccessor<3>::material_id () const
{
- Assert (this->used(), TriaAccessor<3>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
return this->tria->levels[this->present_level]->hexes.material_id[this->present_index];
}
template <>
void CellAccessor<3>::set_material_id (const unsigned char mat_id) const
{
- Assert (this->used(), TriaAccessor<3>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
this->tria->levels[this->present_level]->hexes.material_id[this->present_index]
= mat_id;
}
template <int dim>
unsigned int CellAccessor<dim>::subdomain_id () const
{
- Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
return this->tria->levels[this->present_level]->subdomain_ids[this->present_index];
}
void
CellAccessor<dim>::set_subdomain_id (const unsigned int new_subdomain_id) const
{
- Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
this->tria->levels[this->present_level]->subdomain_ids[this->present_index]
= new_subdomain_id;
}
const TriaIterator<dim,CellAccessor<dim> > &pointer) const
{
Assert (i<GeometryInfo<dim>::faces_per_cell,
- typename TriaAccessor<dim>::ExcInvalidNeighbor(i));
+ TriaAccessorExceptions::ExcInvalidNeighbor(i));
if (pointer.state() == IteratorState::valid)
{
// make sure that the neighbor is
// not on a coarser level
Assert (neighbor_level(neighbor) == this->present_level,
- typename TriaAccessor<dim>::ExcNeighborIsCoarser());
+ TriaAccessorExceptions::ExcNeighborIsCoarser());
Assert (neighbor < GeometryInfo<dim>::faces_per_cell,
- typename TriaAccessor<dim>::ExcInvalidNeighbor(neighbor));
+ TriaAccessorExceptions::ExcInvalidNeighbor(neighbor));
const TriaIterator<dim,CellAccessor<dim> > neighbor_cell = this->neighbor(neighbor);
// make sure that the neighbor is
// on a coarser level
Assert (neighbor_level(neighbor) < this->present_level,
- typename TriaAccessor<dim>::ExcNeighborIsNotCoarser());
+ TriaAccessorExceptions::ExcNeighborIsNotCoarser());
Assert (neighbor < GeometryInfo<dim>::faces_per_cell,
- typename TriaAccessor<dim>::ExcInvalidNeighbor(neighbor));
+ TriaAccessorExceptions::ExcInvalidNeighbor(neighbor));
const TriaIterator<dim,TriaObjectAccessor<dim-1, dim> > this_face=face(neighbor);
const TriaIterator<dim,CellAccessor<dim> > neighbor_cell = this->neighbor(neighbor);
template <int dim>
bool CellAccessor<dim>::at_boundary (const unsigned int i) const
{
- Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
+ Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
Assert (i<GeometryInfo<dim>::faces_per_cell,
ExcIndexRange (i,0,GeometryInfo<dim>::faces_per_cell));
Assert ((q.state() == IteratorState::past_the_end)
||
q->used(),
- typename TriaAccessor<dim>::ExcUnusedCellAsChild());
+ TriaAccessorExceptions::ExcUnusedCellAsChild());
return q;
}
#ifdef DEBUG
if (q.state() != IteratorState::past_the_end)
- Assert (q->used(), typename TriaAccessor<dim>::ExcUnusedCellAsNeighbor());
+ Assert (q->used(), TriaAccessorExceptions::ExcUnusedCellAsNeighbor());
#endif
return q;
}
#ifdef DEBUG
if (q.state() != IteratorState::past_the_end)
- Assert (q->used(), typename TriaAccessor<dim>::ExcUnusedCellAsChild());
+ Assert (q->used(), TriaAccessorExceptions::ExcUnusedCellAsChild());
#endif
return q;
}