How to instantiate a RectangleMesh


265
views
0
6 months ago by
Nate  
I'm trying to instantiate a Mesh using RectangleMesh.create. Does anyone have any clues on the correct way to call

RectangleMesh.create(mpi_comm_world(), (Point(0, 0), Point(1, 1)), (8, 8), CellType.Type_quadrilateral)
​
Community: FEniCS Project

1 Answer


3
6 months ago by
mesh = RectangleMesh.create(MPI.comm_world, [Point(0,0), Point(1,1)], [8,8], CellType.Type.quadrilateral)

Seems to need lists, not tuples.
Thanks very much            !
written 6 months ago by Nate  
Hi Nate,

Do you have a working example using RectangleMesh.create()?

I have the 2017.2.0 version and already run the example at http://fenics.readthedocs.io/projects/dolfin/en/2017.2.0/_downloads/demo_neumann-poisson.py

I can not run the example found at https://fenicsproject.org/olddocs/dolfin/dev/python/_downloads/demo_neumann-poisson.py
it seems that it is a development version

The only difference between these two version is the line 130, for 2017.2.0 version is:
mesh = UnitSquareMesh.create(64, 64, CellType.Type_quadrilateral)​


And for dev version is


mesh = UnitSquareMesh.create(64, 64, CellType.Type.quadrilateral)​


Thank you very much

written 6 months ago by Ruben Gonzalez  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »