# Getting Problem to get good convergence rate in Proximal Discontinuous Galerkin method of Elliptic obstacle problem

**URL:** https://community.freefem.org/t/getting-problem-to-get-good-convergence-rate-in-proximal-discontinuous-galerkin-method-of-elliptic-obstacle-problem/4264
**Category:** General Discussion
**Created:** [April 30, 2026, 11:24am UTC](https://community.freefem.org/t/getting-problem-to-get-good-convergence-rate-in-proximal-discontinuous-galerkin-method-of-elliptic-obstacle-problem/4264 "2026-04-30T11:24:21Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Monirul25](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/monirul25/32/3287_2.png) [@Monirul25](https://community.freefem.org/u/Monirul25)
#### Post date: [April 30, 2026, 11:24am UTC](https://community.freefem.org/t/getting-problem-to-get-good-convergence-rate-in-proximal-discontinuous-galerkin-method-of-elliptic-obstacle-problem/4264/1 "2026-04-30T11:24:21Z")

</div>

Respected Professors and experts,

I am trying to get a good convergence rate using the **Proximal Discontinuous Galerkin(PDG)** method for the **elliptic obstacle** problem.

Here is my main scheme:

 ![PDG_scheme](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/6/62c04ea58cfedc6504d42c95a8511b56345bac84.png)

**Data for numerical experiments:**

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/e/e6677dd3987c298e8d3220a02e4c2b3d81d1bab7.png)

![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/optimized/2X/7/780aa2ba29ccf05074e84efe9763cb8840ea0afc_2_690x44.png)

**Here, is my IPDG proximal galerkin code:**

[PDG\_elliptic.edp](https://community.freefem.org/uploads/short-url/sz2dT0AiwkBTf59FVUq8h7IqUsU.edp) (4.0 KB)

**Note:**  **The code runs correctly, but the results are not satisfactory. Additionally, how can the following space be defined in the code for the proximal EG method?.**

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/e/e0a6a735849f79cb71f98cdbe94ef1466d71ecaf.png)

( **How to write this Vh space in the FF++ code for Proximal EG method ?.** )

Here is the full paper of proximal discontinuous Galerkin method of elliptic obstacle problem:

