ordering of mesh.coordinates() vs. function coefficients
Asked by
Christian Clason
Hello,
something seems to have changed in the trunk version of the Python wrapper for dolfin regarding the ordering of the vector returned by mesh.coordinates() or (more likely) that of the vector returned by u.vector()[:] so that these do not agree anymore.
For example, the following code used to work (in trunk, early summer) for defining the function u = x_1, but not in current trunk:
from dolfin import *
mesh = UnitSquare(4,4)
V = FunctionSpace(
u = Function(V)
x = mesh.coordinates()
u.vector()[:] = x[:,0]
plot(u)
interactive()
Has the interface changed? If so, what can I do to define a CG1 function based on the coordinates of the mesh?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Christian Clason
- Solved:
- Last query:
- Last reply:
To post a message you must log in.