Reference documentation for deal.II version 9.1.0-pre
fe_q_hierarchical.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2002 - 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.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 
21 #include <deal.II/base/tensor_product_polynomials.h>
22 
23 #include <deal.II/fe/fe_poly.h>
24 
25 DEAL_II_NAMESPACE_OPEN
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 
646  virtual void
648  FullMatrix<double> &matrix) const override;
649 
661  virtual void
663  const unsigned int subface,
664  FullMatrix<double> &matrix) const override;
665 
677  const FiniteElement<dim> &fe_other) const override;
678 
687  virtual std::size_t
688  memory_consumption() const override;
689 
695  std::vector<unsigned int>
696  get_embedding_dofs(const unsigned int sub_degree) const;
697 
703  virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
704  get_constant_modes() const override;
705 
706 private:
713  static std::vector<unsigned int>
714  get_dpo_vector(const unsigned int degree);
715 
743  static std::vector<unsigned int>
745 
749  static std::vector<unsigned int>
750  face_fe_q_hierarchical_to_hierarchic_numbering(const unsigned int degree);
751 
756  void
757  build_dofs_cell(std::vector<FullMatrix<double>> &dofs_cell,
758  std::vector<FullMatrix<double>> &dofs_subcell) const;
759 
764  void
765  initialize_constraints(const std::vector<FullMatrix<double>> &dofs_subcell);
766 
770  void
772  const std::vector<FullMatrix<double>> &dofs_cell,
773  const std::vector<FullMatrix<double>> &dofs_subcell);
774 
779  void
781 
786  void
788 
792  const std::vector<unsigned int> face_renumber;
793 
800  template <int dim1>
801  friend class FE_Q_Hierarchical;
802 };
803 
806 /* -------------- declaration of explicit specializations ------------- */
807 
808 template <>
809 void
811 
812 template <>
813 bool
815  const unsigned int) const;
816 
817 template <>
818 std::vector<unsigned int>
820  const unsigned int);
821 
822 DEAL_II_NAMESPACE_CLOSE
823 
824 #endif
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
void initialize_generalized_support_points()
const unsigned int degree
Definition: fe_base.h:313
const std::vector< unsigned int > face_renumber
void build_dofs_cell(std::vector< FullMatrix< double >> &dofs_cell, std::vector< FullMatrix< double >> &dofs_subcell) const
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const override
virtual void get_subface_interpolation_matrix(const FiniteElement< dim > &source, const unsigned int subface, FullMatrix< double > &matrix) const override
virtual FiniteElementDomination::Domination compare_for_face_domination(const FiniteElement< dim > &fe_other) const override
static std::vector< unsigned int > face_fe_q_hierarchical_to_hierarchic_numbering(const unsigned int degree)
virtual std::string get_name() const override
virtual void get_interpolation_matrix(const FiniteElement< dim > &source, FullMatrix< double > &matrix) const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim > &fe_other) const override
void initialize_constraints(const std::vector< FullMatrix< double >> &dofs_subcell)
virtual std::size_t memory_consumption() const override
std::vector< unsigned int > get_embedding_dofs(const unsigned int sub_degree) const
virtual void get_face_interpolation_matrix(const FiniteElement< dim > &source, FullMatrix< double > &matrix) const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim > &fe_other) const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim > &fe_other) const override
virtual std::unique_ptr< FiniteElement< dim, dim > > clone() const override
friend class FE_Q_Hierarchical
static std::vector< unsigned int > hierarchic_to_fe_q_hierarchical_numbering(const FiniteElementData< dim > &fe)
void initialize_embedding_and_restriction(const std::vector< FullMatrix< double >> &dofs_cell, const std::vector< FullMatrix< double >> &dofs_subcell)
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
void initialize_generalized_face_support_points()
virtual bool hp_constraints_are_implemented() const override