Reference documentation for deal.II version 8.5.1
fe_dgq.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2001 - 2017 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 at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii__fe_dgq_h
17 #define dealii__fe_dgq_h
18 
19 #include <deal.II/base/config.h>
20 #include <deal.II/base/tensor_product_polynomials.h>
21 #include <deal.II/base/thread_management.h>
22 #include <deal.II/fe/fe_poly.h>
23 
24 DEAL_II_NAMESPACE_OPEN
25 
26 template <int dim, int spacedim> class MappingQ;
27 template <int dim> class Quadrature;
28 
31 
104 template <int dim, int spacedim=dim>
105 class FE_DGQ : public FE_Poly<TensorProductPolynomials<dim>, dim, spacedim>
106 {
107 public:
114  FE_DGQ (const unsigned int p);
115 
121  virtual std::string get_name () const;
122 
132  virtual void
134  FullMatrix<double> &matrix) const;
135 
147  virtual void
149  FullMatrix<double> &matrix) const;
150 
162  virtual void
164  const unsigned int subface,
165  FullMatrix<double> &matrix) const;
166 
184  virtual const FullMatrix<double> &
185  get_restriction_matrix (const unsigned int child,
187 
209  virtual const FullMatrix<double> &
210  get_prolongation_matrix (const unsigned int child,
212 
236  virtual
237  std::vector<std::pair<unsigned int, unsigned int> >
239 
247  virtual
248  std::vector<std::pair<unsigned int, unsigned int> >
250 
258  virtual
259  std::vector<std::pair<unsigned int, unsigned int> >
261 
270  virtual bool hp_constraints_are_implemented () const;
271 
281  virtual
284 
293  virtual bool has_support_on_face (const unsigned int shape_index,
294  const unsigned int face_index) const;
295 
300  virtual std::pair<Table<2,bool>, std::vector<unsigned int> >
301  get_constant_modes () const;
302 
311  virtual std::size_t memory_consumption () const;
312 
313 
314 protected:
323  FE_DGQ (const std::vector<Polynomials::Polynomial<double> > &polynomials);
324 
330  virtual FiniteElement<dim, spacedim> *clone() const;
331 
332 private:
339  static std::vector<unsigned int> get_dpo_vector (const unsigned int degree);
340 
356  void rotate_indices (std::vector<unsigned int> &indices,
357  const char direction) const;
358 
359  /*
360  * Mutex for protecting initialization of restriction and embedding matrix.
361  */
362  mutable Threads::Mutex mutex;
363 
367  template <int dim1, int spacedim1> friend class FE_DGQ;
368 
372  template <int dim1, int spacedim1> friend class MappingQ;
373 };
374 
375 
376 
393 template <int dim,int spacedim=dim>
394 class FE_DGQArbitraryNodes : public FE_DGQ<dim,spacedim>
395 {
396 public:
403  FE_DGQArbitraryNodes (const Quadrature<1> &points);
404 
410  virtual std::string get_name () const;
411 
412 protected:
418  virtual FiniteElement<dim,spacedim> *clone() const;
419 };
420 
421 
422 
433 template <int dim,int spacedim=dim>
434 class FE_DGQLegendre : public FE_DGQ<dim,spacedim>
435 {
436 public:
441  FE_DGQLegendre (const unsigned int degree);
442 
448  virtual std::pair<Table<2,bool>, std::vector<unsigned int> >
449  get_constant_modes () const;
450 
457  virtual std::string get_name () const;
458 
459 protected:
465  virtual FiniteElement<dim,spacedim> *clone() const;
466 };
467 
468 
469 
483 template <int dim,int spacedim=dim>
484 class FE_DGQHermite : public FE_DGQ<dim,spacedim>
485 {
486 public:
491  FE_DGQHermite (const unsigned int degree);
492 
499  virtual std::pair<Table<2,bool>, std::vector<unsigned int> >
500  get_constant_modes () const;
501 
508  virtual std::string get_name () const;
509 
510 protected:
516  virtual FiniteElement<dim,spacedim> *clone() const;
517 };
518 
519 
522 DEAL_II_NAMESPACE_CLOSE
523 
524 #endif
virtual FiniteElement< dim, spacedim > * clone() const
Definition: fe_dgq.cc:107
virtual FiniteElement< dim, spacedim > * clone() const
Definition: fe_dgq.cc:764
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const
Definition: fe_dgq.cc:321
virtual FiniteElementDomination::Domination compare_for_face_domination(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe_dgq.cc:534
FE_DGQLegendre(const unsigned int degree)
Definition: fe_dgq.cc:781
Definition: fe_dgq.h:105
virtual FiniteElement< dim, spacedim > * clone() const
Definition: fe_dgq.cc:813
const unsigned int degree
Definition: fe_base.h:311
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
Definition: fe_dgq.cc:294
virtual std::size_t memory_consumption() const
Definition: fe_dgq.cc:652
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
Definition: fe_dgq.cc:349
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const
Definition: fe_dgq.cc:639
virtual std::string get_name() const
Definition: fe_dgq.cc:858
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
Definition: fe_dgq.cc:120
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
Definition: fe_dgq.cc:546
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const
Definition: fe_dgq.cc:834
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
Definition: fe_dgq.cc:415
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
Definition: fe_dgq.cc:211
void rotate_indices(std::vector< unsigned int > &indices, const char direction) const
Definition: fe_dgq.cc:133
FE_DGQArbitraryNodes(const Quadrature< 1 > &points)
Definition: fe_dgq.cc:663
virtual FiniteElement< dim, spacedim > * clone() const
Definition: fe_dgq.cc:868
FE_DGQHermite(const unsigned int degree)
Definition: fe_dgq.cc:823
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe_dgq.cc:520
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe_dgq.cc:505
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const
Definition: fe_dgq.cc:789
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe_dgq.cc:490
virtual std::string get_name() const
Definition: fe_dgq.cc:803
friend class FE_DGQ
Definition: fe_dgq.h:367
virtual bool hp_constraints_are_implemented() const
Definition: fe_dgq.cc:480
virtual std::string get_name() const
Definition: fe_dgq.cc:676
virtual std::string get_name() const
Definition: fe_dgq.cc:90