BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
LayerFillLimits.h
Go to the documentation of this file.
1
// ************************************************************************** //
2
//
3
// BornAgain: simulate and fit scattering at grazing incidence
4
//
5
//! @file Sample/Scattering/LayerFillLimits.h
6
//! @brief Defines class LayerFillLimits.
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_MULTILAYER_LAYERFILLLIMITS_H
16
#define BORNAGAIN_CORE_MULTILAYER_LAYERFILLLIMITS_H
17
18
#include "
Sample/Scattering/ZLimits.h
"
19
#include <cstddef>
20
#include <utility>
21
#include <vector>
22
23
//! Helper class for the graded layer approximation. Generates limits for each layer, indicating
24
//! the region of the layer (along z) that contains particle(s)
25
//!
26
//! The constructor takes the bottom layer z-coordinates as parameter. This means that for N
27
//! layers, only N-1 coordinates need to be passed (the last layer is assumed to be semi-infinite).
28
//! @ingroup algorithms_internal
29
30
class
LayerFillLimits
31
{
32
public
:
33
LayerFillLimits
(std::vector<double> layers_bottomz);
34
35
//! Particle limits are given in global coordinates
36
void
update
(
ParticleLimits
particle_limits,
double
offset = 0.0);
37
38
//! Returns the filled region limits for each layer (in local layer coordinates)
39
std::vector<ZLimits>
layerZLimits
()
const
;
40
41
private
:
42
size_t
layerIndexTop
(
double
top_z)
const
;
43
size_t
layerIndexBottom
(
double
bottom_z)
const
;
44
void
updateLayerLimits
(
size_t
i_layer,
ZLimits
limits);
45
std::vector<double>
m_layers_bottomz
;
46
std::vector<ZLimits>
m_layer_fill_limits
;
47
};
48
49
#endif
// BORNAGAIN_CORE_MULTILAYER_LAYERFILLLIMITS_H
ZLimits.h
Defines class ZLimits.
LayerFillLimits
Helper class for the graded layer approximation.
Definition:
LayerFillLimits.h:31
LayerFillLimits::LayerFillLimits
LayerFillLimits(std::vector< double > layers_bottomz)
Definition:
LayerFillLimits.cpp:24
LayerFillLimits::m_layer_fill_limits
std::vector< ZLimits > m_layer_fill_limits
Definition:
LayerFillLimits.h:46
LayerFillLimits::layerZLimits
std::vector< ZLimits > layerZLimits() const
Returns the filled region limits for each layer (in local layer coordinates)
Definition:
LayerFillLimits.cpp:48
LayerFillLimits::m_layers_bottomz
std::vector< double > m_layers_bottomz
Definition:
LayerFillLimits.h:45
LayerFillLimits::updateLayerLimits
void updateLayerLimits(size_t i_layer, ZLimits limits)
Definition:
LayerFillLimits.cpp:74
LayerFillLimits::update
void update(ParticleLimits particle_limits, double offset=0.0)
Particle limits are given in global coordinates.
Definition:
LayerFillLimits.cpp:30
LayerFillLimits::layerIndexTop
size_t layerIndexTop(double top_z) const
Definition:
LayerFillLimits.cpp:53
LayerFillLimits::layerIndexBottom
size_t layerIndexBottom(double bottom_z) const
Definition:
LayerFillLimits.cpp:63
ZLimits
Class that contains upper and lower limits of the z-coordinate for the slicing of form factors.
Definition:
ZLimits.h:41
ParticleLimits
Vertical extension of a particle, specified by bottom and top z coordinate.
Definition:
ZLimits.h:21
Sample
Scattering
LayerFillLimits.h
Generated by
1.9.1