Reference documentation for deal.II version Git 409ee4b167 2020-08-14 09:46:12 -0400
\(\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_dgq.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2001 - 2019 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_dgq_h
17 #define dealii_fe_dgq_h
18 
19 #include <deal.II/base/config.h>
20 
23 
24 #include <deal.II/fe/fe_poly.h>
25 
27 
28 // Forward declarations
29 #ifndef DOXYGEN
30 template <int dim, int spacedim>
31 class MappingQ;
32 template <int dim>
33 class Quadrature;
34 #endif
35 
38 
109 template <int dim, int spacedim = dim>
110 class FE_DGQ : public FE_Poly<dim, spacedim>
111 {
112 public:
119  FE_DGQ(const unsigned int p);
120 
126  virtual std::string
127  get_name() const override;
128 
138  virtual void
140  FullMatrix<double> &matrix) const override;
141 
153  virtual void
155  FullMatrix<double> & matrix,
156  const unsigned int face_no = 0) const override;
157 
169  virtual void
171  const FiniteElement<dim, spacedim> &source,
172  const unsigned int subface,
173  FullMatrix<double> & matrix,
174  const unsigned int face_no = 0) const override;
175 
193  virtual const FullMatrix<double> &
195  const unsigned int child,
196  const RefinementCase<dim> &refinement_case =
198 
220  virtual const FullMatrix<double> &
222  const unsigned int child,
223  const RefinementCase<dim> &refinement_case =
225 
249  virtual std::vector<std::pair<unsigned int, unsigned int>>
251  const FiniteElement<dim, spacedim> &fe_other) const override;
252 
260  virtual std::vector<std::pair<unsigned int, unsigned int>>
262  const FiniteElement<dim, spacedim> &fe_other) const override;
263 
271  virtual std::vector<std::pair<unsigned int, unsigned int>>
273  const unsigned int face_no = 0) const override;
274 
283  virtual bool
284  hp_constraints_are_implemented() const override;
285 
291  const unsigned int codim = 0) const override final;
292 
301  virtual bool
302  has_support_on_face(const unsigned int shape_index,
303  const unsigned int face_index) const override;
304 
309  virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
310  get_constant_modes() const override;
311 
319  virtual void
321  const std::vector<Vector<double>> &support_point_values,
322  std::vector<double> & nodal_values) const override;
323 
324  virtual std::unique_ptr<FiniteElement<dim, spacedim>>
325  clone() const override;
326 
327 protected:
336  FE_DGQ(const std::vector<Polynomials::Polynomial<double>> &polynomials);
337 
338 private:
345  static std::vector<unsigned int>
346  get_dpo_vector(const unsigned int degree);
347 
364  void
365  rotate_indices(std::vector<unsigned int> &indices,
366  const char direction) const;
367 
368  /*
369  * Mutex for protecting initialization of restriction and embedding matrix.
370  */
372 
373  // Allow access from other dimensions.
374  template <int dim1, int spacedim1>
375  friend class FE_DGQ;
376 
377  // Allow @p MappingQ class to access to build_renumbering function.
378  template <int dim1, int spacedim1>
379  friend class MappingQ;
380 };
381 
382 
383 
398 template <int dim, int spacedim = dim>
399 class FE_DGQArbitraryNodes : public FE_DGQ<dim, spacedim>
400 {
401 public:
408  FE_DGQArbitraryNodes(const Quadrature<1> &points);
409 
415  virtual std::string
416  get_name() const override;
417 
425  virtual void
427  const std::vector<Vector<double>> &support_point_values,
428  std::vector<double> & nodal_values) const override;
429  virtual std::unique_ptr<FiniteElement<dim, spacedim>>
430  clone() const override;
431 };
432 
433 
434 
443 template <int dim, int spacedim = dim>
444 class FE_DGQLegendre : public FE_DGQ<dim, spacedim>
445 {
446 public:
451  FE_DGQLegendre(const unsigned int degree);
452 
458  virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
459  get_constant_modes() const override;
460 
467  virtual std::string
468  get_name() const override;
469 
470  virtual std::unique_ptr<FiniteElement<dim, spacedim>>
471  clone() const override;
472 };
473 
474 
475 
492 template <int dim, int spacedim = dim>
493 class FE_DGQHermite : public FE_DGQ<dim, spacedim>
494 {
495 public:
500  FE_DGQHermite(const unsigned int degree);
501 
508  virtual std::string
509  get_name() const override;
510 
511  virtual std::unique_ptr<FiniteElement<dim, spacedim>>
512  clone() const override;
513 };
514 
515 
519 
520 #endif
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
Definition: fe_dgq.cc:404
Threads::Mutex mutex
Definition: fe_dgq.h:371
Contents is actually a matrix.
virtual bool hp_constraints_are_implemented() const override
Definition: fe_dgq.cc:556
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
Definition: fe_dgq.cc:565
Definition: fe_dgq.h:110
const unsigned int degree
Definition: fe_base.h:431
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix, const unsigned int face_no=0) const override
Definition: fe_dgq.cc:376
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix, const unsigned int face_no=0) const override
Definition: fe_dgq.cc:349
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const override final
Definition: fe_dgq.cc:608
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const override
Definition: fe_dgq.cc:808
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
Definition: fe_dgq.cc:179
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_dgq.cc:145
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:363
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
Definition: fe_dgq.cc:166
void rotate_indices(std::vector< unsigned int > &indices, const char direction) const
Definition: fe_dgq.cc:192
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
Definition: fe_dgq.cc:717
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const override
Definition: fe_dgq.cc:269
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other, const unsigned int face_no=0) const override
Definition: fe_dgq.cc:593
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:362
virtual std::string get_name() const override
Definition: fe_dgq.cc:129
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
Definition: fe_dgq.cc:480
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
Definition: fe_dgq.cc:579
friend class FE_DGQ
Definition: fe_dgq.h:375