BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ParticleLayoutComputation.h
Go to the documentation of this file.
1
// ************************************************************************** //
2
//
3
// BornAgain: simulate and fit scattering at grazing incidence
4
//
5
//! @file Core/Computation/ParticleLayoutComputation.h
6
//! @brief Defines class ParticleLayoutComputation.
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_COMPUTATION_PARTICLELAYOUTCOMPUTATION_H
16
#define BORNAGAIN_CORE_COMPUTATION_PARTICLELAYOUTCOMPUTATION_H
17
18
#include "
Sample/Particle/HomogeneousRegion.h
"
19
#include <map>
20
#include <memory>
21
#include <vector>
22
23
class
IInterferenceFunctionStrategy
;
24
class
ProcessedLayout
;
25
class
SimulationElement
;
26
class
SimulationOptions
;
27
28
//! Computes the scattering contribution from one particle layout.
29
//! Used by DWBAComputation.
30
//! @ingroup algorithms_internal
31
32
class
ParticleLayoutComputation
final
33
{
34
public
:
35
ParticleLayoutComputation
(
const
ProcessedLayout
* p_layout,
const
SimulationOptions
& options,
36
bool
polarized);
37
~
ParticleLayoutComputation
();
38
39
void
compute(
SimulationElement
& elem)
const
;
40
41
//! Merges its region map into the given one (notice non-const reference parameter)
42
void
mergeRegionMap
(std::map<
size_t
, std::vector<HomogeneousRegion>>& region_map)
const
;
43
44
private
:
45
const
ProcessedLayout
* mp_layout;
46
std::unique_ptr<const IInterferenceFunctionStrategy> mP_strategy;
47
double
m_surface_density;
48
std::map<size_t, std::vector<HomogeneousRegion>> m_region_map;
49
};
50
51
#endif
// BORNAGAIN_CORE_COMPUTATION_PARTICLELAYOUTCOMPUTATION_H
HomogeneousRegion.h
Defines struct HomogeneousRegion, and declares fct createAveragedMaterial.
IInterferenceFunctionStrategy
Base class of all interference function strategy classes.
Definition:
IInterferenceFunctionStrategy.h:42
ParticleLayoutComputation
Computes the scattering contribution from one particle layout.
Definition:
ParticleLayoutComputation.h:33
ParticleLayoutComputation::mergeRegionMap
void mergeRegionMap(std::map< size_t, std::vector< HomogeneousRegion >> ®ion_map) const
Merges its region map into the given one (notice non-const reference parameter)
Definition:
ParticleLayoutComputation.cpp:45
ProcessedLayout
Data structure that contains preprocessed data for a single layout.
Definition:
ProcessedLayout.h:38
SimulationElement
Data stucture containing both input and output of a single detector cell.
Definition:
SimulationElement.h:29
SimulationOptions
Collect the different options for simulation.
Definition:
SimulationOptions.h:28
Core
Computation
ParticleLayoutComputation.h
Generated by
1.9.1