BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorPrecompute.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/Interference/FormFactorPrecompute.cpp
6 //! @brief Implements helper functions for InterferenceFunctions and Strategies.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
17 
18 std::vector<complex_t>
20  const std::vector<FormFactorCoherentSum>& ff_wrappers)
21 {
22  std::vector<complex_t> result;
23  for (const auto& ffw : ff_wrappers)
24  result.push_back(ffw.evaluate(sim_element));
25  return result;
26 }
27 
30  const std::vector<FormFactorCoherentSum>& ff_wrappers)
31 {
33  for (const auto& ffw : ff_wrappers)
34  result.push_back(ffw.evaluatePol(sim_element));
35  return result;
36 }
Defines class FormFactorCoherentSum.
Defines helper functions for InterferenceFunctions and Strategies.
Data stucture containing both input and output of a single detector cell.
matrixFFVector_t polarized(const SimulationElement &sim_element, const std::vector< FormFactorCoherentSum > &ff_wrappers)
std::vector< complex_t > scalar(const SimulationElement &sim_element, const std::vector< FormFactorCoherentSum > &ff_wrappers)
std::vector< Eigen::Matrix2cd, Eigen::aligned_allocator< Eigen::Matrix2cd > > matrixFFVector_t