template <int dim>
bool LineAccessor<dim>::user_flag_set () const {
- Assert (used(), ExcRefineCellNotActive());
+ Assert (used(), ExcCellNotUsed());
return tria->levels[present_level]->lines.user_flags[present_index];
};
template <int dim>
void LineAccessor<dim>::set_children (const int index) const {
- Assert (used(), ExcRefineCellNotUsed());
+ Assert (used(), ExcCellNotUsed());
tria->levels[present_level]->lines.children[present_index] = index;
};
template <int dim>
unsigned char LineAccessor<dim>::boundary_indicator () const {
Assert (dim>=2, ExcNotUsefulForThisDimension());
- Assert (used(), ExcRefineCellNotUsed());
+ Assert (used(), ExcCellNotUsed());
return tria->levels[present_level]->lines.material_id[present_index];
};
template <int dim>
void LineAccessor<dim>::set_boundary_indicator (unsigned char boundary_ind) const {
Assert (dim>=2, ExcNotUsefulForThisDimension());
- Assert (used(), ExcRefineCellNotUsed());
+ Assert (used(), ExcCellNotUsed());
tria->levels[present_level]->lines.material_id[present_index] = boundary_ind;
};
template <int dim>
bool QuadAccessor<dim>::user_flag_set () const {
- Assert (used(), ExcRefineCellNotActive());
+ Assert (used(), ExcCellNotUsed());
return tria->levels[present_level]->quads.user_flags[present_index];
};
template <int dim>
void QuadAccessor<dim>::set_children (const int index) const {
- Assert (used(), ExcRefineCellNotUsed());
+ Assert (used(), ExcCellNotUsed());
tria->levels[present_level]->quads.children[present_index] = index;
};
template <int dim>
unsigned char QuadAccessor<dim>::boundary_indicator () const {
Assert (dim>=3, ExcNotUsefulForThisDimension());
- Assert (used(), ExcRefineCellNotUsed());
+ Assert (used(), ExcCellNotUsed());
return tria->levels[present_level]->quads.material_id[present_index];
};
template <int dim>
void QuadAccessor<dim>::set_boundary_indicator (unsigned char boundary_ind) const {
Assert (dim>=3, ExcNotUsefulForThisDimension());
- Assert (used(), ExcRefineCellNotUsed());
+ Assert (used(), ExcCellNotUsed());
tria->levels[present_level]->quads.material_id[present_index] = boundary_ind;
};
template <>
unsigned char CellAccessor<1>::material_id () const {
Assert (used(),
- typename TriaSubstructAccessor<1>::ExcRefineCellNotUsed());
+ typename TriaSubstructAccessor<1>::ExcCellNotUsed());
return tria->levels[present_level]->lines.material_id[present_index];
};
template <>
void CellAccessor<1>::set_material_id (const unsigned char mat_id) const {
Assert (used(),
- typename TriaSubstructAccessor<1>::ExcRefineCellNotUsed());
+ typename TriaSubstructAccessor<1>::ExcCellNotUsed());
tria->levels[present_level]->lines.material_id[present_index]
= mat_id;
};
template <>
unsigned char CellAccessor<2>::material_id () const {
Assert (used(),
- typename TriaSubstructAccessor<2>::ExcRefineCellNotUsed());
+ typename TriaSubstructAccessor<2>::ExcCellNotUsed());
return tria->levels[present_level]->quads.material_id[present_index];
};
template <>
void CellAccessor<2>::set_material_id (const unsigned char mat_id) const {
Assert (used(),
- typename TriaSubstructAccessor<2>::ExcRefineCellNotUsed());
+ typename TriaSubstructAccessor<2>::ExcCellNotUsed());
tria->levels[present_level]->quads.material_id[present_index]
= mat_id;
};
// executed and for some reason the refine
// flag is not cleared).
Assert (active() || !tria->levels[present_level]->refine_flags[present_index],
- typename TriaSubstructAccessor<dim>::ExcRefineCellNotActive());
+ ExcRefineCellNotActive());
return tria->levels[present_level]->refine_flags[present_index];
};
template <int dim>
void CellAccessor<dim>::set_refine_flag () const {
- Assert (used() && active(),
- typename TriaSubstructAccessor<dim>::ExcRefineCellNotActive());
+ Assert (used() && active(), ExcRefineCellNotActive());
+ Assert (!coarsen_flag_set(), ExcCellFlaggedForCoarsening());
+
tria->levels[present_level]->refine_flags[present_index] = true;
};
template <int dim>
void CellAccessor<dim>::clear_refine_flag () const {
- Assert (used() && active(),
- typename TriaSubstructAccessor<dim>::ExcRefineCellNotActive());
+ Assert (used() && active(), ExcRefineCellNotActive());
tria->levels[present_level]->refine_flags[present_index] = false;
};
// executed and for some reason the refine
// flag is not cleared).
Assert (active() || !tria->levels[present_level]->coarsen_flags[present_index],
- typename TriaSubstructAccessor<dim>::ExcRefineCellNotActive());
+ ExcRefineCellNotActive());
return tria->levels[present_level]->coarsen_flags[present_index];
};
template <int dim>
void CellAccessor<dim>::set_coarsen_flag () const {
- Assert (used() && active(),
- typename TriaSubstructAccessor<dim>::ExcRefineCellNotActive());
+ Assert (used() && active(), ExcRefineCellNotActive());
+ Assert (!refine_flag_set(), ExcCellFlaggedForRefinement());
+
tria->levels[present_level]->coarsen_flags[present_index] = true;
};
template <int dim>
void CellAccessor<dim>::clear_coarsen_flag () const {
- Assert (used() && active(),
- typename TriaSubstructAccessor<dim>::ExcRefineCellNotActive());
+ Assert (used() && active(), ExcRefineCellNotActive());
tria->levels[present_level]->coarsen_flags[present_index] = false;
};