From 19f08daf07f884beb007ef2ea0a0f77437d51713 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 4 Jun 1998 23:30:47 +0000 Subject: [PATCH] Rename some exception classes. git-svn-id: https://svn.dealii.org/trunk@381 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/grid/tria_accessor.cc | 44 ++++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/deal.II/deal.II/source/grid/tria_accessor.cc b/deal.II/deal.II/source/grid/tria_accessor.cc index 47a92f974f..6ed12ff06d 100644 --- a/deal.II/deal.II/source/grid/tria_accessor.cc +++ b/deal.II/deal.II/source/grid/tria_accessor.cc @@ -121,7 +121,7 @@ void LineAccessor::clear_used_flag () const { template bool LineAccessor::user_flag_set () const { - Assert (used(), ExcRefineCellNotActive()); + Assert (used(), ExcCellNotUsed()); return tria->levels[present_level]->lines.user_flags[present_index]; }; @@ -169,7 +169,7 @@ int LineAccessor::child_index (unsigned int i) const { template void LineAccessor::set_children (const int index) const { - Assert (used(), ExcRefineCellNotUsed()); + Assert (used(), ExcCellNotUsed()); tria->levels[present_level]->lines.children[present_index] = index; }; @@ -241,7 +241,7 @@ void LineAccessor::operator -- () { template unsigned char LineAccessor::boundary_indicator () const { Assert (dim>=2, ExcNotUsefulForThisDimension()); - Assert (used(), ExcRefineCellNotUsed()); + Assert (used(), ExcCellNotUsed()); return tria->levels[present_level]->lines.material_id[present_index]; }; @@ -251,7 +251,7 @@ unsigned char LineAccessor::boundary_indicator () const { template void LineAccessor::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; }; @@ -331,7 +331,7 @@ void QuadAccessor::clear_used_flag () const { template bool QuadAccessor::user_flag_set () const { - Assert (used(), ExcRefineCellNotActive()); + Assert (used(), ExcCellNotUsed()); return tria->levels[present_level]->quads.user_flags[present_index]; }; @@ -403,7 +403,7 @@ int QuadAccessor::child_index (unsigned int i) const { template void QuadAccessor::set_children (const int index) const { - Assert (used(), ExcRefineCellNotUsed()); + Assert (used(), ExcCellNotUsed()); tria->levels[present_level]->quads.children[present_index] = index; }; @@ -474,7 +474,7 @@ void QuadAccessor::operator -- () { template unsigned char QuadAccessor::boundary_indicator () const { Assert (dim>=3, ExcNotUsefulForThisDimension()); - Assert (used(), ExcRefineCellNotUsed()); + Assert (used(), ExcCellNotUsed()); return tria->levels[present_level]->quads.material_id[present_index]; }; @@ -484,7 +484,7 @@ unsigned char QuadAccessor::boundary_indicator () const { template void QuadAccessor::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; }; @@ -529,7 +529,7 @@ bool CellAccessor<1>::at_boundary () const { 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]; }; @@ -538,7 +538,7 @@ unsigned char CellAccessor<1>::material_id () const { 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; }; @@ -569,7 +569,7 @@ bool CellAccessor<2>::at_boundary () const { 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]; }; @@ -578,7 +578,7 @@ unsigned char CellAccessor<2>::material_id () const { 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; }; @@ -653,7 +653,7 @@ bool CellAccessor::refine_flag_set () const { // executed and for some reason the refine // flag is not cleared). Assert (active() || !tria->levels[present_level]->refine_flags[present_index], - typename TriaSubstructAccessor::ExcRefineCellNotActive()); + ExcRefineCellNotActive()); return tria->levels[present_level]->refine_flags[present_index]; }; @@ -661,8 +661,9 @@ bool CellAccessor::refine_flag_set () const { template void CellAccessor::set_refine_flag () const { - Assert (used() && active(), - typename TriaSubstructAccessor::ExcRefineCellNotActive()); + Assert (used() && active(), ExcRefineCellNotActive()); + Assert (!coarsen_flag_set(), ExcCellFlaggedForCoarsening()); + tria->levels[present_level]->refine_flags[present_index] = true; }; @@ -670,8 +671,7 @@ void CellAccessor::set_refine_flag () const { template void CellAccessor::clear_refine_flag () const { - Assert (used() && active(), - typename TriaSubstructAccessor::ExcRefineCellNotActive()); + Assert (used() && active(), ExcRefineCellNotActive()); tria->levels[present_level]->refine_flags[present_index] = false; }; @@ -686,7 +686,7 @@ bool CellAccessor::coarsen_flag_set () const { // executed and for some reason the refine // flag is not cleared). Assert (active() || !tria->levels[present_level]->coarsen_flags[present_index], - typename TriaSubstructAccessor::ExcRefineCellNotActive()); + ExcRefineCellNotActive()); return tria->levels[present_level]->coarsen_flags[present_index]; }; @@ -694,8 +694,9 @@ bool CellAccessor::coarsen_flag_set () const { template void CellAccessor::set_coarsen_flag () const { - Assert (used() && active(), - typename TriaSubstructAccessor::ExcRefineCellNotActive()); + Assert (used() && active(), ExcRefineCellNotActive()); + Assert (!refine_flag_set(), ExcCellFlaggedForRefinement()); + tria->levels[present_level]->coarsen_flags[present_index] = true; }; @@ -703,8 +704,7 @@ void CellAccessor::set_coarsen_flag () const { template void CellAccessor::clear_coarsen_flag () const { - Assert (used() && active(), - typename TriaSubstructAccessor::ExcRefineCellNotActive()); + Assert (used() && active(), ExcRefineCellNotActive()); tria->levels[present_level]->coarsen_flags[present_index] = false; }; -- 2.39.5