--- /dev/null
+Fixed: FEInterfaceValues now works also for codim one and two. Instantiated
+also DoFTools::make_flux_sparsity_pattern() for codim one and two.
+<br>
+(Luca Heltai, 2020/06/24)
#if deal_II_dimension < 3
+ template void DoFTools::make_flux_sparsity_pattern<
+ DoFHandler<deal_II_dimension, deal_II_dimension + 1>,
+ SP>(const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof,
+ SP & sparsity);
+
+ template void DoFTools::make_flux_sparsity_pattern<
+ DoFHandler<deal_II_dimension, deal_II_dimension + 1>,
+ SP>(const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof,
+ SP & sparsity,
+ const Table<2, Coupling> &,
+ const Table<2, Coupling> &,
+ const types::subdomain_id);
+
template void DoFTools::make_sparsity_pattern<
DoFHandler<deal_II_dimension, deal_II_dimension + 1>,
SP>(const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &dof_row,
const std::vector<types::global_dof_index> &,
SP &);
+ template void DoFTools::make_flux_sparsity_pattern<DoFHandler<1, 3>, SP>(
+ const DoFHandler<1, 3> &dof, SP &sparsity);
+
+ template void DoFTools::make_flux_sparsity_pattern<DoFHandler<1, 3>, SP>(
+ const DoFHandler<1, 3> &dof,
+ SP & sparsity,
+ const Table<2, Coupling> &,
+ const Table<2, Coupling> &,
+ const types::subdomain_id);
#endif
}
constraints.close();
GridGenerator::hyper_cube(tria);
- tria.refine_global(5);
+ tria.refine_global(3);
tria.execute_coarsening_and_refinement();
dh.distribute_dofs(fe);
const auto &p = s.get_quadrature_points();
const auto &n = s.get_normal_vectors();
+ const double gh = gamma / cell->diameter();
+
for (unsigned int q = 0; q < p.size(); ++q)
for (unsigned int i = 0; i < fev.dofs_per_cell; ++i)
{
c.cell_matrix(i, j) +=
(-fev.shape_grad(i, q) * n[q] * fev.shape_value(j, q) +
-fev.shape_grad(j, q) * n[q] * fev.shape_value(i, q) +
- gamma / cell->face(f)->diameter() * fev.shape_value(i, q) *
- fev.shape_value(j, q)) *
+ gh * fev.shape_value(i, q) * fev.shape_value(j, q)) *
JxW[q];
}
c.cell_rhs(i) +=
- ((gamma / cell->face(f)->diameter() * fev.shape_value(i, q) -
- fev.shape_grad(i, q) * n[q]) *
+ ((gh * fev.shape_value(i, q) - fev.shape_grad(i, q) * n[q]) *
boundary_function.value(p[q])) *
JxW[q];
}
const auto n_dofs = fev.n_current_interface_dofs();
face_matrix.reinit(n_dofs, n_dofs);
- const double gh = gamma / cell->face(f)->diameter();
+ const double gh = gamma / cell->diameter();
for (unsigned int q = 0; q < p.size(); ++q)
for (unsigned int i = 0; i < n_dofs; ++i)
main()
{
initlog();
+ test<1, 1>();
+ test<1, 2>();
+ test<1, 3>();
test<2, 2>();
+ test<2, 3>();
+ test<3, 3>();
}
-DEAL::Linfty norm of solution 0.0736360
+DEAL::Linfty norm of solution 0.124375
+DEAL::Linfty norm of solution 0.124375
+DEAL::Linfty norm of solution 0.124375
+DEAL::Linfty norm of solution 0.0740767
+DEAL::Linfty norm of solution 0.0740767
+DEAL::Linfty norm of solution 0.0571119