16#ifndef dealii_polynomials_piecewise_h
17#define dealii_polynomials_piecewise_h
63 template <
typename number>
81 const bool spans_next_interval);
90 value(
const number x)
const;
107 value(
const number x, std::vector<number> &
values)
const;
125 value(
const number x,
126 const unsigned int n_derivatives,
141 template <
class Archive>
143 serialize(Archive &ar,
const unsigned int version);
184 std::vector<PiecewisePolynomial<double>>
186 const unsigned int n_subdivisions,
187 const unsigned int base_degree);
198 template <
typename number>
202 return polynomial.degree();
207 template <
typename number>
216 const number step = 1. / n_intervals;
219 if (spans_two_intervals ==
true)
221 const number offset = step * interval;
224 else if (x > offset + step + step)
226 else if (x < offset + step)
229 y = offset + step + step - x;
233 const number offset = step * interval;
234 if (x < offset || x > offset + step)
240 return polynomial.value(y);
243 return polynomial.value(x);
248 template <
typename number>
249 template <
class Archive>
258 ar &spans_two_intervals;
Polynomial< number > polynomial
unsigned int degree() const
PiecewisePolynomial(const Polynomial< number > &coefficients_on_interval, const unsigned int n_intervals, const unsigned int interval, const bool spans_next_interval)
void serialize(Archive &ar, const unsigned int version)
number value(const number x) const
virtual std::size_t memory_consumption() const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define AssertIndexRange(index, range)
std::vector< PiecewisePolynomial< double > > generate_complete_Lagrange_basis_on_subdivisions(const unsigned int n_subdivisions, const unsigned int base_degree)