# Re: [deal.II] discontinous contour over elements

```An easy way to carry the projection that Wolfgang suggested is to use an L2
projection.
The L2 projection matrix is only a mass matrix and your right hand side is
constructed by the integral of multiplication of the variable you want to
project with the test function. Generally, this matrix is very very easy to
invert. This will yield you the C0 representation of your discontinuous
field (vorticity) such that the error between your C0 projection and your
original field is minimized at the position of the gauss points.```
```
This is a procedure we use to set the initial conditions in Lethe when the
initial condition is a complex function (for instance a Taylor-Green
vortex).

On Wednesday, 15 January 2020 11:22:52 UTC-5, David Eaton wrote:
>
> I understand the C0 element is piecewise linear across elements. However,
> I did not experience the same issue in my own C++ code while I use C0
> element with the Petrov Galerkin stabilization terms. Actually, I am very
> confused at this point. How could I get rid of it while using C0 element?
>
> Thanks
> D.
>
> ------------------------------
> <javascript:>> on behalf of Wolfgang Bangerth <bang...@colostate.edu
> <javascript:>>
> *Sent:* Thursday, January 16, 2020, 12:05 AM
> *Subject:* Re: [deal.II] discontinous contour over elements
>
> On 1/14/20 10:04 PM, David Eaton wrote:
> >
> > Thank you for your suggestions. I am going to take a look at Lethe and
> compare
> > with my implementation. In stabilized formulation, I used quadrilateral
> > element, instead of P2 P1 Taylor-Hood element. The used element is only
> C0
> > element. I also did not expect such a discontinuity between elements.
> Although
> > I use P2 P1 Taylor-Hood element without stabilization terms, the
> discontinuity
> > is still there. Probably I made mistakes somewhere  in setup. I also
> suspect
> > that my solution is not converged. After taking a small relative
> tolerance
> > 1e-8, the discontinuity still appears.
>
> David, you did not understand what we were saying: If you use C0 elements
> (think, piecewise linear) and you take derivatives to compute the
> vorticity,
> then you automatically get a discontinuous function. That has nothing to
> do
> with stabilization, solver tolerances, etc. It's just a consequence of the
> fact that C0 elements and their shape functions have kinks and
> consequently
> their derivatives are discontinuous.
>
> Best
>   W.
>
> --
> ------------------------------------------------------------------------
> Wolfgang Bangerth          email:                 bang...@colostate.edu
> <javascript:>
>                             www: http://www.math.colostate.edu/~bangerth/
>
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see
> ---
> You received this message because you are subscribed to the Google Groups
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> To view this discussion on the web visit
> .
>
>

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see