Different labels to a uniform mesh in domain with a hole & scattered field

Hi,

I created a uniform mesh for a square with a hole using the “square” and “trunc” commands in FF++. Thus, the domain has two boundaries, outer and inner.
I would like to ask please, how to ask FF++ to assign a different label to each boundary?

I need these different labels for each boundary since I have to impose on the outer boundary absorbing boundary conditions whereas for the inner boundary I have to impose Dirichlet boundary conditions.
My objective is to create a scattered field for the 2D wave equation on this domain with a hole.
I created a code in FF++ for the scattered field but unfortunately, I don’t get the correct scattered field which should result in waves that are only going out from the inner boundary and not from the outer boundary.

Can someone check my code to see where is the error? I think that I didn’t define the labels correctly and thus the scattered field is obtained wrong.

Mordechai.

u scattered with hole.edp (2.1 KB)

Hi, @mordechaiy
Have you solved the problem? maybe you can try like this. u scattered with hole.edp (2.3 KB)

Hi RYP,
First, Thank you very much!
yes, I have solved the problem.

I have done the following codeu scattered with hole.edp (2.9 KB)

can you please tell me in your code in line 30 why did you define L in this manner?

I understand that L is an array of integers that includes eight edges since my domain has eight edges, but could you please tell me why it is ordered in the following order?
int [int]L=[1,1,2,1,3,1,4,1]?