Reference documentation for deal.II version 8.5.1
fe.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 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_h
17 #define dealii__fe_h
18 
19 #include <deal.II/base/config.h>
20 #include <deal.II/fe/fe_base.h>
21 #include <deal.II/fe/fe_values_extractors.h>
22 #include <deal.II/fe/fe_update_flags.h>
23 #include <deal.II/fe/component_mask.h>
24 #include <deal.II/fe/block_mask.h>
25 #include <deal.II/fe/mapping.h>
26 
27 DEAL_II_NAMESPACE_OPEN
28 
29 template <int dim, int spacedim> class FEValuesBase;
30 template <int dim, int spacedim> class FEValues;
31 template <int dim, int spacedim> class FEFaceValues;
32 template <int dim, int spacedim> class FESubfaceValues;
33 template <int dim, int spacedim> class FESystem;
34 
568 template <int dim, int spacedim=dim>
569 class FiniteElement : public Subscriptor,
570  public FiniteElementData<dim>
571 {
572 public:
576  static const unsigned int space_dimension = spacedim;
577 
605  {
606  private:
611 
612  public:
617  InternalDataBase ();
618 
622  virtual ~InternalDataBase ();
623 
639 
643  virtual std::size_t memory_consumption () const;
644  };
645 
646 public:
689  FiniteElement (const FiniteElementData<dim> &fe_data,
690  const std::vector<bool> &restriction_is_additive_flags,
691  const std::vector<ComponentMask> &nonzero_components);
692 
697  virtual ~FiniteElement ();
698 
705  virtual FiniteElement<dim,spacedim> *clone() const = 0;
706 
717  virtual std::string get_name () const = 0;
718 
740  const FiniteElement<dim,spacedim> &operator[] (const unsigned int fe_index) const;
741 
767  virtual double shape_value (const unsigned int i,
768  const Point<dim> &p) const;
769 
776  virtual double shape_value_component (const unsigned int i,
777  const Point<dim> &p,
778  const unsigned int component) const;
779 
801  virtual Tensor<1,dim> shape_grad (const unsigned int i,
802  const Point<dim> &p) const;
803 
810  virtual Tensor<1,dim> shape_grad_component (const unsigned int i,
811  const Point<dim> &p,
812  const unsigned int component) const;
813 
835  virtual Tensor<2,dim> shape_grad_grad (const unsigned int i,
836  const Point<dim> &p) const;
837 
844  virtual Tensor<2,dim> shape_grad_grad_component (const unsigned int i,
845  const Point<dim> &p,
846  const unsigned int component) const;
847 
869  virtual Tensor<3,dim> shape_3rd_derivative (const unsigned int i,
870  const Point<dim> &p) const;
871 
878  virtual Tensor<3,dim> shape_3rd_derivative_component (const unsigned int i,
879  const Point<dim> &p,
880  const unsigned int component) const;
881 
903  virtual Tensor<4,dim> shape_4th_derivative (const unsigned int i,
904  const Point<dim> &p) const;
905 
912  virtual Tensor<4,dim> shape_4th_derivative_component (const unsigned int i,
913  const Point<dim> &p,
914  const unsigned int component) const;
925  virtual bool has_support_on_face (const unsigned int shape_index,
926  const unsigned int face_index) const;
927 
929 
949  virtual const FullMatrix<double> &
950  get_restriction_matrix (const unsigned int child,
952 
982  virtual const FullMatrix<double> &
983  get_prolongation_matrix (const unsigned int child,
985 
1007  bool prolongation_is_implemented () const;
1008 
1025 
1047  bool restriction_is_implemented () const;
1048 
1065 
1066 
1075  bool restriction_is_additive (const unsigned int index) const;
1076 
1088  const FullMatrix<double> &constraints (const ::internal::SubfaceCase<dim> &subface_case=::internal::SubfaceCase<dim>::case_isotropic) const;
1089 
1105  bool constraints_are_implemented (const ::internal::SubfaceCase<dim> &subface_case=::internal::SubfaceCase<dim>::case_isotropic) const;
1106 
1107 
1129  virtual bool hp_constraints_are_implemented () const;
1130 
1131 
1143  virtual void
1145  FullMatrix<double> &matrix) const;
1147 
1165  virtual void
1167  FullMatrix<double> &matrix) const;
1168 
1169 
1181  virtual void
1183  const unsigned int subface,
1184  FullMatrix<double> &matrix) const;
1186 
1187 
1208  virtual
1209  std::vector<std::pair<unsigned int, unsigned int> >
1210  hp_vertex_dof_identities (const FiniteElement<dim,spacedim> &fe_other) const;
1211 
1216  virtual
1217  std::vector<std::pair<unsigned int, unsigned int> >
1218  hp_line_dof_identities (const FiniteElement<dim,spacedim> &fe_other) const;
1219 
1224  virtual
1225  std::vector<std::pair<unsigned int, unsigned int> >
1226  hp_quad_dof_identities (const FiniteElement<dim,spacedim> &fe_other) const;
1227 
1237  virtual
1240 
1242 
1252  bool operator == (const FiniteElement<dim,spacedim> &) const;
1253 
1286  std::pair<unsigned int, unsigned int>
1287  system_to_component_index (const unsigned int index) const;
1288 
1298  unsigned int component_to_system_index(const unsigned int component,
1299  const unsigned int index) const;
1300 
1310  std::pair<unsigned int, unsigned int>
1311  face_system_to_component_index (const unsigned int index) const;
1312 
1321  unsigned int adjust_quad_dof_index_for_face_orientation (const unsigned int index,
1322  const bool face_orientation,
1323  const bool face_flip,
1324  const bool face_rotation) const;
1325 
1380  virtual
1381  unsigned int face_to_cell_index (const unsigned int face_dof_index,
1382  const unsigned int face,
1383  const bool face_orientation = true,
1384  const bool face_flip = false,
1385  const bool face_rotation = false) const;
1386 
1394  unsigned int adjust_line_dof_index_for_line_orientation (const unsigned int index,
1395  const bool line_orientation) const;
1396 
1413  const ComponentMask &
1414  get_nonzero_components (const unsigned int i) const;
1415 
1426  unsigned int
1427  n_nonzero_components (const unsigned int i) const;
1428 
1437  bool is_primitive () const;
1438 
1449  bool
1450  is_primitive (const unsigned int i) const;
1451 
1463  unsigned int n_base_elements () const;
1464 
1469  virtual
1471  base_element (const unsigned int index) const;
1472 
1479  unsigned int
1480  element_multiplicity (const unsigned int index) const;
1481 
1501  std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1502  system_to_base_index (const unsigned int index) const;
1503 
1512  std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1513  face_system_to_base_index (const unsigned int index) const;
1514 
1519  types::global_dof_index first_block_of_base (const unsigned int b) const;
1520 
1533  std::pair<unsigned int, unsigned int>
1534  component_to_base_index (const unsigned int component) const;
1535 
1536 
1541  std::pair<unsigned int,unsigned int>
1542  block_to_base_index (const unsigned int block) const;
1543 
1547  std::pair<unsigned int,types::global_dof_index>
1548  system_to_block_index (const unsigned int component) const;
1549 
1553  unsigned int
1554  component_to_block_index (const unsigned int component) const;
1555 
1557 
1576  component_mask (const FEValuesExtractors::Scalar &scalar) const;
1577 
1591  component_mask (const FEValuesExtractors::Vector &vector) const;
1592 
1607  component_mask (const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const;
1608 
1624  component_mask (const BlockMask &block_mask) const;
1625 
1646  BlockMask
1647  block_mask (const FEValuesExtractors::Scalar &scalar) const;
1648 
1665  BlockMask
1666  block_mask (const FEValuesExtractors::Vector &vector) const;
1667 
1685  BlockMask
1686  block_mask (const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const;
1687 
1710  BlockMask
1711  block_mask (const ComponentMask &component_mask) const;
1712 
1728  virtual std::pair<Table<2,bool>,std::vector<unsigned int> >
1729  get_constant_modes () const;
1730 
1732 
1768  const std::vector<Point<dim> > &
1769  get_unit_support_points () const;
1770 
1788  bool has_support_points () const;
1789 
1802  virtual
1803  Point<dim>
1804  unit_support_point (const unsigned int index) const;
1805 
1832  const std::vector<Point<dim-1> > &
1834 
1843  bool has_face_support_points () const;
1844 
1849  virtual
1850  Point<dim-1>
1851  unit_face_support_point (const unsigned int index) const;
1852 
1860  const std::vector<Point<dim> > &
1862 
1871  bool has_generalized_support_points () const;
1872 
1877  const std::vector<Point<dim-1> > &
1879 
1888  bool
1890 
1935  get_associated_geometry_primitive (const unsigned int cell_dof_index) const;
1936 
1937 
2006  virtual
2007  void
2008  convert_generalized_support_point_values_to_nodal_values (const std::vector<Vector<double> > &support_point_values,
2009  std::vector<double> &nodal_values) const;
2010 
2022  virtual
2023  void
2024  interpolate(std::vector<double> &local_dofs,
2025  const std::vector<double> &values) const DEAL_II_DEPRECATED;
2026 
2038  virtual
2039  void
2040  interpolate(std::vector<double> &local_dofs,
2041  const std::vector<Vector<double> > &values,
2042  const unsigned int offset = 0) const DEAL_II_DEPRECATED;
2043 
2050  virtual
2051  void
2052  interpolate(std::vector<double> &local_dofs,
2053  const VectorSlice<const std::vector<std::vector<double> > > &values) const DEAL_II_DEPRECATED;
2054 
2056 
2065  virtual std::size_t memory_consumption () const;
2066 
2073  int,
2074  << "The shape function with index " << arg1
2075  << " is not primitive, i.e. it is vector-valued and "
2076  << "has more than one non-zero vector component. This "
2077  << "function cannot be called for these shape functions. "
2078  << "Maybe you want to use the same function with the "
2079  << "_component suffix?");
2092  "You are trying to access the values or derivatives of shape functions "
2093  "on the reference cell of an element that does not define its shape "
2094  "functions through mapping from the reference cell. Consequently, "
2095  "you cannot ask for shape function values or derivatives on the "
2096  "reference cell.");
2097 
2105  "You are trying to access the support points of a finite "
2106  "element that either has no support points at all, or for "
2107  "which the corresponding tables have not been implemented.");
2108 
2116  "You are trying to access the matrices that describe how "
2117  "to embed a finite element function on one cell into the "
2118  "finite element space on one of its children (i.e., the "
2119  "'embedding' or 'prolongation' matrices). However, the "
2120  "current finite element can either not define this sort of "
2121  "operation, or it has not yet been implemented.");
2122 
2131  "You are trying to access the matrices that describe how "
2132  "to restrict a finite element function from the children "
2133  "of one cell to the finite element space defined on their "
2134  "parent (i.e., the 'restriction' or 'projection' matrices). "
2135  "However, the current finite element can either not define "
2136  "this sort of operation, or it has not yet been "
2137  "implemented.");
2138 
2144  int, int,
2145  << "The interface matrix has a size of " << arg1
2146  << "x" << arg2
2147  << ", which is not reasonable for the current element "
2148  "in the present dimension.");
2154 
2155 protected:
2156 
2170  void reinit_restriction_and_prolongation_matrices(const bool isotropic_restriction_only=false,
2171  const bool isotropic_prolongation_only=false);
2172 
2185  std::vector<std::vector<FullMatrix<double> > > restriction;
2186 
2199  std::vector<std::vector<FullMatrix<double> > > prolongation;
2200 
2212 
2224 
2231 
2237 
2243 
2260 
2275 
2279  std::vector<std::pair<unsigned int, unsigned int> > system_to_component_table;
2280 
2290  std::vector<std::pair<unsigned int, unsigned int> > face_system_to_component_table;
2291 
2308  std::vector<std::pair<std::pair<unsigned int,unsigned int>,unsigned int> >
2310 
2314  std::vector<std::pair<std::pair<unsigned int,unsigned int>,unsigned int> >
2316 
2322 
2338  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int> >
2340 
2346  const std::vector<bool> restriction_is_additive_flags;
2347 
2356 
2364  const std::vector<unsigned int> n_nonzero_components_table;
2365 
2372 
2384  TableIndices<2>
2385  interface_constraints_size () const;
2386 
2392  static
2393  std::vector<unsigned int>
2395 
2416  virtual
2417  UpdateFlags
2418  requires_update_flags (const UpdateFlags update_flags) const = 0;
2419 
2496  virtual
2497  InternalDataBase *
2498  get_data (const UpdateFlags update_flags,
2499  const Mapping<dim,spacedim> &mapping,
2500  const Quadrature<dim> &quadrature,
2501  ::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const = 0;
2502 
2544  virtual
2545  InternalDataBase *
2546  get_face_data (const UpdateFlags update_flags,
2547  const Mapping<dim,spacedim> &mapping,
2548  const Quadrature<dim-1> &quadrature,
2549  ::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const;
2550 
2592  virtual
2593  InternalDataBase *
2594  get_subface_data (const UpdateFlags update_flags,
2595  const Mapping<dim,spacedim> &mapping,
2596  const Quadrature<dim-1> &quadrature,
2597  ::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const;
2598 
2679  virtual
2680  void
2681  fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
2682  const CellSimilarity::Similarity cell_similarity,
2683  const Quadrature<dim> &quadrature,
2684  const Mapping<dim,spacedim> &mapping,
2685  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
2686  const ::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
2687  const InternalDataBase &fe_internal,
2688  ::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const = 0;
2689 
2732  virtual
2733  void
2734  fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
2735  const unsigned int face_no,
2736  const Quadrature<dim-1> &quadrature,
2737  const Mapping<dim,spacedim> &mapping,
2738  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
2739  const ::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
2740  const InternalDataBase &fe_internal,
2741  ::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const = 0;
2742 
2788  virtual
2789  void
2790  fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
2791  const unsigned int face_no,
2792  const unsigned int sub_no,
2793  const Quadrature<dim-1> &quadrature,
2794  const Mapping<dim,spacedim> &mapping,
2795  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
2796  const ::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
2797  const InternalDataBase &fe_internal,
2798  ::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const = 0;
2799 
2800  friend class InternalDataBase;
2801  friend class FEValuesBase<dim,spacedim>;
2802  friend class FEValues<dim,spacedim>;
2803  friend class FEFaceValues<dim,spacedim>;
2804  friend class FESubfaceValues<dim,spacedim>;
2805  friend class FESystem<dim,spacedim>;
2806 
2807  // explicitly check for sensible template arguments, but not on windows
2808  // because MSVC creates bogus warnings during normal compilation
2809 #ifdef DEAL_II_WITH_CXX11
2810 #ifndef DEAL_II_MSVC
2811  static_assert (dim<=spacedim,
2812  "The dimension <dim> of a FiniteElement must be less than or "
2813  "equal to the space dimension <spacedim> in which it lives.");
2814 #endif
2815 #endif
2816 
2817 };
2818 
2819 
2820 //----------------------------------------------------------------------//
2821 
2822 
2823 template <int dim, int spacedim>
2824 inline
2826 FiniteElement<dim,spacedim>::operator[] (const unsigned int fe_index) const
2827 {
2828  (void)fe_index;
2829  Assert (fe_index == 0,
2830  ExcMessage ("A fe_index of zero is the only index allowed here"));
2831  return *this;
2832 }
2833 
2834 
2835 
2836 template <int dim, int spacedim>
2837 inline
2838 std::pair<unsigned int,unsigned int>
2840 {
2841  Assert (index < system_to_component_table.size(),
2842  ExcIndexRange(index, 0, system_to_component_table.size()));
2843  Assert (is_primitive (index),
2845  return system_to_component_table[index];
2846 }
2847 
2848 
2849 
2850 template <int dim, int spacedim>
2851 inline
2852 unsigned int
2854 {
2855  return base_to_block_indices.size();
2856 }
2857 
2858 
2859 
2860 template <int dim, int spacedim>
2861 inline
2862 unsigned int
2864 {
2865  return static_cast<unsigned int>(base_to_block_indices.block_size(index));
2866 }
2867 
2868 
2869 
2870 template <int dim, int spacedim>
2871 inline
2872 unsigned int
2874  const unsigned int index) const
2875 {
2876  AssertIndexRange(component, this->n_components());
2877  const std::vector<std::pair<unsigned int, unsigned int> >::const_iterator
2878  it = std::find(system_to_component_table.begin(), system_to_component_table.end(),
2879  std::pair<unsigned int, unsigned int>(component, index));
2880 
2881  Assert(it != system_to_component_table.end(),
2882  ExcMessage ("You are asking for the number of the shape function "
2883  "within a system element that corresponds to vector "
2884  "component " + Utilities::int_to_string(component) + " and within this to "
2885  "index " + Utilities::int_to_string(index) + ". But no such "
2886  "shape function exists."));
2887  return std::distance(system_to_component_table.begin(), it);
2888 }
2889 
2890 
2891 
2892 template <int dim, int spacedim>
2893 inline
2894 std::pair<unsigned int,unsigned int>
2896 {
2897  Assert(index < face_system_to_component_table.size(),
2898  ExcIndexRange(index, 0, face_system_to_component_table.size()));
2899 
2900  // in debug mode, check whether the
2901  // function is primitive, since
2902  // otherwise the result may have no
2903  // meaning
2904  //
2905  // since the primitivity tables are
2906  // all geared towards cell dof
2907  // indices, rather than face dof
2908  // indices, we have to work a
2909  // little bit...
2910  //
2911  // in 1d, the face index is equal
2912  // to the cell index
2913  Assert (is_primitive(this->face_to_cell_index(index, 0)),
2915 
2916  return face_system_to_component_table[index];
2917 }
2918 
2919 
2920 
2921 template <int dim, int spacedim>
2922 inline
2923 std::pair<std::pair<unsigned int,unsigned int>,unsigned int>
2925 {
2926  Assert (index < system_to_base_table.size(),
2927  ExcIndexRange(index, 0, system_to_base_table.size()));
2928  return system_to_base_table[index];
2929 }
2930 
2931 
2932 
2933 
2934 template <int dim, int spacedim>
2935 inline
2936 std::pair<std::pair<unsigned int,unsigned int>,unsigned int>
2938 {
2939  Assert(index < face_system_to_base_table.size(),
2940  ExcIndexRange(index, 0, face_system_to_base_table.size()));
2941  return face_system_to_base_table[index];
2942 }
2943 
2944 
2945 
2946 template <int dim, int spacedim>
2947 inline
2950 {
2951  return base_to_block_indices.block_start(index);
2952 }
2953 
2954 
2955 
2956 template <int dim, int spacedim>
2957 inline
2958 std::pair<unsigned int,unsigned int>
2960 {
2961  Assert(index < component_to_base_table.size(),
2962  ExcIndexRange(index, 0, component_to_base_table.size()));
2963 
2964  return component_to_base_table[index].first;
2965 }
2966 
2967 
2968 
2969 template <int dim, int spacedim>
2970 inline
2971 std::pair<unsigned int,unsigned int>
2973 {
2974  return base_to_block_indices.global_to_local(index);
2975 }
2976 
2977 
2978 
2979 template <int dim, int spacedim>
2980 inline
2981 std::pair<unsigned int,types::global_dof_index>
2983 {
2984  Assert (index < this->dofs_per_cell,
2985  ExcIndexRange(index, 0, this->dofs_per_cell));
2986  // The block is computed simply as
2987  // first block of this base plus
2988  // the index within the base blocks
2989  return std::pair<unsigned int, types::global_dof_index>(
2990  first_block_of_base(system_to_base_table[index].first.first)
2991  + system_to_base_table[index].first.second,
2992  system_to_base_table[index].second);
2993 }
2994 
2995 
2996 
2997 template <int dim, int spacedim>
2998 inline
2999 bool
3001 {
3002  Assert(index < this->dofs_per_cell,
3003  ExcIndexRange(index, 0, this->dofs_per_cell));
3004  return restriction_is_additive_flags[index];
3005 }
3006 
3007 
3008 
3009 template <int dim, int spacedim>
3010 inline
3011 const ComponentMask &
3013 {
3014  Assert (i < this->dofs_per_cell, ExcIndexRange (i, 0, this->dofs_per_cell));
3015  return nonzero_components[i];
3016 }
3017 
3018 
3019 
3020 template <int dim, int spacedim>
3021 inline
3022 unsigned int
3024 {
3025  Assert (i < this->dofs_per_cell, ExcIndexRange (i, 0, this->dofs_per_cell));
3026  return n_nonzero_components_table[i];
3027 }
3028 
3029 
3030 
3031 template <int dim, int spacedim>
3032 inline
3033 bool
3035 {
3036  return cached_primitivity;
3037 }
3038 
3039 
3040 
3041 template <int dim, int spacedim>
3042 inline
3043 bool
3044 FiniteElement<dim,spacedim>::is_primitive (const unsigned int i) const
3045 {
3046  Assert (i < this->dofs_per_cell, ExcIndexRange (i, 0, this->dofs_per_cell));
3047 
3048  // return primitivity of a shape
3049  // function by checking whether it
3050  // has more than one non-zero
3051  // component or not. we could cache
3052  // this value in an array of bools,
3053  // but accessing a bit-vector (as
3054  // std::vector<bool> is) is
3055  // probably more expensive than
3056  // just comparing against 1
3057  //
3058  // for good measure, short circuit the test
3059  // if the entire FE is primitive
3060  return (is_primitive() ||
3061  (n_nonzero_components_table[i] == 1));
3062 }
3063 
3064 
3065 
3066 template <int dim, int spacedim>
3067 inline
3070 {
3071  Assert (cell_dof_index < this->dofs_per_cell,
3072  ExcIndexRange (cell_dof_index, 0, this->dofs_per_cell));
3073 
3074  // just go through the usual cases, taking into account how DoFs
3075  // are enumerated on the reference cell
3076  if (cell_dof_index < this->first_line_index)
3078  else if (cell_dof_index < this->first_quad_index)
3079  return GeometryPrimitive::line;
3080  else if (cell_dof_index < this->first_hex_index)
3081  return GeometryPrimitive::quad;
3082  else
3083  return GeometryPrimitive::hex;
3084 }
3085 
3086 
3087 
3088 DEAL_II_NAMESPACE_CLOSE
3089 
3090 #endif
virtual void fill_fe_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature< dim > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const ::internal::FEValues::MappingRelatedData< dim, spacedim > &mapping_data, const InternalDataBase &fe_internal, ::internal::FEValues::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
static ::ExceptionBase & ExcFEHasNoSupportPoints()
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const =0
BlockMask block_mask(const FEValuesExtractors::Scalar &scalar) const
Definition: fe.cc:442
bool restriction_is_additive(const unsigned int index) const
Definition: fe.h:3000
virtual Tensor< 2, dim > shape_grad_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe.cc:220
std::vector< std::vector< FullMatrix< double > > > restriction
Definition: fe.h:2185
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:576
virtual std::size_t memory_consumption() const
Definition: fe.cc:52
const std::vector< Point< dim-1 > > & get_unit_face_support_points() const
Definition: fe.cc:1017
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
Definition: fe.cc:867
virtual InternalDataBase * get_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim > &quadrature, ::internal::FEValues::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
std::vector< Point< dim > > generalized_support_points
Definition: fe.h:2236
virtual Tensor< 3, dim > shape_3rd_derivative(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:232
FullMatrix< double > interface_constraints
Definition: fe.h:2211
unsigned int n_nonzero_components(const unsigned int i) const
Definition: fe.h:3023
const std::vector< Point< dim-1 > > & get_generalized_face_support_points() const
Definition: fe.cc:1042
FiniteElement(const FiniteElementData< dim > &fe_data, const std::vector< bool > &restriction_is_additive_flags, const std::vector< ComponentMask > &nonzero_components)
Definition: fe.cc:61
virtual void interpolate(std::vector< double > &local_dofs, const std::vector< double > &values) const 1
Definition: fe.cc:1118
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe.cc:174
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
Definition: fe.cc:850
static ::ExceptionBase & ExcUnitShapeValuesDoNotExist()
virtual Point< dim > unit_support_point(const unsigned int index) const
Definition: fe.cc:1004
bool restriction_is_implemented() const
Definition: fe.cc:698
const std::vector< Point< dim > > & get_generalized_support_points() const
Definition: fe.cc:980
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:186
virtual Tensor< 3, dim > shape_3rd_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe.cc:243
virtual void fill_fe_face_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const Quadrature< dim-1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const ::internal::FEValues::MappingRelatedData< dim, spacedim > &mapping_data, const InternalDataBase &fe_internal, ::internal::FEValues::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
#define AssertIndexRange(index, range)
Definition: exceptions.h:1170
Table< 2, int > adjust_quad_dof_index_for_face_orientation_table
Definition: fe.h:2259
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:923
bool isotropic_prolongation_is_implemented() const
Definition: fe.cc:724
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > component_to_base_table
Definition: fe.h:2339
bool has_generalized_support_points() const
Definition: fe.cc:995
STL namespace.
ComponentMask component_mask(const FEValuesExtractors::Scalar &scalar) const
Definition: fe.cc:360
static std::vector< unsigned int > compute_n_nonzero_components(const std::vector< ComponentMask > &nonzero_components)
Definition: fe.cc:1208
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > face_system_to_base_table
Definition: fe.h:2315
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
Definition: fe.cc:325
bool is_primitive() const
Definition: fe.h:3034
static ::ExceptionBase & ExcInterpolationNotImplemented()
const std::vector< unsigned int > n_nonzero_components_table
Definition: fe.h:2364
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
virtual void convert_generalized_support_point_values_to_nodal_values(const std::vector< Vector< double > > &support_point_values, std::vector< double > &nodal_values) const
Definition: fe.cc:1103
bool has_face_support_points() const
Definition: fe.cc:1033
bool operator==(const FiniteElement< dim, spacedim > &) const
Definition: fe.cc:944
std::vector< Point< dim > > unit_support_points
Definition: fe.h:2223
bool has_support_points() const
Definition: fe.cc:971
unsigned int component_to_block_index(const unsigned int component) const
Definition: fe.cc:347
static ::ExceptionBase & ExcFENotPrimitive()
static ::ExceptionBase & ExcMessage(std::string arg1)
const FullMatrix< double > & constraints(const ::internal::SubfaceCase< dim > &subface_case=::internal::SubfaceCase< dim >::case_isotropic) const
Definition: fe.cc:797
virtual Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe.cc:197
virtual std::size_t memory_consumption() const
Definition: fe.cc:1188
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:564
virtual ~FiniteElement()
Definition: fe.cc:155
std::vector< std::vector< FullMatrix< double > > > prolongation
Definition: fe.h:2199
std::pair< unsigned int, unsigned int > component_to_base_index(const unsigned int component) const
Definition: fe.h:2959
unsigned int global_dof_index
Definition: types.h:88
#define Assert(cond, exc)
Definition: exceptions.h:313
unsigned int element_multiplicity(const unsigned int index) const
Definition: fe.h:2863
UpdateFlags
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
Definition: fe.cc:305
Abstract base class for mapping classes.
Definition: dof_tools.h:46
GeometryPrimitive get_associated_geometry_primitive(const unsigned int cell_dof_index) const
Definition: fe.h:3069
std::vector< Point< dim-1 > > unit_face_support_points
Definition: fe.h:2230
Definition: fe.h:33
const ComponentMask & get_nonzero_components(const unsigned int i) const
Definition: fe.h:3012
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:553
#define DeclException0(Exception0)
Definition: exceptions.h:541
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const
Definition: fe.cc:884
virtual void fill_fe_subface_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const Quadrature< dim-1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const ::internal::FEValues::MappingRelatedData< dim, spacedim > &mapping_data, const InternalDataBase &fe_internal, ::internal::FEValues::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
bool constraints_are_implemented(const ::internal::SubfaceCase< dim > &subface_case=::internal::SubfaceCase< dim >::case_isotropic) const
Definition: fe.cc:776
static ::ExceptionBase & ExcWrongInterfaceMatrixSize(int arg1, int arg2)
std::pair< unsigned int, unsigned int > face_system_to_component_index(const unsigned int index) const
Definition: fe.h:2895
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
Definition: fe.cc:1251
virtual std::string get_name() const =0
static ::ExceptionBase & ExcProjectionVoid()
bool has_generalized_face_support_points() const
Definition: fe.cc:1057
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:901
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.cc:528
virtual 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.cc:1223
virtual Point< dim-1 > unit_face_support_point(const unsigned int index) const
Definition: fe.cc:1066
std::string int_to_string(const unsigned int value, const unsigned int digits=numbers::invalid_unsigned_int)
Definition: utilities.cc:85
virtual ~InternalDataBase()
Definition: fe.cc:45
std::pair< unsigned int, unsigned int > block_to_base_index(const unsigned int block) const
Definition: fe.h:2972
static ::ExceptionBase & ExcShapeFunctionNotPrimitive(int arg1)
std::vector< Point< dim-1 > > generalized_face_support_points
Definition: fe.h:2242
static const unsigned int dimension
Definition: fe_base.h:233
types::global_dof_index first_block_of_base(const unsigned int b) const
Definition: fe.h:2949
unsigned int adjust_line_dof_index_for_line_orientation(const unsigned int index, const bool line_orientation) const
Definition: fe.cc:649
const std::vector< Point< dim > > & get_unit_support_points() const
Definition: fe.cc:955
unsigned int component_to_system_index(const unsigned int component, const unsigned int index) const
Definition: fe.h:2873
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:912
std::pair< unsigned int, unsigned int > system_to_component_index(const unsigned int index) const
Definition: fe.h:2839
const FiniteElement< dim, spacedim > & operator[](const unsigned int fe_index) const
Definition: fe.h:2826
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > face_system_to_base_index(const unsigned int index) const
Definition: fe.h:2937
static ::ExceptionBase & ExcEmbeddingVoid()
virtual double shape_value(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:163
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > system_to_base_index(const unsigned int index) const
Definition: fe.h:2924
std::pair< unsigned int, types::global_dof_index > system_to_block_index(const unsigned int component) const
Definition: fe.h:2982
std::vector< std::pair< unsigned int, unsigned int > > system_to_component_table
Definition: fe.h:2279
virtual bool hp_constraints_are_implemented() const
Definition: fe.cc:788
Definition: fe.h:30
bool prolongation_is_implemented() const
Definition: fe.cc:672
virtual Tensor< 4, dim > shape_4th_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe.cc:266
const bool cached_primitivity
Definition: fe.h:2371
virtual Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:209
const std::vector< ComponentMask > nonzero_components
Definition: fe.h:2355
void reinit_restriction_and_prolongation_matrices(const bool isotropic_restriction_only=false, const bool isotropic_prolongation_only=false)
Definition: fe.cc:277
Definition: table.h:33
virtual 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.cc:1237
std::vector< std::pair< unsigned int, unsigned int > > face_system_to_component_table
Definition: fe.h:2290
bool isotropic_restriction_is_implemented() const
Definition: fe.cc:750
virtual FiniteElement< dim, spacedim > * clone() const =0
BlockIndices base_to_block_indices
Definition: fe.h:2321
unsigned int n_components(const DoFHandler< dim, spacedim > &dh)
virtual Tensor< 4, dim > shape_4th_derivative(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:255
unsigned int n_base_elements() const
Definition: fe.h:2853
static const unsigned int space_dimension
Definition: fe.h:576
unsigned int adjust_quad_dof_index_for_face_orientation(const unsigned int index, const bool face_orientation, const bool face_flip, const bool face_rotation) const
Definition: fe.cc:617
std::vector< int > adjust_line_dof_index_for_line_orientation_table
Definition: fe.h:2274
TableIndices< 2 > interface_constraints_size() const
Definition: fe.cc:823
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const
Definition: fe.cc:1090
const std::vector< bool > restriction_is_additive_flags
Definition: fe.h:2346
UpdateFlags update_each
Definition: fe.h:638
virtual FiniteElementDomination::Domination compare_for_face_domination(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:934
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
Definition: fe.cc:1079
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > system_to_base_table
Definition: fe.h:2309