Examine complex-valued function at a point x

Asked by Loll Wies on 2013-10-18

I solve a complex-valued problem with FeNiCs. This works quite well. Now I want to examine a function which consists of the real-valued parts of the solutions of the problem (phi_r and u_r).

The problem is: I would like to examine this new function at one point x. My problem is: I can calculate the function for the whole domain and I can even plot it, but I can't filter out the value of it at one point.

phi_r , phi_i = split(phi)
u_r, u_i = split(u)

d=Function(V)
d=inner(grad(phi_r),grad(u_r))

plot(d, title='d')

print d(0.0,0.0)

The last line does not work. I have found out, that even this one does not work:

print phi_r(0.0,0.0)

But when I write it the following way, it works:

print phi(0.0,0.0)[0]

So, why is this? Thank you very much for your help!

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
2013-10-18
Last reply:
2013-10-25
Johannes Ring (johannr) said : #1

FEniCS no longer uses Launchpad for Questions & Answers. Please consult the documentation on the FEniCS web page for where and how to (re)post your question: http://fenicsproject.org/support/

Can you help with this problem?

Provide an answer of your own, or ask Loll Wies for more information if necessary.

To post a message you must log in.