aboutsummaryrefslogtreecommitdiff
path: root/tests/gpu_sim_check.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-09-24 16:41:59 +0200
committerThomas White <taw@physics.org>2014-09-24 16:41:59 +0200
commitf92b47bcd85ff06c386119153270b22d532c897c (patch)
treece7269ae5ca02b86a798b30bdb7df0a99787a221 /tests/gpu_sim_check.c
parente3bb47c737988d277aebc240e517ae52819ad895 (diff)
Remove bandwidth, divergence and profile radius from struct beam_params
Diffstat (limited to 'tests/gpu_sim_check.c')
-rw-r--r--tests/gpu_sim_check.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/tests/gpu_sim_check.c b/tests/gpu_sim_check.c
index a829d1db..677999ab 100644
--- a/tests/gpu_sim_check.c
+++ b/tests/gpu_sim_check.c
@@ -80,7 +80,6 @@ int main(int argc, char *argv[])
UnitCell *cell;
UnitCell *cell_raw;
struct detector *det;
- struct beam_params *beam;
int i;
double gpu_min, gpu_max, gpu_tot;
double cpu_min, cpu_max, cpu_tot;
@@ -150,18 +149,13 @@ int main(int argc, char *argv[])
cpu_image.det = det;
gpu_image.det = det;
+ cpu_image.beam = NULL;
+ gpu_image.beam = NULL;
- beam = calloc(1, sizeof(struct beam_params));
- beam->photon_energy = 6000.0;
- beam->bandwidth = 1.0 / 100.0;
- beam->divergence = 0.0;
- cpu_image.beam = beam;
- gpu_image.beam = beam;
-
- cpu_image.lambda = ph_en_to_lambda(eV_to_J(beam->photon_energy));
- gpu_image.lambda = ph_en_to_lambda(eV_to_J(beam->photon_energy));
- cpu_image.bw = beam->bandwidth;
- gpu_image.bw = beam->bandwidth;
+ cpu_image.lambda = ph_en_to_lambda(eV_to_J(6000));
+ gpu_image.lambda = ph_en_to_lambda(eV_to_J(6000));
+ cpu_image.bw = 1.0 / 100.0;
+ gpu_image.bw = 1.0 / 100.0;
cpu_image.nsamples = 10;
gpu_image.nsamples = 10;
@@ -210,7 +204,6 @@ int main(int argc, char *argv[])
cell_free(cell);
free_detector_geometry(det);
- free(beam);
if ( perc > 1.0 ) {