# Discountinous Galerkin example

**URL:** https://community.freefem.org/t/discountinous-galerkin-example/2559
**Category:** General Discussion
**Created:** [June 26, 2023, 10:21pm UTC](https://community.freefem.org/t/discountinous-galerkin-example/2559 "2023-06-26T22:21:20Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![larismartins](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/larismartins/32/2712_2.png) [@larismartins](https://community.freefem.org/u/larismartins)
#### Post date: [June 26, 2023, 10:21pm UTC](https://community.freefem.org/t/discountinous-galerkin-example/2559/1 "2023-06-26T22:21:20Z")

</div>

Hi everyone,

I saw two different ways to compute integral on internal edges and I was wondering which one is the right one. I saw using

```auto
intalledges(Th)((1-nTonEdge)*p)

```

and

```auto
intalledges(Th)(p/nTonEdge);

```

---

<div class="post-metadata">

### Author: ![junjie](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@junjie](https://community.freefem.org/u/junjie)
#### Post date: [June 27, 2023, 8:56am UTC](https://community.freefem.org/t/discountinous-galerkin-example/2559/2 "2023-06-27T08:56:31Z")

</div>

I think this depends on your numerical algorithm.The general jump is defined as taking 0 on the boundary edge of the area. So I think the right way should be  
intalledges(Th)((1-nTonEdge)\*p/nTonEdge).

---

<div class="post-metadata">

### Author: ![junjie](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@junjie](https://community.freefem.org/u/junjie)
#### Post date: [June 27, 2023, 9:02am UTC](https://community.freefem.org/t/discountinous-galerkin-example/2559/3 "2023-06-27T09:02:04Z")

</div>

[LapDG2.edp](https://community.freefem.org/uploads/short-url/3LgGrdhU169750f7z6eKxsjvAZq.edp) (2.0 KB)

Maybe you can look at this example to see what I mean.

---

<div class="post-metadata">

### Author: ![larismartins](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/larismartins/32/2712_2.png) [@larismartins](https://community.freefem.org/u/larismartins)
#### Post date: [June 28, 2023, 10:18pm UTC](https://community.freefem.org/t/discountinous-galerkin-example/2559/4 "2023-06-28T22:18:50Z")

</div>

I want to compute the normal component of the mean of a vector on internal edges
