|
Reference documentation for deal.II version 9.2.0
|
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\)
\(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\)
\(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\)
\(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Go to the documentation of this file.
16 #ifndef dealii_polynomial_space_h
17 #define dealii_polynomial_space_h
121 template <
class StreamType>
147 std::vector<double> & values,
205 name()
const override;
210 virtual std::unique_ptr<ScalarPolynomialsBase<dim>>
211 clone()
const override;
222 std::array<unsigned int, dim>
246 std::array<unsigned int, 1>
249 std::array<unsigned int, 2>
252 std::array<unsigned int, 3>
263 , polynomials(pols.
begin(), pols.
end())
264 , index_map(n_polynomials(pols.size()))
265 , index_map_inverse(n_polynomials(pols.size()))
271 for (
unsigned int i = 0; i < this->
n(); ++i)
284 return "PolynomialSpace";
289 template <
class StreamType>
293 for (
unsigned int i = 0; i < this->
n(); ++i)
297 for (
unsigned int d = 0;
d < dim; ++
d)
309 const std::array<unsigned int, dim> indices =
compute_index(i);
311 double v[dim][order + 1];
313 std::vector<double> tmp(order + 1);
314 for (
unsigned int d = 0;
d < dim; ++
d)
317 for (
unsigned int j = 0; j < order + 1; ++j)
329 for (
unsigned int d = 0;
d < dim; ++
d)
331 derivative_1[
d] = 1.;
332 for (
unsigned int x = 0; x < dim; ++x)
334 unsigned int x_order = 0;
338 derivative_1[
d] *= v[x][x_order];
348 for (
unsigned int d1 = 0; d1 < dim; ++d1)
349 for (
unsigned int d2 = 0; d2 < dim; ++d2)
351 derivative_2[d1][d2] = 1.;
352 for (
unsigned int x = 0; x < dim; ++x)
354 unsigned int x_order = 0;
360 derivative_2[d1][d2] *= v[x][x_order];
370 for (
unsigned int d1 = 0; d1 < dim; ++d1)
371 for (
unsigned int d2 = 0; d2 < dim; ++d2)
372 for (
unsigned int d3 = 0; d3 < dim; ++d3)
374 derivative_3[d1][d2][d3] = 1.;
375 for (
unsigned int x = 0; x < dim; ++x)
377 unsigned int x_order = 0;
385 derivative_3[d1][d2][d3] *= v[x][x_order];
395 for (
unsigned int d1 = 0; d1 < dim; ++d1)
396 for (
unsigned int d2 = 0; d2 < dim; ++d2)
397 for (
unsigned int d3 = 0; d3 < dim; ++d3)
398 for (
unsigned int d4 = 0; d4 < dim; ++d4)
400 derivative_4[d1][d2][d3][d4] = 1.;
401 for (
unsigned int x = 0; x < dim; ++x)
403 unsigned int x_order = 0;
413 derivative_4[d1][d2][d3][d4] *= v[x][x_order];
std::array< unsigned int, dim > compute_index(const unsigned int n) const
Tensor< 1, dim > compute_grad(const unsigned int i, const Point< dim > &p) const
void set_numbering(const std::vector< unsigned int > &renumber)
static ::ExceptionBase & ExcNotImplemented()
std::vector< unsigned int > index_map_inverse
const std::vector< Polynomials::Polynomial< double > > polynomials
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
PolynomialSpace(const std::vector< Pol > &pols)
VectorType::value_type * begin(VectorType &V)
#define DEAL_II_NAMESPACE_OPEN
double compute_value(const unsigned int i, const Point< dim > &p) const
VectorType::value_type * end(VectorType &V)
static const unsigned int dimension
#define Assert(cond, exc)
std::vector< unsigned int > index_map
Tensor< 2, dim > compute_grad_grad(const unsigned int i, const Point< dim > &p) const
std::string name() const override
static unsigned int n_polynomials(const unsigned int n)
void output_indices(StreamType &out) const
virtual std::unique_ptr< ScalarPolynomialsBase< dim > > clone() const override
#define DEAL_II_NAMESPACE_CLOSE
Tensor< order, dim > compute_derivative(const unsigned int i, const Point< dim > &p) const
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