What to import for CellFunction?


52
views
1
23 days ago by
Hi,

Just started using Fenics today from the python interface, and following the tutorial.
I'm trying to define a CellFunction, but it's not defined in fenics, and can't find where else it would be.

import fenics
mesh = fenics.BoxMesh(Point(0, 0, 0), Point(1, 1, 1), 5, 5, 5)
material = fenics.CellFunction('size_t', mesh)

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'fenics' has no attribute 'CellFunction'

What should I do here ?

Thanks
Community: FEniCS Project

1 Answer


1
23 days ago by
Leo  
Try:

from dolfin import *
mesh = BoxMesh(Point(0, 0, 0), Point(1, 1, 1), 5, 5, 5)
material = CellFunction('size_t', mesh)​
Please login to add an answer/comment or follow this question.

Similar posts:
Search »