PoissonCL
CCATSL provides a routine for solving Poisson's equation
| void PoissonCL ( |
double *psi, |
| double *zeta, |
|
| int nx, |
|
| int ny, |
|
| double dlx, |
|
| double dly); |
|
| psi |
Array to hold the solution |
|
| zeta |
Array specifying the function |
|
| nx |
The number of divisions in the lattice in the |
|
| ny |
The number of divisions in the lattice in the ny must be a power of 2.) |
|
| dlx, dly |
The grid spacing in the |
A typical use of PoissonCL might look like
|
/* /examples/chapter2/poisnex.c */
#include <catam.h>
int MainCL(void)
{
int nx=10;
int ny=8;
double dlx=0.1;
double dly=0.125;
double psi[nx][ny];
double zeta[nx][ny];
/* setup zeta */
/* .. */
PoissonCL(psi,zeta,nx,ny,dlx,dly);
return 0;
}
|
A complete example using PoissonCL can be found in b09poisn.c.