16 #ifndef dealii__polynomials_piecewise_h 17 #define dealii__polynomials_piecewise_h 21 #include <deal.II/base/config.h> 22 #include <deal.II/base/exceptions.h> 23 #include <deal.II/base/subscriptor.h> 24 #include <deal.II/base/polynomial.h> 25 #include <deal.II/base/point.h> 29 DEAL_II_NAMESPACE_OPEN
54 template <
typename number>
72 const bool spans_next_interval);
80 number
value (
const number x)
const;
96 void value (
const number x,
97 std::vector<number> &values)
const;
114 void value (
const number x,
115 const unsigned int n_derivatives,
116 number *values)
const;
122 unsigned int degree ()
const;
128 template <
class Archive>
129 void serialize (Archive &ar,
const unsigned int version);
163 std::vector<PiecewisePolynomial<double> >
165 const unsigned int base_degree);
176 template <
typename number>
181 return polynomial.degree();
186 template <
typename number>
196 const number step = 1./n_intervals;
199 if (spans_two_intervals ==
true)
201 const number offset = step * interval;
204 else if (x>offset+step+step)
206 else if (x<offset+step)
209 y = offset+step+step-x;
213 const number offset = step * interval;
214 if (x<offset || x>offset+step)
220 return polynomial.value(y);
223 return polynomial.value(x);
228 template <
typename number>
229 template <
class Archive>
239 ar &spans_two_intervals;
244 DEAL_II_NAMESPACE_CLOSE
#define AssertIndexRange(index, range)
void serialize(Archive &ar, const unsigned int version)
number value(const number x) const
std::vector< PiecewisePolynomial< double > > generate_complete_Lagrange_basis_on_subdivisions(const unsigned int n_subdivisions, const unsigned int base_degree)
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)