question.edp (4.9 KB)
Hello FreeFem++ community,
I’m working on a problem that involves a complex 2D geometry, and I need to define and extract specific regions (subdomains) from the generated mesh for further processing.
I have defined several borders, including an outer circle, two inner circles, two tangent lines connecting the inner circles, and two rectangles inside the inner circles. My current code builds the mesh using these borders.
While the buildmesh
command generates a mesh, I’m unsure how to explicitly define and assign unique region
numbers to the 2D areas enclosed by these borders, or combinations of them. For example, I would like to define the following distinct regions:
- The area outside
innerCircle1
andinnerCircle2
but insideouterCircle
, and potentially bounded by the tangent lines. - The area inside
innerCircle1
but outsiderect1
. - The area inside
rect1
. - The area inside
innerCircle2
but outsiderect2
. - The area inside
rect2
. - The area between the two tangent lines, outside both inner circles (if distinct from region 1).
What is the best approach in FreeFem++ to achieve this? Should I modify the buildmesh
command, use specific region
keywords, or are there other techniques that would be more suitable for defining these complex subdomains?
Any guidance or examples on how to properly define and access these regions would be greatly appreciated!
Thank you in advance for your help.