I get the following error in boxfield.py file:
“”
nodal_values[d2v] = fenics_function.vector().get_local().copy()
ValueError: shape mismatch: value array of shape (20,) could not be broadcast to indexing result of shape (46,)
“”
Is there a way to do this in parallel?
Thank you very much!
In general, when visualizing in parallel, I would strongly recommend you to write your data to the xdmf file format, and use Paraview for post processing.
Thank you for your reply!
Actually, I don’t need it for visualization. But I want to use the structured data in the matrix w_[:][:][:] in my code.
Is there any other way to get this structured data from FEniCS function in parallel?
To me it is not clear what the use-case is if you want the matrix. What kind of matrix do you expect to have on each process?
Note that the degrees of freedom in dolfin is distributed over multiple processes in parallel, this means that no process has access to the full 11,11,11 matrix that you are trying to create.