16 #ifndef dealii_polynomials_piecewise_h
17 #define dealii_polynomials_piecewise_h
54 template <
typename number>
72 const bool spans_next_interval);
81 value(
const number x)
const;
98 value(
const number x, std::vector<number> &values)
const;
116 value(
const number x,
117 const unsigned int n_derivatives,
118 number * values)
const;
131 template <
class Archive>
133 serialize(Archive &ar,
const unsigned int version);
174 std::vector<PiecewisePolynomial<double>>
176 const unsigned int n_subdivisions,
177 const unsigned int base_degree);
188 template <
typename number>
192 return polynomial.degree();
197 template <
typename number>
206 const number step = 1. / n_intervals;
209 if (spans_two_intervals ==
true)
211 const number offset = step * interval;
214 else if (x > offset + step + step)
216 else if (x < offset + step)
219 y = offset + step + step - x;
223 const number offset = step * interval;
224 if (x < offset || x > offset + step)
230 return polynomial.value(y);
233 return polynomial.value(x);
238 template <
typename number>
239 template <
class Archive>
248 ar &spans_two_intervals;