Question #91944 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/91944
dbeacham posted a new comment:
I assume the above discussion regarding dolfin assembly over meshes embedded in
higher degree space (ie 1d mesh in R^2),
is why the below code only prints the x[0] correctly, with x[1] incorrectly
taking the value 0,0.5 or 1?
from dolfin import *
class MyExp(Expression):
def eval(self, values, x):
print x # <-----------------prints x[0], x[1]: but x[1] is not true
value
values[0] = 0
mesh = UnitSquare(10,10)
bmesh = Mesh(BoundaryMesh(mesh))
for i,j in [(i,j) for i in range(2) for j in range(2)]:
bmesh.init(i,j)
V = VectorFunctionSpace(bmesh, "CG", 2)
exp = MyExp()
f = Function(V)
f.interpolate(exp)
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.
_______________________________________________
Mailing list: https://launchpad.net/~dolfin
Post to : [email protected]
Unsubscribe : https://launchpad.net/~dolfin
More help : https://help.launchpad.net/ListHelp