Triangulation<dim>::begin_raw_line (unsigned int level) const {
Assert (level<levels.size(),
ExcInvalidLevel(level));
-
- // does this level have cells?
- if (levels[level]->lines.lines.size() == 0)
- return end_line();
+ Assert (levels[level]->lines.lines.size() != 0,
+ ExcEmptyLevel (level));
return raw_line_iterator ((Triangulation<dim>*)this,
level,
Triangulation<dim>::begin_raw_quad (unsigned int level) const {
Assert (level<levels.size(),
ExcInvalidLevel(level));
-
- if (levels[level]->quads.quads.size() == 0)
- return end_quad();
-
+ Assert (levels[level]->quads.quads.size() != 0,
+ ExcEmptyLevel (level));
return raw_quad_iterator ((Triangulation<dim>*)this,
level,
0);
template <int dim>
typename TriaDimensionInfo<dim>::raw_line_iterator
Triangulation<dim>::last_raw_line (const unsigned int level) const {
- Assert (level<levels.size(),
- ExcInvalidLevel(level));
+ Assert (level<levels.size(), ExcInvalidLevel(level));
+ Assert (levels[level]->lines.lines.size() != 0,
+ ExcEmptyLevel (level));
return raw_line_iterator ((Triangulation<dim>*)this,
level,
Triangulation<dim>::last_raw_quad (const unsigned int level) const {
Assert (level<levels.size(),
ExcInvalidLevel(level));
-
+ Assert (levels[level]->quads.quads.size() != 0,
+ ExcEmptyLevel (level));
+
return raw_quad_iterator ((Triangulation<dim>*)this,
level,
levels[level]->quads.quads.size()-1);