BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ParticleLayoutComputation Class Referencefinal

Computes the scattering contribution from one particle layout. More...

Collaboration diagram for ParticleLayoutComputation:
[legend]

Public Member Functions

 ParticleLayoutComputation (const ProcessedLayout &layout, const SimulationOptions &options, bool polarized)
 
 ~ParticleLayoutComputation ()
 
void compute (SimulationElement &elem) const
 
void mergeRegionMap (std::map< size_t, std::vector< HomogeneousRegion >> &region_map) const
 Merges its region map into the given one (notice non-const reference parameter) More...
 

Private Attributes

std::unique_ptr< const IInterferenceFunctionStrategym_interference_function_strategy
 
const ProcessedLayoutm_layout
 
const std::map< size_t, std::vector< HomogeneousRegion > > m_region_map
 

Detailed Description

Computes the scattering contribution from one particle layout.

Used by DWBAComputation.

Definition at line 37 of file ParticleLayoutComputation.h.

Constructor & Destructor Documentation

◆ ParticleLayoutComputation()

ParticleLayoutComputation::ParticleLayoutComputation ( const ProcessedLayout layout,
const SimulationOptions options,
bool  polarized 
)

Definition at line 48 of file ParticleLayoutComputation.cpp.

51  : m_layout(layout)
52  , m_region_map(layout.regionMap())
53  , m_interference_function_strategy(processedInterferenceFunction(layout, options, polarized))
54 {
55 }
const ProcessedLayout & m_layout
const std::map< size_t, std::vector< HomogeneousRegion > > m_region_map
std::unique_ptr< const IInterferenceFunctionStrategy > m_interference_function_strategy
std::map< size_t, std::vector< HomogeneousRegion > > regionMap() const
matrixFFVector_t polarized(const SimulationElement &sim_element, const std::vector< FormFactorCoherentSum > &ff_wrappers)

◆ ~ParticleLayoutComputation()

ParticleLayoutComputation::~ParticleLayoutComputation ( )
default

Member Function Documentation

◆ compute()

void ParticleLayoutComputation::compute ( SimulationElement elem) const

Definition at line 59 of file ParticleLayoutComputation.cpp.

60 {
62 }
double surfaceDensity() const
void addIntensity(double intensity)

References SimulationElement::addIntensity(), m_interference_function_strategy, m_layout, and ProcessedLayout::surfaceDensity().

Here is the call graph for this function:

◆ mergeRegionMap()

void ParticleLayoutComputation::mergeRegionMap ( std::map< size_t, std::vector< HomogeneousRegion >> &  region_map) const

Merges its region map into the given one (notice non-const reference parameter)

Definition at line 64 of file ParticleLayoutComputation.cpp.

66 {
67  for (auto& entry : m_region_map) {
68  size_t i = entry.first;
69  auto& regions = entry.second;
70  region_map[i].insert(region_map[i].begin(), regions.begin(), regions.end());
71  }
72 }

References m_region_map.

Referenced by DWBASingleComputation::addLayoutComputation().

Member Data Documentation

◆ m_interference_function_strategy

std::unique_ptr<const IInterferenceFunctionStrategy> ParticleLayoutComputation::m_interference_function_strategy
private

Definition at line 51 of file ParticleLayoutComputation.h.

Referenced by compute().

◆ m_layout

const ProcessedLayout& ParticleLayoutComputation::m_layout
private

Definition at line 49 of file ParticleLayoutComputation.h.

Referenced by compute().

◆ m_region_map

const std::map<size_t, std::vector<HomogeneousRegion> > ParticleLayoutComputation::m_region_map
private

Definition at line 50 of file ParticleLayoutComputation.h.

Referenced by mergeRegionMap().


The documentation for this class was generated from the following files: