(void)points;
AssertIndexRange(component, this->n_components);
Assert(return_values.size() == points.size(),
- ExcDimensionMismatch(return_values.size(), points.size()))
+ ExcDimensionMismatch(return_values.size(), points.size()));
- std::fill(return_values.begin(),
- return_values.end(),
- function_value_vector[component]);
+ std::fill(return_values.begin(),
+ return_values.end(),
+ function_value_vector[component]);
}
AssertThrow(
false,
ExcMessage(
- "No convergence in iterative QL eigenvector algorithm.")) return std::
- array<std::pair<Number, Tensor<1, dim, Number>>, dim>();
+ "No convergence in iterative QL eigenvector algorithm."));
+ return std::array<std::pair<Number, Tensor<1, dim, Number>>,
+ dim>();
}
// Calculate the shift..
AssertThrow(
false,
ExcMessage(
- "No convergence in iterative Jacobi eigenvector algorithm.")) return std::
- array<std::pair<Number, Tensor<1, dim, Number>>, dim>();
+ "No convergence in iterative Jacobi eigenvector algorithm."));
+ return std::array<std::pair<Number, Tensor<1, dim, Number>>,
+ dim>();
}
// Compute threshold value which dictates whether or
const DoFHandler<dim, spacedim> & /*dof2*/,
OutVector & /*u2*/)
{
- Assert(false, ExcNotImplemented())
+ Assert(false, ExcNotImplemented());
}
};
public:
ExtrapolateImplementation()
{
- AssertThrow(false, ExcNotImplemented())
+ AssertThrow(false, ExcNotImplemented());
}
template <class InVector>
public:
ExtrapolateImplementation()
{
- AssertThrow(false, ExcNotImplemented())
+ AssertThrow(false, ExcNotImplemented());
}
template <class InVector>
public:
ExtrapolateImplementation()
{
- AssertThrow(false, ExcNotImplemented())
+ AssertThrow(false, ExcNotImplemented());
}
template <class InVector>
double factor = 1.)
{
const unsigned int n_dofs = fe.dofs_per_cell;
- AssertDimension(fe.get_fe().n_components(), dim)
- AssertVectorVectorDimension(input, dim, fe.n_quadrature_points);
+ AssertDimension(fe.get_fe().n_components(), dim);
+ AssertVectorVectorDimension(input, dim, fe.n_quadrature_points);
AssertVectorVectorDimension(Dinput, dim, fe.n_quadrature_points);
AssertVectorVectorDimension(data, dim, fe.n_quadrature_points);
if (col_indices[i] <= before)
Assert(false,
ExcMessage("Flag col_indices_are_sorted is set, but "
- "indices appear to not be sorted.")) else before =
- col_indices[i];
+ "indices appear to not be sorted."));
+ else
+ before = col_indices[i];
# endif
const std::pair<unsigned int, size_type> row_index =
this->row_block_indices.global_to_local(row);
A_t.Tadd(A, 1);
A_t.mmult(A_t_times_A, A);
if (number(A_t_times_A.determinant()) == number(0))
- Assert(false, ExcSingular()) else
+ Assert(false, ExcSingular());
+ else
{
A_t_times_A_inv.invert(A_t_times_A);
A_t_times_A_inv.mmult(left_inv, A_t);
A_t.Tadd(A, 1);
A.mmult(A_times_A_t, A_t);
if (number(A_times_A_t.determinant()) == number(0))
- Assert(false, ExcSingular()) else
+ Assert(false, ExcSingular());
+ else
{
A_times_A_t_inv.invert(A_times_A_t);
A_t.mmult(right_inv, A_times_A_t_inv);
// check against # of data sets in first patch.
if (patches[0].points_are_available)
{
- AssertDimension(n_data_sets + spacedim, patches[0].data.n_rows())
+ AssertDimension(n_data_sets + spacedim, patches[0].data.n_rows());
}
else
{
- AssertDimension(n_data_sets, patches[0].data.n_rows())
+ AssertDimension(n_data_sets, patches[0].data.n_rows());
}
//---------------------
// patches are made in write_gmv_reorder_data_vectors
if (patches[0].points_are_available)
{
- AssertDimension(n_data_sets + spacedim, patches[0].data.n_rows())
+ AssertDimension(n_data_sets + spacedim, patches[0].data.n_rows());
}
else
{
- AssertDimension(n_data_sets, patches[0].data.n_rows())
+ AssertDimension(n_data_sets, patches[0].data.n_rows());
}
const char *ascii_or_binary =
: center(center)
, radius(radius)
{
- Assert(radius > 0, ExcMessage("Radius must be positive."))
+ Assert(radius > 0, ExcMessage("Radius must be positive."));
}
: point_in_plane(point)
, normal(normal)
{
- Assert(normal.norm() > 0, ExcMessage("Plane normal must not be 0."))
+ Assert(normal.norm() > 0, ExcMessage("Plane normal must not be 0."));
}
, max_iter(max_iter)
{
for (unsigned int d = 0; d < dim; ++d)
- Assert(radii[d] > 0, ExcMessage("All radii must be positive."))
+ Assert(radii[d] > 0, ExcMessage("All radii must be positive."));
}
if (finalize_petscslepc)
{
PetscErrorCode ierr = SlepcFinalize();
- AssertThrow(ierr == 0, SLEPcWrappers::SolverBase::ExcSLEPcError(ierr))
+ AssertThrow(ierr == 0,
+ SLEPcWrappers::SolverBase::ExcSLEPcError(ierr));
}
# else
// or just end PETSc if we did so
break;
}
default:
- Assert(false, ExcInternalError())
+ Assert(false, ExcInternalError());
}
Assert(x != nullptr, ExcInternalError());
{
Assert(false,
ExcMessage("The number stored by this element of the "
- "table is not a number."))
+ "table is not a number."));
}
return 0;
Assert(
tria_fine.all_reference_cells_are_hyper_cube(),
ExcMessage(
- "FirstChildPolicy is only working for pure hex meshes at the moment."))
+ "FirstChildPolicy is only working for pure hex meshes at the moment."));
- const internal::CellIDTranslator<dim>
- cell_id_translator(n_coarse_cells, n_global_levels);
+ const internal::CellIDTranslator<dim> cell_id_translator(n_coarse_cells,
+ n_global_levels);
is_level_partitions.set_size(cell_id_translator.size());
for (const auto &cell : tria_fine.active_cell_iterators())
}
else
{
- AssertThrow(false, ExcInternalError())
+ AssertThrow(false, ExcInternalError());
}
// do not partition multigrid levels if user is
Assert(Utilities::MPI::this_mpi_process(tr->get_communicator()) ==
this->dof_handler->get_triangulation()
.locally_owned_subdomain(),
- ExcInternalError())
+ ExcInternalError());
// gather new numbers among processors into one vector
{
// matrix, we assume that for a 0* rotation we would have to build the
// identity matrix
- Assert(matrix.m() == spacedim, ExcInternalError())
+ Assert(matrix.m() == spacedim, ExcInternalError());
- Quadrature<dim - 1>
- quadrature(fe.get_unit_face_support_points(face_no));
+ Quadrature<dim - 1> quadrature(fe.get_unit_face_support_points(face_no));
// have an array that stores the location of each vector-dof tuple we want
// to rotate.
(mapping_kind == mapping_raviart_thomas) ||
(mapping_kind == mapping_nedelec))))
{
- Assert(false, ExcNotImplemented())
+ Assert(false, ExcNotImplemented());
}
}
}
// third derivatives are not implemented
if (fe_data.update_each & update_3rd_derivatives)
{
- Assert(false, ExcNotImplemented())
+ Assert(false, ExcNotImplemented());
}
}
}
// third derivatives are not implemented
if (fe_data.update_each & update_3rd_derivatives)
{
- Assert(false, ExcNotImplemented())
+ Assert(false, ExcNotImplemented());
}
}
}
epsilon = std::min(epsilon, 0.01 * delta[i][i]);
Assert(epsilon > 0,
ExcMessage(
- "The distance between corner points must be positive."))
+ "The distance between corner points must be positive."));
- // actual code is external since
- // 1-D is different from 2/3d.
- colorize_subdivided_hyper_rectangle(tria, p1, p2, epsilon);
+ // actual code is external since
+ // 1-D is different from 2/3d.
+ colorize_subdivided_hyper_rectangle(tria, p1, p2, epsilon);
}
}
{
AssertThrow(n_rotate_middle_square < 4,
ExcMessage("The number of rotation by pi/2 of the right square "
- "must be in the half-open range [0,4)."))
+ "must be in the half-open range [0,4)."));
- constexpr unsigned int dim = 2;
+ constexpr unsigned int dim = 2;
const unsigned int n_cells = 5;
std::vector<CellData<dim>> cells(n_cells);
}
else
{
- AssertThrow(false, ExcNotImplemented())
+ AssertThrow(false, ExcNotImplemented());
}
}
} // namespace GridGenerator
(std::lower_bound(edge_list.begin(), edge_list.end(), e) -
edge_list.begin());
Assert(edge_indices[l] < edge_list.size(), ExcInternalError());
- Assert(edge_list[edge_indices[l]] == e, ExcInternalError())
+ Assert(edge_list[edge_indices[l]] == e, ExcInternalError());
}
}
}
else
{
- Assert(false, ExcNotImplemented())
+ Assert(false, ExcNotImplemented());
}
}
} // namespace
}
else
{
- Assert(false, ExcNotImplemented())
+ Assert(false, ExcNotImplemented());
}
}
} // namespace
}
else
{
- Assert(false, ExcNotImplemented())
+ Assert(false, ExcNotImplemented());
}
}
} // namespace
{
Assert(false,
ExcMessage("You can't ask a complex value "
- "whether it is non-negative.")) return true;
+ "whether it is non-negative."));
+ return true;
}
} // namespace internal
"component, but as stated in the documentation "
"we only want to reorder such graphs if no "
"starting indices are given. The function was "
- "called with starting indices, however."))
+ "called with starting indices, however."));
- next_round_dofs.push_back(
- internal::find_unnumbered_starting_index(sparsity,
- new_indices));
+ next_round_dofs.push_back(
+ internal::find_unnumbered_starting_index(sparsity, new_indices));
}
Assert(false,
ExcMessage("The DataOutFaces class can currently not be "
"used on meshes that do not have the same cell type "
- "throughout."))
+ "throughout."));
}
const double d = p1.distance(p2);
const double d2 = p1.distance_square(p2);
- AssertThrow(std::abs(d - std::sqrt(d2)) < 1e-10, ExcInternalError())
+ AssertThrow(std::abs(d - std::sqrt(d2)) < 1e-10, ExcInternalError());
- deallog
- << "Ok" << std::endl;
+ deallog << "Ok" << std::endl;
}
int
fe_val.get_function_values(interpolant, values);
fe_val_m.get_function_values(interpolant, values_m);
- Assert(values[0] == values_m[0], ExcInternalError())
+ Assert(values[0] == values_m[0], ExcInternalError());
- for (const unsigned int f : GeometryInfo<dim>::face_indices())
- {
- fe_f_val.reinit(cell, f);
- fe_f_val_m.reinit(cell, f);
+ for (const unsigned int f : GeometryInfo<dim>::face_indices())
+ {
+ fe_f_val.reinit(cell, f);
+ fe_f_val_m.reinit(cell, f);
- fe_f_val.get_function_values(interpolant, values);
- fe_f_val_m.get_function_values(interpolant, values_m);
- Assert(values[0] == values_m[0], ExcInternalError())
+ fe_f_val.get_function_values(interpolant, values);
+ fe_f_val_m.get_function_values(interpolant, values_m);
+ Assert(values[0] == values_m[0], ExcInternalError());
// Also check the Jacobian with FESubfaceValues
if (cell->at_boundary(f) == false &&
cell->neighbor(f)->level() < cell->level())
- {
- fe_subf_val.reinit(cell->neighbor(f),
- cell->neighbor_face_no(f),
- cell->neighbor_of_coarser_neighbor(f).second);
- fe_subf_val_m.reinit(cell->neighbor(f),
- cell->neighbor_face_no(f),
- cell->neighbor_of_coarser_neighbor(f).second);
-
- fe_subf_val.get_function_values(interpolant, values);
- fe_subf_val_m.get_function_values(interpolant, values_m);
- Assert(values[0] == values_m[0], ExcInternalError())
+ {
+ fe_subf_val.reinit(
+ cell->neighbor(f),
+ cell->neighbor_face_no(f),
+ cell->neighbor_of_coarser_neighbor(f).second);
+ fe_subf_val_m.reinit(
+ cell->neighbor(f),
+ cell->neighbor_face_no(f),
+ cell->neighbor_of_coarser_neighbor(f).second);
+
+ fe_subf_val.get_function_values(interpolant, values);
+ fe_subf_val_m.get_function_values(interpolant, values_m);
+ Assert(values[0] == values_m[0], ExcInternalError());
+ }
}
- }
}
deallog << "OK" << std::endl;
}
"did not converge to a tolerance of " +
Utilities::to_string(solver_control.tolerance()) +
". It reported the following error:\n\n") +
- exc.what())) else throw QuietException();
+ exc.what()));
+ else
+ throw QuietException();
}
dst.block(1) *= -1.0;
}
{
AssertThrow(p->row() == 0, ExcInternalError());
if (p->column() == 0)
- AssertThrow(p->value() == 0.1,
- ExcInternalError()) else if (p->column() == 2)
- AssertThrow(p->value() == 0.2, ExcInternalError()) else
- // well, we didn't write here, so the only thing that
- // should be in there is a zero
- AssertThrow(p->value() == 0.0, ExcInternalError());
+ AssertThrow(p->value() == 0.1, ExcInternalError());
+ else if (p->column() == 2)
+ AssertThrow(p->value() == 0.2, ExcInternalError());
+ else
+ // well, we didn't write here, so the only thing that
+ // should be in there is a zero
+ AssertThrow(p->value() == 0.0, ExcInternalError());
}
}
else
{
AssertThrow(p->row() == 2, ExcInternalError());
if (p->column() == 3)
- AssertThrow(p->value() == 0.3, ExcInternalError()) else
- // well, we didn't write here, so the only thing that
- // should be in there is a zero
- AssertThrow(p->value() == 0.0, ExcInternalError());
+ AssertThrow(p->value() == 0.3, ExcInternalError());
+ else
+ // well, we didn't write here, so the only thing that
+ // should be in there is a zero
+ AssertThrow(p->value() == 0.0, ExcInternalError());
}
}
{
AssertThrow(p->row() == 0, ExcInternalError());
if (p->column() == 0)
- AssertThrow(p->value() == 0.1,
- ExcInternalError()) else if (p->column() == 2)
- AssertThrow(p->value() == 0.2, ExcInternalError()) else
- // well, we didn't write here, so the only thing that
- // should be in there is a zero
- AssertThrow(p->value() == 0.0, ExcInternalError());
+ AssertThrow(p->value() == 0.1, ExcInternalError());
+ else if (p->column() == 2)
+ AssertThrow(p->value() == 0.2, ExcInternalError());
+ else
+ // well, we didn't write here, so the only thing that
+ // should be in there is a zero
+ AssertThrow(p->value() == 0.0, ExcInternalError());
}
}
else
{
AssertThrow(p->row() == 2, ExcInternalError());
if (p->column() == 3)
- AssertThrow(p->value() == 0.3, ExcInternalError()) else
- // well, we didn't write here, so the only thing that
- // should be in there is a zero
- AssertThrow(p->value() == 0.0, ExcInternalError());
+ AssertThrow(p->value() == 0.3, ExcInternalError());
+ else
+ // well, we didn't write here, so the only thing that
+ // should be in there is a zero
+ AssertThrow(p->value() == 0.0, ExcInternalError());
}
}
{
AssertThrow(p->row() == 0, ExcInternalError());
if (p->column() == 0)
- AssertThrow(p->value() == 108,
- ExcInternalError()) else if (p->column() == 2)
- AssertThrow(p->value() == 0.2, ExcInternalError()) else
- // well, we didn't write here, so the only thing that
- // should be in there is a zero
- AssertThrow(p->value() == 0.0, ExcInternalError());
+ AssertThrow(p->value() == 108, ExcInternalError());
+ else if (p->column() == 2)
+ AssertThrow(p->value() == 0.2, ExcInternalError());
+ else
+ // well, we didn't write here, so the only thing that
+ // should be in there is a zero
+ AssertThrow(p->value() == 0.0, ExcInternalError());
}
}
else
{
AssertThrow(p->row() == 2, ExcInternalError());
if (p->column() == 3)
- AssertThrow(p->value() == 42, ExcInternalError()) else
- // well, we didn't write here, so the only thing that
- // should be in there is a zero
- AssertThrow(p->value() == 0.0, ExcInternalError());
+ AssertThrow(p->value() == 42, ExcInternalError());
+ else
+ // well, we didn't write here, so the only thing that
+ // should be in there is a zero
+ AssertThrow(p->value() == 0.0, ExcInternalError());
}
}
"did not converge to a tolerance of " +
Utilities::to_string(solver_control.tolerance()) +
". It reported the following error:\n\n") +
- exc.what())) else throw QuietException();
+ exc.what()));
+ else
+ throw QuietException();
}
dst.block(1) *= -1.0;
}
{
const std::vector<Point<dim>> &points = quadrature.get_points();
const std::vector<Tensor<1, dim>> &normals = quadrature.get_normal_vectors();
- AssertThrow(points.size() == normals.size(), ExcInternalError())
+ AssertThrow(points.size() == normals.size(), ExcInternalError());
}
"did not converge to a tolerance of " +
Utilities::to_string(solver_control.tolerance()) +
". It reported the following error:\n\n") +
- exc.what())) else throw QuietException();
+ exc.what()));
+ else
+ throw QuietException();
}
dst.block(1) *= -1.0;
}
{
AssertThrow(shared_map[it->first] == it->second,
ExcMessage(
- "Not all CellIds map to correct level subdomain_ids."))
+ "Not all CellIds map to correct level subdomain_ids."));
}
{
if (cell1->level_subdomain_id() != numbers::artificial_subdomain_id)
Assert(p4est_known_cells.find(cell1->id()) != p4est_known_cells.end(),
- ExcMessage("Cell not known by processor."))
+ ExcMessage("Cell not known by processor."));
}
cell2 = p4est_tria.begin(), endc2 = p4est_tria.end();
for (; cell2 != endc2; ++cell2)
{
if (cell2->level_subdomain_id() != numbers::artificial_subdomain_id)
Assert(shared_known_cells.find(cell2->id()) != shared_known_cells.end(),
- ExcMessage("Cell not known by processor."))
+ ExcMessage("Cell not known by processor."));
}
}
{
AssertThrow(shared_tria.n_locally_owned_active_cells() ==
p4est_tria.n_locally_owned_active_cells(),
- ExcMessage("Subdomains are of different sizes."))
+ ExcMessage("Subdomains are of different sizes."));
- std::map<CellId, unsigned int>
- shared_map;
+ std::map<CellId, unsigned int> shared_map;
std::map<CellId, unsigned int> p4est_map;
typename Triangulation<dim>::active_cell_iterator cell1 = shared_tria
++it)
{
AssertThrow(shared_map[it->first] == it->second,
- ExcMessage("Not all CellIds map to correct subdomain_ids."))
+ ExcMessage("Not all CellIds map to correct subdomain_ids."));
}
}
void
test(const unsigned int)
{
- AssertThrow(false, ExcNotImplemented())
+ AssertThrow(false, ExcNotImplemented());
}
template <>
}
else
{
- AssertThrow(false, ExcNotImplemented())
+ AssertThrow(false, ExcNotImplemented());
}
}
}
else
{
- AssertThrow(false, ExcNotImplemented())
+ AssertThrow(false, ExcNotImplemented());
}
}
}
else
{
- AssertThrow(false, ExcNotImplemented())
+ AssertThrow(false, ExcNotImplemented());
}
}