I how can I generate the following mesh in Fenics. My domain is [-1,1]*[-1,1]. I tried the following
mesh = Rectangle(-1,-1,1,1)
but this doesn't work. Any help is appreciated. Thanks.
It is done with Points now:
from dolfin import*
mesh_density = 10
p1 = Point(0,0)
p2 = Point(1,1)
mesh = RectangleMesh(p1,p2,mesh_density,mesh_density)
Assuming you use Fenics 1.6
You have to look for the command RectangleMesh
:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.