Output a function of the solution vtk #3847
Answered
by
connorjward
cjham
asked this question in
Firedrake support
-
Hello, Sorry this is probably a very basic question but I haven't been able to get it to work. I'd like to output the solution, u, to vtk which I can do but I'd also like to output the derivative in the x direction of the solution. I am not sure how to make this happen. I have done various things with Dx(u,0) but none have worked! |
Beta Was this translation helpful? Give feedback.
Answered by
connorjward
Nov 1, 2024
Replies: 1 comment 1 reply
-
I think your issue is likely that deriv = Function(V).interpolate(Dx(u, 0))
# now plot deriv |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
cjham
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think your issue is likely that
Dx(u, 0)
is a symbolic expression whereas for visualisation you want aFunction
. I think you can get what you want by doing