I’m running the code in jorgensd/dolfinx_ipcs: Simple IPCS solver for dolfinx.
I ran the code as follows:
- download the docker and git clone the repository;
- run
python3 create_and_convert_2D_mesh.py
in command line; - run
python3 DFG_benchmark.py
in command line.
And I make sure it can run successfully.
Now I want to save the output as numpy format, I followed the code in
How to get the solution obtained by fenics as a vector? - #2 by dokken
But when I made change in the DFG_benchmark.py
as follows:
dof_coordinates = V.tabulate_dof_coordinates()
(line 47) ran with no error, but print(uh.vector().get_local())
(line 64) get the error:
TypeError: 'petsc4py.PETSc.Vec' object is not callable
I wonder if this problem comes from that I used the package dolfinx
in dolfinx_icps rather dolfin
.
THANKS A LOT For Any Help!!!