[Proximal\_dg\_2026.pdf](https://community.freefem.org/uploads/short-url/mBMUlKDOtZaPQOqRjSs4GCECXzf.pdf) (503.2 KB)

I would be very grateful for any suggestions to obtain the expected **order of convergence, i.e., 2,** in the L^2-norm.

---

<div class="post-metadata">

### Author: ![fb77](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/fb77/32/3796_2.png) [@fb77](https://community.freefem.org/u/fb77)
#### Post date: [May 6, 2026, 3:32pm UTC](https://community.freefem.org/t/getting-problem-to-get-good-convergence-rate-in-proximal-discontinuous-galerkin-method-of-elliptic-obstacle-problem/4264/2 "2026-05-06T15:32:33Z")

</div>

Probably you need to define a new fe space for (26) (see the FF++ doc to define new fe spaces, but it is rather difficult).  
Independently of that, it seems that there is a bug regarding the example since the exact solution does not vanish on the boundary. I think that the domain should be the unit disc instead of the square, or otherwise with the square we have to set the BC u=u\_ex.

---

<div class="post-metadata">

### Author: ![fb77](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/fb77/32/3796_2.png) [@fb77](https://community.freefem.org/u/fb77)
#### Post date: [May 11, 2026, 2:05pm UTC](https://community.freefem.org/t/getting-problem-to-get-good-convergence-rate-in-proximal-discontinuous-galerkin-method-of-elliptic-obstacle-problem/4264/3 "2026-05-11T14:05:52Z")

</div>

Here is a version with correct Newton algorithm, for the unit disk and conforming FE (P1,P0).  
[pg\_disk.edp](https://community.freefem.org/uploads/short-url/qB4NYyp84WEWZYy1LpmSQcTErHC.edp) (3.6 KB)

To compare with, here is a code for the semi-exact method  
[obstacle-semiexact.edp](https://community.freefem.org/uploads/short-url/6m5fvVhD5aJvzRXh02hrjEKrJp1.edp) (4.4 KB)  
The method is described in

> **[A semi-exact primal-dual method for steady viscoplastic flows](https://smai-jcm.centre-mersenne.org/articles/10.5802/jcm.145/)**

(see appendix A for the general formulation, that is applicable to the obstacle problem with G=Id, and h the indicator function (in the sense of convex analysis) of the set of admissible unknowns u(x) satisfying u\geq\phi a.e.)

---

<div class="post-metadata">

### Author: ![Monirul25](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/monirul25/32/3287_2.png) [@Monirul25](https://community.freefem.org/u/Monirul25)
#### Post date: [May 11, 2026, 3:27pm UTC](https://community.freefem.org/t/getting-problem-to-get-good-convergence-rate-in-proximal-discontinuous-galerkin-method-of-elliptic-obstacle-problem/4264/4 "2026-05-11T15:27:12Z")

</div>

Sir, **why is the order initially coming out to be very low**?.

Results:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/7/77c16b7ecbf1d76e1a90be7ecfcb60c0fced4a4f.png)

Thank you so much, Sir, for your constant guidance and kind support. I truly appreciate your time, patience, and valuable suggestions. Your help means a lot to me.

---

<div class="post-metadata">

### Author: ![fb77](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/fb77/32/3796_2.png) [@fb77](https://community.freefem.org/u/fb77)
#### Post date: [May 11, 2026, 3:29pm UTC](https://community.freefem.org/t/getting-problem-to-get-good-convergence-rate-in-proximal-discontinuous-galerkin-method-of-elliptic-obstacle-problem/4264/5 "2026-05-11T15:29:57Z")

</div>

The theoretical order of accuracy is in the limit h\to0, thus we cannot say anything for ‘not so small’ h.

---

<div class="post-metadata">

### Author: ![Monirul25](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/monirul25/32/3287_2.png) [@Monirul25](https://community.freefem.org/u/Monirul25)
#### Post date: [May 11, 2026, 3:37pm UTC](https://community.freefem.org/t/getting-problem-to-get-good-convergence-rate-in-proximal-discontinuous-galerkin-method-of-elliptic-obstacle-problem/4264/6 "2026-05-11T15:37:28Z")

</div>

Okay Sir. The order is also increasing, as I observe, when N increases, where h=1/N.

---

<div class="post-metadata">

### Author: ![Monirul25](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/monirul25/32/3287_2.png) [@Monirul25](https://community.freefem.org/u/Monirul25)
#### Post date: [May 11, 2026, 4:31pm UTC](https://community.freefem.org/t/getting-problem-to-get-good-convergence-rate-in-proximal-discontinuous-galerkin-method-of-elliptic-obstacle-problem/4264/7 "2026-05-11T16:31:01Z")

</div>

Sir, I am wondering why applying the **Symmetric Interior Penalty** method to the continuous Galerkin code is giving optimized error estimates.

[PDG\_FF\_Sir.edp](https://community.freefem.org/uploads/short-url/gm9O4SHZiQx0clbwm6xmtiKeAJ5.edp) (3.8 KB)

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/f/f1e009d4e271215e3d95d2a8eaf40c2eef80d987.png)

---

<div class="post-metadata">

### Author: ![fb77](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/fb77/32/3796_2.png) [@fb77](https://community.freefem.org/u/fb77)
#### Post date: [May 11, 2026, 5:12pm UTC](https://community.freefem.org/t/getting-problem-to-get-good-convergence-rate-in-proximal-discontinuous-galerkin-method-of-elliptic-obstacle-problem/4264/8 "2026-05-11T17:12:59Z")

</div>

It means the scheme blows up, I don’t know why. You have to check the formulation (fespace, bilinear form, etc)

---

<div class="post-metadata">

### Author: ![Monirul25](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/monirul25/32/3287_2.png) [@Monirul25](https://community.freefem.org/u/Monirul25)
#### Post date: [May 11, 2026, 6:11pm UTC](https://community.freefem.org/t/getting-problem-to-get-good-convergence-rate-in-proximal-discontinuous-galerkin-method-of-elliptic-obstacle-problem/4264/9 "2026-05-11T18:11:16Z")

</div>

Okay Sir. I will check and let you know.

---

<div class="post-metadata">

### Author: ![fb77](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/fb77/32/3796_2.png) [@fb77](https://community.freefem.org/u/fb77)
#### Post date: [May 12, 2026, 8:46am UTC](https://community.freefem.org/t/getting-problem-to-get-good-convergence-rate-in-proximal-discontinuous-galerkin-method-of-elliptic-obstacle-problem/4264/10 "2026-05-12T08:46:27Z")

</div>

If you put a minus sign on the second term:

```auto
			+ intalledges(Th)(// loop on all edge of all triangle 
                       ( jump(v)*mean(dn(u))-jump(u)*mean(dn(v)) 
                      + pena*jump(u)*jump(v)) / nTonEdge
                        )

```

it converges (I am not an expert on DG methods and I am not able to explain this).

---

<div class="post-metadata">

### Author: ![Monirul25](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/monirul25/32/3287_2.png) [@Monirul25](https://community.freefem.org/u/Monirul25)
#### Post date: [May 12, 2026, 9:17am UTC](https://community.freefem.org/t/getting-problem-to-get-good-convergence-rate-in-proximal-discontinuous-galerkin-method-of-elliptic-obstacle-problem/4264/11 "2026-05-12T09:17:02Z")

</div>

Thank you so much, Sir. I have solved this issue. But I have seen that you considered alpha\_k=1/k, whereas in my case alpha\_k=2^(k-1). Although, the code is working fine when setting alpha\_k=2^(k-1).

---

<div class="post-metadata">

### Author: ![fb77](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/fb77/32/3796_2.png) [@fb77](https://community.freefem.org/u/fb77)
#### Post date: [May 12, 2026, 10:17am UTC](https://community.freefem.org/t/getting-problem-to-get-good-convergence-rate-in-proximal-discontinuous-galerkin-method-of-elliptic-obstacle-problem/4264/12 "2026-05-12T10:17:59Z")

</div>

I don’t know how to determine the “best choice” for \alpha\_k. The paper says “an unsummable sequence of positive proximity parameters \alpha\_k”. Probably the choice influences the number of iterations to achieve convergence.

---

<div class="post-metadata">

### Author: ![Monirul25](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/monirul25/32/3287_2.png) [@Monirul25](https://community.freefem.org/u/Monirul25)
#### Post date: [May 12, 2026, 1:30pm UTC](https://community.freefem.org/t/getting-problem-to-get-good-convergence-rate-in-proximal-discontinuous-galerkin-method-of-elliptic-obstacle-problem/4264/13 "2026-05-12T13:30:51Z")

</div>

Yes Sir. Thanks for your guidance.
