new_lines[l] = next_unused_line;
++next_unused_line;
- Assert(
- new_lines[l]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_lines[l]);
}
if (ref_case == RefinementCase<dim>::cut_xy)
const unsigned int n_children = GeometryInfo<dim>::n_children(ref_case);
for (unsigned int i = 0; i < n_children; ++i)
{
- Assert(
- next_unused_cell->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(next_unused_cell);
subcells[i] = next_unused_cell;
++next_unused_cell;
if (i % 2 == 1 && i < n_children - 1)
const typename Triangulation<dim, spacedim>::raw_line_iterator
children[2] = {next_unused_line, ++next_unused_line};
- Assert(
- children[0]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
- Assert(
- children[1]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(children[0]);
+ AssertIsNotUsed(children[1]);
children[0]->set_bounding_object_indices(
{line->vertex_index(0), next_unused_vertex});
new_lines[l] = next_unused_line;
++next_unused_line;
- Assert(
- new_lines[l]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_lines[l]);
}
if (true)
for (unsigned int i = 0; i < n_children; ++i)
{
- Assert(
- next_unused_cell->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(next_unused_cell);
subcells[i] = next_unused_cell;
++next_unused_cell;
if (i % 2 == 1 && i < n_children - 1)
first_child->set_used_flag();
first_child->clear_user_data();
++next_unused_cell;
- Assert(
- next_unused_cell->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(next_unused_cell);
second_child = next_unused_cell;
second_child->set_used_flag();
second_child->clear_user_data();
children[2] = {next_unused_line, ++next_unused_line};
// some tests; if any of the iterators should be
// invalid, then already dereferencing will fail
- Assert(
- children[0]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
- Assert(
- children[1]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(children[0]);
+ AssertIsNotUsed(children[1]);
children[0]->set_bounding_object_indices(
{line->vertex_index(0), next_unused_vertex});
const typename Triangulation<dim, spacedim>::raw_line_iterator
children[2] = {next_unused_line, ++next_unused_line};
- Assert(
- children[0]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
- Assert(
- children[1]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(children[0]);
+ AssertIsNotUsed(children[1]);
children[0]->set_bounding_object_indices(
{line->vertex_index(0), next_unused_vertex});
new_lines[i] = next_unused_line;
++next_unused_line;
-
- Assert(
- new_lines[i]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_lines[i]);
}
}
triangulation);
new_quads[0] = next_unused_quad;
- Assert(
- new_quads[0]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_quads[0]);
++next_unused_quad;
new_quads[1] = next_unused_quad;
- Assert(
- new_quads[1]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_quads[1]);
next_unused_quad =
triangulation.faces->quads.template next_free_pair_object<2>(
triangulation);
new_quads[2] = next_unused_quad;
- Assert(
- new_quads[2]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_quads[2]);
++next_unused_quad;
new_quads[3] = next_unused_quad;
- Assert(
- new_quads[3]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_quads[3]);
quad->set_children(0, new_quads[0]->index());
quad->set_children(2, new_quads[2]->index());
triangulation.faces->lines
.template next_free_single_object<1>(triangulation);
- Assert(
- new_lines[i]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_lines[i]);
new_lines[i]->set_used_flag();
new_lines[i]->clear_user_flag();
new_lines[i]->clear_user_data();
ReferenceCells::Quadrilateral :
ReferenceCells::Triangle;
- Assert(
- new_quad->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_quad);
new_quad->set_used_flag();
new_quad->clear_user_flag();
new_quad->clear_user_data();
->reference_cell[new_hex->index()] =
reference_cell_type;
- Assert(
- new_hex->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_hex);
new_hex->set_used_flag();
new_hex->clear_user_flag();
new_hex->clear_user_data();
// some tests; if any of the iterators should be
// invalid, then already dereferencing will fail
- Assert(
- children[0]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
- Assert(
- children[1]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(children[0]);
+ AssertIsNotUsed(children[1]);
children[0]->set_bounding_object_indices(
{line->vertex_index(0), next_unused_vertex});
new_line =
triangulation.faces->lines
.template next_free_single_object<1>(triangulation);
- Assert(
- new_line->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_line);
// first collect the
// indices of the vertices:
triangulation.faces->quads
.template next_free_pair_object<2>(triangulation);
new_quads[0] = next_unused_quad;
- Assert(
- new_quads[0]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_quads[0]);
++next_unused_quad;
new_quads[1] = next_unused_quad;
- Assert(
- new_quads[1]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
-
+ AssertIsNotUsed(new_quads[1]);
if (aniso_quad_ref_case == RefinementCase<dim - 1>::cut_x)
{
// some tests; if any of the iterators
// should be invalid, then already
// dereferencing will fail
- Assert(
- children[0]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
- Assert(
- children[1]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(children[0]);
+ AssertIsNotUsed(children[1]);
children[0]->set_bounding_object_indices(
{middle_line->vertex_index(0),
new_lines[i] = next_unused_line;
++next_unused_line;
- Assert(
- new_lines[i]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_lines[i]);
}
// set the data of the four lines. first collect
.template next_free_pair_object<2>(triangulation);
new_quads[0] = next_unused_quad;
- Assert(
- new_quads[0]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_quads[0]);
++next_unused_quad;
new_quads[1] = next_unused_quad;
- Assert(
- new_quads[1]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_quads[1]);
next_unused_quad =
triangulation.faces->quads
.template next_free_pair_object<2>(triangulation);
new_quads[2] = next_unused_quad;
- Assert(
- new_quads[2]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_quads[2]);
++next_unused_quad;
new_quads[3] = next_unused_quad;
- Assert(
- new_quads[3]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_quads[3]);
// note these quads as children to the present one
quad->set_children(0, new_quads[0]->index());
triangulation.faces->lines
.template next_free_single_object<1>(triangulation);
- Assert(
- new_lines[i]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_lines[i]);
new_lines[i]->set_used_flag();
new_lines[i]->clear_user_flag();
new_lines[i]->clear_user_data();
triangulation.faces->quads
.template next_free_single_object<2>(triangulation);
- Assert(
- new_quads[i]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_quads[i]);
new_quads[i]->set_used_flag();
new_quads[i]->clear_user_flag();
new_quads[i]->clear_user_data();
new_hexes[i] = next_unused_hex;
- Assert(
- new_hexes[i]->used() == false,
- ExcMessage(
- "Internal error: We want to use a cell during refinement that should be unused, but turns out not to be."));
+ AssertIsNotUsed(new_hexes[i]);
new_hexes[i]->set_used_flag();
new_hexes[i]->clear_user_flag();
new_hexes[i]->clear_user_data();