const std::vector<double> &JxW = coarse.get_JxW_values();
for (unsigned int i = 0; i < n; ++i)
for (unsigned int j = 0; j < n; ++j)
- if (fe.
-
- is_primitive()
-
- )
+ if (fe.is_primitive())
{
const double *coarse_i = &coarse.shape_value(i, 0);
const double *coarse_j = &coarse.shape_value(j, 0);
}
// invert mass matrix
- mass.
-
- gauss_jordan();
+ mass.gauss_jordan();
}
- auto compute_one_case =
+ const auto compute_one_case =
[&fe, &q_fine, n, nd, nq](const unsigned int ref_case,
const FullMatrix<double> &inverse_mass_matrix,
std::vector<FullMatrix<double>> &matrices) {
for (unsigned int i = 0; i < nc; ++i)
{
- Assert(matrices[i].
-
- n()
-
- == n,
- ExcDimensionMismatch(matrices[i].
-
- n(),
- n
-
- ));
- Assert(matrices[i].
-
- m()
-
- == n,
- ExcDimensionMismatch(matrices[i].
-
- m(),
- n
-
- ));
+ Assert(matrices[i].n() == n,
+ ExcDimensionMismatch(matrices[i].n(), n));
+ Assert(matrices[i].m() == n,
+ ExcDimensionMismatch(matrices[i].m(), n));
}
// create a respective refinement on the triangulation
Triangulation<dim, spacedim> tr;
GridGenerator::hyper_cube(tr, 0, 1);
- tr.
-
- begin_active()
- ->
-
- set_refine_flag(RefinementCase<dim>(ref_case));
- tr.
-
- execute_coarsening_and_refinement();
+ tr.begin_active()->set_refine_flag(RefinementCase<dim>(ref_case));
+ tr.execute_coarsening_and_refinement();
FEValues<dim, spacedim> fine(StaticMappingQ1<dim, spacedim>::mapping,
fe,
fine.reinit(coarse_cell->child(cell_number));
const std::vector<Point<spacedim>> &q_points_fine =
fine.get_quadrature_points();
- std::vector<Point<dim>> q_points_coarse(q_points_fine.
-
- size()
-
- );
- for (unsigned int q = 0; q < q_points_fine.
-
- size();
-
- ++q)
+ std::vector<Point<dim>> q_points_coarse(q_points_fine.size());
+ for (unsigned int q = 0; q < q_points_fine.size(); ++q)
for (unsigned int j = 0; j < dim; ++j)
q_points_coarse[q](j) = q_points_fine[q](j);
Quadrature<dim> q_coarse(q_points_coarse, fine.get_JxW_values());
{
for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
{
- if (fe.
-
- is_primitive()
-
- )
+ if (fe.is_primitive())
{
const double *coarse_i = &coarse.shape_value(i, 0);
const double *fine_j = &fine.shape_value(j, 0);
}
// Remove small entries from the matrix
- for (unsigned int i = 0; i < this_matrix.
-
- m();
-
- ++i)
- for (unsigned int j = 0; j < this_matrix.
-
- n();
-
- ++j)
+ for (unsigned int i = 0; i < this_matrix.m(); ++i)
+ for (unsigned int j = 0; j < this_matrix.n(); ++j)
if (std::fabs(this_matrix(i, j)) < 1e-12)
this_matrix(i, j) = 0.;
}
compute_one_case(ref_case, mass, matrices[ref_case - 1]);
});
- tasks.
-
- join_all();
+ tasks.join_all();
}