Debian Codegraph @

include/deal.II/fe/fe_pyramid_p.h

raw
1 // ------------------------------------------------------------------------
2 //
3 // SPDX-License-Identifier: LGPL-2.1-or-later
4 // Copyright (C) 2021 - 2024 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 #ifndef dealii_fe_fe_p_pyramids_h
16 #define dealii_fe_fe_p_pyramids_h
17
18 #include <deal.II/base/config.h>
19
20 #include <deal.II/base/polynomials_pyramid.h>
21
22 #include <deal.II/fe/fe_poly.h>
23
24 DEAL_II_NAMESPACE_OPEN
25
26 /**
27 * Base class of FE_PyramidP and FE_PyramidDGP.
28 *
29 * @note Only implemented for 3d.
30 *
31 * Also see
32 * @ref simplex "Simplex support".
33 */
34 template <int dim, int spacedim = dim>
35 class FE_PyramidPoly : public dealii::FE_Poly<dim, spacedim>
36 {
37 public:
38 /**
39 * Constructor.
40 */
41 FE_PyramidPoly(const unsigned int degree,
42 const internal::GenericDoFsPerObject &dpos,
43 const typename FiniteElementData<dim>::Conformity conformity);
44
45 /**
46 * @copydoc dealii::FiniteElement::convert_generalized_support_point_values_to_dof_values()
47 */
48 virtual void
49 convert_generalized_support_point_values_to_dof_values(
50 const std::vector<Vector<double>> &support_point_values,
51 std::vector<double> &nodal_values) const override;
52 };
53
54 /**
55 * Implementation of a scalar Lagrange finite element on a pyramid that yields
56 * the finite element space of continuous, piecewise polynomials of
57 * degree $k$. The corresponding element on simplex (triangular or tetrahedral)
58 * cells is FE_SimplexP, on hypercube cells it is FE_Q, and
59 * on wedges it is FE_WedgeP.
60 *
61 * @note Currently, only linear polynomials (degree=1) are implemented. See
62 * also the documentation of ScalarLagrangePolynomialPyramid.
63 *
64 * Also see
65 * @ref simplex "Simplex support".
66 */
67 template <int dim, int spacedim = dim>
68 class FE_PyramidP : public FE_PyramidPoly<dim, spacedim>
69 {
70 public:
71 /**
72 * Constructor.
73 */
74 FE_PyramidP(const unsigned int degree);
75
76 /**
77 * @copydoc dealii::FiniteElement::clone()
78 */
79 std::unique_ptr<FiniteElement<dim, spacedim>>
80 clone() const override;
81
82 /**
83 * Return a string that uniquely identifies a finite element. This class
84 * returns <tt>FE_PyramidP<dim>(degree)</tt>, with @p dim and @p degree
85 * replaced by appropriate values.
86 */
87 std::string
88 get_name() const override;
89
90 /**
91 * @copydoc dealii::FiniteElement::compare_for_domination()
92 */
93 FiniteElementDomination::Domination
94 compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
95 const unsigned int codim) const override;
96
97 /**
98 * @copydoc dealii::FiniteElement::hp_vertex_dof_identities()
99 */
100 std::vector<std::pair<unsigned int, unsigned int>>
101 hp_vertex_dof_identities(
102 const FiniteElement<dim, spacedim> &fe_other) const override;
103
104 /**
105 * @copydoc dealii::FiniteElement::hp_line_dof_identities()
106 */
107 std::vector<std::pair<unsigned int, unsigned int>>
108 hp_line_dof_identities(
109 const FiniteElement<dim, spacedim> &fe_other) const override;
110
111 /**
112 * @copydoc dealii::FiniteElement::hp_quad_dof_identities()
113 */
114 std::vector<std::pair<unsigned int, unsigned int>>
115 hp_quad_dof_identities(const FiniteElement<dim, spacedim> &fe_other,
116 const unsigned int face_no = 0) const override;
117 };
118
119 /**
120 * Implementation of a scalar Lagrange finite element on a pyramid that yields
121 * the finite element space of discontinuous, piecewise polynomials of
122 * degree $k$.
123 *
124 * @note Currently, only linear polynomials (degree=1) are implemented. See
125 * also the documentation of ScalarLagrangePolynomialPyramid.
126 *
127 * Also see
128 * @ref simplex "Simplex support".
129 */
130 template <int dim, int spacedim = dim>
131 class FE_PyramidDGP : public FE_PyramidPoly<dim, spacedim>
132 {
133 public:
134 /**
135 * Constructor.
136 */
137 FE_PyramidDGP(const unsigned int degree);
138
139 /**
140 * @copydoc dealii::FiniteElement::clone()
141 */
142 std::unique_ptr<FiniteElement<dim, spacedim>>
143 clone() const override;
144
145 /**
146 * Return a string that uniquely identifies a finite element. This class
147 * returns <tt>FE_PyramidDGP<dim>(degree)</tt>, with @p dim and @p degree
148 * replaced by appropriate values.
149 */
150 std::string
151 get_name() const override;
152 };
153
154 DEAL_II_NAMESPACE_CLOSE
155
156 #endif