Changing label of the mesh

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?

Are you sure about using single &?

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

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

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

1 Like

Thanks,
I think so. I will try that