Debian Codegraph @

include/deal.II/fe/fe_wedge_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_wedge_h
16 #define dealii_fe_fe_p_wedge_h
17
18 #include <deal.II/base/config.h>
19
20 #include <deal.II/base/polynomials_wedge.h>
21
22 #include <deal.II/fe/fe_poly.h>
23
24 DEAL_II_NAMESPACE_OPEN
25
26 /**
27 * Base class of FE_WedgeP and FE_WedgeDGP.
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_WedgePoly : public dealii::FE_Poly<dim, spacedim>
36 {
37 public:
38 /**
39 * Constructor.
40 */
41 FE_WedgePoly(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 wedge 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 pyramids it is FE_PyramidP.
60 *
61 * @note Currently, only linear (degree=1) and quadratic polynomials
62 * (degree=2) are implemented. See also the documentation of
63 * ScalarLagrangePolynomialWedge.
64 *
65 * Also see
66 * @ref simplex "Simplex support".
67 */
68 template <int dim, int spacedim = dim>
69 class FE_WedgeP : public FE_WedgePoly<dim, spacedim>
70 {
71 public:
72 /**
73 * Constructor.
74 */
75 FE_WedgeP(const unsigned int degree);
76
77 /**
78 * @copydoc dealii::FiniteElement::clone()
79 */
80 std::unique_ptr<FiniteElement<dim, spacedim>>
81 clone() const override;
82
83 /**
84 * Return a string that uniquely identifies a finite element. This class
85 * returns <tt>FE_WedgeP<dim>(degree)</tt>, with @p dim and @p degree
86 * replaced by appropriate values.
87 */
88 std::string
89 get_name() const override;
90
91 /**
92 * @copydoc dealii::FiniteElement::compare_for_domination()
93 */
94 FiniteElementDomination::Domination
95 compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
96 const unsigned int codim) const override;
97
98 /**
99 * @copydoc dealii::FiniteElement::hp_vertex_dof_identities()
100 */
101 std::vector<std::pair<unsigned int, unsigned int>>
102 hp_vertex_dof_identities(
103 const FiniteElement<dim, spacedim> &fe_other) const override;
104
105 /**
106 * @copydoc dealii::FiniteElement::hp_line_dof_identities()
107 */
108 std::vector<std::pair<unsigned int, unsigned int>>
109 hp_line_dof_identities(
110 const FiniteElement<dim, spacedim> &fe_other) const override;
111
112 /**
113 * @copydoc dealii::FiniteElement::hp_quad_dof_identities()
114 */
115 std::vector<std::pair<unsigned int, unsigned int>>
116 hp_quad_dof_identities(const FiniteElement<dim, spacedim> &fe_other,
117 const unsigned int face_no = 0) const override;
118 };
119
120 /**
121 * Implementation of a scalar Lagrange finite element on a wedge that yields
122 * the finite element space of discontinuous, piecewise polynomials of
123 * degree $k$.
124 *
125 * @note Currently, only linear (degree=1) and quadratic polynomials
126 * (degree=2) are implemented. See also the documentation of
127 * ScalarLagrangePolynomialWedge.
128 *
129 * Also see
130 * @ref simplex "Simplex support".
131 */
132 template <int dim, int spacedim = dim>
133 class FE_WedgeDGP : public FE_WedgePoly<dim, spacedim>
134 {
135 public:
136 /**
137 * Constructor.
138 */
139 FE_WedgeDGP(const unsigned int degree);
140
141 /**
142 * @copydoc dealii::FiniteElement::clone()
143 */
144 std::unique_ptr<FiniteElement<dim, spacedim>>
145 clone() const override;
146
147 /**
148 * Return a string that uniquely identifies a finite element. This class
149 * returns <tt>FE_WedgeDGP<dim>(degree)</tt>, with @p dim and @p degree
150 * replaced by appropriate values.
151 */
152 std::string
153 get_name() const override;
154 };
155
156 DEAL_II_NAMESPACE_CLOSE
157
158 #endif