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

More
3 years 7 months ago #3663 by Younghigh
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]
Code:
import ngsolve.meshes as ngm mesh = ngm.MakeStructured2DMesh(quads=False, nx=10, ny=10)

Best,
Di Yang
More
3 years 7 months ago #3665 by mneunteufel
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
The following user(s) said Thank You: Younghigh
Time to create page: 0.107 seconds