Filling up a MeshFunction with a numpy array
Hello,
I have read about the pending implementation of reading MeshFunction XML files for parallel computations. As a workaround for this, I have tried the following:
mesh = Mesh( "mesh.xml" )
domains = MeshFunction(
indices = domains.array()
"""
.
pickle indices in serial code, unpickle in parallel code
.
"""
par_domains = MeshFunctuion(
par_domains.
but the call to set_values returns:
TypeError: in method 'MeshFunctionUI
I have the latest fenics version of the Ubuntu repositories. I have read elsewhere in the net and the call to set_values is supposed to work with a numpy array of the proper datatype (as is mine). Do I have any other choice??
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Johan Hake
- Solved:
- Last query:
- Last reply: