Reference documentation for deal.II version 9.6.0
\(\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
fe_hermite.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2023 - 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_hermite_h
16#define dealii_fe_hermite_h
17
18#include <deal.II/base/config.h>
19
21
22#include <deal.II/fe/fe_poly.h>
23
24#include <string>
25#include <vector>
26
28
97template <int dim, int spacedim = dim>
98class FE_Hermite : public FE_Poly<dim, spacedim>
99{
100public:
107 FE_Hermite(const unsigned int fe_degree);
108
109 // Other functions
115 virtual std::string
116 get_name() const override;
117
121 virtual std::unique_ptr<FiniteElement<dim, spacedim>>
122 clone() const override;
123
127 virtual UpdateFlags
128 requires_update_flags(const UpdateFlags update_flags) const override;
129
133 virtual std::vector<std::pair<unsigned int, unsigned int>>
135 const FiniteElement<dim, spacedim> &fe_other) const override;
136
140 virtual std::vector<std::pair<unsigned int, unsigned int>>
142 const FiniteElement<dim, spacedim> &fe_other) const override;
143
147 virtual std::vector<std::pair<unsigned int, unsigned int>>
149 const unsigned int face_no = 0) const override;
150
156 const unsigned int codim) const override;
157
163 std::vector<unsigned int>
165
180 virtual void
183 const CellSimilarity::Similarity cell_similarity,
184 const Quadrature<dim> &quadrature,
185 const Mapping<dim, spacedim> &mapping,
186 const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
187 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
188 spacedim>
189 &mapping_data,
190 const typename FiniteElement<dim, spacedim>::InternalDataBase &fe_internal,
192 spacedim>
193 &output_data) const override;
194
195 using FiniteElement<dim, spacedim>::fill_fe_face_values;
196
202 virtual void
205 const unsigned int face_no,
206 const hp::QCollection<dim - 1> &quadrature,
207 const Mapping<dim, spacedim> &mapping,
208 const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
209 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
210 spacedim>
211 &mapping_data,
212 const typename FiniteElement<dim, spacedim>::InternalDataBase &fe_internal,
214 spacedim>
215 &output_data) const override;
216
217
218
219protected:
224 virtual std::unique_ptr<
227 const UpdateFlags update_flags,
228 const Mapping<dim, spacedim> &mapping,
229 const Quadrature<dim> &quadrature,
231 spacedim>
232 &output_data) const override
233 {
234 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
235 data_ptr = FE_Poly<dim, spacedim>::get_data(update_flags,
236 mapping,
237 quadrature,
238 output_data);
239 auto &data =
240 dynamic_cast<typename FE_Poly<dim, spacedim>::InternalData &>(*data_ptr);
241
242 const unsigned int n_q_points = quadrature.size();
243
244 if ((update_flags & update_values) &&
245 ((output_data.shape_values.n_rows() > 0) &&
246 (output_data.shape_values.n_cols() == n_q_points)))
247 data.shape_values = output_data.shape_values;
248
249 return data_ptr;
250 }
251
252
253
254private:
262 unsigned int regularity;
263
264
265
266public:
270 inline unsigned int
272 {
273 return this->regularity;
274 };
275};
276
282
283#endif
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
unsigned int get_regularity() const
Definition fe_hermite.h:271
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &other_fe, const unsigned int codim) const override
virtual void fill_fe_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature< dim > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const ::internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > get_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
Definition fe_hermite.h:226
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
virtual std::string get_name() const override
std::vector< unsigned int > get_lexicographic_to_hierarchic_numbering() const
FE_Hermite(const unsigned int fe_degree)
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other, const unsigned int face_no=0) const override
virtual void fill_fe_face_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const hp::QCollection< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const ::internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
unsigned int regularity
Definition fe_hermite.h:262
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > get_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
Definition fe_poly.h:262
Abstract base class for mapping classes.
Definition mapping.h:318
unsigned int size() const
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:503
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:504
UpdateFlags
@ update_values
Shape function values.