Reference documentation for deal.II version 9.3.3
\(\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\}}\)
fe_nedelec_sz.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2015 - 2020 by the deal.II authors
4//
5// This file is part of the deal.II library.
6//
7// The deal.II library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 2.1 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE.md at
12// the top level directory of deal.II.
13//
14// ---------------------------------------------------------------------
15
16#ifndef dealii_fe_nedelec_sz_h
17#define dealii_fe_nedelec_sz_h
18
19#include <deal.II/base/config.h>
20
24
25#include <deal.II/fe/fe.h>
27#include <deal.II/fe/mapping.h>
28
30
33
72template <int dim, int spacedim = dim>
73class FE_NedelecSZ : public FiniteElement<dim, dim>
74{
75public:
76 static_assert(dim == spacedim,
77 "FE_NedelecSZ is only implemented for dim==spacedim!");
78
91 FE_NedelecSZ(const unsigned int order);
92
93 virtual UpdateFlags
94 requires_update_flags(const UpdateFlags update_flags) const override;
95
96 virtual std::string
97 get_name() const override;
98
99 virtual std::unique_ptr<FiniteElement<dim, dim>>
100 clone() const override;
101
106 virtual double
107 shape_value(const unsigned int i, const Point<dim> &p) const override;
108
112 virtual double
113 shape_value_component(const unsigned int i,
114 const Point<dim> & p,
115 const unsigned int component) const override;
116
121 virtual Tensor<1, dim>
122 shape_grad(const unsigned int i, const Point<dim> &p) const override;
123
127 virtual Tensor<1, dim>
128 shape_grad_component(const unsigned int i,
129 const Point<dim> & p,
130 const unsigned int component) const override;
131
136 virtual Tensor<2, dim>
137 shape_grad_grad(const unsigned int i, const Point<dim> &p) const override;
138
142 virtual Tensor<2, dim>
143 shape_grad_grad_component(const unsigned int i,
144 const Point<dim> & p,
145 const unsigned int component) const override;
146
147protected:
153
154 virtual std::unique_ptr<
155 typename ::FiniteElement<dim, spacedim>::InternalDataBase>
156 get_data(
157 const UpdateFlags update_flags,
158 const Mapping<dim, spacedim> &mapping,
159 const Quadrature<dim> & quadrature,
161 spacedim>
162 &output_data) const override;
163
169 virtual void
171 const typename Triangulation<dim, dim>::cell_iterator &cell,
172 const CellSimilarity::Similarity cell_similarity,
173 const Quadrature<dim> & quadrature,
174 const Mapping<dim, dim> & mapping,
175 const typename Mapping<dim, dim>::InternalDataBase & mapping_internal,
176 const ::internal::FEValuesImplementation::MappingRelatedData<dim, dim>
177 & mapping_data,
178 const typename FiniteElement<dim, dim>::InternalDataBase &fedata,
180 &data) const override;
181
182 using FiniteElement<dim, spacedim>::fill_fe_face_values;
183
189 virtual void
191 const typename Triangulation<dim, dim>::cell_iterator &cell,
192 const unsigned int face_no,
193 const hp::QCollection<dim - 1> & quadrature,
194 const Mapping<dim, dim> & mapping,
195 const typename Mapping<dim, dim>::InternalDataBase & mapping_internal,
196 const ::internal::FEValuesImplementation::MappingRelatedData<dim, dim>
197 & mapping_data,
198 const typename FiniteElement<dim, dim>::InternalDataBase &fedata,
200 &data) const override;
201
205 virtual void
207 const typename Triangulation<dim, dim>::cell_iterator &cell,
208 const unsigned int face_no,
209 const unsigned int sub_no,
210 const Quadrature<dim - 1> & quadrature,
211 const Mapping<dim, dim> & mapping,
212 const typename Mapping<dim, dim>::InternalDataBase & mapping_internal,
213 const ::internal::FEValuesImplementation::MappingRelatedData<dim, dim>
214 & mapping_data,
215 const typename FiniteElement<dim, dim>::InternalDataBase &fedata,
217 &data) const override;
218
239 {
240 public:
247 mutable std::vector<std::vector<Tensor<1, dim>>> shape_values;
248
256 mutable std::vector<std::vector<DerivativeForm<1, dim, dim>>> shape_grads;
257
273 std::vector<std::vector<std::vector<double>>> sigma_imj_values;
274
290 std::vector<std::vector<std::vector<double>>> sigma_imj_grads;
291
303 std::vector<std::vector<double>> edge_sigma_values;
304
316 std::vector<std::vector<double>> edge_sigma_grads;
317
333 std::vector<std::vector<double>> edge_lambda_values;
334
344 std::vector<std::vector<double>> edge_lambda_grads_2d;
345
355 std::vector<std::vector<std::vector<double>>> edge_lambda_grads_3d;
356
367 std::vector<std::vector<std::vector<double>>> edge_lambda_gradgrads_3d;
368
385 std::vector<std::vector<double>> face_lambda_values;
386
395 std::vector<std::vector<double>> face_lambda_grads;
396 };
397
398private:
407 static std::vector<unsigned int>
408 get_dpo_vector(const unsigned int degree);
409
413 std::vector<Polynomials::Polynomial<double>> IntegratedLegendrePolynomials;
414
419 void
420 create_polynomials(const unsigned int degree);
421
425 unsigned int
426 compute_num_dofs(const unsigned int degree) const;
427
432 void
434 const Quadrature<dim> &quadrature,
435 const InternalData & fedata) const;
436
441 void
443 const Quadrature<dim> &quadrature,
444 const InternalData & fedata) const;
445};
446
447
448
452
453#endif
std::vector< std::vector< double > > edge_lambda_grads_2d
std::vector< std::vector< Tensor< 1, dim > > > shape_values
std::vector< std::vector< std::vector< double > > > sigma_imj_values
std::vector< std::vector< double > > edge_sigma_grads
std::vector< std::vector< double > > edge_sigma_values
std::vector< std::vector< std::vector< double > > > sigma_imj_grads
std::vector< std::vector< double > > face_lambda_values
std::vector< std::vector< DerivativeForm< 1, dim, dim > > > shape_grads
std::vector< std::vector< std::vector< double > > > edge_lambda_grads_3d
std::vector< std::vector< double > > edge_lambda_values
std::vector< std::vector< std::vector< double > > > edge_lambda_gradgrads_3d
std::vector< std::vector< double > > face_lambda_grads
virtual void fill_fe_values(const typename Triangulation< dim, dim >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature< dim > &quadrature, const Mapping< dim, dim > &mapping, const typename Mapping< dim, dim >::InternalDataBase &mapping_internal, const ::internal::FEValuesImplementation::MappingRelatedData< dim, dim > &mapping_data, const typename FiniteElement< dim, dim >::InternalDataBase &fedata, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, dim > &data) const override
unsigned int compute_num_dofs(const unsigned int degree) const
virtual std::unique_ptr< FiniteElement< dim, dim > > clone() const override
virtual void fill_fe_face_values(const typename Triangulation< dim, dim >::cell_iterator &cell, const unsigned int face_no, const hp::QCollection< dim - 1 > &quadrature, const Mapping< dim, dim > &mapping, const typename Mapping< dim, dim >::InternalDataBase &mapping_internal, const ::internal::FEValuesImplementation::MappingRelatedData< dim, dim > &mapping_data, const typename FiniteElement< dim, dim >::InternalDataBase &fedata, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, dim > &data) const override
FE_NedelecSZ(const unsigned int order)
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
virtual void fill_fe_subface_values(const typename Triangulation< dim, dim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const Quadrature< dim - 1 > &quadrature, const Mapping< dim, dim > &mapping, const typename Mapping< dim, dim >::InternalDataBase &mapping_internal, const ::internal::FEValuesImplementation::MappingRelatedData< dim, dim > &mapping_data, const typename FiniteElement< dim, dim >::InternalDataBase &fedata, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, dim > &data) const override
void create_polynomials(const unsigned int degree)
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
virtual std::string get_name() const override
virtual Tensor< 2, dim > shape_grad_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const override
std::vector< Polynomials::Polynomial< double > > IntegratedLegendrePolynomials
virtual Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const override
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
void fill_face_values(const typename Triangulation< dim, dim >::cell_iterator &cell, const Quadrature< dim > &quadrature, const InternalData &fedata) const
void fill_edge_values(const typename Triangulation< dim, dim >::cell_iterator &cell, const Quadrature< dim > &quadrature, const InternalData &fedata) const
MappingKind mapping_kind
virtual double shape_value(const unsigned int i, const Point< dim > &p) const override
const unsigned int degree
Definition: fe_base.h:435
friend class InternalDataBase
Definition: fe.h:3066
Definition: point.h:111
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:402
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:403
UpdateFlags
MappingKind
Definition: mapping.h:65