/**
* Return the number of immediate
- * children of this object.
- *
- * An assertion assures that this
- * function can only be called
- * for TriaObjects with
- * <tt>has_children()==true</tt>.
+ * children of this object. The
+ * number of children of an
+ * unrefined cell is zero.
*/
unsigned int n_children() const;
/**
* Return the number of immediate
* children of this object.
- *
- * An assertion assures that this
- * function can only be called
- * for TriaObjects with
- * <tt>has_children()==true</tt>.
*/
unsigned int n_children() const;
/**
* Return the number of immediate
* children of this object.
- *
- * An assertion assures that this
- * function can only be called
- * for TriaObjects with
- * <tt>has_children()==true</tt>.
*/
unsigned int n_children() const;
/**
* Return the number of immediate
* children of this object.
- *
- * An assertion assures that this
- * function can only be called
- * for TriaObjects with
- * <tt>has_children()==true</tt>.
*/
unsigned int n_children() const;
unsigned int
TriaObjectAccessor<1,dim>::n_children () const
{
- Assert (has_children()==true, TriaAccessorExceptions::ExcCellHasNoChildren());
- return GeometryInfo<1>::max_children_per_cell;
+ return (has_children() ? GeometryInfo<1>::max_children_per_cell : 0);
}
unsigned int
TriaObjectAccessor<2,dim>::n_children () const
{
- Assert (has_children()==true, TriaAccessorExceptions::ExcCellHasNoChildren());
Assert (static_cast<unsigned int> (this->present_index) <
objects().refinement_cases.size(),
ExcIndexRange(this->present_index, 0,
objects().refinement_cases.size()));
-
return GeometryInfo<2>::n_children(refinement_case());
}
unsigned int
TriaObjectAccessor<3,3>::n_children () const
{
- Assert (has_children()==true, TriaAccessorExceptions::ExcCellHasNoChildren());
Assert (static_cast<unsigned int> (this->present_index) <
this->tria->levels[this->present_level]->cells.refinement_cases.size(),
ExcIndexRange(this->present_index, 0,