16#ifndef dealii_polynomial_space_h
17#define dealii_polynomial_space_h
120 template <
class StreamType>
146 std::vector<double> & values,
237 virtual std::unique_ptr<ScalarPolynomialsBase<dim>>
238 clone()
const override;
249 std::array<unsigned int, dim>
273std::array<unsigned int, 1>
276std::array<unsigned int, 2>
279std::array<unsigned int, 3>
290 , polynomials(
pols.begin(),
pols.end())
291 , index_map(n_polynomials(
pols.size()))
292 , index_map_inverse(n_polynomials(
pols.size()))
298 for (
unsigned int i = 0; i < this->
n(); ++i)
311 return "PolynomialSpace";
316template <
class StreamType>
320 for (
unsigned int i = 0; i < this->n(); ++i)
322 const std::array<unsigned int, dim>
ix = compute_index(i);
324 for (
unsigned int d = 0; d < dim; ++d)
336 const std::array<unsigned int, dim> indices = compute_index(i);
340 std::vector<double> tmp(order + 1);
341 for (
unsigned int d = 0; d < dim; ++d)
343 polynomials[indices[d]].value(p(d), tmp);
344 for (
unsigned int j = 0;
j < order + 1; ++
j)
356 for (
unsigned int d = 0; d < dim; ++d)
359 for (
unsigned int x = 0;
x < dim; ++
x)
375 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
376 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
379 for (
unsigned int x = 0;
x < dim; ++
x)
397 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
398 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
399 for (
unsigned int d3 = 0;
d3 < dim; ++
d3)
402 for (
unsigned int x = 0;
x < dim; ++
x)
422 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
423 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
424 for (
unsigned int d3 = 0;
d3 < dim; ++
d3)
425 for (
unsigned int d4 = 0;
d4 < dim; ++
d4)
428 for (
unsigned int x = 0;
x < dim; ++
x)
const std::vector< Polynomials::Polynomial< double > > polynomials
void output_indices(StreamType &out) const
Tensor< order, dim > compute_derivative(const unsigned int i, const Point< dim > &p) const
PolynomialSpace(const std::vector< Pol > &pols)
double compute_value(const unsigned int i, const Point< dim > &p) const override
static constexpr unsigned int dimension
Tensor< 1, dim > compute_grad(const unsigned int i, const Point< dim > &p) const override
void set_numbering(const std::vector< unsigned int > &renumber)
static unsigned int n_polynomials(const unsigned int n)
std::array< unsigned int, dim > compute_index(const unsigned int n) const
std::string name() const override
virtual Tensor< 2, dim > compute_2nd_derivative(const unsigned int i, const Point< dim > &p) const override
virtual Tensor< 1, dim > compute_1st_derivative(const unsigned int i, const Point< dim > &p) const override
Tensor< 2, dim > compute_grad_grad(const unsigned int i, const Point< dim > &p) const override
virtual Tensor< 3, dim > compute_3rd_derivative(const unsigned int i, const Point< dim > &p) const override
std::vector< unsigned int > index_map
virtual std::unique_ptr< ScalarPolynomialsBase< dim > > clone() const override
void evaluate(const Point< dim > &unit_point, std::vector< double > &values, std::vector< Tensor< 1, dim > > &grads, std::vector< Tensor< 2, dim > > &grad_grads, std::vector< Tensor< 3, dim > > &third_derivatives, std::vector< Tensor< 4, dim > > &fourth_derivatives) const override
std::vector< unsigned int > index_map_inverse
virtual Tensor< 4, dim > compute_4th_derivative(const unsigned int i, const Point< dim > &p) const override
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)