Reference documentation for deal.II version GIT 2c37b3e359 2022-05-26 00:10:02+00:00
\(\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 - 2022 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 
72 template <int dim, int spacedim = dim>
73 class FE_NedelecSZ : public FiniteElement<dim, dim>
74 {
75 public:
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 
147 protected:
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 
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 
265  mutable std::vector<std::vector<DerivativeForm<2, dim, dim>>>
267 
283  std::vector<std::vector<std::vector<double>>> sigma_imj_values;
284 
300  std::vector<std::vector<std::vector<double>>> sigma_imj_grads;
301 
313  std::vector<std::vector<double>> edge_sigma_values;
314 
326  std::vector<std::vector<double>> edge_sigma_grads;
327 
343  std::vector<std::vector<double>> edge_lambda_values;
344 
354  std::vector<std::vector<double>> edge_lambda_grads_2d;
355 
365  std::vector<std::vector<std::vector<double>>> edge_lambda_grads_3d;
366 
377  std::vector<std::vector<std::vector<double>>> edge_lambda_gradgrads_3d;
378 
395  std::vector<std::vector<double>> face_lambda_values;
396 
405  std::vector<std::vector<double>> face_lambda_grads;
406  };
407 
408 private:
417  static std::vector<unsigned int>
418  get_dpo_vector(const unsigned int degree);
419 
423  std::vector<Polynomials::Polynomial<double>> IntegratedLegendrePolynomials;
424 
429  void
430  create_polynomials(const unsigned int degree);
431 
435  unsigned int
436  compute_num_dofs(const unsigned int degree) const;
437 
442  void
444  const Quadrature<dim> &quadrature,
445  const InternalData & fedata) const;
446 
451  void
453  const Quadrature<dim> &quadrature,
454  const InternalData & fedata) const;
455 };
456 
457 
458 
462 
463 #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< DerivativeForm< 2, dim, dim > > > shape_hessians
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:449
friend class InternalDataBase
Definition: fe.h:3075
Definition: point.h:111
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:416
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:417
UpdateFlags
MappingKind
Definition: mapping.h:72