Reference documentation for deal.II version 9.2.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\}}\)
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>
26 #include <deal.II/fe/fe_values.h>
27 #include <deal.II/fe/mapping.h>
28 
30 
33 
75 template <int dim, int spacedim = dim>
76 class FE_NedelecSZ : public FiniteElement<dim, dim>
77 {
78 public:
79  static_assert(dim == spacedim,
80  "FE_NedelecSZ is only implemented for dim==spacedim!");
81 
94  FE_NedelecSZ(const unsigned int order);
95 
96  virtual UpdateFlags
97  requires_update_flags(const UpdateFlags update_flags) const override;
98 
99  virtual std::string
100  get_name() const override;
101 
102  virtual std::unique_ptr<FiniteElement<dim, dim>>
103  clone() const override;
104 
109  virtual double
110  shape_value(const unsigned int i, const Point<dim> &p) const override;
111 
115  virtual double
116  shape_value_component(const unsigned int i,
117  const Point<dim> & p,
118  const unsigned int component) const override;
119 
124  virtual Tensor<1, dim>
125  shape_grad(const unsigned int i, const Point<dim> &p) const override;
126 
130  virtual Tensor<1, dim>
131  shape_grad_component(const unsigned int i,
132  const Point<dim> & p,
133  const unsigned int component) const override;
134 
139  virtual Tensor<2, dim>
140  shape_grad_grad(const unsigned int i, const Point<dim> &p) const override;
141 
145  virtual Tensor<2, dim>
146  shape_grad_grad_component(const unsigned int i,
147  const Point<dim> & p,
148  const unsigned int component) const override;
149 
150 protected:
156 
157  virtual std::unique_ptr<
158  typename ::FiniteElement<dim, spacedim>::InternalDataBase>
159  get_data(
160  const UpdateFlags update_flags,
161  const Mapping<dim, spacedim> &mapping,
162  const Quadrature<dim> & quadrature,
164  spacedim>
165  &output_data) const override;
166 
172  virtual void
174  const typename Triangulation<dim, dim>::cell_iterator &cell,
175  const CellSimilarity::Similarity cell_similarity,
176  const Quadrature<dim> & quadrature,
177  const Mapping<dim, dim> & mapping,
178  const typename Mapping<dim, dim>::InternalDataBase & mapping_internal,
179  const ::internal::FEValuesImplementation::MappingRelatedData<dim, dim>
180  & mapping_data,
181  const typename FiniteElement<dim, dim>::InternalDataBase &fedata,
183  &data) const override;
184 
190  virtual void
192  const typename Triangulation<dim, dim>::cell_iterator &cell,
193  const unsigned int face_no,
194  const Quadrature<dim - 1> & quadrature,
195  const Mapping<dim, dim> & mapping,
196  const typename Mapping<dim, dim>::InternalDataBase & mapping_internal,
197  const ::internal::FEValuesImplementation::MappingRelatedData<dim, dim>
198  & mapping_data,
199  const typename FiniteElement<dim, dim>::InternalDataBase &fedata,
201  &data) const override;
202 
206  virtual void
208  const typename Triangulation<dim, dim>::cell_iterator &cell,
209  const unsigned int face_no,
210  const unsigned int sub_no,
211  const Quadrature<dim - 1> & quadrature,
212  const Mapping<dim, dim> & mapping,
213  const typename Mapping<dim, dim>::InternalDataBase & mapping_internal,
214  const ::internal::FEValuesImplementation::MappingRelatedData<dim, dim>
215  & mapping_data,
216  const typename FiniteElement<dim, dim>::InternalDataBase &fedata,
218  &data) const override;
219 
240  {
241  public:
248  mutable std::vector<std::vector<Tensor<1, dim>>> shape_values;
249 
257  mutable std::vector<std::vector<DerivativeForm<1, dim, dim>>> shape_grads;
258 
274  std::vector<std::vector<std::vector<double>>> sigma_imj_values;
275 
291  std::vector<std::vector<std::vector<double>>> sigma_imj_grads;
292 
304  std::vector<std::vector<double>> edge_sigma_values;
305 
318  std::vector<std::vector<double>> edge_sigma_grads;
319 
335  std::vector<std::vector<double>> edge_lambda_values;
336 
346  std::vector<std::vector<double>> edge_lambda_grads_2d;
347 
357  std::vector<std::vector<std::vector<double>>> edge_lambda_grads_3d;
358 
369  std::vector<std::vector<std::vector<double>>> edge_lambda_gradgrads_3d;
370 
387  std::vector<std::vector<double>> face_lambda_values;
388 
397  std::vector<std::vector<double>> face_lambda_grads;
398  };
399 
400 private:
409  static std::vector<unsigned int>
410  get_dpo_vector(const unsigned int degree);
411 
415  std::vector<Polynomials::Polynomial<double>> IntegratedLegendrePolynomials;
416 
421  void
422  create_polynomials(const unsigned int degree);
423 
427  unsigned int
428  compute_num_dofs(const unsigned int degree) const;
429 
434  void
436  const Quadrature<dim> &quadrature,
437  const InternalData & fedata) const;
438 
443  void
445  const Quadrature<dim> &quadrature,
446  const InternalData & fedata) const;
447 };
448 
449 
450 
454 
455 #endif
derivative_form.h
fe_values.h
MappingKind
MappingKind
Definition: mapping.h:62
internal::FEValuesImplementation::FiniteElementRelatedData
Definition: fe_update_flags.h:524
FE_NedelecSZ::InternalData::edge_lambda_grads_2d
std::vector< std::vector< double > > edge_lambda_grads_2d
Definition: fe_nedelec_sz.h:346
FE_NedelecSZ::InternalData::edge_sigma_values
std::vector< std::vector< double > > edge_sigma_values
Definition: fe_nedelec_sz.h:304
FE_NedelecSZ::create_polynomials
void create_polynomials(const unsigned int degree)
Definition: fe_nedelec_sz.cc:2278
Triangulation
Definition: tria.h:1109
FE_NedelecSZ::fill_fe_subface_values
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
Definition: fe_nedelec_sz.cc:2156
FiniteElement< dim, dim >::InternalDataBase
friend class InternalDataBase
Definition: fe.h:3048
FE_NedelecSZ::IntegratedLegendrePolynomials
std::vector< Polynomials::Polynomial< double > > IntegratedLegendrePolynomials
Definition: fe_nedelec_sz.h:415
FE_NedelecSZ::shape_grad
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const override
Definition: fe_nedelec_sz.cc:79
FE_NedelecSZ::get_data
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_nedelec_sz.cc:127
CellSimilarity::Similarity
Similarity
Definition: fe_update_flags.h:378
FE_NedelecSZ::shape_grad_grad
virtual Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const override
Definition: fe_nedelec_sz.cc:103
FE_NedelecSZ::clone
virtual std::unique_ptr< FiniteElement< dim, dim > > clone() const override
Definition: fe_nedelec_sz.cc:2222
FE_NedelecSZ::InternalData::face_lambda_values
std::vector< std::vector< double > > face_lambda_values
Definition: fe_nedelec_sz.h:387
FE_NedelecSZ
Definition: fe_nedelec_sz.h:76
FE_NedelecSZ::compute_num_dofs
unsigned int compute_num_dofs(const unsigned int degree) const
Definition: fe_nedelec_sz.cc:2254
FE_NedelecSZ::InternalData
Definition: fe_nedelec_sz.h:239
FiniteElementData::degree
const unsigned int degree
Definition: fe_base.h:298
FE_NedelecSZ::InternalData::edge_lambda_gradgrads_3d
std::vector< std::vector< std::vector< double > > > edge_lambda_gradgrads_3d
Definition: fe_nedelec_sz.h:369
Mapping
Abstract base class for mapping classes.
Definition: mapping.h:302
FE_NedelecSZ::get_dpo_vector
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
Definition: fe_nedelec_sz.cc:2231
FE_NedelecSZ::shape_grad_grad_component
virtual Tensor< 2, dim > shape_grad_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
Definition: fe_nedelec_sz.cc:114
FE_NedelecSZ::FE_NedelecSZ
FE_NedelecSZ(const unsigned int order)
Definition: fe_nedelec_sz.cc:24
FE_NedelecSZ::shape_value
virtual double shape_value(const unsigned int i, const Point< dim > &p) const override
Definition: fe_nedelec_sz.cc:54
Tensor< 1, dim >
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
FE_NedelecSZ::InternalData::shape_values
std::vector< std::vector< Tensor< 1, dim > > > shape_values
Definition: fe_nedelec_sz.h:248
FE_NedelecSZ::requires_update_flags
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
Definition: fe_nedelec_sz.cc:2176
fe.h
FE_NedelecSZ::InternalData::shape_grads
std::vector< std::vector< DerivativeForm< 1, dim, dim > > > shape_grads
Definition: fe_nedelec_sz.h:257
FE_NedelecSZ::fill_fe_values
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
Definition: fe_nedelec_sz.cc:1911
FE_NedelecSZ::shape_value_component
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
Definition: fe_nedelec_sz.cc:65
FE_NedelecSZ::shape_grad_component
virtual Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
Definition: fe_nedelec_sz.cc:90
FiniteElement
Definition: fe.h:648
FE_NedelecSZ::fill_edge_values
void fill_edge_values(const typename Triangulation< dim, dim >::cell_iterator &cell, const Quadrature< dim > &quadrature, const InternalData &fedata) const
Definition: fe_nedelec_sz.cc:1108
UpdateFlags
UpdateFlags
Definition: fe_update_flags.h:66
FE_NedelecSZ::fill_face_values
void fill_face_values(const typename Triangulation< dim, dim >::cell_iterator &cell, const Quadrature< dim > &quadrature, const InternalData &fedata) const
Definition: fe_nedelec_sz.cc:1535
mapping.h
FE_NedelecSZ::InternalData::edge_lambda_values
std::vector< std::vector< double > > edge_lambda_values
Definition: fe_nedelec_sz.h:335
FE_NedelecSZ::fill_fe_face_values
virtual void fill_fe_face_values(const typename Triangulation< dim, dim >::cell_iterator &cell, const unsigned int face_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
Definition: fe_nedelec_sz.cc:2025
FE_NedelecSZ::InternalData::face_lambda_grads
std::vector< std::vector< double > > face_lambda_grads
Definition: fe_nedelec_sz.h:397
Point< dim >
config.h
FE_NedelecSZ::InternalData::edge_lambda_grads_3d
std::vector< std::vector< std::vector< double > > > edge_lambda_grads_3d
Definition: fe_nedelec_sz.h:357
FE_NedelecSZ::get_name
virtual std::string get_name() const override
Definition: fe_nedelec_sz.cc:2203
polynomials_integrated_legendre_sz.h
FE_NedelecSZ::InternalData::sigma_imj_grads
std::vector< std::vector< std::vector< double > > > sigma_imj_grads
Definition: fe_nedelec_sz.h:291
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
Quadrature
Definition: quadrature.h:85
qprojector.h
FE_NedelecSZ::InternalData::edge_sigma_grads
std::vector< std::vector< double > > edge_sigma_grads
Definition: fe_nedelec_sz.h:318
FE_NedelecSZ::InternalData::sigma_imj_values
std::vector< std::vector< std::vector< double > > > sigma_imj_values
Definition: fe_nedelec_sz.h:274
FE_NedelecSZ::mapping_kind
MappingKind mapping_kind
Definition: fe_nedelec_sz.h:155