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

rm auxiliary class

parent 18fa2ede
No related branches found
No related tags found
1 merge request!1021work on readability of slicing machinery
......@@ -25,35 +25,6 @@
#include <stdexcept>
#include <utility>
// ************************************************************************************************
// define local class
// ************************************************************************************************
//! Helper class for the graded layer approximation. Generates limits for each layer, indicating
//! the region of the layer (along z) that contains particle(s)
//!
//! The constructor takes the bottom layer z-coordinates as parameter. This means that for N
//! layers, only N-1 coordinates need to be passed (the last layer is assumed to be semi-infinite).
//! @ingroup algorithms_internal
class LayerFillLimits {
public:
LayerFillLimits(std::vector<double> layers_bottomz);
//! Particle limits are given in global coordinates
void update(std::vector<ZLimits>& result, const std::vector<double> ZBottoms,
const ZLimits& particle_limits, double offset);
private:
std::vector<double> m_ZBottoms;
};
#ifndef INCLUDED_BY_TEST
// ************************************************************************************************
// implement local class
// ************************************************************************************************
namespace {
std::vector<double> bottomLayerCoordinates(const MultiLayer& sample)
......@@ -87,16 +58,6 @@ size_t iLayerBottom(double bottom, const std::vector<double> ZBottoms)
} // namespace
LayerFillLimits::LayerFillLimits(std::vector<double> layers_bottomz)
: m_ZBottoms(std::move(layers_bottomz))
{
}
void LayerFillLimits::update(std::vector<ZLimits>& result, const std::vector<double> ZBottoms,
const ZLimits& particle_span, double offset)
{
}
// ************************************************************************************************
// exported function
// ************************************************************************************************
......@@ -112,7 +73,6 @@ std::vector<ZLimits> Compute::Slicing::particleRegions(const MultiLayer& sample,
return result;
const std::vector<double> ZBottoms = bottomLayerCoordinates(sample);
LayerFillLimits layer_fill_limits(ZBottoms);
for (size_t i = 0; i < N; ++i) {
const Layer* layer = sample.layer(i);
const double offset = (i == 0) ? 0 : ZBottoms[i - 1];
......@@ -144,5 +104,3 @@ std::vector<ZLimits> Compute::Slicing::particleRegions(const MultiLayer& sample,
}
return result;
}
#endif // INCLUDED_BY_TEST
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