BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
MaterialFactoryFuncs.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/Material/MaterialFactoryFuncs.h
6 //! @brief Factory functions used to create material instances.
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_MATERIAL_MATERIALFACTORYFUNCS_H
16 #define BORNAGAIN_CORE_MATERIAL_MATERIALFACTORYFUNCS_H
17 
19 
20 struct HomogeneousRegion;
21 
22 //! @ingroup materials
23 
25 
26 //! @ingroup materials
27 
28 Material HomogeneousMaterial(const std::string& name, double delta, double beta,
29  kvector_t magnetization = {});
30 
31 //! @ingroup materials
32 
33 //! Constructs a material with _name_, _refractive_index_ and _magnetization_ (in A/m).
34 //! Alternatively,
35 //! \f$\delta\f$ and \f$\beta\f$ for refractive index \f$n = 1 - \delta + i \beta\f$ can be passed
36 //! directly.
37 //! With no parameters given, constructs default (vacuum) material with \f$n = 1\f$ and zero
38 //! magnetization.
39 Material HomogeneousMaterial(const std::string& name, complex_t refractive_index,
40  kvector_t magnetization = {});
41 
42 //! @ingroup materials
43 
45 
46 //! @ingroup materials
47 
48 //! Constructs a wavelength-independent material with a given complex-valued
49 //! scattering length density (SLD).
50 //! SLD values for a wide variety of materials can be found on
51 //! https://sld-calculator.appspot.com/
52 //! and
53 //! https://www.ncnr.nist.gov/resources/activation/
54 //! By convention, SLD imaginary part is treated as negative by default, which corresponds to
55 //! attenuation of the signal.
56 //! With no parameters given, MaterialBySLD constructs default (vacuum) material with zero sld
57 //! and zero magnetization.
58 //! @param name: material name
59 //! @param sld_real: real part of the scattering length density, inverse square angstroms
60 //! @param sld_imag: imaginary part of the scattering length density, inverse square angstroms
61 //! @param magnetization: magnetization (in A/m)
62 Material MaterialBySLD(const std::string& name, double sld_real, double sld_imag,
63  kvector_t magnetization = {});
64 
65 #endif // BORNAGAIN_CORE_MATERIAL_MATERIALFACTORYFUNCS_H
std::complex< double > complex_t
Definition: Complex.h:20
Defines and implements class Material.
A wrapper for underlying material implementation.
Definition: Material.h:29
Material HomogeneousMaterial()
Material MaterialBySLD()
Struct that contains information on a single homogeneous region of a particle inside a single layer.