# Regarding Error Indicator in FF++

**URL:** https://community.freefem.org/t/regarding-error-indicator-in-ff/3661
**Category:** General Discussion
**Created:** [December 27, 2024, 11:59am UTC](https://community.freefem.org/t/regarding-error-indicator-in-ff/3661 "2024-12-27T11:59:46Z")
**Posts on this page:** 8
**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: [December 27, 2024, 11:59am UTC](https://community.freefem.org/t/regarding-error-indicator-in-ff/3661/1 "2024-12-27T11:59:46Z")

</div>

Hello, all expert  
I am trying to write the following error indicator in FF++.

 ![ErrINd](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/9/9696024c8aa94f911427cb81793a48e323a0cdee.png)

**Its FF++ code( according to me):**

> Blockquote  
> sqrt(int1d(Th)(hTriangle\*((dx(phi))^2+(dy(phi))^2))+intalledges(Th)((lenEdge\*((jump(dx(phi)))^2+(jump(dy(phi)))^2))/nTonEdge\*(nTonEdge-1)))  
> Blockquote  
> Is It Correct ???.

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

How, to write this ( **the normalized error indicator** ) then in FF++. Please help. Thanks in advance.

---

<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: [December 27, 2024, 4:55pm UTC](https://community.freefem.org/t/regarding-error-indicator-in-ff/3661/2 "2024-12-27T16:55:05Z")

</div>

There is an example of such a computation in the documentation

> **[FreeFEM-documentation.pdf](https://doc.freefem.org/pdf/FreeFEM-documentation.pdf)**
>
> 33.85 MB

page 230

---

<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: [December 27, 2024, 7:16pm UTC](https://community.freefem.org/t/regarding-error-indicator-in-ff/3661/3 "2024-12-27T19:16:13Z")

</div>

Yes Sir. Thank you. But i am getting problem to write the normalized error indicator.

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

This is sir.

---

<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: [December 28, 2024, 11:31am UTC](https://community.freefem.org/t/regarding-error-indicator-in-ff/3661/4 "2024-12-28T11:31:02Z")

</div>

I am facing problem to write the denominator sir.

---

<div class="post-metadata">

### Author: ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)
#### Post date: [December 28, 2024, 2:32pm UTC](https://community.freefem.org/t/regarding-error-indicator-in-ff/3661/5 "2024-12-28T14:32:35Z")

</div>

just do that in 2 times: one for the numerator `etaK` ; divide by a constant `real cnst = 1` ;  
and after compute the constant `cnst = max(etaK[]); ` and the get the correct result if `etaK` is a P0 finite element.

---

<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: [December 28, 2024, 3:01pm UTC](https://community.freefem.org/t/regarding-error-indicator-in-ff/3661/6 "2024-12-28T15:01:38Z")

</div>

Thanks sir for your replies. Can you please give me exact FF++ code of it??. I am facing problem to write it.

---

<div class="post-metadata">

### Author: ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)
#### Post date: [December 28, 2024, 5:39pm UTC](https://community.freefem.org/t/regarding-error-indicator-in-ff/3661/7 "2024-12-28T17:39:56Z")

</div>

my code not valided , but running:

[monirul25.edp](https://community.freefem.org/uploads/short-url/b5zlom9drjw5ptsF1cSG0AqW5Q9.edp) (962 Bytes)

---

<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: [December 28, 2024, 6:12pm UTC](https://community.freefem.org/t/regarding-error-indicator-in-ff/3661/8 "2024-12-28T18:12:23Z")

</div>

Thank you so much sir.
