deal.II version GIT relicensing-6868-gafcc71a9cb 2026-10-12 01:10:01+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_wedge.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2021 - 2026 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13
14#ifndef dealii_base_polynomials_wedge_h
15#define dealii_base_polynomials_wedge_h
16
17#include <deal.II/base/config.h>
18
20#include <deal.II/base/point.h>
24#include <deal.II/base/tensor.h>
25
27
28
30
31
32namespace internal
33{
38 template <int dim>
39 std::vector<Point<dim>>
40 get_wedge_support_points(const unsigned int degree)
41 {
42 if constexpr (dim == 3)
43 {
44 if (degree == 1)
45 return {ReferenceCells::Wedge.vertex(0),
46 ReferenceCells::Wedge.vertex(1),
47 ReferenceCells::Wedge.vertex(2),
48 ReferenceCells::Wedge.vertex(3),
49 ReferenceCells::Wedge.vertex(4),
50 ReferenceCells::Wedge.vertex(5)};
51 else if (degree == 2)
52 return {// vertices
53 ReferenceCells::Wedge.vertex(0),
54 ReferenceCells::Wedge.vertex(1),
55 ReferenceCells::Wedge.vertex(2),
56 ReferenceCells::Wedge.vertex(3),
57 ReferenceCells::Wedge.vertex(4),
58 ReferenceCells::Wedge.vertex(5),
59 // edges
60 0.5 * (ReferenceCells::Wedge.vertex(0) +
61 ReferenceCells::Wedge.vertex(1)),
62 0.5 * (ReferenceCells::Wedge.vertex(1) +
63 ReferenceCells::Wedge.vertex(2)),
64 0.5 * (ReferenceCells::Wedge.vertex(2) +
65 ReferenceCells::Wedge.vertex(0)),
66 0.5 * (ReferenceCells::Wedge.vertex(3) +
67 ReferenceCells::Wedge.vertex(4)),
68 0.5 * (ReferenceCells::Wedge.vertex(4) +
69 ReferenceCells::Wedge.vertex(5)),
70 0.5 * (ReferenceCells::Wedge.vertex(5) +
71 ReferenceCells::Wedge.vertex(3)),
72 0.5 * (ReferenceCells::Wedge.vertex(3) +
73 ReferenceCells::Wedge.vertex(0)),
74 0.5 * (ReferenceCells::Wedge.vertex(1) +
75 ReferenceCells::Wedge.vertex(4)),
76 0.5 * (ReferenceCells::Wedge.vertex(2) +
77 ReferenceCells::Wedge.vertex(5)),
78 // quad midpoints
79 0.25 * (ReferenceCells::Wedge.vertex(0) +
80 ReferenceCells::Wedge.vertex(1) +
81 ReferenceCells::Wedge.vertex(3) +
82 ReferenceCells::Wedge.vertex(4)),
83 0.25 * (ReferenceCells::Wedge.vertex(1) +
84 ReferenceCells::Wedge.vertex(2) +
85 ReferenceCells::Wedge.vertex(4) +
86 ReferenceCells::Wedge.vertex(5)),
87 0.25 * (ReferenceCells::Wedge.vertex(2) +
88 ReferenceCells::Wedge.vertex(0) +
89 ReferenceCells::Wedge.vertex(5) +
90 ReferenceCells::Wedge.vertex(3))};
91 else
93 }
94
96 return {};
97 }
98} // namespace internal
99
100
111template <int dim>
114{
115public:
119 static constexpr unsigned int dimension = dim;
120
121 /*
122 * Constructor taking the polynomial @p degree and the support points as
123 * arguments.
124 */
125 ScalarLagrangePolynomialWedge(const unsigned int degree,
126 const std::vector<Point<dim>> &support_points);
127
128 /*
129 * Legacy constructor taking the polynomial @p degree.
130 * Note: only works for degrees one and two.
131 */
132 ScalarLagrangePolynomialWedge(const unsigned int degree);
133
134 std::string
135 name() const override;
136
137 virtual std::unique_ptr<ScalarPolynomialsBase<dim>>
138 clone() const override;
139
140private:
145 double
147 const unsigned int i,
148 const unsigned int j,
149 const unsigned int k,
150 const Point<dim> &p) const override;
151
157 double
158 evaluate_orthogonal_basis_function(const unsigned int i,
159 const Point<dim> &p) const override;
160
168 const unsigned int i,
169 const unsigned int j,
170 const unsigned int k,
171 const Point<dim> &p) const override;
172
179 evaluate_orthogonal_basis_derivative(const unsigned int i,
180 const Point<dim> &p) const override;
181};
182
184
185#endif
Definition point.h:111
std::string name() const override
Tensor< 1, dim > evaluate_orthogonal_basis_derivative(const unsigned int i, const Point< dim > &p) const override
virtual std::unique_ptr< ScalarPolynomialsBase< dim > > clone() const override
double evaluate_orthogonal_basis_function_by_degree(const unsigned int i, const unsigned int j, const unsigned int k, const Point< dim > &p) const override
double evaluate_orthogonal_basis_function(const unsigned int i, const Point< dim > &p) const override
Tensor< 1, dim > evaluate_orthogonal_basis_derivative_by_degree(const unsigned int i, const unsigned int j, const unsigned int k, const Point< dim > &p) const override
static constexpr unsigned int dimension
virtual unsigned int degree() const
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
#define DEAL_II_ASSERT_UNREACHABLE()
#define DEAL_II_NOT_IMPLEMENTED()
constexpr ReferenceCell< 3 > Wedge
std::vector< Point< dim > > get_wedge_support_points(const unsigned int degree)