I am new to Fenics and doing the first Poisson example. I cannot seem to find the solution of the system at nodes of the mesh. If I use the following code:
u_nodal_values = u.vector()
u_array = u_nodal_values.array()
I am getting an error "‘dolfin.cpp.la.PETScVector’ object has no attribute ‘array’ "
Also, using u.vector().get_local() seems to give me a tuple with too many values, more than number of nodes (81 nodes, 289 values).
Any suggestions on how resolve it? Also, I would prefer if my output is as numpy array.
Thank you.