mesh.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:finite-element-course 作者: finite-element 项目源码 文件源码
def __init__(self, nx, ny):
        """
        :param nx: The number of cells in the x direction.
        :param ny: The number of cells in the y direction.
        """
        points = list((x, y)
                      for x in np.linspace(0, 1, nx + 1)
                      for y in np.linspace(0, 1, ny + 1))

        mesh = Delaunay(points)

        super(UnitSquareMesh, self).__init__(mesh.points,
                                             mesh.simplices)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号