1
$\begingroup$

Suppose that $\Omega\subset\mathbb{R}^2$ and we define the triangulation $\mathcal{T}_h$ where, $$\mathcal{T}_h=\bigcup_{i=1}^nK_i$$, with $K_i$ are triangles.

We have the explicit a posteriori estimator for elliptic problems, $$\eta_K(u_h)=h_K\|f+\Delta u_h\|_{L_{2}(K)}+\frac{1}{2}h_K^{1/2}\|[n\cdot\nabla u_h]\|_{L_{2}(\partial K\backslash\partial\Omega)}$$ Here $[n\cdot\nabla u_h]$ denotes the jump in the normal derivative of $u_h$ on the interior edges of the element $K.$

$u_h$ is the finite element solution.

I want to numerically approximate $[n\cdot\nabla u_h],$ without using Matlab function pdejmps

$\endgroup$
  • $\begingroup$ Why? And how are you computing $u_h$? $\endgroup$ – Christian Clason Nov 15 '16 at 15:58
  • $\begingroup$ $u_h$ is linear. Suppose that I have the value of $u_h,$ how can I calculate $[n\cdot\nabla u_h]?$ $\endgroup$ – math_lover Nov 15 '16 at 16:04
  • 1
    $\begingroup$ I meant, why don't you want to use pdejmps? What kind of FE infrastructure (mesh, connectivity, assembly etc.) do you have in place? $\endgroup$ – Christian Clason Nov 15 '16 at 16:10
  • 1
    $\begingroup$ Why would you need to do this without using a particular MATLAB function, unless this were a homework, test, or job interview problem, in which case why didn't you tell us so? $\endgroup$ – Mark L. Stone Nov 16 '16 at 5:52
  • $\begingroup$ @MarkL.Stone Because I work in python and I want to know how is calculated! $\endgroup$ – math_lover Nov 16 '16 at 7:42
1
$\begingroup$

Since you mention that your elements are linear, the gradient of $u_h$ on each cell is constant. As a consequence, if you have an edge $e$ between cells $K$ and $K'$, with $\vec n$ being the normal to the edge pointing from $K$ to $K'$, then $$ [\vec n \cdot \nabla u_h] = \vec n \cdot \left(\nabla u_h|_{K'} - \nabla u_h|_K\right). $$ Furthermore, $$ \|[\vec n \cdot \nabla u_h]\|_e^2 = \left|\vec n \cdot \left(\nabla u_h|_{K'} - \nabla u_h|_K\right)\right|^2 h_e, $$ where $h_e$ is the length of edge $e$. Equivalent formulas are true for faces in 3d.

If you have higher order elements, then the situation is not as trivial. Rather, you need to typically compute the integral via quadrature, which requires evaluating the jump term at the quadrature points along the edge. To do this, you need to evaluate both $\nabla u_h|_K$ and $\nabla u_h|_{K'}$ at the quadrature points along the edge.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.