Consider the following two point BVP: $$ -u''(x)=f(x),~~~u(0)=u(1)=0. $$ An interior penalty DG method for this BVP that weakly imposes homogeneous Dirichlet boundary conditions is of the form: $$ \sum_{i=0}^{N-1} \int_{I_i} u'(x) v'(x)\,dx + \frac{1}{h} \sum_{i=0}^{N } [\![u]\!]|_{x_i} [\![ v]\!]|_{x_i} - \epsilon (\!( v')\!)|_{x_i} [\![ u ]\!]|_{x_i} - (\!( u')\!)|_{x_i} [\![ v ]\!]|_{x_i} = \int_{0}^{1} f(x)v(x)\,dx, $$ where $[\![ \cdot ]\!]$ is the jump operator, and $(\!( \cdot )\!)$ is the average operator (see for more detail: https://scicomp.stackexchange.com/questions/19394/help-implementing-1d-ode-discontinuous-galerkin-method).

Question: How can I modify the above interior penalty DG method so that it can handle Neumann boundary conditions? For Poisson's equation in 2D and 3D, I've seen Neumann boundary conditions handled through integrals on the boundary of the elements...not sure if there is analogy of this for ODEs...


1 Answer 1


It works exactly the same as in higher dimensions, except that the integral is replaced by evaluation at the boundary points of the interval. You have $$ \int_{(0,1)} -u'' v \,dx = \int_{(0,1)} u' v' \,dx - (u'(1) v(1) - u'(0) v(0)), $$ so if you have known values $g_0$ or $g_1$ for $u'(0)$ or $u'(1)$, you simply insert them into this equation and get new terms which should go on the right-hand side, $g_1 v(1)$ or $-g_0 v(0)$.

This approach works just the same in your DG formulation.

  • $\begingroup$ Ahh, I see. However, if I have homogeneous Neumann boundary conditions, it seems natural to do nothing to the above DG formulation (since $g_1=g_0=0$). However, this means we have done nothing to alter the above DG formulation, which still imposes Dirichlet boundary conditions. $\endgroup$
    – user107904
    Commented May 1, 2015 at 15:16
  • $\begingroup$ @user107904, The DG formulation in this case is different from the case when a Dirichlet condition is imposed because it lacks the term in which the jump in $u$ appears. $\endgroup$
    – DanielRch
    Commented May 2, 2015 at 12:43
  • $\begingroup$ @DanielRch I guess that is my main confusion; if I have a Neumann boundary condition, I'm not sure how the scheme should look. If I remove the jump in $u$, we end up with $\sum_{i=0}^{N-1} \int_{I_i} u'(x) v'(x)\,dx + \frac{1}{h} \sum_{i=0}^{N } [\![u]\!]|_{x_i} [\![ v]\!]|_{x_i} - (\!( u')\!)|_{x_i} [\![ v ]\!]|_{x_i} = \int_{0}^{1} f(x)v(x)\,dx$. But is this still an interior penalty method? $\endgroup$
    – user107904
    Commented May 2, 2015 at 19:25
  • $\begingroup$ @user107904 You shold also remove the second term, there's a jump in $u$ there as well, which you cannot specify. I agree that this is just like a regular imposition of Neumann conditions - they are not imposed weakly like Dirichlet condition. But isn't the regular method of imposing Neumann conditions "weak" in a sense? $\endgroup$
    – DanielRch
    Commented May 3, 2015 at 16:52
  • $\begingroup$ @DanielRch You are correct, this makes sense now that I think about it. I was under the impression that the jump penalty term $\sum_{i=0}^{N } [\![u]\!]|_{x_i} [\![ v]\!]|_{x_i}$ acted as some sort of stabilization. The scheme I have now is $\sum_{i=0}^{N-1} \int_{I_i} u'(x) v'(x)\,dx - (\!( u')\!)|_{x_i} [\![ v ]\!]|_{x_i} = \int_{0}^{1} f(x)v(x)\,dx$; should I do anything to stabilize this scheme? $\endgroup$
    – user107904
    Commented May 3, 2015 at 20:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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