From: Jiaqi Zhang Date: Mon, 30 Nov 2020 16:55:40 +0000 (-0500) Subject: update intro and penalty X-Git-Tag: v9.3.0-rc1~687^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10932%2Fhead;p=dealii.git update intro and penalty --- diff --git a/examples/step-74/doc/intro.dox b/examples/step-74/doc/intro.dox index 90965c30cf..585a87421b 100644 --- a/examples/step-74/doc/intro.dox +++ b/examples/step-74/doc/intro.dox @@ -54,22 +54,19 @@ respectively. Note that when $f\subset \partial \Omega$, we define $\jump{v} = v $\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_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_F \right\}. diff --git a/examples/step-74/step-74.cc b/examples/step-74/step-74.cc index 9d42c971ae..ccdd6e5f6f 100644 --- a/examples/step-74/step-74.cc +++ b/examples/step-74/step-74.cc @@ -393,8 +393,7 @@ namespace Step74 std::vector g(n_q_points); exact_solution->value_list(q_points, g); - const double extent1 = cell->extent_in_direction( - GeometryInfo::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) @@ -462,10 +461,8 @@ namespace Step74 const std::vector & JxW = fe_iv.get_JxW_values(); const std::vector> &normals = fe_iv.get_normal_vectors(); - const double extent1 = - cell->extent_in_direction(GeometryInfo::unit_normal_direction[f]); - const double extent2 = ncell->extent_in_direction( - GeometryInfo::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) @@ -560,7 +557,7 @@ namespace Step74 DataOut data_out; data_out.attach_dof_handler(dof_handler); data_out.add_data_vector(solution, "u", DataOut::type_dof_data); - data_out.build_patches(); + data_out.build_patches(mapping); data_out.write_vtu(output); }