Reference documentation for deal.II version 9.1.0-pre
fe_nedelec.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2002 - 2018 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_h
17 #define dealii_fe_nedelec_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/base/geometry_info.h>
22 #include <deal.II/base/polynomial.h>
23 #include <deal.II/base/polynomials_nedelec.h>
24 #include <deal.II/base/table.h>
25 #include <deal.II/base/tensor.h>
26 #include <deal.II/base/tensor_product_polynomials.h>
27 #include <deal.II/base/thread_management.h>
28 
29 #include <deal.II/fe/fe.h>
30 #include <deal.II/fe/fe_poly_tensor.h>
31 
32 #include <vector>
33 
34 DEAL_II_NAMESPACE_OPEN
35 
38 
112 template <int dim>
113 class FE_Nedelec : public FE_PolyTensor<PolynomialsNedelec<dim>, dim>
114 {
115 public:
122  FE_Nedelec(const unsigned int order);
123 
129  virtual std::string
130  get_name() const override;
131 
132 
137  virtual bool
138  has_support_on_face(const unsigned int shape_index,
139  const unsigned int face_index) const override;
140 
149  virtual bool
150  hp_constraints_are_implemented() const override;
151 
158  const FiniteElement<dim> &fe_other) const override;
159 
175  virtual std::vector<std::pair<unsigned int, unsigned int>>
176  hp_vertex_dof_identities(const FiniteElement<dim> &fe_other) const override;
177 
182  virtual std::vector<std::pair<unsigned int, unsigned int>>
183  hp_line_dof_identities(const FiniteElement<dim> &fe_other) const override;
184 
189  virtual std::vector<std::pair<unsigned int, unsigned int>>
190  hp_quad_dof_identities(const FiniteElement<dim> &fe_other) const override;
191 
203  virtual void
205  FullMatrix<double> &matrix) const override;
206 
218  virtual void
220  const unsigned int subface,
221  FullMatrix<double> &matrix) const override;
236  virtual const FullMatrix<double> &
238  const unsigned int child,
239  const RefinementCase<dim> &refinement_case =
241 
262  virtual const FullMatrix<double> &
264  const unsigned int child,
265  const RefinementCase<dim> &refinement_case =
267 
268  // documentation inherited from the base class
269  virtual void
271  const std::vector<Vector<double>> &support_point_values,
272  std::vector<double> & nodal_values) const override;
273 
277  virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
278  get_constant_modes() const override;
279 
280  virtual std::size_t
281  memory_consumption() const override;
282 
283  virtual std::unique_ptr<FiniteElement<dim, dim>>
284  clone() const override;
285 
286 private:
297  static std::vector<unsigned int>
298  get_dpo_vector(const unsigned int degree, bool dg = false);
299 
305  void
306  initialize_support_points(const unsigned int order);
307 
313  void
315 
325 
326  /*
327  * Mutex for protecting initialization of restriction and embedding matrix.
328  */
329  mutable Threads::Mutex mutex;
330 
334  template <int dim1>
335  friend class FE_Nedelec;
336 };
337 
338 /* -------------- declaration of explicit specializations ------------- */
339 
340 #ifndef DOXYGEN
341 
342 template <>
343 void
345 
346 #endif // DOXYGEN
347 
350 DEAL_II_NAMESPACE_CLOSE
351 
352 #endif
virtual void get_subface_interpolation_matrix(const FiniteElement< dim > &source, const unsigned int subface, FullMatrix< double > &matrix) const override
Definition: fe_nedelec.cc:2538
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
Definition: fe_nedelec.cc:3029
virtual void get_face_interpolation_matrix(const FiniteElement< dim > &source, FullMatrix< double > &matrix) const override
Definition: fe_nedelec.cc:2436
virtual bool hp_constraints_are_implemented() const override
Definition: fe_nedelec.cc:2324
friend class FE_Nedelec
Definition: fe_nedelec.h:335
const unsigned int degree
Definition: fe_base.h:313
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
Definition: fe_nedelec.cc:2969
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const override
Definition: fe_nedelec.cc:4046
virtual void convert_generalized_support_point_values_to_dof_values(const std::vector< Vector< double >> &support_point_values, std::vector< double > &nodal_values) const override
Definition: fe_nedelec.cc:3098
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree, bool dg=false)
Definition: fe_nedelec.cc:2000
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim > &fe_other) const override
Definition: fe_nedelec.cc:2340
void initialize_support_points(const unsigned int order)
Table< 2, double > boundary_weights
Definition: fe_nedelec.h:324
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim > &fe_other) const override
Definition: fe_nedelec.cc:2331
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim > &fe_other) const override
Definition: fe_nedelec.cc:2382
virtual FiniteElementDomination::Domination compare_for_face_domination(const FiniteElement< dim > &fe_other) const override
Definition: fe_nedelec.cc:2277
virtual std::size_t memory_consumption() const override
Definition: fe_nedelec.cc:4062
virtual std::string get_name() const override
Definition: fe_nedelec.cc:207
void initialize_restriction()
Definition: fe_nedelec.cc:516
virtual std::unique_ptr< FiniteElement< dim, dim > > clone() const override
Definition: fe_nedelec.cc:225
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
Definition: fe_nedelec.cc:2036