在阅读^{
我想知道是否可以输入边界顶点并指定最大单元/面大小来自动生成网格(just like this example in dolphin)?在
#The dolfin example which I need to mimic in PyMesh
from dolfin import *
# Create empty Mesh
mesh = Mesh()
# Create list of polygonal domain vertices
domain_vertices = [Point(0.0, 0.0),
Point(10.0, 0.0),
Point(10.0, 2.0),
Point(8.0, 2.0),
Point(7.5, 1.0),
Point(2.5, 1.0),
Point(2.0, 4.0),
Point(0.0, 4.0),
Point(0.0, 0.0)]
# Generate mesh and plot
PolygonalMeshGenerator.generate(mesh, domain_vertices, 0.25)
plot(mesh, interactive=True)
结果网格:
目前没有回答
相关问题 更多 >
编程相关推荐