Interpolate a grad of a function
Hi,
I'm trying (as an example) to interpolate the values of a gradient of a given vector onto an estimated space but I get the following error :
TypeError: in method 'Function_
To clarify the question, I put here what's in my code :
mesh = Box(-200, -20, -20, 200, 20, 20, 10, 1, 1)
V = FunctionSpace(mesh, "Lagrange", 2)
Ve = VectorFunctionS
uFunc = Expression(
u = interpolate(
w = interpolate(
In fact, the reason for programming this test is to compute a divergence of a tensor, and check if the value of the divergence tends to zero.. I thought the interpoplate command should help me for this purpose but I have the sme problem even for the simplest case of grad(u) where u is a given function.
Could you please say me what I've written wrong, or give me other solutions I could explore.
Thanks in advance,
Nicolas Verdon
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Martin Sandve Alnæs
- Solved:
- Last query:
- Last reply: