Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
fe_q_base.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2000 - 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_q_base_h
17 #define dealii_fe_q_base_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/base/thread_management.h>
22 
23 #include <deal.II/fe/fe_poly.h>
24 
25 DEAL_II_NAMESPACE_OPEN
26 
27 
30 
41 template <class PolynomialType,
42  int dim = PolynomialType::dimension,
43  int spacedim = dim>
44 class FE_Q_Base : public FE_Poly<PolynomialType, dim, spacedim>
45 {
46 public:
50  FE_Q_Base(const PolynomialType & poly_space,
51  const FiniteElementData<dim> &fe_data,
52  const std::vector<bool> & restriction_is_additive_flags);
53 
63  virtual void
65  FullMatrix<double> &matrix) const override;
66 
67 
77  virtual void
79  FullMatrix<double> &matrix) const override;
80 
90  virtual void
92  const unsigned int subface,
93  FullMatrix<double> &matrix) const override;
94 
99  virtual bool
100  has_support_on_face(const unsigned int shape_index,
101  const unsigned int face_index) const override;
102 
125  virtual const FullMatrix<double> &
127  const unsigned int child,
128  const RefinementCase<dim> &refinement_case =
130 
157  virtual const FullMatrix<double> &
159  const unsigned int child,
160  const RefinementCase<dim> &refinement_case =
162 
201  virtual unsigned int
202  face_to_cell_index(const unsigned int face_dof_index,
203  const unsigned int face,
204  const bool face_orientation = true,
205  const bool face_flip = false,
206  const bool face_rotation = false) const override;
207 
212  virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
213  get_constant_modes() const override;
214 
228  virtual bool
229  hp_constraints_are_implemented() const override;
230 
246  virtual std::vector<std::pair<unsigned int, unsigned int>>
248  const FiniteElement<dim, spacedim> &fe_other) const override;
249 
254  virtual std::vector<std::pair<unsigned int, unsigned int>>
256  const FiniteElement<dim, spacedim> &fe_other) const override;
257 
262  virtual std::vector<std::pair<unsigned int, unsigned int>>
264  const FiniteElement<dim, spacedim> &fe_other) const override;
265 
267 
274  "FE_Q can only be used for polynomial degrees "
275  "greater than zero. If you want an element of polynomial "
276  "degree zero, then it cannot be continuous and you "
277  "will want to use FE_DGQ<dim>(0).");
278 
279 protected:
286  static std::vector<unsigned int>
287  get_dpo_vector(const unsigned int degree);
288 
294  void
295  initialize(const std::vector<Point<1>> &support_points_1d);
296 
301  void
302  initialize_constraints(const std::vector<Point<1>> &points);
303 
308  void
309  initialize_unit_support_points(const std::vector<Point<1>> &points);
310 
315  void
316  initialize_unit_face_support_points(const std::vector<Point<1>> &points);
317 
322  void
324 
331  struct Implementation;
332 
333  /*
334  * Declare implementation friend.
335  */
336  friend struct FE_Q_Base<PolynomialType, dim, spacedim>::Implementation;
337 
338 private:
339  /*
340  * Mutex for protecting initialization of restriction and embedding matrix.
341  */
342  mutable Threads::Mutex mutex;
343 
344  /*
345  * The highest polynomial degree of the underlying tensor product space
346  * without any enrichment. For FE_Q*(p) this is p. Note that enrichments
347  * may lead to a difference to degree.
348  */
349  const unsigned int q_degree;
350 };
351 
352 
355 DEAL_II_NAMESPACE_CLOSE
356 
357 #endif
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
Definition: fe_q_base.cc:757
FE_Q_Base(const PolynomialType &poly_space, const FiniteElementData< dim > &fe_data, const std::vector< bool > &restriction_is_additive_flags)
Definition: fe_q_base.cc:433
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const override
Definition: fe_q_base.cc:597
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
Definition: fe_q_base.cc:1146
const unsigned int degree
Definition: fe_base.h:298
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
Definition: fe_q_base.cc:1520
static ::ExceptionBase & ExcFEQCannotHaveDegree0()
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
Definition: fe_q_base.cc:1171
Definition: point.h:110
void initialize_unit_face_support_points(const std::vector< Point< 1 >> &points)
Definition: fe_q_base.cc:923
void initialize_unit_support_points(const std::vector< Point< 1 >> &points)
Definition: fe_q_base.cc:898
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:496
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const override
Definition: fe_q_base.cc:499
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
Definition: fe_q_base.cc:1373
virtual unsigned int face_to_cell_index(const unsigned int face_dof_index, const unsigned int face, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false) const override
Definition: fe_q_base.cc:1030
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const override
Definition: fe_q_base.cc:611
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
Definition: fe_q_base.cc:822
void initialize_constraints(const std::vector< Point< 1 >> &points)
Definition: fe_q_base.cc:1161
virtual bool hp_constraints_are_implemented() const override
Definition: fe_q_base.cc:707
void initialize(const std::vector< Point< 1 >> &support_points_1d)
Definition: fe_q_base.cc:452
void initialize_quad_dof_index_permutation()
Definition: fe_q_base.cc:958
PolynomialType poly_space
Definition: fe_poly.h:482
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
Definition: fe_q_base.cc:716
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const override
Definition: fe_q_base.cc:1622
const std::vector< bool > restriction_is_additive_flags
Definition: fe.h:2609