BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
MultiLayerUtils.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/Multilayer/MultiLayerUtils.h
6 //! @brief Defines helper functions for MultiLayer objects.
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 
15 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_SAMPLE_MULTILAYER_MULTILAYERUTILS_H
21 #define BORNAGAIN_SAMPLE_MULTILAYER_MULTILAYERUTILS_H
22 
23 #include <cstddef>
24 #include <vector>
25 
26 class Layer;
27 class LayerInterface;
28 class LayerRoughness;
29 class MultiLayer;
30 
31 namespace MultiLayerUtils {
32 
33 //! Returns top roughness of layer
34 const LayerRoughness* LayerTopRoughness(const MultiLayer& multilayer, size_t i);
35 
36 //! Returns the index of the given layer
37 size_t IndexOfLayer(const MultiLayer& multilayer, const Layer* p_layer);
38 
39 //! Returns true if the multilayer contains non-default materials of one type only
40 bool ContainsCompatibleMaterials(const MultiLayer& multilayer);
41 
42 bool hasRoughness(const MultiLayer& sample);
43 } // namespace MultiLayerUtils
44 
45 #endif // BORNAGAIN_SAMPLE_MULTILAYER_MULTILAYERUTILS_H
46 #endif // USER_API
Interface between two layers, possibly with roughness.
A roughness of interface between two layers.
A layer in a MultiLayer sample.
Definition: Layer.h:27
Our sample model: a stack of layers one below the other.
Definition: MultiLayer.h:41
const LayerRoughness * LayerTopRoughness(const MultiLayer &multilayer, size_t i)
Returns top roughness of layer.
size_t IndexOfLayer(const MultiLayer &multilayer, const Layer *p_layer)
Returns the index of the given layer.
bool ContainsCompatibleMaterials(const MultiLayer &multilayer)
Returns true if the multilayer contains non-default materials of one type only.
bool hasRoughness(const MultiLayer &sample)