BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
IFresnelMap.cpp
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/Fresnel/IFresnelMap.cpp
6 //! @brief Implements class IFresnelMap.
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 "Sample/Slice/Slice.h"
17 
18 IFresnelMap::IFresnelMap(std::unique_ptr<ISpecularStrategy> strategy)
19  : m_use_cache(true), m_Strategy(std::move(strategy))
20 {
21 }
22 
23 void IFresnelMap::setSlices(const std::vector<Slice>& slices)
24 {
25  m_slices = slices;
26 }
27 
28 const std::vector<Slice>& IFresnelMap::slices() const
29 {
30  return m_slices;
31 }
32 
33 IFresnelMap::~IFresnelMap() = default;
34 
36 {
37  m_use_cache = false;
38 }
Defines class IFresnelMap.
Defines class Slice.
void disableCaching()
Disables caching of previously computed Fresnel coefficients.
Definition: IFresnelMap.cpp:35
IFresnelMap(std::unique_ptr< ISpecularStrategy > strategy)
Definition: IFresnelMap.cpp:18
std::vector< Slice > m_slices
Definition: IFresnelMap.h:57
virtual void setSlices(const std::vector< Slice > &slices)
Definition: IFresnelMap.cpp:23
const std::vector< Slice > & slices() const
Definition: IFresnelMap.cpp:28
bool m_use_cache
Definition: IFresnelMap.h:58
virtual ~IFresnelMap()