This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Discontinuous first derivative and discontinuous Galerkin

+2 votes

For the solution $\psi$ of my PDE, I would like

  1. $\psi$ to be continuous
  2. $\frac1{m}\frac{\partial \psi}{\partial x}$ to be continuous, where m is a piecewise constant material parameter
    (I can provide more information if needed)

Now I wonder if this is possible in FEniCS, and if so how? As I understand, a continuous first derivative would require Hermite basis functions (which are not supported, and even then would not allow for condition 2 on the interface where m changes value). So is there another option? If both are not possible I prefer condition 2 as a strong requirement above condition 1.

And if the solution would involve discontinuous Galerkin methods, is there a recommended hands-on introduction to these somewhere?

(related question: http://fenicsproject.org/qa/3299/discontinuous-derivatives?show=3299#q3299 )

asked Nov 20, 2015 by maartent FEniCS User (3,910 points)

1 Answer

0 votes

If you have first or second order PDE and you use the Galerkin method, you only need elements with C0 continuity to reach what you want (1. and 2.). (For example have a look at the Poisson demo.)

If you have a higher order PDE, you cannot you FEniCS with the standard Galerkin method.
E.g. in case of a fourth order PDE (like the biharmonic equation) you would need C1 continuity if you used the standard Galerkin method (Hermite basis functions are suitable to that). However with a Discontinuous Galerkin method you are able to satisfy 1. and 2. with only C0 continuous elements or discontinuous elements.

answered Nov 22, 2015 by str FEniCS User (1,600 points)

Could you elaborate a little on the first paragraph? To my understanding, C0 (eg. Lagrange polynomials of any order) will by definition fulfill condition 1, but at the element boundaries the first derivative will always be discontinuous, no?

I forgot to mention the fact, that the 2nd condition is only satisfied weakly since you seek your solution in a Sobolev space. So the derivatives on the boundaries will be weakly continuous. Do you really need strong continuity?

My main concern is a conserved flux, which is guaranteed if condition 2 is fulfilled in this case. But since there is no strong way to demand this, my guess is that I will have to use discontinuous Galerkin methods?
I am new to DG methods however, so any pointing to good tutorials will be helpful.

Galerkin methods are based on Sobolev spaces, so from that point of view using the Discontinuous Galerkin method makes no difference. If you have a first order problem, with the Galerkin you can guarantee your (1) condition strongly and (2) weakly; with discontinuous elments you satisfy both of them weakly.

I think it might be worth to consider whether it is enough to fulfill (2) weakly to have a conserved flux.

Taking the mesh fine enough, CG does a good enough job in conserving the flux indeed. But from what I read about DG so far, its strength is that, although in a weak way, it does a better job at conserving fluxes at a same computational cost (i.e. it is more useful to use a DG method than to use a finer mesh). Please correct me if I am wrong here.

Your last comment modified my understanding of your original question:
So you have a CG implementation of you first order problem and worried about condition (2) therefore you want to move forward to DG hoping that it would be more efficient. If your CG implementation works I wouldn't worry about the weak derivatives (meaning that there is no need to use Hermite polynomials). I don't have an information about the computational cost but it might worth to compare the Poisson and the DG Poisson demo.

To get the idea of the DG method I would recommend reading the first chapter of the book of Riviere (especially from page 3 to 6). Then it worth reading the documentation of the biharmonic demo and then checking the undocumented DG Poisson demo.

Thanks. I'll have a look.

...