Skip to content

Commit

Permalink
Merge pull request #1751 from willend/main
Browse files Browse the repository at this point in the history
  • Loading branch information
willend authored Oct 23, 2024
2 parents b0ac4dc + 7c2f45c commit f93f020
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions mcstas-comps/samples/Single_crystal.comp
Original file line number Diff line number Diff line change
Expand Up @@ -1080,8 +1080,10 @@ DECLARE
struct hkl_info_struct hkl_info;
off_struct offdata;
struct hkl_data *hkl_list;
#ifndef OPENACC
struct tau_data tau_list_initial[MCSX_REFL_SLIST_SIZE];
struct tau_data tau_list[MCSX_REFL_SLIST_SIZE];
#endif
%}

INITIALIZE
Expand Down Expand Up @@ -1382,16 +1384,16 @@ TRACE
/* (2). Intersection of Ewald sphere with reciprocal lattice points */

double coh_xsect = 0, coh_refl = 0;
/* in case we use 'SPLIT' then consecutive neutrons can be identical when entering here
and we may skip the hkl_search call. One tau_list is reserved for data for the initial
ray results so that it potentially can be reused later. */
if (event_counter==0) {
T = tau_list_initial;
} else {
T = tau_list;
}

#ifndef OPENACC
/* in case we use 'SPLIT' then consecutive neutrons can be identical when entering here
and we may skip the hkl_search call. One tau_list is reserved for data for the initial
ray results so that it potentially can be reused later. */
if (event_counter==0) {
T = tau_list_initial;
} else {
T = tau_list;
}
if (order==1 && fabs(kix - hkl_info.kix) < deltak
&& fabs(kiy - hkl_info.kiy) < deltak
&& fabs(kiz - hkl_info.kiz) < deltak) {
Expand Down

0 comments on commit f93f020

Please sign in to comment.