Hello everyone,
I have the following problem: I have a rectangle domain, lets say
$$ [0,R]x[0,2*\pi] $$ resulting from some simulation in polar coordinates. I can use the standard RectangleMesh routine to get a first, regular mesh for this domain.
Additionally I have two internal boundaries, e.g. at $$r = r_1$$ and $$r = r_2.$$ These internal boundaries are always shaped like that (so very simple, just r = const), but in general the regular mesh doesn't coincide with these internal boundaries.
What is the best way to change the regular mesh, so that I will get a new mesh with some triangles stretched or moved and having the mesh aligned with the boundaries?
My current implementation is to look for the nearest vertices to the boundary and move them, so that they lie on the $$r = r_i$$ lines, but I think in special cases this can lead to a very unregular and bad mesh. The snap_boundary method didn't work. I think the reason is, that the boundaries are in the inside of the domain.
Thank you for your help :)