BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
IFootprintFactor.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Device/Beam/IFootprintFactor.cpp
6 //! @brief Implements interface IFootprintFactor.
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 
16 #include <stdexcept>
17 
18 IFootprintFactor::IFootprintFactor(const std::vector<double>& PValues)
19  : INode(PValues)
20  , m_width_ratio(m_P[0])
21 {
22  if (m_P[0] < 0.0)
23  throw std::runtime_error(
24  "Error in IFootprintFactor::setWidthRatio: width ratio is negative");
25 }
26 
Defines interface IFootprintFactor.
IFootprintFactor(const std::vector< double > &PValues)
~IFootprintFactor() override
Base class for tree-like structures containing parameterized objects.
Definition: INode.h:40
std::vector< double > m_P
Definition: INode.h:63