BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
InterferenceFunctionUtils.cpp
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/Interference/InterferenceFunctionUtils.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 
19 {
20 std::vector<complex_t>
22  const std::vector<FormFactorCoherentSum>& ff_wrappers)
23 {
24  std::vector<complex_t> result;
25  for (auto& ffw : ff_wrappers) {
26  result.push_back(ffw.evaluate(sim_element));
27  }
28  return result;
29 }
30 
33  const std::vector<FormFactorCoherentSum>& ff_wrappers)
34 {
35  matrixFFVector_t result;
36  for (auto& ffw : ff_wrappers) {
37  result.push_back(ffw.evaluatePol(sim_element));
38  }
39  return result;
40 }
41 } // namespace InterferenceFunctionUtils
Defines class FormFactorCoherentSum.
Defines helper functions for InterferenceFunctions and Strategies.
Data stucture containing both input and output of a single detector cell.
std::vector< complex_t > PrecomputeScalarFormFactors(const SimulationElement &sim_element, const std::vector< FormFactorCoherentSum > &ff_wrappers)
matrixFFVector_t PrecomputePolarizedFormFactors(const SimulationElement &sim_element, const std::vector< FormFactorCoherentSum > &ff_wrappers)
std::vector< Eigen::Matrix2cd, Eigen::aligned_allocator< Eigen::Matrix2cd > > matrixFFVector_t