Reference documentation for deal.II version 9.3.2
\(\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\}}\)
polynomials_wedge.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2021 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 
17 #ifndef dealii_base_polynomials_wedge_h
18 #define dealii_base_polynomials_wedge_h
19 
20 #include <deal.II/base/config.h>
21 
24 
26 
36 template <int dim>
38 {
39 public:
43  static const unsigned int dimension = dim;
44 
45  /*
46  * Constructor taking the polynomial @p degree as input.
47  *
48  * @note Currently, only linear (degree=1) and quadratic polynomials
49  * (degree=2) are implemented.
50  */
51  ScalarLagrangePolynomialWedge(const unsigned int degree);
52 
58  void
59  evaluate(const Point<dim> & unit_point,
60  std::vector<double> & values,
61  std::vector<Tensor<1, dim>> &grads,
62  std::vector<Tensor<2, dim>> &grad_grads,
63  std::vector<Tensor<3, dim>> &third_derivatives,
64  std::vector<Tensor<4, dim>> &fourth_derivatives) const override;
65 
66  double
67  compute_value(const unsigned int i, const Point<dim> &p) const override;
68 
74  template <int order>
76  compute_derivative(const unsigned int i, const Point<dim> &p) const;
77 
79  compute_1st_derivative(const unsigned int i,
80  const Point<dim> & p) const override;
81 
88  compute_2nd_derivative(const unsigned int i,
89  const Point<dim> & p) const override;
90 
97  compute_3rd_derivative(const unsigned int i,
98  const Point<dim> & p) const override;
99 
106  compute_4th_derivative(const unsigned int i,
107  const Point<dim> & p) const override;
108 
115  compute_grad(const unsigned int i, const Point<dim> &p) const override;
116 
123  compute_grad_grad(const unsigned int i, const Point<dim> &p) const override;
124 
125  std::string
126  name() const override;
127 
128  virtual std::unique_ptr<ScalarPolynomialsBase<dim>>
129  clone() const override;
130 
131 private:
136 
141 };
142 
143 
144 
145 template <int dim>
146 template <int order>
149  const unsigned int i,
150  const Point<dim> & p) const
151 {
152  Tensor<order, dim> der;
153 
154  AssertDimension(order, 1);
155  const auto grad = compute_grad(i, p);
156 
157  for (unsigned int i = 0; i < dim; i++)
158  der[i] = grad[i];
159 
160  return der;
161 }
162 
164 
165 #endif
Definition: point.h:111
Tensor< 1, dim > compute_grad(const unsigned int i, const Point< dim > &p) const override
Tensor< 1, dim > compute_1st_derivative(const unsigned int i, const Point< dim > &p) const override
Tensor< 4, dim > compute_4th_derivative(const unsigned int i, const Point< dim > &p) const override
std::string name() const override
Tensor< 3, dim > compute_3rd_derivative(const unsigned int i, const Point< dim > &p) const override
Tensor< 2, dim > compute_2nd_derivative(const unsigned int i, const Point< dim > &p) const override
ScalarLagrangePolynomialWedge(const unsigned int degree)
Tensor< order, dim > compute_derivative(const unsigned int i, const Point< dim > &p) const
virtual std::unique_ptr< ScalarPolynomialsBase< dim > > clone() const override
static const unsigned int dimension
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
double compute_value(const unsigned int i, const Point< dim > &p) const override
const BarycentricPolynomials< 1 > poly_line
const BarycentricPolynomials< 2 > poly_tri
Tensor< 2, dim > compute_grad_grad(const unsigned int i, const Point< dim > &p) const override
virtual unsigned int degree() const
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:396
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:397
#define AssertDimension(dim1, dim2)
Definition: exceptions.h:1622