BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
HomogeneousRegion.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/Particle/HomogeneousRegion.h
6 //! @brief Defines struct HomogeneousRegion, 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_PARTICLE_HOMOGENEOUSREGION_H
21 #define BORNAGAIN_SAMPLE_PARTICLE_HOMOGENEOUSREGION_H
22 
24 
25 //! Struct that contains information on a single homogeneous region of a particle inside
26 //! a single layer.
27 //! This information is needed for calculating the average of a material, used in the Fresnel
28 //! calculations.
29 //!
30 //! @ingroup intern
31 
33  double m_volume;
35 };
36 
37 #ifndef SWIG
38 
39 //! @ingroup materials
40 
41 //! Creates averaged material. Square refractive index of returned material is arithmetic mean over
42 //! _regions_ and _layer_mat_. Magnetization (if present) is averaged linearly.
44  const std::vector<HomogeneousRegion>& regions);
45 
46 #endif // USER_API
47 
48 #endif // BORNAGAIN_SAMPLE_PARTICLE_HOMOGENEOUSREGION_H
49 #endif // USER_API
Defines and implements class Material.
A wrapper for underlying material implementation.
Definition: Material.h:29
Material createAveragedMaterial(const Material &layer_mat, const std::vector< HomogeneousRegion > &regions)
Creates averaged material.
Struct that contains information on a single homogeneous region of a particle inside a single layer.