BornAgain  1.18.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 scattering at grazing incidence
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 #ifndef BORNAGAIN_CORE_PARTICLE_HOMOGENEOUSREGION_H
16 #define BORNAGAIN_CORE_PARTICLE_HOMOGENEOUSREGION_H
17 
19 
20 //! Struct that contains information on a single homogeneous region of a particle inside
21 //! a single layer.
22 //! This information is needed for calculating the average of a material, used in the Fresnel
23 //! calculations.
24 //!
25 //! @ingroup intern
26 
28  double m_volume;
30 };
31 
32 #ifndef SWIG
33 
34 //! @ingroup materials
35 
36 //! Creates averaged material. Square refractive index of returned material is arithmetic mean over
37 //! _regions_ and _layer_mat_. Magnetization (if present) is averaged linearly.
39  const std::vector<HomogeneousRegion>& regions);
40 
41 #endif // SWIG
42 
43 #endif // BORNAGAIN_CORE_PARTICLE_HOMOGENEOUSREGION_H
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.