Reference documentation for deal.II version 9.2.0
\(\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_q_hierarchical.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2002 - 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_q_hierarchical_h
17 #define dealii_fe_q_hierarchical_h
18 
19 #include <deal.II/base/config.h>
20 
22 
23 #include <deal.II/fe/fe_poly.h>
24 
26 
29 
542 template <int dim>
543 class FE_Q_Hierarchical : public FE_Poly<TensorProductPolynomials<dim>, dim>
544 {
545 public:
549  FE_Q_Hierarchical(const unsigned int p);
550 
556  virtual std::string
557  get_name() const override;
558 
559  virtual std::unique_ptr<FiniteElement<dim, dim>>
560  clone() const override;
561 
566  virtual bool
567  has_support_on_face(const unsigned int shape_index,
568  const unsigned int face_index) const override;
569 
583  virtual bool
584  hp_constraints_are_implemented() const override;
585 
590  virtual void
592  FullMatrix<double> & matrix) const override;
593 
597  virtual const FullMatrix<double> &
599  const unsigned int child,
600  const RefinementCase<dim> &refinement_case =
602 
618  virtual std::vector<std::pair<unsigned int, unsigned int>>
619  hp_vertex_dof_identities(const FiniteElement<dim> &fe_other) const override;
620 
624  virtual std::vector<std::pair<unsigned int, unsigned int>>
625  hp_line_dof_identities(const FiniteElement<dim> &fe_other) const override;
626 
630  virtual std::vector<std::pair<unsigned int, unsigned int>>
631  hp_quad_dof_identities(const FiniteElement<dim> &fe_other) const override;
632 
638  const unsigned int codim = 0) const override final;
639 
653  virtual void
655  FullMatrix<double> &matrix) const override;
656 
668  virtual void
670  const unsigned int subface,
671  FullMatrix<double> &matrix) const override;
672 
681  virtual std::size_t
682  memory_consumption() const override;
683 
689  std::vector<unsigned int>
690  get_embedding_dofs(const unsigned int sub_degree) const;
691 
697  virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
698  get_constant_modes() const override;
699 
700 private:
707  static std::vector<unsigned int>
708  get_dpo_vector(const unsigned int degree);
709 
737  static std::vector<unsigned int>
739 
743  static std::vector<unsigned int>
745 
750  void
751  build_dofs_cell(std::vector<FullMatrix<double>> &dofs_cell,
752  std::vector<FullMatrix<double>> &dofs_subcell) const;
753 
758  void
759  initialize_constraints(const std::vector<FullMatrix<double>> &dofs_subcell);
760 
764  void
766  const std::vector<FullMatrix<double>> &dofs_cell,
767  const std::vector<FullMatrix<double>> &dofs_subcell);
768 
773  void
775 
780  void
782 
786  const std::vector<unsigned int> face_renumber;
787 
788  // Allow access from other dimensions. We need this since we want to call
789  // the functions @p get_dpo_vector and @p
790  // lexicographic_to_hierarchic_numbering for the faces of the finite element
791  // of dimension dim+1.
792  template <int dim1>
793  friend class FE_Q_Hierarchical;
794 };
795 
798 /* -------------- declaration of explicit specializations ------------- */
799 
800 template <>
801 void
803 
804 template <>
805 bool
807  const unsigned int) const;
808 
809 template <>
810 std::vector<unsigned int>
812  const unsigned int);
813 
815 
816 #endif
tensor_product_polynomials.h
FE_Q_Hierarchical::clone
virtual std::unique_ptr< FiniteElement< dim, dim > > clone() const override
Definition: fe_q_hierarchical.cc:139
FE_Q_Hierarchical::hp_line_dof_identities
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim > &fe_other) const override
Definition: fe_q_hierarchical.cc:257
FiniteElementData
Definition: fe_base.h:147
FE_Q_Hierarchical::hierarchic_to_fe_q_hierarchical_numbering
static std::vector< unsigned int > hierarchic_to_fe_q_hierarchical_numbering(const FiniteElementData< dim > &fe)
Definition: fe_q_hierarchical.cc:1942
fe_poly.h
FE_Q_Hierarchical::initialize_constraints
void initialize_constraints(const std::vector< FullMatrix< double >> &dofs_subcell)
Definition: fe_q_hierarchical.cc:499
FE_Q_Hierarchical
Definition: fe_q_hierarchical.h:543
FE_Q_Hierarchical::compare_for_domination
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim > &fe_other, const unsigned int codim=0) const override final
Definition: fe_q_hierarchical.cc:333
FE_Q_Hierarchical::memory_consumption
virtual std::size_t memory_consumption() const override
Definition: fe_q_hierarchical.cc:2403
FE_Q_Hierarchical::get_prolongation_matrix
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_hierarchical.cc:199
FE_Q_Hierarchical::get_embedding_dofs
std::vector< unsigned int > get_embedding_dofs(const unsigned int sub_degree) const
Definition: fe_q_hierarchical.cc:2246
FiniteElementData::degree
const unsigned int degree
Definition: fe_base.h:298
FiniteElementDomination::Domination
Domination
Definition: fe_base.h:83
FE_Q_Hierarchical::get_subface_interpolation_matrix
virtual void get_subface_interpolation_matrix(const FiniteElement< dim > &source, const unsigned int subface, FullMatrix< double > &matrix) const override
Definition: fe_q_hierarchical.cc:997
FE_Q_Hierarchical::hp_constraints_are_implemented
virtual bool hp_constraints_are_implemented() const override
Definition: fe_q_hierarchical.cc:216
FE_Q_Hierarchical::face_fe_q_hierarchical_to_hierarchic_numbering
static std::vector< unsigned int > face_fe_q_hierarchical_to_hierarchic_numbering(const unsigned int degree)
Definition: fe_q_hierarchical.cc:2116
FE_Q_Hierarchical::build_dofs_cell
void build_dofs_cell(std::vector< FullMatrix< double >> &dofs_cell, std::vector< FullMatrix< double >> &dofs_subcell) const
Definition: fe_q_hierarchical.cc:385
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
RefinementCase
Definition: geometry_info.h:795
LAPACKSupport::matrix
@ matrix
Contents is actually a matrix.
Definition: lapack_support.h:60
FE_Q_Hierarchical::initialize_generalized_face_support_points
void initialize_generalized_face_support_points()
Definition: fe_q_hierarchical.cc:1880
FE_Q_Hierarchical::get_interpolation_matrix
virtual void get_interpolation_matrix(const FiniteElement< dim > &source, FullMatrix< double > &matrix) const override
Definition: fe_q_hierarchical.cc:148
FiniteElement< dim >
FE_Q_Hierarchical::hp_vertex_dof_identities
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim > &fe_other) const override
Definition: fe_q_hierarchical.cc:224
FE_Q_Hierarchical::get_dpo_vector
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
Definition: fe_q_hierarchical.cc:1930
FE_Q_Hierarchical::FE_Q_Hierarchical
friend class FE_Q_Hierarchical
Definition: fe_q_hierarchical.h:793
FE_Poly
Definition: fe_poly.h:76
FE_Q_Hierarchical::face_renumber
const std::vector< unsigned int > face_renumber
Definition: fe_q_hierarchical.h:786
FE_Q_Hierarchical::initialize_embedding_and_restriction
void initialize_embedding_and_restriction(const std::vector< FullMatrix< double >> &dofs_cell, const std::vector< FullMatrix< double >> &dofs_subcell)
Definition: fe_q_hierarchical.cc:669
config.h
FE_Q_Hierarchical::initialize_generalized_support_points
void initialize_generalized_support_points()
Definition: fe_q_hierarchical.cc:804
FullMatrix< double >
FE_Q_Hierarchical::get_face_interpolation_matrix
virtual void get_face_interpolation_matrix(const FiniteElement< dim > &source, FullMatrix< double > &matrix) const override
Definition: fe_q_hierarchical.cc:911
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
FE_Q_Hierarchical::hp_quad_dof_identities
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim > &fe_other) const override
Definition: fe_q_hierarchical.cc:295
FE_Q_Hierarchical::get_name
virtual std::string get_name() const override
Definition: fe_q_hierarchical.cc:120
FE_Q_Hierarchical::has_support_on_face
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
Definition: fe_q_hierarchical.cc:2160
FE_Q_Hierarchical::get_constant_modes
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const override
Definition: fe_q_hierarchical.cc:2386