简体   繁体   English

Fenics python中的网格生成

[英]Mesh generation in Fenics python

I how can I generate the following mesh in Fenics.我如何在 Fenics 中生成以下网格。 My domain is [-1,1]*[-1,1].我的域名是 [-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:现在用 Points 完成:

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假设您使用 Fenics 1.6

You have to look for the command RectangleMesh :你必须寻找命令RectangleMesh

enter link description here 在此处输入链接描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM