  We present a new approach for simulating x-ray nanobeam Bragg coherent
diffraction patterns based on the Takagi-Taupin equations. Compared to
conventional methods, the current approach can be universally applied to any
weakly strained system including semi-infinite crystals that diffract
dynamically. It addresses issues such as the curved wavefront and re-divergence
of the focused incident beam. We show excellent agreement against experimental
data on a strained La0.7Sr0.3MnO3 thin film on SrTiO3 substrate, and a path to
extracting physical information using automatic differentiation.
