Sorry for the basic question but I am trying to plot the real and the imaginary parts of the eigenvector that I obtain from solving an eigenvalue problem. I am trying to follow a model that I found online and the first figure comes up. But when I close it the system seems to freeze and I need to force quit python.
I am running this on my Mac and using the FEniCS binary. Below is the tail end of my code. Any advice would be greatly appreciated.
psi = Function(V0)
psi_vec = psi.vector()
for i in range(num):
r, c, rx, cx = eigensolver.get_eigenpair(i)
print("Eigenvalue:", i, r, c)
psi_vec[:] = rx
psi_r = psi_vec[:]
#psi_vec[:] = cx
#psi_i = psi_vec[:]
# Plot eigenfunction
plot(psi, key='u', title='psi_r')
interactive()