# Changing label of the mesh

**URL:** <https://community.freefem.org/t/changing-label-of-the-mesh/1555>\
**Category:** General Discussion\
**Created:** [February 24, 2022, 7:51am UTC](https://community.freefem.org/t/changing-label-of-the-mesh/1555 "2022-02-24T07:51:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zese](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/zese/32/917_2.png) [@zese](https://community.freefem.org/u/zese)\
**Post date:** [February 24, 2022, 7:51am UTC](https://community.freefem.org/t/changing-label-of-the-mesh/1555/1 "2022-02-24T07:51:50Z")

</div>

Dear all

I have a meh with defined lables. now I want to change part of the boundary’s labels. for example I have inlet as 1 and wall as 2, outside as 3. now I want to change the label of some part of wall and keep the the leftover with no change.  
I wrote

func int mylab(int ll)  
{

```
if (x>=0.02 & x<=0.04)
{
	if (y>=0.02 & y<=0.03)
	{
		return 7;
	}
}

if (x>=0.14 & x<=0.17)
{
	if (y>=0.01 & y<=0.04)
	{
		return 9;
	}
}

```

}  
th=change(th,flabel= mylab(label));  
but when I run it the new 7 and 9 are assigned but 2 an 1 and 3 are removed as the lables.  
why?

---

<div class="post-metadata">

**Author:** ![julienG](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/julieng/32/222_2.png) [@julienG](https://community.freefem.org/u/julienG)\
**Post date:** [February 24, 2022, 9:24am UTC](https://community.freefem.org/t/changing-label-of-the-mesh/1555/2 "2022-02-24T09:24:36Z")

</div>

Are you sure about using single `&`?

Single `&` is the bitwise “and” operator while the double `&&` is the logical “and” operator…

---

<div class="post-metadata">

**Author:** ![zese](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/zese/32/917_2.png) [@zese](https://community.freefem.org/u/zese)\
**Post date:** [February 24, 2022, 9:30am UTC](https://community.freefem.org/t/changing-label-of-the-mesh/1555/3 "2022-02-24T09:30:20Z")

</div>

Hi  
it doesn’t change anything because I tried double && and the problem still remains.

---

<div class="post-metadata">

**Author:** ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Post date:** [February 24, 2022, 9:49am UTC](https://community.freefem.org/t/changing-label-of-the-mesh/1555/4 "2022-02-24T09:49:25Z")

</div>

Maybe the function should return the original labels in the region where you do not want to change the label.

---

<div class="post-metadata">

**Author:** ![zese](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/zese/32/917_2.png) [@zese](https://community.freefem.org/u/zese)\
**Post date:** [February 24, 2022, 11:29am UTC](https://community.freefem.org/t/changing-label-of-the-mesh/1555/5 "2022-02-24T11:29:39Z")

</div>

Thanks,  
I think so. I will try that
