measure.c
/* Fast FMM computation of the far-field pattern using interpolation. */
Fast FMM computation of the far-field pattern using interpolation.
Fast FMM computation of the far - field pattern using interpolation .
int farfield (cplx *currents, measdesc *obs, cplx *result) {
	int i;
	cplx fact;
	if (ScaleME_evlRootFarFld (obs->imat[0], currents, &result)) return 0;
	fact = fmaconf.k0 / (4 * M_PI);
	for (i = 0; i < obs->count; ++i) result[i] *= fact;
	return 0;
}
int farfield ( cplx * currents , measdesc * obs , cplx * result ) { int i ; cplx fact ; if ( ScaleME_evlRootFarFld ( obs -> imat [ 0 ] , currents , & result ) ) return 0 ; fact = fmaconf . k0 / ( 4 * M_PI ) ; for ( i = 0 ; i < obs -> count ; ++ i ) result [ i ] *= fact ; return 0 ; }
Fast FMM computation of the far-field pattern using interpolation.
Fast FMM computation of the far - field pattern using interpolation .
/* The result must be a pointer to the pointer. */ /* The far-field pattern already has a factor of k in the front.
	 * However, the actual integral needs (k^2 / 4 pi), so we need the
	 * extra factors in the field. */