Parallel solver for Poisson equation using PETSc
I am using the PETSc library to solve numerically the Poisson equation.
My domain is a square and the mesh is uniform. The poisson equation is discretized with
a 5-points stencil. The BCs are of Dirichlet's type.
To test the solver I compared an analytical solution with the numerical one and I found out my code produces incorrect results.
If I solve the system with the identity matrix, I am able to recover the know-terms vector, thus I suspect I am not setting up properly the off-diagonal elements of the coefficient matrix.
Is there anyone with some experience in using PETSc who could help me?
|All times are GMT -4. The time now is 09:01.|