22 static_assert(std::is_copy_constructible<SpecularComputation>::value ==
false,
23 "SpecularComputation should not be copy constructible");
24 static_assert(std::is_copy_assignable<SpecularComputation>::value ==
false,
25 "SpecularComputation should not be copy assignable");
27 SpecularComputation::SpecularComputation(
const MultiLayer& multilayer,
30 SpecularElementIter end_it)
31 :
IComputation(multilayer, options, progress), m_begin_it(begin_it), m_end_it(end_it)
33 if (mP_processed_sample->containsMagneticMaterial()
34 || mP_processed_sample->externalField() !=
kvector_t{})
35 m_computation_term.reset(
38 m_computation_term.reset(
42 SpecularComputation::~SpecularComputation() =
default;
44 void SpecularComputation::runProtected()
46 if (!mp_progress->alive())
49 m_computation_term->setProgressHandler(mp_progress);
50 auto& slices = mP_processed_sample->averageSlices();
51 for (
auto it = m_begin_it; it != m_end_it; ++it)
52 m_computation_term->computeIntensity(*it, slices);
Defines class ProcessedSample.
Defines class ProgressHandler.
Defines classes SpecularComputationTerm, SpecularScalarTerm, SpecularMatrixTerm.
Defines class SpecularComputation.
Declares the class SpecularSimulationElement.
Defines class SpecularStrategyBuilder.
Interface for a single-threaded computation with given range of SimulationElements and ProgressHandle...
Our sample model: a stack of layers one below the other.
Maintains information about progress of a computation.
Collect the different options for simulation.
Computes the specular scattering for a magnetic sample Used by SpecularComputation.
Computes the specular scattering for a scalar sample Used by SpecularComputation.