Reference documentation for deal.II version 9.1.0-pre
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 
277  const FiniteElement<dim, spacedim> &fe_other) const override;
279 
286  "FE_Q can only be used for polynomial degrees "
287  "greater than zero. If you want an element of polynomial "
288  "degree zero, then it cannot be continuous and you "
289  "will want to use FE_DGQ<dim>(0).");
290 
291 protected:
298  static std::vector<unsigned int>
299  get_dpo_vector(const unsigned int degree);
300 
306  void
307  initialize(const std::vector<Point<1>> &support_points_1d);
308 
313  void
314  initialize_constraints(const std::vector<Point<1>> &points);
315 
320  void
321  initialize_unit_support_points(const std::vector<Point<1>> &points);
322 
327  void
328  initialize_unit_face_support_points(const std::vector<Point<1>> &points);
329 
334  void
336 
343  struct Implementation;
344 
345  /*
346  * Declare implementation friend.
347  */
348  friend struct FE_Q_Base<PolynomialType, dim, spacedim>::Implementation;
349 
350 private:
351  /*
352  * Mutex for protecting initialization of restriction and embedding matrix.
353  */
354  mutable Threads::Mutex mutex;
355 
356  /*
357  * The highest polynomial degree of the underlying tensor product space
358  * without any enrichment. For FE_Q*(p) this is p. Note that enrichments
359  * may lead to a difference to degree.
360  */
361  const unsigned int q_degree;
362 };
363 
364 
367 DEAL_II_NAMESPACE_CLOSE
368 
369 #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:1191
const unsigned int degree
Definition: fe_base.h:313
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
Definition: fe_q_base.cc:1565
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:1216
Definition: point.h:106
void initialize_unit_face_support_points(const std::vector< Point< 1 >> &points)
Definition: fe_q_base.cc:968
virtual FiniteElementDomination::Domination compare_for_face_domination(const FiniteElement< dim, spacedim > &fe_other) const override
Definition: fe_q_base.cc:892
void initialize_unit_support_points(const std::vector< Point< 1 >> &points)
Definition: fe_q_base.cc:943
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:397
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:1418
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:1075
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:1206
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:1003
PolynomialType poly_space
Definition: fe_poly.h:480
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:1667
const std::vector< bool > restriction_is_additive_flags
Definition: fe.h:2586