How to make a uniform triangulation on the square domain [-0.5,1.5]*[0,2]

Hi all

In 2D numerical examples, if setting the domain is [-0.5,1.5][0,2] not [0,1][0,1], how can we obtain a uniform triangulation on this domain? We know the code on [0,1]*[0,1]

import ngsolve.meshes as ngm
mesh = ngm.MakeStructured2DMesh(quads=False, nx=10, ny=10)

Best,
Di Yang

Hi Di Yang,

a similar question has been asked and answered in this post. You have to use a mapping to ‘deform’ the unit-square.

Best
Michael