Dear all
I have a problem about dumping solution to a vtk file. I would appreciate if you can help me out.
In the following code, I want to dump the solution for S to a vtk file. u and d are the solutions of different equations on Vector function Spaces at time steps (t). At the end I want to calculate the function S and dump the solution (scalar field) to a vtk file.
V_u = VectorFunctionSpace(mesh, "Lagrange", 1)
V_d = VectorFunctionSpace(mesh, "Lagrange", 1)
u = Function (V_u)
d = Function (V_d)
def e(u)
return sym(grad(u))
def S(u,d)
return e(u)[0,0]*(1 + d[0,1])
.....
file_S = File("s.pvd")
file _S<< S, t