I have been writing some code in C for particle-in-cell simulation. One of the steps of the PIC algorithm requires to solve (numerically) Poisson's equation
$$ \Delta \varphi = - 4 \pi \rho. $$
Initially I want to limit the program to 2d case ( instead of 3d ) and use the finite difference method ( instead of finite elements ).
Much to my surprise, I was not able to find any free open source C library for this task ( i.e. to solve 2d Poisson's equation using the finite difference method ). The only thing I've found is a FISHPACK - collection of FORTRAN77 routines, part of a famous SLATEC library.
I'm fine with fortran, but a call to a fortran routine from C requires some unnecessary array transformations and "native" C solution seems more convenient. Another reason I hesitate to use FISHPACK is that it uses single precision floats with implicit type declaration. Using the gcc '-fdefault-real-8' flag I was able to convert it to double precision, but I'm not sure whether or not everything still works correctly after this.
So, my question is: are there any free ( as in freedom ) C/C++ libraries to solve 2d Poisson equation using the finite difference method? And since I do intend to switch to 3d and finite elements, advices on C library for this purpose are also welcome.