ExcInternalError());
if (do_schlieren_plot == true)
- Assert(computed_quantities[0].size() == dim + 2,
- ExcInternalError()) else Assert(computed_quantities[0].size() ==
- dim + 1,
- ExcInternalError());
+ {
+ Assert(computed_quantities[0].size() == dim + 2, ExcInternalError());
+ }
+ else
+ {
+ Assert(computed_quantities[0].size() == dim + 1, ExcInternalError());
+ }
// Then loop over all quadrature points and do our work there. The code
// should be pretty self-explanatory. The order of output variables is
(void)total_local_cells;
if (Utilities::MPI::n_mpi_processes(this->mpi_communicator) == 1)
- Assert(
- static_cast<unsigned int>(parallel_forest->local_num_quadrants) ==
- total_local_cells,
- ExcInternalError()) else Assert(static_cast<unsigned int>(parallel_forest
- ->local_num_quadrants) <=
- total_local_cells,
- ExcInternalError());
+ {
+ Assert(static_cast<unsigned int>(
+ parallel_forest->local_num_quadrants) == total_local_cells,
+ ExcInternalError());
+ }
+ else
+ {
+ Assert(static_cast<unsigned int>(
+ parallel_forest->local_num_quadrants) <= total_local_cells,
+ ExcInternalError());
+ }
// count the number of owned, active cells and compare with p4est.
unsigned int n_owned = 0;
// in higher dimensions, this may happen but is not
// implemented
if (spacedim == 2)
- AssertThrow((n_adj_cells >= 1) && (n_adj_cells <= 2), ExcInternalError()) else AssertThrow(
- (n_adj_cells >= 1) && (n_adj_cells <= 2),
- ExcMessage("You have a line in your triangulation "
- "at which more than two cells come together. "
- "\n\n"
- "This is not currently supported because the "
- "Triangulation class makes the assumption that "
- "every cell has zero or one neighbors behind "
- "each face (here, behind each line), but in your "
- "situation there would be more than one."
- "\n\n"
- "Support for this is not currently implemented. "
- "If you need to work with triangulations where "
- "more than two cells come together at a line, "
- "duplicate the vertices once per cell (i.e., put "
- "multiple vertices at the same physical location, "
- "but using different vertex indices for each) "
- "and then ensure continuity of the solution by "
- "explicitly creating constraints that the degrees "
- "of freedom at these lines have the same "
- "value, using the AffineConstraints class."));
+ {
+ AssertThrow((n_adj_cells >= 1) && (n_adj_cells <= 2),
+ ExcInternalError());
+ }
+ else
+ {
+ AssertThrow(
+ (n_adj_cells >= 1) && (n_adj_cells <= 2),
+ ExcMessage("You have a line in your triangulation at which "
+ "more than two cells come together. "
+ "\n\n"
+ "This is not currently supported because the "
+ "Triangulation class makes the assumption that "
+ "every cell has zero or one neighbors behind each "
+ "face (here, behind each line), but in your "
+ "situation there would be more than one."
+ "\n\n"
+ "Support for this is not currently implemented. "
+ "If you need to work with triangulations where "
+ "more than two cells come together at a line, "
+ "duplicate the vertices once per cell (i.e., put "
+ "multiple vertices at the same physical location, "
+ "but using different vertex indices for each) "
+ "and then ensure continuity of the solution by "
+ "explicitly creating constraints that the degrees "
+ "of freedom at these lines have the same "
+ "value, using the AffineConstraints class."));
+ }
// if only one cell: line is at boundary -> give it the boundary
// indicator zero by default
cell_partition_data.push_back(n_cells);
}
if (cell_vectorization_categories_strict == true)
- Assert(n_cells >= n_macro_cells + n_ghost_slots,
- ExcInternalError()) else AssertDimension(n_cells,
- n_macro_cells +
- n_ghost_slots);
+ {
+ Assert(n_cells >= n_macro_cells + n_ghost_slots, ExcInternalError());
+ }
+ else
+ {
+ AssertDimension(n_cells, n_macro_cells + n_ghost_slots);
+ }
AssertDimension(cell_partition_data.back(), n_cells);
AssertDimension(counter, n_active_cells + n_ghost_cells);
for (unsigned int c = 0; c < dim + 2; ++c)
if (c == 0 || c == dim + 1)
- AssertThrow(object.value(p, c) == 0,
- ExcInternalError()) else AssertThrow(object.value(p, c) ==
- p[c - 1],
- ExcInternalError());
+ {
+ AssertThrow(object.value(p, c) == 0, ExcInternalError());
+ }
+ else
+ {
+ AssertThrow(object.value(p, c) == p[c - 1], ExcInternalError());
+ }
Vector<double> v(dim + 2);
object.vector_value(p, v);
for (unsigned int c = 0; c < dim + 2; ++c)
if (c == 0 || c == dim + 1)
- AssertThrow(v(c) == 0,
- ExcInternalError()) else AssertThrow(v(c) == p[c - 1],
- ExcInternalError());
+ {
+ AssertThrow(v(c) == 0, ExcInternalError());
+ }
+ else
+ {
+ AssertThrow(v(c) == p[c - 1], ExcInternalError());
+ }
}
deallog << "OK" << std::endl;
// other faces are
// squashed
if (f < 2)
- AssertThrow(
- alternating_forms[v].norm() == 1,
- ExcInternalError()) else AssertThrow(alternating_forms[v]
- .norm() == 0.1,
- ExcInternalError());
+ {
+ AssertThrow(alternating_forms[v].norm() == 1,
+ ExcInternalError());
+ }
+ else
+ {
+ AssertThrow(alternating_forms[v].norm() == 0.1,
+ ExcInternalError());
+ }
}
}
}
deallog << "Squashed+rotated cell: face " << f << ": "
<< alternating_forms[v] << std::endl;
- // in 2d and 3d, faces
- // 0,1 should be
- // unaffected (just like
- // for the squashed cell,
- // the rotation has
- // nothing to do with
- // face numbers though
- // the direction of the
- // alternating form
- // vector would have
+ // in 2d and 3d, faces 0,1 should be unaffected (just like for the
+ // squashed cell, the rotation has nothing to do with face numbers
+ // though the direction of the alternating form vector would have
// rotated along)
if (f < 2)
- AssertThrow(
- alternating_forms[v].norm() == 1,
- ExcInternalError()) else AssertThrow(alternating_forms[v]
- .norm() == 0.1,
- ExcInternalError());
+ {
+ AssertThrow(alternating_forms[v].norm() == 1,
+ ExcInternalError());
+ }
+ else
+ {
+ AssertThrow(alternating_forms[v].norm() == 0.1,
+ ExcInternalError());
+ }
}
}
}
for (unsigned int c = 0; c < fe.get_fe().n_components(); ++c)
{
if (fe.get_fe().system_to_component_index(i).first == c)
- AssertThrow(
- (fe.shape_value(i, k) ==
- fe.shape_value_component(i, k, c)) &&
- (fe.shape_grad(i, k) ==
- fe.shape_grad_component(i, k, c)) &&
- (fe.shape_hessian(i, k) ==
- fe.shape_hessian_component(i, k, c)),
- ExcInternalError()) else AssertThrow((fe
- .shape_value_component(
- i, k, c) ==
- 0) &&
- (fe.shape_grad_component(
- i, k, c) ==
- Tensor<
- 1,
- dim>()) &&
- (fe.shape_hessian_component(
- i, k, c) ==
- Tensor<
- 2,
- dim>()),
- ExcInternalError());
+ {
+ AssertThrow((fe.shape_value(i, k) ==
+ fe.shape_value_component(i, k, c) &&
+ fe.shape_grad(i, k) ==
+ fe.shape_grad_component(i, k, c) &&
+ fe.shape_hessian(i, k) ==
+ fe.shape_hessian_component(i, k, c)),
+ ExcInternalError());
+ }
+ else
+ {
+ AssertThrow((fe.shape_value_component(i, k, c) == 0 &&
+ fe.shape_grad_component(i, k, c) ==
+ Tensor<1, dim>() &&
+ fe.shape_hessian_component(i, k, c) ==
+ Tensor<2, dim>()),
+ ExcInternalError());
+ }
};
}
deallog << std::endl;