BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
Admixtures.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/Material/Admixtures.h
6 //! @brief Defines struct OneAdmixture, and declares fct createAveragedMaterial
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_MATERIAL_ADMIXTURES_H
21 #define BORNAGAIN_SAMPLE_MATERIAL_ADMIXTURES_H
22 
24 #include <vector>
25 
26 //! An admixture to a slice, consisting of a certain volume fraction of a homogeneous material.
27 //!
28 //! @ingroup intern
29 
30 struct OneAdmixture {
31  double fraction; //!< Volume fraction
33 };
34 
35 //! The list of material admixtures to a slice.
36 //!
37 //! Needed for calculating the average of a material, which is needed in the Fresnel calculation.
38 
39 class Admixtures : public std::vector<OneAdmixture> {
40 public:
41  Admixtures() = default;
42  Admixtures(const std::vector<OneAdmixture>& _super)
43  : std::vector<OneAdmixture>(_super)
44  {
45  }
46 };
47 
48 #endif // BORNAGAIN_SAMPLE_MATERIAL_ADMIXTURES_H
49 #endif // USER_API
Defines and implements class Material.
The list of material admixtures to a slice.
Definition: Admixtures.h:39
Admixtures(const std::vector< OneAdmixture > &_super)
Definition: Admixtures.h:42
Admixtures()=default
A wrapper for underlying material implementation.
Definition: Material.h:35
An admixture to a slice, consisting of a certain volume fraction of a homogeneous material.
Definition: Admixtures.h:30
double fraction
Volume fraction.
Definition: Admixtures.h:31
Material material
Definition: Admixtures.h:32