Skip to content
Snippets Groups Projects
Commit 2e72a33f authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

standardize namespace name Compute

parent 4100bd1f
No related branches found
No related tags found
1 merge request!1548rm class IComputation and children; computation fcts now in namespace Compute.
......@@ -44,13 +44,13 @@ double DWBAComputation::simulatedIntensity(DiffuseElement& ele)
double intensity = 0;
for (const ReLayout* relayout : m_re_sample.relayouts())
intensity += compute::dwbaContribution(*relayout, ele);
intensity += Compute::dwbaContribution(*relayout, ele);
if (m_re_sample.hasRoughness())
intensity += compute::roughMultiLayerContribution(m_re_sample, ele);
intensity += Compute::roughMultiLayerContribution(m_re_sample, ele);
if (m_options.includeSpecular() && ele.isSpecular() && ele.solidAngle() > 0)
intensity = compute::gisasSpecularContribution(ele);
intensity = Compute::gisasSpecularContribution(ele);
stepProgress();
......
......@@ -21,9 +21,8 @@
#include "Resample/Specular/ComputeFluxScalar.h"
//! Performs the actual simulation, and sets intensity, for given range of SpecularElement%s.
double SpecularComputation::simulatedIntensity(const ReSample& re_sample,
ProgressHandler& progress,
SpecularElement& ele)
double Compute::reflectedIntensity(const ReSample& re_sample, ProgressHandler& progress,
SpecularElement& ele)
{
if (!ele.isCalculated())
return 0;
......
......@@ -22,13 +22,11 @@ class ProgressHandler;
class ReSample;
class SpecularElement;
//! Returns reflected intensity.
namespace Compute {
namespace SpecularComputation {
double simulatedIntensity(const ReSample& re_sample, ProgressHandler& progress,
double reflectedIntensity(const ReSample& re_sample, ProgressHandler& progress,
SpecularElement& ele);
} // namespace SpecularComputation
} // namespace Compute
#endif // BORNAGAIN_SIM_COMPUTATION_SPECULARCOMPUTATION_H
......@@ -17,7 +17,7 @@
#include "Resample/Interparticle/IInterparticleStrategy.h"
#include "Resample/Processed/ReLayout.h"
double compute::dwbaContribution(const ReLayout& relayout, const DiffuseElement& ele)
double Compute::dwbaContribution(const ReLayout& relayout, const DiffuseElement& ele)
{
return relayout.interparticle_strategy()->evaluate(ele) * relayout.surfaceDensity();
}
......@@ -21,11 +21,13 @@
class ReLayout;
class DiffuseElement;
namespace Compute {
//! Computes the diffuse reflection from the rough interfaces of a sample.
//! Used by DWBAComputation.
namespace compute {
double dwbaContribution(const ReLayout& relayout, const DiffuseElement& ele);
}
} // namespace Compute
#endif // BORNAGAIN_SIM_CONTRIB_DWBACONTRIBUTION_H
......@@ -17,7 +17,7 @@
#include "Resample/Element/DiffuseElement.h"
#include "Resample/Flux/ScalarFlux.h"
double compute::gisasSpecularContribution(const DiffuseElement& ele)
double Compute::gisasSpecularContribution(const DiffuseElement& ele)
{
if (!ele.isSpecular())
return 0;
......
......@@ -20,11 +20,11 @@
class DiffuseElement;
namespace compute {
namespace Compute {
//! Computes the specular signal in the bin where q_parallel = 0. Used by DWBAComputation.
double gisasSpecularContribution(const DiffuseElement& ele);
} // namespace compute
} // namespace Compute
#endif // BORNAGAIN_SIM_CONTRIB_GISASSPECULARCONTRIBUTION_H
......@@ -93,7 +93,7 @@ complex_t get_sum8terms(const ReSample& re_sample, size_t i_layer, const Diffuse
} // namespace
double compute::roughMultiLayerContribution(const ReSample& re_sample, const DiffuseElement& ele)
double Compute::roughMultiLayerContribution(const ReSample& re_sample, const DiffuseElement& ele)
{
if (ele.alphaMean() < 0.0)
return 0;
......
......@@ -21,11 +21,12 @@
class ReSample;
class DiffuseElement;
namespace Compute {
//! Computes the diffuse reflection from the rough interfaces of a sample.
//! Used by DWBAComputation.
namespace compute {
double roughMultiLayerContribution(const ReSample& re_sample, const DiffuseElement& ele);
}
} // namespace Compute
#endif // BORNAGAIN_SIM_CONTRIB_ROUGHMULTILAYERCONTRIBUTION_H
......@@ -53,7 +53,7 @@ void SpecularSimulation::initElementVector()
void SpecularSimulation::runComputation(const ReSample& re_sample, size_t iElement, double weight)
{
SpecularElement& ele = *(m_eles.begin() + static_cast<long>(iElement));
double intensity = SpecularComputation::simulatedIntensity(re_sample, progress(), ele);
double intensity = Compute::reflectedIntensity(re_sample, progress(), ele);
if (background())
intensity = background()->addBackground(intensity);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment