$\average{v}=v$.
The discretization using the SIPG is given by the following weak formula
(more details can be found in @cite di2011mathematical and the references therein)
-@f{multline*}
- \sum_{K\in {\mathbb T}_h} (\nabla v_h, \nu \nabla u_h)_K
- \\
- - \sum_{F \in F_h^i} \left\{
+@f{align*}
+&\sum_{K\in {\mathbb T}_h} (\nabla v_h, \nu \nabla u_h)_K\\
+&-\sum_{F \in F_h^i} \left\{
\left< \jump{v_h}, \nu\average{ \nabla u_h} \cdot \mathbf n \right>_F
+\left<\average{ \nabla v_h }\cdot \mathbf n,\nu\jump{u_h}\right>_F
-\left<\jump{v_h},\nu \sigma \jump{u_h} \right>_F
- \right\}
- \\
- - \sum_{F \in F_h^b} \left\{
+ \right\}\\
+&-\sum_{F \in F_h^b} \left\{
\left<v_h, \nu \nabla u_h\cdot \mathbf n \right>_F
+ \left< \nabla v_h \cdot \mathbf n , \nu u_h\right>_F
- \left< v_h,\nu \sigma u_h\right>_F
- \right\}
- \\
- = (v_h, f)_\Omega
+ \right\}\\
+&=(v_h, f)_\Omega
- \sum_{F \in F_h^b} \left\{
\left< \nabla v_h \cdot \mathbf n, \nu g_D\right>_F - \left<v_h,\nu \sigma g_D\right>_F
\right\}.
std::vector<double> g(n_q_points);
exact_solution->value_list(q_points, g);
- const double extent1 = cell->extent_in_direction(
- GeometryInfo<dim>::unit_normal_direction[face_no]);
+ const double extent1 = cell->measure() / cell->face(face_no)->measure();
const double penalty = compute_penalty(degree, extent1, extent1);
for (unsigned int point = 0; point < n_q_points; ++point)
const std::vector<double> & JxW = fe_iv.get_JxW_values();
const std::vector<Tensor<1, dim>> &normals = fe_iv.get_normal_vectors();
- const double extent1 =
- cell->extent_in_direction(GeometryInfo<dim>::unit_normal_direction[f]);
- const double extent2 = ncell->extent_in_direction(
- GeometryInfo<dim>::unit_normal_direction[nf]);
+ const double extent1 = cell->measure() / cell->face(f)->measure();
+ const double extent2 = ncell->measure() / ncell->face(nf)->measure();
const double penalty = compute_penalty(degree, extent1, extent2);
for (unsigned int point = 0; point < n_q_points; ++point)
DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "u", DataOut<dim>::type_dof_data);
- data_out.build_patches();
+ data_out.build_patches(mapping);
data_out.write_vtu(output);
}