Reference documentation for deal.II version 8.5.1
fe_system.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1999 - 2016 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_system_h
17 #define dealii__fe_system_h
18 
19 
20 /*---------------------------- fe_system.h ---------------------------*/
21 
22 
23 #include <deal.II/base/config.h>
24 #include <deal.II/base/thread_management.h>
25 #include <deal.II/fe/fe.h>
26 #include <vector>
27 #include <utility>
28 
29 DEAL_II_NAMESPACE_OPEN
30 
31 template <int dim, int spacedim> class FE_Enriched;
32 
33 
161 template <int dim, int spacedim=dim>
162 class FESystem : public FiniteElement<dim,spacedim>
163 {
164 public:
165 
197  const unsigned int n_elements);
198 
205  FESystem (const FiniteElement<dim,spacedim> &fe1, const unsigned int n1,
206  const FiniteElement<dim,spacedim> &fe2, const unsigned int n2);
207 
214  FESystem (const FiniteElement<dim,spacedim> &fe1, const unsigned int n1,
215  const FiniteElement<dim,spacedim> &fe2, const unsigned int n2,
216  const FiniteElement<dim,spacedim> &fe3, const unsigned int n3);
217 
224  FESystem (const FiniteElement<dim,spacedim> &fe1, const unsigned int n1,
225  const FiniteElement<dim,spacedim> &fe2, const unsigned int n2,
226  const FiniteElement<dim,spacedim> &fe3, const unsigned int n3,
227  const FiniteElement<dim,spacedim> &fe4, const unsigned int n4);
228 
235  FESystem (const FiniteElement<dim,spacedim> &fe1, const unsigned int n1,
236  const FiniteElement<dim,spacedim> &fe2, const unsigned int n2,
237  const FiniteElement<dim,spacedim> &fe3, const unsigned int n3,
238  const FiniteElement<dim,spacedim> &fe4, const unsigned int n4,
239  const FiniteElement<dim,spacedim> &fe5, const unsigned int n5);
240 
420  FESystem (const std::vector<const FiniteElement<dim,spacedim>*> &fes,
421  const std::vector<unsigned int> &multiplicities);
422 
426  virtual ~FESystem ();
427 
436  virtual std::string get_name () const;
437 
438  // for documentation, see the FiniteElement base class
439  virtual
441  requires_update_flags (const UpdateFlags update_flags) const;
442 
455  virtual double shape_value (const unsigned int i,
456  const Point<dim> &p) const;
457 
466  virtual double shape_value_component (const unsigned int i,
467  const Point<dim> &p,
468  const unsigned int component) const;
469 
484  virtual Tensor<1,dim> shape_grad (const unsigned int i,
485  const Point<dim> &p) const;
486 
495  virtual Tensor<1,dim> shape_grad_component (const unsigned int i,
496  const Point<dim> &p,
497  const unsigned int component) const;
498 
513  virtual Tensor<2,dim> shape_grad_grad (const unsigned int i,
514  const Point<dim> &p) const;
515 
524  virtual
526  shape_grad_grad_component (const unsigned int i,
527  const Point<dim> &p,
528  const unsigned int component) const;
529 
544  virtual Tensor<3,dim> shape_3rd_derivative (const unsigned int i,
545  const Point<dim> &p) const;
546 
555  virtual Tensor<3,dim> shape_3rd_derivative_component (const unsigned int i,
556  const Point<dim> &p,
557  const unsigned int component) const;
558 
573  virtual Tensor<4,dim> shape_4th_derivative (const unsigned int i,
574  const Point<dim> &p) const;
575 
584  virtual Tensor<4,dim> shape_4th_derivative_component (const unsigned int i,
585  const Point<dim> &p,
586  const unsigned int component) const;
587 
599  virtual void
601  FullMatrix<double> &matrix) const;
602 
609  virtual const FiniteElement<dim,spacedim> &
610  base_element (const unsigned int index) const;
611 
616  virtual bool has_support_on_face (const unsigned int shape_index,
617  const unsigned int face_index) const;
618 
642  virtual const FullMatrix<double> &
643  get_restriction_matrix (const unsigned int child,
645 
673  virtual const FullMatrix<double> &
674  get_prolongation_matrix (const unsigned int child,
676 
715  virtual
716  unsigned int face_to_cell_index (const unsigned int face_dof_index,
717  const unsigned int face,
718  const bool face_orientation = true,
719  const bool face_flip = false,
720  const bool face_rotation = false) const;
721 
725  virtual
726  Point<dim>
727  unit_support_point (const unsigned int index) const;
728 
732  virtual
733  Point<dim-1>
734  unit_face_support_point (const unsigned int index) const;
735 
743  virtual std::pair<Table<2,bool>, std::vector<unsigned int> >
744  get_constant_modes () const;
745 
758  virtual bool hp_constraints_are_implemented () const;
759 
772  virtual void
774  FullMatrix<double> &matrix) const;
775 
776 
789  virtual void
791  const unsigned int subface,
792  FullMatrix<double> &matrix) const;
793 
809  virtual
810  std::vector<std::pair<unsigned int, unsigned int> >
812 
817  virtual
818  std::vector<std::pair<unsigned int, unsigned int> >
819  hp_line_dof_identities (const FiniteElement<dim,spacedim> &fe_other) const;
820 
825  virtual
826  std::vector<std::pair<unsigned int, unsigned int> >
827  hp_quad_dof_identities (const FiniteElement<dim,spacedim> &fe_other) const;
828 
838  virtual
842 
851  virtual std::size_t memory_consumption () const;
852 
853 protected:
854 
860  virtual FiniteElement<dim,spacedim> *clone() const;
861 
862 
864  get_data (const UpdateFlags update_flags,
865  const Mapping<dim,spacedim> &mapping,
866  const Quadrature<dim> &quadrature,
868 
869  virtual
871  get_face_data (const UpdateFlags update_flags,
872  const Mapping<dim,spacedim> &mapping,
873  const Quadrature<dim-1> &quadrature,
875 
876  virtual
878  get_subface_data (const UpdateFlags update_flags,
879  const Mapping<dim,spacedim> &mapping,
880  const Quadrature<dim-1> &quadrature,
882 
883  virtual
884  void
885  fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
886  const CellSimilarity::Similarity cell_similarity,
887  const Quadrature<dim> &quadrature,
888  const Mapping<dim,spacedim> &mapping,
889  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
890  const ::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
891  const typename FiniteElement<dim,spacedim>::InternalDataBase &fe_internal,
893 
894  virtual
895  void
896  fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
897  const unsigned int face_no,
898  const Quadrature<dim-1> &quadrature,
899  const Mapping<dim,spacedim> &mapping,
900  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
901  const ::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
902  const typename FiniteElement<dim,spacedim>::InternalDataBase &fe_internal,
904 
905  virtual
906  void
907  fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
908  const unsigned int face_no,
909  const unsigned int sub_no,
910  const Quadrature<dim-1> &quadrature,
911  const Mapping<dim,spacedim> &mapping,
912  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
913  const ::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
914  const typename FiniteElement<dim,spacedim>::InternalDataBase &fe_internal,
916 
927  template <int dim_1>
928  void compute_fill (const Mapping<dim,spacedim> &mapping,
929  const typename Triangulation<dim,spacedim>::cell_iterator &cell,
930  const unsigned int face_no,
931  const unsigned int sub_no,
932  const Quadrature<dim_1> &quadrature,
933  const CellSimilarity::Similarity cell_similarity,
934  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
935  const typename FiniteElement<dim,spacedim>::InternalDataBase &fe_data,
938 
939 private:
940 
945 
960  std::vector<std::pair<std_cxx11::shared_ptr<const FiniteElement<dim,spacedim> >,
961  unsigned int> >
963 
969 
975 
986  void initialize (const std::vector<const FiniteElement<dim,spacedim>*> &fes,
987  const std::vector<unsigned int> &multiplicities);
988 
993 
999  template <int structdim>
1000  std::vector<std::pair<unsigned int, unsigned int> >
1001  hp_object_dof_identities (const FiniteElement<dim,spacedim> &fe_other) const;
1002 
1009  class InternalData : public FiniteElement<dim,spacedim>::InternalDataBase
1010  {
1011  public:
1016  InternalData (const unsigned int n_base_elements);
1017 
1022  ~InternalData();
1023 
1028  void set_fe_data(const unsigned int base_no,
1030 
1036  get_fe_data (const unsigned int base_no) const;
1037 
1044  get_fe_output_object (const unsigned int base_no) const;
1045 
1046  private:
1047 
1058  typename std::vector<typename FiniteElement<dim,spacedim>::InternalDataBase *> base_fe_datas;
1059 
1068  mutable std::vector<internal::FEValues::FiniteElementRelatedData<dim,spacedim> > base_fe_output_objects;
1069  };
1070 
1071  /*
1072  * Mutex for protecting initialization of restriction and embedding matrix.
1073  */
1074  mutable Threads::Mutex mutex;
1075 
1076  friend class FE_Enriched<dim,spacedim>;
1077 };
1078 
1079 
1080 DEAL_II_NAMESPACE_CLOSE
1081 
1082 /*---------------------------- fe_system.h ---------------------------*/
1083 #endif
1084 /*---------------------------- fe_system.h ---------------------------*/
void initialize_unit_support_points()
Definition: fe_system.cc:1531
static const unsigned int invalid_unsigned_int
Definition: types.h:170
void build_interface_constraints()
Definition: fe_system.cc:1270
void initialize(const std::vector< const FiniteElement< dim, spacedim > *> &fes, const std::vector< unsigned int > &multiplicities)
Definition: fe_system.cc:1453
std::vector< std::pair< unsigned int, unsigned int > > hp_object_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe_system.cc:1900
std::vector< std::pair< std_cxx11::shared_ptr< const FiniteElement< dim, spacedim > >, unsigned int > > base_elements
Definition: fe_system.h:962
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe_system.cc:355
virtual bool hp_constraints_are_implemented() const
Definition: fe_system.cc:1664
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe_system.cc:2012
virtual FiniteElement< dim, spacedim >::InternalDataBase * get_face_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim-1 > &quadrature, ::internal::FEValues::FiniteElementRelatedData< dim, spacedim > &output_data) const
Definition: fe_system.cc:923
void initialize_quad_dof_index_permutation()
Definition: fe_system.cc:1609
std::vector< internal::FEValues::FiniteElementRelatedData< dim, spacedim > > base_fe_output_objects
Definition: fe_system.h:1068
void set_fe_data(const unsigned int base_no, typename FiniteElement< dim, spacedim >::InternalDataBase *)
Definition: fe_system.cc:86
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const
Definition: fe_system.cc:2151
virtual Point< dim > unit_support_point(const unsigned int index) const
Definition: fe_system.cc:2105
InternalData(const unsigned int n_base_elements)
Definition: fe_system.cc:49
virtual Tensor< 3, dim > shape_3rd_derivative(const unsigned int i, const Point< dim > &p) const
Definition: fe_system.cc:482
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const
Definition: fe_system.cc:852
virtual Tensor< 3, dim > shape_3rd_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe_system.cc:497
virtual std::string get_name() const
Definition: fe_system.cc:292
virtual Tensor< 4, dim > shape_4th_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe_system.cc:542
virtual FiniteElement< dim, spacedim > * clone() const
Definition: fe_system.cc:323
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe_system.cc:2028
UpdateFlags
static const unsigned int invalid_face_number
Definition: fe_system.h:944
Abstract base class for mapping classes.
Definition: dof_tools.h:46
Definition: fe.h:33
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
Definition: fe_system.cc:743
void initialize_unit_face_support_points()
Definition: fe_system.cc:1563
virtual Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const
Definition: fe_system.cc:437
virtual double shape_value(const unsigned int i, const Point< dim > &p) const
Definition: fe_system.cc:340
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
Definition: fe_system.cc:572
void compute_fill(const Mapping< dim, spacedim > &mapping, const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const Quadrature< dim_1 > &quadrature, const CellSimilarity::Similarity cell_similarity, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_data, const internal::FEValues::MappingRelatedData< dim, spacedim > &mapping_data, internal::FEValues::FiniteElementRelatedData< dim, spacedim > &output_data) const
Definition: fe_system.cc:1096
virtual Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe_system.cc:407
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const
Definition: fe_system.cc:1788
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
Definition: fe_system.cc:2082
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
Definition: fe_system.cc:1678
virtual std::size_t memory_consumption() const
Definition: fe_system.cc:2205
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe_system.cc:2019
std::vector< typename FiniteElement< dim, spacedim >::InternalDataBase * > base_fe_datas
Definition: fe_system.h:1058
virtual FiniteElementDomination::Domination compare_for_face_domination(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe_system.cc:2038
FiniteElement< dim, spacedim >::InternalDataBase & get_fe_data(const unsigned int base_no) const
Definition: fe_system.cc:74
virtual Point< dim-1 > unit_face_support_point(const unsigned int index) const
Definition: fe_system.cc:2128
FESystem(const FiniteElement< dim, spacedim > &fe, const unsigned int n_elements)
Definition: fe_system.cc:116
virtual Tensor< 4, dim > shape_4th_derivative(const unsigned int i, const Point< dim > &p) const
Definition: fe_system.cc:527
virtual FiniteElement< dim, spacedim >::InternalDataBase * get_subface_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim-1 > &quadrature, ::internal::FEValues::FiniteElementRelatedData< dim, spacedim > &output_data) const
Definition: fe_system.cc:981
virtual FiniteElement< dim, spacedim >::InternalDataBase * get_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim > &quadrature, ::internal::FEValues::FiniteElementRelatedData< dim, spacedim > &output_data) const
Definition: fe_system.cc:867
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
Definition: fe_system.cc:807
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
Definition: fe_system.cc:2093
internal::FEValues::FiniteElementRelatedData< dim, spacedim > & get_fe_output_object(const unsigned int base_no) const
Definition: fe_system.cc:99
unsigned int n_base_elements() const
Definition: fe.h:2853
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
Definition: fe_system.cc:654
virtual ~FESystem()
Definition: fe_system.cc:285
virtual Tensor< 2, dim > shape_grad_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe_system.cc:452
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const
Definition: fe_system.cc:392