Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 488 Bytes

README.md

File metadata and controls

15 lines (13 loc) · 488 Bytes

petsc4py-examples

Some examples for petsc4py. These examples are from the book: PETSc for Partial Differential Equations. I convert some C codes in this book to the python version.

To run the python code, you should install petsc. You can install it by conda

conda -c conda-forge install petsc petsc4py mpi4py matplotlib 

run the code by

mpiexec -np 4 python3 test_heat.py

The correspondin C codes are also given. You can compile the C code by the makefile...