BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Public Member Functions | |
LayerFillLimits (std::vector< double > layers_bottomz) | |
void | update (ParticleLimits particle_limits, double offset=0.0) |
std::vector< ZLimits > | layerZLimits () const |
Private Member Functions | |
size_t | layerIndexTop (double top_z) const |
size_t | layerIndexBottom (double bottom_z) const |
void | updateLayerLimits (size_t i_layer, ZLimits limits) |
Private Attributes | |
std::vector< double > | m_layers_bottomz |
std::vector< ZLimits > | m_layer_fill_limits |
Helper class for the graded layer approximation.
Generates limits for each layer, indicating the region of the layer (along z) that contains particle(s)
The constructor takes the bottom layer z-coordinates as parameter. This means that for N layers, only N-1 coordinates need to be passed (the last layer is assumed to be semi-infinite).
Definition at line 30 of file LayerFillLimits.h.
LayerFillLimits::LayerFillLimits | ( | std::vector< double > | layers_bottomz | ) |
Definition at line 24 of file LayerFillLimits.cpp.
void LayerFillLimits::update | ( | ParticleLimits | particle_limits, |
double | offset = 0.0 |
||
) |
Particle limits are given in global coordinates.
Definition at line 30 of file LayerFillLimits.cpp.
References layerIndexBottom(), layerIndexTop(), ParticleLimits::m_bottom, m_layers_bottomz, ParticleLimits::m_top, and updateLayerLimits().
Referenced by MultiLayerUtils::ParticleRegions().
std::vector< ZLimits > LayerFillLimits::layerZLimits | ( | ) | const |
Returns the filled region limits for each layer (in local layer coordinates)
Definition at line 48 of file LayerFillLimits.cpp.
References m_layer_fill_limits.
Referenced by MultiLayerUtils::ParticleRegions().
|
private |
Definition at line 53 of file LayerFillLimits.cpp.
References m_layers_bottomz.
Referenced by update().
|
private |
Definition at line 63 of file LayerFillLimits.cpp.
References m_layers_bottomz.
Referenced by update().
|
private |
Definition at line 74 of file LayerFillLimits.cpp.
References anonymous_namespace{LayerFillLimits.cpp}::CalculateNewLayerLimits(), ZLimits::isFinite(), ZLimits::lowerLimit(), m_layer_fill_limits, m_layers_bottomz, OneSidedLimit::m_value, and ZLimits::upperLimit().
Referenced by update().
|
private |
Definition at line 45 of file LayerFillLimits.h.
Referenced by layerIndexBottom(), layerIndexTop(), update(), and updateLayerLimits().
|
private |
Definition at line 46 of file LayerFillLimits.h.
Referenced by layerZLimits(), and updateLayerLimits().