BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
Materials

Classes and functions to describe magnetic and non-magnetic materials. More...

Classes

class  BaseMaterialImpl
 Interface for material implementation classes. More...
 
class  MagneticMaterialImpl
 Basic implementation for magnetized material. More...
 
class  Material
 A wrapper for underlying material implementation. More...
 
class  MaterialBySLDImpl
 Material implementation based on wavelength-independent data (valid for a range of wavelengths) More...
 
class  RefractiveMaterialImpl
 Material implementation based on refractive coefficiencts (valid for one wavelength value only) More...
 

Functions

Material HomogeneousMaterial ()
 
Material HomogeneousMaterial (const std::string &name, double delta, double beta, kvector_t magnetization={})
 
Material HomogeneousMaterial (const std::string &name, complex_t refractive_index, kvector_t magnetization={})
 Constructs a material with name, refractive_index and magnetization (in A/m). More...
 
Material MaterialBySLD ()
 
Material MaterialBySLD (const std::string &name, double sld_real, double sld_imag, kvector_t magnetization={})
 Constructs a wavelength-independent material with a given complex-valued scattering length density (SLD). More...
 
Material createAveragedMaterial (const Material &layer_mat, const std::vector< HomogeneousRegion > &regions)
 Creates averaged material. More...
 
std::vector< complex_t > MaterialProfile (const MultiLayer &multilayer, int n_points, double z_min, double z_max)
 

Detailed Description

Classes and functions to describe magnetic and non-magnetic materials.

Function Documentation

◆ HomogeneousMaterial()

Material HomogeneousMaterial ( const std::string &  name,
complex_t  refractive_index,
kvector_t  magnetization = {} 
)

Constructs a material with name, refractive_index and magnetization (in A/m).

Alternatively, $\delta$ and $\beta$ for refractive index $n = 1 - \delta + i \beta$ can be passed directly. With no parameters given, constructs default (vacuum) material with $n = 1$ and zero magnetization.

Definition at line 21 of file MaterialFactoryFuncs.cpp.

◆ MaterialBySLD()

Material MaterialBySLD ( const std::string &  name,
double  sld_real,
double  sld_imag,
kvector_t  magnetization = {} 
)

Constructs a wavelength-independent material with a given complex-valued scattering length density (SLD).

SLD values for a wide variety of materials can be found on https://sld-calculator.appspot.com/ and https://www.ncnr.nist.gov/resources/activation/ By convention, SLD imaginary part is treated as negative by default, which corresponds to attenuation of the signal. With no parameters given, MaterialBySLD constructs default (vacuum) material with zero sld and zero magnetization.

Parameters
namematerial name
sld_realreal part of the scattering length density, inverse square angstroms
sld_imagimaginary part of the scattering length density, inverse square angstroms
magnetizationmagnetization (in A/m)

Definition at line 27 of file MaterialFactoryFuncs.cpp.

◆ createAveragedMaterial()

Material createAveragedMaterial ( const Material layer_mat,
const std::vector< HomogeneousRegion > &  regions 
)

Creates averaged material.

Square refractive index of returned material is arithmetic mean over regions and layer_mat. Magnetization (if present) is averaged linearly.

Definition at line 38 of file HomogeneousRegion.cpp.

◆ MaterialProfile()

std::vector<complex_t> MaterialProfile ( const MultiLayer multilayer,
int  n_points,
double  z_min,
double  z_max 
)

Calculate average material profile for given multilayer

Definition at line 20 of file MultiLayerFuncs.cpp.