Reference documentation for deal.II version GIT relicensing-687-gbf51c6da8c 2024-05-21 02:00:02+00:00
\(\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\}}\)
Loading...
Searching...
No Matches
polynomials_pyramid.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2021 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15
16#ifndef dealii_polynomials_pyramid_h
17#define dealii_polynomials_pyramid_h
18
19#include <deal.II/base/config.h>
20
22
24
29template <int dim>
31{
32public:
36 static constexpr unsigned int dimension = dim;
37
38 /*
39 * Constructor taking the polynomial @p degree as input.
40 *
41 * @note Currently, only linear polynomials (degree=1) are implemented.
42 */
43 ScalarLagrangePolynomialPyramid(const unsigned int degree);
44
50 void
51 evaluate(const Point<dim> &unit_point,
52 std::vector<double> &values,
53 std::vector<Tensor<1, dim>> &grads,
54 std::vector<Tensor<2, dim>> &grad_grads,
55 std::vector<Tensor<3, dim>> &third_derivatives,
56 std::vector<Tensor<4, dim>> &fourth_derivatives) const override;
57
58 double
59 compute_value(const unsigned int i, const Point<dim> &p) const override;
60
66 template <int order>
68 compute_derivative(const unsigned int i, const Point<dim> &p) const;
69
71 compute_1st_derivative(const unsigned int i,
72 const Point<dim> &p) const override;
73
75 compute_2nd_derivative(const unsigned int i,
76 const Point<dim> &p) const override;
77
84 compute_3rd_derivative(const unsigned int i,
85 const Point<dim> &p) const override;
86
93 compute_4th_derivative(const unsigned int i,
94 const Point<dim> &p) const override;
95
102 compute_grad(const unsigned int i, const Point<dim> &p) const override;
103
110 compute_grad_grad(const unsigned int i, const Point<dim> &p) const override;
111
112 std::string
113 name() const override;
114
115 virtual std::unique_ptr<ScalarPolynomialsBase<dim>>
116 clone() const override;
117};
118
119
120
121template <int dim>
122template <int order>
125 const unsigned int i,
126 const Point<dim> &p) const
127{
129
130 Assert(order == 1, ExcNotImplemented());
131 const auto grad = compute_grad(i, p);
132
133 for (unsigned int i = 0; i < dim; ++i)
134 der[i] = grad[i];
135
136 return der;
137}
138
140
141#endif
Definition point.h:111
Tensor< 2, dim > compute_grad_grad(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
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< order, dim > compute_derivative(const unsigned int i, const Point< dim > &p) const
Tensor< 3, dim > compute_3rd_derivative(const unsigned int i, const Point< dim > &p) const override
double compute_value(const unsigned int i, const Point< dim > &p) const override
static constexpr unsigned int dimension
virtual std::unique_ptr< ScalarPolynomialsBase< dim > > clone() const override
Tensor< 2, dim > compute_2nd_derivative(const unsigned int i, const Point< dim > &p) const override
std::string name() 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
virtual unsigned int degree() const
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:502
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)