Hi there,
Below there is an example code which generates a unstructured mesh. How can I build up a structured mesh when using Polygon?
from dolfin import *
from mshr import *
from pylab import show,triplot
domain_vertices = [Point(0.0, 0.0125),
Point(0.0, -0.0125),
Point(1.0, -1.0),
Point(2.0, 0.0),
Point(1.0, 1.0)]
domain = Polygon(domain_vertices)
mesh = generate_mesh(domain,40)
coords = mesh.coordinates()
triplot(coords[:,0], coords[:,1], triangles=mesh.cells())
print mesh.num_cells()
show()
Thanks for any help,