how to convert MeshFunction to Function with MPI
Asked by
Doug Arnold
The following code shows how a MeshFunction can be converted to a DG0 function. This works on
one processor, but fails if invoked with MPI with the message "RuntimeError: non matching dimensions on input".
Is there a way around this? Thanks -- Doug
from dolfin import *
mesh = UnitSquare(2, 2)
subdomains = MeshFunction(
subdomains.
V = FunctionSpace(mesh, 'DG', 0)
k = Function(V)
k.vector()[:] = subdomains.array()
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Doug Arnold for more information if necessary.
To post a message you must log in.