23 const double multiplier)
24 : length_(L), dL0_(dL0), max_dL_(max_dL), multiplier_(multiplier)
28 if (multiplier < 1.0 && dL0 / (1.0 - multiplier) < L)
31 "Using dL0={:g} and multiplier={:g} the generated subdivisions can "
32 "not sum up to a total length of {:g}.",
41 std::vector<double> vec_x;
55 double last_dx = vec_x[vec_x.size() - 1] - vec_x[vec_x.size() - 2];
56 if (
length_ - vec_x.back() < last_dx)
58 vec_x[vec_x.size() - 1] =
length_;
69 const double L,
const std::size_t num_subdivisions,
const double multiplier)
70 : length_{L}, num_subdivisions_{num_subdivisions}, multiplier_{multiplier}
76 std::vector<double> subdivisions;
78 subdivisions.push_back(0.0);
87 subdivisions.push_back(dx * i);
99 subdivisions.push_back(a * (qi - 1.0) / (q - 1.0));
104 subdivisions.push_back(
length_);
GradualSubdivisionFixedNum(const double L, const std::size_t num_subdivisions, const double multiplier)
std::vector< double > operator()() const override
Returns a vector of subdivided points.
const std::size_t num_subdivisions_
GradualSubdivision(const double L, const double dL0, const double max_dL, const double multiplier)
std::vector< double > operator()() const override
Returns a vector of subdivided points.