Friday, August 31, 2007

Poisson Solver

Here I am going to talk some thing on Poisson Solvers. Right now I am writing a code for solving poisson equation. This work is going to be half of my PhD. It's been almost more than 2 months since I started developing this code. Right now I am totally stuck with this Poisson Solver. There are number of methods available to solve poisson equation. But the problem is some times they converge to what you want. I have tried Sor method, Ssor method, CG (conjugate gradient) method and CGSTAB (conjugate gradient stabilized) method. Right now I am trying to use PETSc library to solve. This PETSc library has very good methods to solve linear and non-linear system of equations. Especially if the coefficient matrix A in Ax=b is kind of sparse matrix. We can do programming too using this PETSc. I am going to write my code next week using this PETSc. It looks ok. They wrote this library in C language. I am writing my code in Fortran. But they have nice examples in both languages. But they put lot of examples written using C language. Luckily I know C language. So I am in a kind of confused state right now. Actually we need to follow the same rules we follow when we write programs in these languages. I mean for example when you are defining integer in C you write int. Right? Here you write PetscInt. That's it. Of course there is lot to know.

Anyway I will come to the point. I will try to put some thing that could be useful. I mean I am not going to put my code here. I am sure if I do that, my adviser will get upset. May be in future. Still the material I am going to put here and the links I am going to refer here are much useful. I will try to upload as soon as possible.