41 |
x20=Line(x2, x0) |
x20=Line(x2, x0) |
42 |
cutout=CurveLoop(x01, x12, x20) |
cutout=CurveLoop(x01, x12, x20) |
43 |
|
|
44 |
|
# Create the surface with cutout |
45 |
s=PlaneSurface(c, holes=[cutout]) |
s=PlaneSurface(c, holes=[cutout]) |
46 |
|
|
47 |
|
# Create a Design which can make the mesh |
48 |
d=Design(dim=2, element_size=0.05) |
d=Design(dim=2, element_size=0.05) |
49 |
|
|
50 |
|
# Add the trapezoid with cutout |
51 |
d.addItems(s) |
d.addItems(s) |
52 |
|
|
53 |
|
# Create the geometry, mesh and Escript domain |
54 |
d.setScriptFileName("trapezoid.geo") |
d.setScriptFileName("trapezoid.geo") |
55 |
d.setMeshFileName("trapezoid.msh") |
d.setMeshFileName("trapezoid.msh") |
56 |
dom=MakeDomain(d, integrationOrder=-1, reducedIntegrationOrder=-1, optimizeLabeling=True) |
domain=MakeDomain(d, integrationOrder=-1, reducedIntegrationOrder=-1, optimizeLabeling=True) |
57 |
dom.write("trapezoid.fly") |
|
58 |
|
# Create a file that can be read back in to python with mesh=ReadMesh(fileName) |
59 |
|
domain.write("trapezoid.fly") |
60 |
|
|