Skip to content
Snippets Groups Projects
Commit 02ebb894 authored by Yurov, Dmitry's avatar Yurov, Dmitry
Browse files

Rename SpecularSimulationElement_ --> SpecularSimulationElement

parent 7c0f875a
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@
#include "IComputationUtils.h"
#include "MultiLayer.h"
#include "ProgressHandler.h"
#include "SpecularSimulationElement_.h"
#include "SpecularSimulationElement.h"
static_assert(std::is_copy_constructible<SpecularComputation>::value == false,
"SpecularComputation should not be copy constructible");
......
......@@ -20,7 +20,7 @@
#include "SpecularComputationTerm.h"
class MultiLayer;
class SpecularSimulationElement_;
class SpecularSimulationElement;
//! Performs a single-threaded specular computation with given sample.
//!
......@@ -30,7 +30,7 @@ class SpecularSimulationElement_;
class SpecularComputation : public IComputation
{
using SpecularElementIter = std::vector<SpecularSimulationElement_>::iterator;
using SpecularElementIter = std::vector<SpecularSimulationElement>::iterator;
public:
SpecularComputation(const MultiLayer& multilayer, const SimulationOptions& options,
......
......@@ -16,7 +16,7 @@
#include "DelayedProgressCounter.h"
#include "ScalarRTCoefficients.h"
#include "SpecularMatrix.h"
#include "SpecularSimulationElement_.h"
#include "SpecularSimulationElement.h"
SpecularComputationTerm::SpecularComputationTerm()
{}
......@@ -28,7 +28,7 @@ void SpecularComputationTerm::setProgressHandler(ProgressHandler* p_progress)
mP_progress_counter.reset(new DelayedProgressCounter(p_progress, 100));
}
void SpecularComputationTerm::compute(SpecularSimulationElement_& elem,
void SpecularComputationTerm::compute(SpecularSimulationElement& elem,
const MultiLayer& sample) const
{
if (!elem.isCalculated())
......
......@@ -20,7 +20,7 @@
class DelayedProgressCounter;
class MultiLayer;
class ProgressHandler;
class SpecularSimulationElement_;
class SpecularSimulationElement;
//! Computes the specular scattering.
//! Used by SpecularComputation.
......@@ -33,7 +33,7 @@ public:
~SpecularComputationTerm();
void setProgressHandler(ProgressHandler* p_progress);
void compute(SpecularSimulationElement_& elem, const MultiLayer& sample) const;
void compute(SpecularSimulationElement& elem, const MultiLayer& sample) const;
private:
std::unique_ptr<DelayedProgressCounter> mP_progress_counter;
......
......@@ -26,7 +26,7 @@
#include "RealParameter.h"
#include "SpecularComputation.h"
#include "SpecularDetector1D.h"
#include "SpecularSimulationElement_.h"
#include "SpecularSimulationElement.h"
#include "UnitConverter1D.h"
namespace
......@@ -145,10 +145,10 @@ void SpecularSimulation::initSimulationElementVector()
m_cache.resize(m_sim_elements.size(), 0);
}
std::vector<SpecularSimulationElement_>
std::vector<SpecularSimulationElement>
SpecularSimulation::generateSimulationElements(const Beam& beam)
{
std::vector<SpecularSimulationElement_> result;
std::vector<SpecularSimulationElement> result;
const double wavelength = beam.getWavelength();
const double angle_shift = beam.getAlpha();
......
......@@ -26,7 +26,7 @@ class ISample;
class IMultiLayerBuilder;
class MultiLayer;
class Histogram1D;
class SpecularSimulationElement_;
class SpecularSimulationElement;
//! Main class to run a specular simulation.
//! @ingroup simulation
......@@ -78,7 +78,7 @@ private:
void initSimulationElementVector() override;
//! Generate simulation elements for given beam
std::vector<SpecularSimulationElement_> generateSimulationElements(const Beam& beam);
std::vector<SpecularSimulationElement> generateSimulationElements(const Beam& beam);
//! Generate a single threaded computation for a given range of simulation elements
//! @param start Index of the first element to include into computation
......@@ -113,7 +113,7 @@ private:
void setRawResults(const std::vector<double>& raw_data) override;
std::unique_ptr<IAxis> m_coordinate_axis;
std::vector<SpecularSimulationElement_> m_sim_elements;
std::vector<SpecularSimulationElement> m_sim_elements;
std::vector<double> m_cache;
};
......
#include "SpecularSimulationElement_.h"
#include "SpecularSimulationElement.h"
#include "IKzComputation.h"
#include "Layer.h"
#include "MultiLayer.h"
SpecularSimulationElement_::SpecularSimulationElement_(double kz, double, double)
SpecularSimulationElement::SpecularSimulationElement(double kz, double, double)
: m_intensity(0.0)
, m_calculation_flag(true)
, m_kz_computation(std::make_unique<KzFromSLDComputation>(kz))
{}
SpecularSimulationElement_::SpecularSimulationElement_(double wavelength, double, double alpha,
SpecularSimulationElement::SpecularSimulationElement(double wavelength, double, double alpha,
double)
: m_intensity(0.0)
, m_calculation_flag(true)
......@@ -18,7 +18,7 @@ SpecularSimulationElement_::SpecularSimulationElement_(double wavelength, double
{
}
SpecularSimulationElement_::SpecularSimulationElement_(const SpecularSimulationElement_& other)
SpecularSimulationElement::SpecularSimulationElement(const SpecularSimulationElement& other)
: m_polarization(other.m_polarization)
, m_intensity(other.m_intensity)
, m_calculation_flag(other.m_calculation_flag)
......@@ -26,7 +26,7 @@ SpecularSimulationElement_::SpecularSimulationElement_(const SpecularSimulationE
{
}
SpecularSimulationElement_::SpecularSimulationElement_(SpecularSimulationElement_&& other) noexcept
SpecularSimulationElement::SpecularSimulationElement(SpecularSimulationElement&& other) noexcept
: m_polarization(std::move(other.m_polarization))
, m_intensity(other.m_intensity)
, m_calculation_flag(other.m_calculation_flag)
......@@ -34,24 +34,24 @@ SpecularSimulationElement_::SpecularSimulationElement_(SpecularSimulationElement
{
}
SpecularSimulationElement_::~SpecularSimulationElement_() = default;
SpecularSimulationElement::~SpecularSimulationElement() = default;
SpecularSimulationElement_& SpecularSimulationElement_::
operator=(const SpecularSimulationElement_& other)
SpecularSimulationElement& SpecularSimulationElement::
operator=(const SpecularSimulationElement& other)
{
if (this != &other) {
SpecularSimulationElement_ tmp(other);
SpecularSimulationElement tmp(other);
tmp.swapContent(*this);
}
return *this;
}
std::vector<complex_t> SpecularSimulationElement_::produceKz(const MultiLayer& sample)
std::vector<complex_t> SpecularSimulationElement::produceKz(const MultiLayer& sample)
{
return m_kz_computation->compute(sample);
}
void SpecularSimulationElement_::swapContent(SpecularSimulationElement_ &other)
void SpecularSimulationElement::swapContent(SpecularSimulationElement &other)
{
m_polarization.swapContent(other.m_polarization);
std::swap(m_intensity, other.m_intensity);
......
#ifndef SPECULARSIMULATIONELEMENT_H_
#define SPECULARSIMULATIONELEMENT_H_
#ifndef SPECULARSIMULATIONELEMENT_H
#define SPECULARSIMULATIONELEMENT_H
#include "Complex.h"
#include "Vectors3D.h"
......@@ -9,18 +9,18 @@
class IKzComputation;
class MultiLayer;
class BA_CORE_API_ SpecularSimulationElement_
class BA_CORE_API_ SpecularSimulationElement
{
public:
SpecularSimulationElement_(double kz, double d_kz, double dl_l);
SpecularSimulationElement_(double wavelength, double d_l, double alpha, double d_alpha);
SpecularSimulationElement(double kz, double d_kz, double dl_l);
SpecularSimulationElement(double wavelength, double d_l, double alpha, double d_alpha);
SpecularSimulationElement_(const SpecularSimulationElement_& other);
SpecularSimulationElement_(SpecularSimulationElement_&& other) noexcept;
SpecularSimulationElement(const SpecularSimulationElement& other);
SpecularSimulationElement(SpecularSimulationElement&& other) noexcept;
~SpecularSimulationElement_();
~SpecularSimulationElement();
SpecularSimulationElement_& operator=(const SpecularSimulationElement_& other);
SpecularSimulationElement& operator=(const SpecularSimulationElement& other);
//! Assigns PolarizationHandler.
void setPolarizationHandler(const PolarizationHandler& handler) { m_polarization = handler; }
......@@ -38,7 +38,7 @@ public:
std::vector<complex_t> produceKz(const MultiLayer& sample);
private:
void swapContent(SpecularSimulationElement_& other);
void swapContent(SpecularSimulationElement& other);
PolarizationHandler m_polarization;
double m_intensity; //!< simulated intensity for detector cell
......@@ -46,4 +46,4 @@ private:
std::unique_ptr<IKzComputation> m_kz_computation;
};
#endif // SPECULARSIMULATIONELEMENT_H_
#endif // SPECULARSIMULATIONELEMENT_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment