tissue.c
/* Build the contrast of the current slab. Requires the previous and next
 * slab densities to evaluate the Laplacian of the density. */
Build the contrast of the current slab. Requires the previous and next
slab densities to evaluate the Laplacian of the density.
Build the contrast of the current slab . Requires the previous and next slab densities to evaluate the Laplacian of the density .
long ctslab (cplx *contrast, cplx *k, real *r, real *lr,
		real *nr, cplx kbg, long nx, long ny, real delta) {
	long i, npx;
	real rval;
	npx = nx * ny;
#pragma omp parallel for default(shared) private(rval,i)
	for (i = 0; i < npx; ++i) {
		contrast[i] = k[i] / kbg;
		contrast[i] = contrast[i] * contrast[i] - 1;
		rval = lapden (r, lr, nr, delta, i, nx, ny);
		contrast[i] -= rval * r[i] / (kbg * kbg);
	}
	return npx;
}
long ctslab ( cplx * contrast , cplx * k , real * r , real * lr , real * nr , cplx kbg , long nx , long ny , real delta ) { long i , npx ; real rval ; npx = nx * ny ; #pragma  omp parallel for default(shared) private(rval,i) for ( i = 0 ; i < npx ; ++ i ) { contrast [ i ] = k [ i ] / kbg ; contrast [ i ] = contrast [ i ] * contrast [ i ] - 1 ; rval = lapden ( r , lr , nr , delta , i , nx , ny ) ; contrast [ i ] -= rval * r [ i ] / ( kbg * kbg ) ; } return npx ; }
Build the contrast of the current slab.
Build the contrast of the current slab .
/* Compute the relative wave number. */ /* Now square and shift to form the contrast. */ /* Compute the Laplacian of the density. */ /* Add in the density term. */