Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added order_extra feature for Single_crystal #1767

Merged
merged 2 commits into from
Nov 21, 2024
Merged

Conversation

mads-bertelsen
Copy link
Contributor

Added extra_order feature to Single_crystal, allowing extra orders of multiple scattering that ignores coherent scattering which is slow for large unit cells.

In a case as below, order=0 does not give satisfactory approximation.

order_approach_ref

Using higher orders provides less speedup as a function of split as show below.

Figure 3

This update introduces the option to allow a limited number of additional multiple scattering that ignores the coherent part of the cross section which is the computationally expensive part of the algorithm.

Figure 199-2
Figure 199-3

Using this feature with order=1 quickly provides a very good approximation with less computation time. Below we see speed ups compared to order=0, all with SPLIT 100. Using extra_order provides a better approximation, but of course does take computation time, though much faster than increasing the normal order parameter.

Figure 204

It can be a bit complex to choose the right combination of SPLIT, order and extra_order. The plot below shows many runs with speed up relative to a reference simulation and a chi square comparison to the reference run (here extra_order is called order_inc / "oi" in label, order is "o", SPLIT as "s"). For this system, leucine, using order=1, high split and extra_order somewhere between 3 and 6 would provide a good balance between accuracy and computation time.

Figure 191

Will update this pull request with equivalent feature for McXtrace.

… multiple scattering that ignores coherent scattering which is slow for large unit cells
… reaching order, now work with split optimization, and extra_order parameter
@mads-bertelsen
Copy link
Contributor Author

McXtrace version added.

@willend willend merged commit 89f3eb7 into main Nov 21, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants