How to refine given L-shape mesh by factor of 1/2, 1/4 and 1/8

I want to refine the this L-shape mesh “h” as 1/2, 1/4, and 1/8. I found the mesh here

I want the refinement to make an error analysis. Nevertheless, when I checked the command “refine,” it did not show how to refine the mesh using in this particular sense. i.e., change the number of intervals in each dimension by 2x, 4x, 8x.

For traditional meshes, it is straightforward, and it is shown how to do it in the

Simply by changing 32 by 32*2 = 64.

I also tried to construct the mesh from scratch following the dolphin tutorial for different subdomains, but there is not an option for my desired refinement.

Repeatedly applying the refine function will give you the desired sequence of h values. The resulting square pairs of right triangles are no longer all split in the "left" sense of the original mesh, but this may or may not be significant for your purposes. If you really want to preserve the "left" splitting at every level of refinement, you’d likely need to write a custom script to generate the mesh yourself for a given number of elements in each direction. (Alternatively, you could use a UnitSquareMesh, define an L-shaped subdomain, and apply DirichletBCs to the upper-right quadrant, but this is a bit of a hack.)

1 Like