Refactoring #2343

Improve performance in reflectometry engine

Added by dmitry over 1 year ago. Updated 5 months ago.

Status:RejectedStart date:30 Apr 2019
Priority:LowDue date:
Assignee:rbeerwerth% Done:

100%

Category:Reflectometry
Target version:-

Description

Currently it uses backwards computation of reflection/transmission coefficients and the bisection to find the last layer with non-zero transmission.
My previous attempt to compute coefficients directly (from top to bottom) failed because of scheme instability.
Still getting rid of at least bisection would change the worst-case complexity of computation from N * log(N) to N, where N is the number of layers.


Related issues

Related to BornAgain - Refactoring #2410: Core: beam propagation: Speeding up computations on samples with a large number of layers Backlog 21 Oct 2019
Related to BornAgain - Feature #2336: Make reflectometry computation as fast as in Refnx Resolved 04 Apr 2019

History

#1 Updated by dmitry about 1 year ago

  • Related to Refactoring #2410: Core: beam propagation: Speeding up computations on samples with a large number of layers added

#2 Updated by dmitry about 1 year ago

  • Related to Feature #2336: Make reflectometry computation as fast as in Refnx added

#3 Updated by rbeerwerth 8 months ago

  • Assignee set to rbeerwerth
  • Target version set to Sprint 43

#4 Updated by rbeerwerth 8 months ago

This is completed in PR 911 (https://github.com/scgmlz/BornAgain/pull/911).

A test case that probes the numerical stability and sanity is added in PR 917 (https://github.com/scgmlz/BornAgain/pull/917)

In short: The computation is replaced with a backwards computation that renormalizes the computed amplitudes at every step.
At the end of the computation a second forward sweep is needed to consistently normalize all amplitudes.
For details, see section 3.2 of the description in theory/Roughness.pdf.
This approach now has a constant complexity of O(N).

Currently, I do not see a necessity for implementing a direct (top-to-bottom calculation).

#5 Updated by rbeerwerth 8 months ago

  • % Done changed from 0 to 100

#6 Updated by pospelov 6 months ago

  • Target version deleted (Sprint 43)

#7 Updated by wuttke 5 months ago

  • Status changed from Backlog to Sprint

#8 Updated by wuttke 5 months ago

  • Status changed from Sprint to Rejected

duplication of #2336

Also available in: Atom PDF