How to instantiate a RectangleMesh

6 months ago by
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

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

I can not run the example found at
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 »