Reference documentation for deal.II version Git 251e984 2017-09-25 10:29:00 +0200
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 #include <memory>
28 
29 
30 DEAL_II_NAMESPACE_OPEN
31 
32 template <int dim, int spacedim> class FEValuesBase;
33 template <int dim, int spacedim> class FEValues;
34 template <int dim, int spacedim> class FEFaceValues;
35 template <int dim, int spacedim> class FESubfaceValues;
36 template <int dim, int spacedim> class FESystem;
37 
632 template <int dim, int spacedim=dim>
633 class FiniteElement : public Subscriptor,
634  public FiniteElementData<dim>
635 {
636 public:
640  static const unsigned int space_dimension = spacedim;
641 
669  {
670  private:
674  InternalDataBase (const InternalDataBase &) = delete;
675 
676  public:
681  InternalDataBase ();
682 
686  virtual ~InternalDataBase () = default;
687 
703 
707  virtual std::size_t memory_consumption () const;
708  };
709 
710 public:
753  FiniteElement (const FiniteElementData<dim> &fe_data,
754  const std::vector<bool> &restriction_is_additive_flags,
755  const std::vector<ComponentMask> &nonzero_components);
756 
761 
765  FiniteElement (const FiniteElement<dim, spacedim> &) = default;
766 
771  virtual ~FiniteElement () = default;
772 
781  std::pair<std::unique_ptr<FiniteElement<dim, spacedim> >, unsigned int>
782  operator^ (const unsigned int multiplicity) const;
783 
795  virtual
796  std::unique_ptr<FiniteElement<dim,spacedim> >
797  clone() const = 0;
798 
809  virtual std::string get_name () const = 0;
810 
832  const FiniteElement<dim,spacedim> &operator[] (const unsigned int fe_index) const;
833 
859  virtual double shape_value (const unsigned int i,
860  const Point<dim> &p) const;
861 
868  virtual double shape_value_component (const unsigned int i,
869  const Point<dim> &p,
870  const unsigned int component) const;
871 
893  virtual Tensor<1,dim> shape_grad (const unsigned int i,
894  const Point<dim> &p) const;
895 
902  virtual Tensor<1,dim> shape_grad_component (const unsigned int i,
903  const Point<dim> &p,
904  const unsigned int component) const;
905 
927  virtual Tensor<2,dim> shape_grad_grad (const unsigned int i,
928  const Point<dim> &p) const;
929 
936  virtual Tensor<2,dim> shape_grad_grad_component (const unsigned int i,
937  const Point<dim> &p,
938  const unsigned int component) const;
939 
961  virtual Tensor<3,dim> shape_3rd_derivative (const unsigned int i,
962  const Point<dim> &p) const;
963 
970  virtual Tensor<3,dim> shape_3rd_derivative_component (const unsigned int i,
971  const Point<dim> &p,
972  const unsigned int component) const;
973 
995  virtual Tensor<4,dim> shape_4th_derivative (const unsigned int i,
996  const Point<dim> &p) const;
997 
1004  virtual Tensor<4,dim> shape_4th_derivative_component (const unsigned int i,
1005  const Point<dim> &p,
1006  const unsigned int component) const;
1017  virtual bool has_support_on_face (const unsigned int shape_index,
1018  const unsigned int face_index) const;
1019 
1021 
1041  virtual const FullMatrix<double> &
1042  get_restriction_matrix (const unsigned int child,
1043  const RefinementCase<dim> &refinement_case=RefinementCase<dim>::isotropic_refinement) const;
1044 
1074  virtual const FullMatrix<double> &
1075  get_prolongation_matrix (const unsigned int child,
1076  const RefinementCase<dim> &refinement_case=RefinementCase<dim>::isotropic_refinement) const;
1077 
1099  bool prolongation_is_implemented () const;
1100 
1117 
1139  bool restriction_is_implemented () const;
1140 
1157 
1158 
1167  bool restriction_is_additive (const unsigned int index) const;
1168 
1180  const FullMatrix<double> &constraints (const ::internal::SubfaceCase<dim> &subface_case=::internal::SubfaceCase<dim>::case_isotropic) const;
1181 
1197  bool constraints_are_implemented (const ::internal::SubfaceCase<dim> &subface_case=::internal::SubfaceCase<dim>::case_isotropic) const;
1198 
1199 
1221  virtual bool hp_constraints_are_implemented () const;
1222 
1223 
1235  virtual void
1237  FullMatrix<double> &matrix) const;
1239 
1257  virtual void
1259  FullMatrix<double> &matrix) const;
1260 
1261 
1273  virtual void
1275  const unsigned int subface,
1276  FullMatrix<double> &matrix) const;
1278 
1279 
1300  virtual
1301  std::vector<std::pair<unsigned int, unsigned int> >
1302  hp_vertex_dof_identities (const FiniteElement<dim,spacedim> &fe_other) const;
1303 
1308  virtual
1309  std::vector<std::pair<unsigned int, unsigned int> >
1310  hp_line_dof_identities (const FiniteElement<dim,spacedim> &fe_other) const;
1311 
1316  virtual
1317  std::vector<std::pair<unsigned int, unsigned int> >
1318  hp_quad_dof_identities (const FiniteElement<dim,spacedim> &fe_other) const;
1319 
1329  virtual
1332 
1334 
1344  bool operator == (const FiniteElement<dim,spacedim> &) const;
1345 
1380  std::pair<unsigned int, unsigned int>
1381  system_to_component_index (const unsigned int index) const;
1382 
1392  unsigned int component_to_system_index(const unsigned int component,
1393  const unsigned int index) const;
1394 
1404  std::pair<unsigned int, unsigned int>
1405  face_system_to_component_index (const unsigned int index) const;
1406 
1415  unsigned int adjust_quad_dof_index_for_face_orientation (const unsigned int index,
1416  const bool face_orientation,
1417  const bool face_flip,
1418  const bool face_rotation) const;
1419 
1474  virtual
1475  unsigned int face_to_cell_index (const unsigned int face_dof_index,
1476  const unsigned int face,
1477  const bool face_orientation = true,
1478  const bool face_flip = false,
1479  const bool face_rotation = false) const;
1480 
1488  unsigned int adjust_line_dof_index_for_line_orientation (const unsigned int index,
1489  const bool line_orientation) const;
1490 
1507  const ComponentMask &
1508  get_nonzero_components (const unsigned int i) const;
1509 
1520  unsigned int
1521  n_nonzero_components (const unsigned int i) const;
1522 
1531  bool is_primitive () const;
1532 
1543  bool
1544  is_primitive (const unsigned int i) const;
1545 
1557  unsigned int n_base_elements () const;
1558 
1563  virtual
1565  base_element (const unsigned int index) const;
1566 
1573  unsigned int
1574  element_multiplicity (const unsigned int index) const;
1575 
1597  std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1598  system_to_base_index (const unsigned int index) const;
1599 
1608  std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1609  face_system_to_base_index (const unsigned int index) const;
1610 
1615  types::global_dof_index first_block_of_base (const unsigned int b) const;
1616 
1629  std::pair<unsigned int, unsigned int>
1630  component_to_base_index (const unsigned int component) const;
1631 
1632 
1637  std::pair<unsigned int,unsigned int>
1638  block_to_base_index (const unsigned int block) const;
1639 
1643  std::pair<unsigned int,types::global_dof_index>
1644  system_to_block_index (const unsigned int component) const;
1645 
1649  unsigned int
1650  component_to_block_index (const unsigned int component) const;
1651 
1653 
1672  component_mask (const FEValuesExtractors::Scalar &scalar) const;
1673 
1687  component_mask (const FEValuesExtractors::Vector &vector) const;
1688 
1703  component_mask (const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const;
1704 
1720  component_mask (const BlockMask &block_mask) const;
1721 
1742  BlockMask
1743  block_mask (const FEValuesExtractors::Scalar &scalar) const;
1744 
1761  BlockMask
1762  block_mask (const FEValuesExtractors::Vector &vector) const;
1763 
1781  BlockMask
1782  block_mask (const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const;
1783 
1806  BlockMask
1807  block_mask (const ComponentMask &component_mask) const;
1808 
1824  virtual std::pair<Table<2,bool>,std::vector<unsigned int> >
1825  get_constant_modes () const;
1826 
1828 
1864  const std::vector<Point<dim> > &
1865  get_unit_support_points () const;
1866 
1884  bool has_support_points () const;
1885 
1898  virtual
1899  Point<dim>
1900  unit_support_point (const unsigned int index) const;
1901 
1928  const std::vector<Point<dim-1> > &
1930 
1939  bool has_face_support_points () const;
1940 
1945  virtual
1946  Point<dim-1>
1947  unit_face_support_point (const unsigned int index) const;
1948 
1961  const std::vector<Point<dim> > &
1963 
1973  bool has_generalized_support_points () const;
1974 
1983  const std::vector<Point<dim-1> > &
1984  get_generalized_face_support_points () const DEAL_II_DEPRECATED;
1985 
1998  bool
1999  has_generalized_face_support_points () const DEAL_II_DEPRECATED;
2000 
2045  get_associated_geometry_primitive (const unsigned int cell_dof_index) const;
2046 
2047 
2123  virtual
2124  void
2125  convert_generalized_support_point_values_to_dof_values (const std::vector<Vector<double> > &support_point_values,
2126  std::vector<double> &nodal_values) const;
2127 
2129 
2138  virtual std::size_t memory_consumption () const;
2139 
2146  int,
2147  << "The shape function with index " << arg1
2148  << " is not primitive, i.e. it is vector-valued and "
2149  << "has more than one non-zero vector component. This "
2150  << "function cannot be called for these shape functions. "
2151  << "Maybe you want to use the same function with the "
2152  << "_component suffix?");
2165  "You are trying to access the values or derivatives of shape functions "
2166  "on the reference cell of an element that does not define its shape "
2167  "functions through mapping from the reference cell. Consequently, "
2168  "you cannot ask for shape function values or derivatives on the "
2169  "reference cell.");
2170 
2178  "You are trying to access the support points of a finite "
2179  "element that either has no support points at all, or for "
2180  "which the corresponding tables have not been implemented.");
2181 
2189  "You are trying to access the matrices that describe how "
2190  "to embed a finite element function on one cell into the "
2191  "finite element space on one of its children (i.e., the "
2192  "'embedding' or 'prolongation' matrices). However, the "
2193  "current finite element can either not define this sort of "
2194  "operation, or it has not yet been implemented.");
2195 
2204  "You are trying to access the matrices that describe how "
2205  "to restrict a finite element function from the children "
2206  "of one cell to the finite element space defined on their "
2207  "parent (i.e., the 'restriction' or 'projection' matrices). "
2208  "However, the current finite element can either not define "
2209  "this sort of operation, or it has not yet been "
2210  "implemented.");
2211 
2217  int, int,
2218  << "The interface matrix has a size of " << arg1
2219  << "x" << arg2
2220  << ", which is not reasonable for the current element "
2221  "in the present dimension.");
2227 
2228 protected:
2229 
2243  void reinit_restriction_and_prolongation_matrices(const bool isotropic_restriction_only=false,
2244  const bool isotropic_prolongation_only=false);
2245 
2258  std::vector<std::vector<FullMatrix<double> > > restriction;
2259 
2272  std::vector<std::vector<FullMatrix<double> > > prolongation;
2273 
2285 
2297 
2304 
2310 
2316 
2333 
2348 
2352  std::vector<std::pair<unsigned int, unsigned int> > system_to_component_table;
2353 
2363  std::vector<std::pair<unsigned int, unsigned int> > face_system_to_component_table;
2364 
2381  std::vector<std::pair<std::pair<unsigned int,unsigned int>,unsigned int> >
2383 
2387  std::vector<std::pair<std::pair<unsigned int,unsigned int>,unsigned int> >
2389 
2395 
2411  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int> >
2413 
2419  const std::vector<bool> restriction_is_additive_flags;
2420 
2429 
2437  const std::vector<unsigned int> n_nonzero_components_table;
2438 
2445 
2457  TableIndices<2>
2458  interface_constraints_size () const;
2459 
2465  static
2466  std::vector<unsigned int>
2467  compute_n_nonzero_components (const std::vector<ComponentMask> &nonzero_components);
2468 
2489  virtual
2490  UpdateFlags
2491  requires_update_flags (const UpdateFlags update_flags) const = 0;
2492 
2569  virtual
2570  InternalDataBase *
2571  get_data (const UpdateFlags update_flags,
2572  const Mapping<dim,spacedim> &mapping,
2573  const Quadrature<dim> &quadrature,
2574  ::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const = 0;
2575 
2617  virtual
2618  InternalDataBase *
2619  get_face_data (const UpdateFlags update_flags,
2620  const Mapping<dim,spacedim> &mapping,
2621  const Quadrature<dim-1> &quadrature,
2622  ::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const;
2623 
2665  virtual
2666  InternalDataBase *
2667  get_subface_data (const UpdateFlags update_flags,
2668  const Mapping<dim,spacedim> &mapping,
2669  const Quadrature<dim-1> &quadrature,
2670  ::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const;
2671 
2752  virtual
2753  void
2754  fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
2755  const CellSimilarity::Similarity cell_similarity,
2756  const Quadrature<dim> &quadrature,
2757  const Mapping<dim,spacedim> &mapping,
2758  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
2759  const ::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
2760  const InternalDataBase &fe_internal,
2761  ::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const = 0;
2762 
2805  virtual
2806  void
2807  fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
2808  const unsigned int face_no,
2809  const Quadrature<dim-1> &quadrature,
2810  const Mapping<dim,spacedim> &mapping,
2811  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
2812  const ::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
2813  const InternalDataBase &fe_internal,
2814  ::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const = 0;
2815 
2861  virtual
2862  void
2863  fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
2864  const unsigned int face_no,
2865  const unsigned int sub_no,
2866  const Quadrature<dim-1> &quadrature,
2867  const Mapping<dim,spacedim> &mapping,
2868  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
2869  const ::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
2870  const InternalDataBase &fe_internal,
2871  ::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const = 0;
2872 
2873  friend class InternalDataBase;
2874  friend class FEValuesBase<dim,spacedim>;
2875  friend class FEValues<dim,spacedim>;
2876  friend class FEFaceValues<dim,spacedim>;
2877  friend class FESubfaceValues<dim,spacedim>;
2878  friend class FESystem<dim,spacedim>;
2879 
2880  // explicitly check for sensible template arguments, but not on windows
2881  // because MSVC creates bogus warnings during normal compilation
2882 #ifndef DEAL_II_MSVC
2883  static_assert (dim<=spacedim,
2884  "The dimension <dim> of a FiniteElement must be less than or "
2885  "equal to the space dimension <spacedim> in which it lives.");
2886 #endif
2887 
2888 };
2889 
2890 
2891 //----------------------------------------------------------------------//
2892 
2893 
2894 template <int dim, int spacedim>
2895 inline
2897 FiniteElement<dim,spacedim>::operator[] (const unsigned int fe_index) const
2898 {
2899  (void)fe_index;
2900  Assert (fe_index == 0,
2901  ExcMessage ("A fe_index of zero is the only index allowed here"));
2902  return *this;
2903 }
2904 
2905 
2906 
2907 template <int dim, int spacedim>
2908 inline
2909 std::pair<unsigned int,unsigned int>
2911 {
2912  Assert (index < system_to_component_table.size(),
2913  ExcIndexRange(index, 0, system_to_component_table.size()));
2914  Assert (is_primitive (index),
2916  return system_to_component_table[index];
2917 }
2918 
2919 
2920 
2921 template <int dim, int spacedim>
2922 inline
2923 unsigned int
2925 {
2926  return base_to_block_indices.size();
2927 }
2928 
2929 
2930 
2931 template <int dim, int spacedim>
2932 inline
2933 unsigned int
2935 {
2936  return static_cast<unsigned int>(base_to_block_indices.block_size(index));
2937 }
2938 
2939 
2940 
2941 template <int dim, int spacedim>
2942 inline
2943 unsigned int
2945  const unsigned int index) const
2946 {
2947  AssertIndexRange(component, this->n_components());
2948  const std::vector<std::pair<unsigned int, unsigned int> >::const_iterator
2949  it = std::find(system_to_component_table.begin(), system_to_component_table.end(),
2950  std::pair<unsigned int, unsigned int>(component, index));
2951 
2952  Assert(it != system_to_component_table.end(),
2953  ExcMessage ("You are asking for the number of the shape function "
2954  "within a system element that corresponds to vector "
2955  "component " + Utilities::int_to_string(component) + " and within this to "
2956  "index " + Utilities::int_to_string(index) + ". But no such "
2957  "shape function exists."));
2958  return std::distance(system_to_component_table.begin(), it);
2959 }
2960 
2961 
2962 
2963 template <int dim, int spacedim>
2964 inline
2965 std::pair<unsigned int,unsigned int>
2967 {
2968  Assert(index < face_system_to_component_table.size(),
2969  ExcIndexRange(index, 0, face_system_to_component_table.size()));
2970 
2971  // in debug mode, check whether the
2972  // function is primitive, since
2973  // otherwise the result may have no
2974  // meaning
2975  //
2976  // since the primitivity tables are
2977  // all geared towards cell dof
2978  // indices, rather than face dof
2979  // indices, we have to work a
2980  // little bit...
2981  //
2982  // in 1d, the face index is equal
2983  // to the cell index
2984  Assert (is_primitive(this->face_to_cell_index(index, 0)),
2986 
2987  return face_system_to_component_table[index];
2988 }
2989 
2990 
2991 
2992 template <int dim, int spacedim>
2993 inline
2994 std::pair<std::pair<unsigned int,unsigned int>,unsigned int>
2996 {
2997  Assert (index < system_to_base_table.size(),
2998  ExcIndexRange(index, 0, system_to_base_table.size()));
2999  return system_to_base_table[index];
3000 }
3001 
3002 
3003 
3004 
3005 template <int dim, int spacedim>
3006 inline
3007 std::pair<std::pair<unsigned int,unsigned int>,unsigned int>
3009 {
3010  Assert(index < face_system_to_base_table.size(),
3011  ExcIndexRange(index, 0, face_system_to_base_table.size()));
3012  return face_system_to_base_table[index];
3013 }
3014 
3015 
3016 
3017 template <int dim, int spacedim>
3018 inline
3021 {
3022  return base_to_block_indices.block_start(index);
3023 }
3024 
3025 
3026 
3027 template <int dim, int spacedim>
3028 inline
3029 std::pair<unsigned int,unsigned int>
3031 {
3032  Assert(index < component_to_base_table.size(),
3033  ExcIndexRange(index, 0, component_to_base_table.size()));
3034 
3035  return component_to_base_table[index].first;
3036 }
3037 
3038 
3039 
3040 template <int dim, int spacedim>
3041 inline
3042 std::pair<unsigned int,unsigned int>
3044 {
3045  return base_to_block_indices.global_to_local(index);
3046 }
3047 
3048 
3049 
3050 template <int dim, int spacedim>
3051 inline
3052 std::pair<unsigned int,types::global_dof_index>
3054 {
3055  Assert (index < this->dofs_per_cell,
3056  ExcIndexRange(index, 0, this->dofs_per_cell));
3057  // The block is computed simply as
3058  // first block of this base plus
3059  // the index within the base blocks
3060  return std::pair<unsigned int, types::global_dof_index>(
3061  first_block_of_base(system_to_base_table[index].first.first)
3062  + system_to_base_table[index].first.second,
3063  system_to_base_table[index].second);
3064 }
3065 
3066 
3067 
3068 template <int dim, int spacedim>
3069 inline
3070 bool
3072 {
3073  Assert(index < this->dofs_per_cell,
3074  ExcIndexRange(index, 0, this->dofs_per_cell));
3075  return restriction_is_additive_flags[index];
3076 }
3077 
3078 
3079 
3080 template <int dim, int spacedim>
3081 inline
3082 const ComponentMask &
3084 {
3085  Assert (i < this->dofs_per_cell, ExcIndexRange (i, 0, this->dofs_per_cell));
3086  return nonzero_components[i];
3087 }
3088 
3089 
3090 
3091 template <int dim, int spacedim>
3092 inline
3093 unsigned int
3095 {
3096  Assert (i < this->dofs_per_cell, ExcIndexRange (i, 0, this->dofs_per_cell));
3097  return n_nonzero_components_table[i];
3098 }
3099 
3100 
3101 
3102 template <int dim, int spacedim>
3103 inline
3104 bool
3106 {
3107  return cached_primitivity;
3108 }
3109 
3110 
3111 
3112 template <int dim, int spacedim>
3113 inline
3114 bool
3115 FiniteElement<dim,spacedim>::is_primitive (const unsigned int i) const
3116 {
3117  Assert (i < this->dofs_per_cell, ExcIndexRange (i, 0, this->dofs_per_cell));
3118 
3119  // return primitivity of a shape
3120  // function by checking whether it
3121  // has more than one non-zero
3122  // component or not. we could cache
3123  // this value in an array of bools,
3124  // but accessing a bit-vector (as
3125  // std::vector<bool> is) is
3126  // probably more expensive than
3127  // just comparing against 1
3128  //
3129  // for good measure, short circuit the test
3130  // if the entire FE is primitive
3131  return (is_primitive() ||
3132  (n_nonzero_components_table[i] == 1));
3133 }
3134 
3135 
3136 
3137 template <int dim, int spacedim>
3138 inline
3141 {
3142  Assert (cell_dof_index < this->dofs_per_cell,
3143  ExcIndexRange (cell_dof_index, 0, this->dofs_per_cell));
3144 
3145  // just go through the usual cases, taking into account how DoFs
3146  // are enumerated on the reference cell
3147  if (cell_dof_index < this->first_line_index)
3149  else if (cell_dof_index < this->first_quad_index)
3150  return GeometryPrimitive::line;
3151  else if (cell_dof_index < this->first_hex_index)
3152  return GeometryPrimitive::quad;
3153  else
3154  return GeometryPrimitive::hex;
3155 }
3156 
3157 
3158 
3159 DEAL_II_NAMESPACE_CLOSE
3160 
3161 #endif
static::ExceptionBase & ExcFEHasNoSupportPoints()
virtual double shape_value(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:159
bool prolongation_is_implemented() const
Definition: fe.cc:668
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
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const =0
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const
Definition: fe.cc:1084
const std::vector< Point< dim > > & get_unit_support_points() const
Definition: fe.cc:951
std::vector< std::vector< FullMatrix< double > > > restriction
Definition: fe.h:2258
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:605
std::pair< unsigned int, types::global_dof_index > system_to_block_index(const unsigned int component) const
Definition: fe.h:3053
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:908
std::vector< Point< dim > > generalized_support_points
Definition: fe.h:2309
FullMatrix< double > interface_constraints
Definition: fe.h:2284
FiniteElement(const FiniteElementData< dim > &fe_data, const std::vector< bool > &restriction_is_additive_flags, const std::vector< ComponentMask > &nonzero_components)
Definition: fe.cc:55
unsigned int component_to_system_index(const unsigned int component, const unsigned int index) const
Definition: fe.h:2944
virtual Tensor< 3, dim > shape_3rd_derivative(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:228
static::ExceptionBase & ExcUnitShapeValuesDoNotExist()
bool isotropic_restriction_is_implemented() const
Definition: fe.cc:746
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
Definition: fe.cc:846
bool constraints_are_implemented(const ::internal::SubfaceCase< dim > &subface_case=::internal::SubfaceCase< dim >::case_isotropic) const
Definition: fe.cc:772
#define AssertIndexRange(index, range)
Definition: exceptions.h:1207
virtual ~InternalDataBase()=default
Table< 2, int > adjust_quad_dof_index_for_face_orientation_table
Definition: fe.h:2332
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:919
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > component_to_base_table
Definition: fe.h:2412
STL namespace.
virtual bool hp_constraints_are_implemented() const
Definition: fe.cc:784
bool isotropic_prolongation_is_implemented() const
Definition: fe.cc:720
TableIndices< 2 > interface_constraints_size() const
Definition: fe.cc:819
virtual Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:205
static std::vector< unsigned int > compute_n_nonzero_components(const std::vector< ComponentMask > &nonzero_components)
Definition: fe.cc:1133
unsigned int n_components(const DoFHandler< dim, spacedim > &dh) 1
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > face_system_to_base_table
Definition: fe.h:2388
bool is_primitive() const
Definition: fe.h:3105
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
Definition: fe.cc:1073
static::ExceptionBase & ExcInterpolationNotImplemented()
const std::vector< unsigned int > n_nonzero_components_table
Definition: fe.h:2437
static::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
BlockMask block_mask(const FEValuesExtractors::Scalar &scalar) const
Definition: fe.cc:438
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:897
std::vector< Point< dim > > unit_support_points
Definition: fe.h:2296
bool restriction_is_implemented() const
Definition: fe.cc:694
unsigned int element_multiplicity(const unsigned int index) const
Definition: fe.h:2934
static::ExceptionBase & ExcFENotPrimitive()
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const =0
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
Definition: fe.cc:321
static::ExceptionBase & ExcMessage(std::string arg1)
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:593
std::vector< std::vector< FullMatrix< double > > > prolongation
Definition: fe.h:2272
unsigned int global_dof_index
Definition: types.h:88
std::pair< unsigned int, unsigned int > block_to_base_index(const unsigned int block) const
Definition: fe.h:3043
#define Assert(cond, exc)
Definition: exceptions.h:337
unsigned int component_to_block_index(const unsigned int component) const
Definition: fe.cc:343
UpdateFlags
virtual Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe.cc:193
unsigned int n_nonzero_components(const unsigned int i) const
Definition: fe.h:3094
bool operator==(const FiniteElement< dim, spacedim > &) const
Definition: fe.cc:940
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe.cc:170
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:613
Abstract base class for mapping classes.
Definition: dof_tools.h:46
std::vector< Point< dim-1 > > unit_face_support_points
Definition: fe.h:2303
Definition: fe.h:36
std::pair< unsigned int, unsigned int > component_to_base_index(const unsigned int component) const
Definition: fe.h:3030
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:582
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 DeclException0(Exception0)
Definition: exceptions.h:570
unsigned int adjust_line_dof_index_for_line_orientation(const unsigned int index, const bool line_orientation) const
Definition: fe.cc:645
static::ExceptionBase & ExcWrongInterfaceMatrixSize(int arg1, int arg2)
GeometryPrimitive get_associated_geometry_primitive(const unsigned int cell_dof_index) const
Definition: fe.h:3140
const ComponentMask & get_nonzero_components(const unsigned int i) const
Definition: fe.h:3083
virtual Point< dim > unit_support_point(const unsigned int index) const
Definition: fe.cc:998
const FullMatrix< double > & constraints(const ::internal::SubfaceCase< dim > &subface_case=::internal::SubfaceCase< dim >::case_isotropic) const
Definition: fe.cc:793
virtual std::string get_name() const =0
unsigned int n_base_elements() const
Definition: fe.h:2924
static::ExceptionBase & ExcProjectionVoid()
bool has_generalized_support_points() const
Definition: fe.cc:989
virtual Point< dim-1 > unit_face_support_point(const unsigned int index) const
Definition: fe.cc:1060
std::pair< unsigned int, unsigned int > face_system_to_component_index(const unsigned int index) const
Definition: fe.h:2966
virtual std::size_t memory_consumption() const
Definition: fe.cc:1113
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > system_to_base_index(const unsigned int index) const
Definition: fe.h:2995
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:182
bool has_generalized_face_support_points() const 1
Definition: fe.cc:1051
std::string int_to_string(const unsigned int value, const unsigned int digits=numbers::invalid_unsigned_int)
Definition: utilities.cc:93
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
Definition: fe.cc:863
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const
Definition: fe.cc:880
const FiniteElement< dim, spacedim > & operator[](const unsigned int fe_index) const
Definition: fe.h:2897
static::ExceptionBase & ExcShapeFunctionNotPrimitive(int arg1)
std::vector< Point< dim-1 > > generalized_face_support_points
Definition: fe.h:2315
const std::vector< Point< dim > > & get_generalized_support_points() const
Definition: fe.cc:976
static const unsigned int dimension
Definition: fe_base.h:233
bool restriction_is_additive(const unsigned int index) const
Definition: fe.h:3071
virtual Tensor< 3, dim > shape_3rd_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe.cc:239
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:524
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
Definition: fe.cc:301
static::ExceptionBase & ExcEmbeddingVoid()
const std::vector< Point< dim-1 > > & get_generalized_face_support_points() const 1
Definition: fe.cc:1036
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > face_system_to_base_index(const unsigned int index) const
Definition: fe.h:3008
virtual std::size_t memory_consumption() const
Definition: fe.cc:46
std::pair< unsigned int, unsigned int > system_to_component_index(const unsigned int index) const
Definition: fe.h:2910
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
virtual FiniteElementDomination::Domination compare_for_face_domination(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:930
std::vector< std::pair< unsigned int, unsigned int > > system_to_component_table
Definition: fe.h:2352
virtual Tensor< 4, dim > shape_4th_derivative(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:251
ComponentMask component_mask(const FEValuesExtractors::Scalar &scalar) const
Definition: fe.cc:356
Definition: fe.h:33
const bool cached_primitivity
Definition: fe.h:2444
const std::vector< ComponentMask > nonzero_components
Definition: fe.h:2428
void reinit_restriction_and_prolongation_matrices(const bool isotropic_restriction_only=false, const bool isotropic_prolongation_only=false)
Definition: fe.cc:273
virtual Tensor< 4, dim > shape_4th_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe.cc:262
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:1148
Definition: table.h:33
std::vector< std::pair< unsigned int, unsigned int > > face_system_to_component_table
Definition: fe.h:2363
std::pair< std::unique_ptr< FiniteElement< dim, spacedim > >, unsigned int > operator^(const unsigned int multiplicity) const
Definition: fe.cc:150
const std::vector< Point< dim-1 > > & get_unit_face_support_points() const
Definition: fe.cc:1011
BlockIndices base_to_block_indices
Definition: fe.h:2394
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
bool has_support_points() const
Definition: fe.cc:967
types::global_dof_index first_block_of_base(const unsigned int b) const
Definition: fe.h:3020
static const unsigned int space_dimension
Definition: fe.h:640
bool has_face_support_points() const
Definition: fe.cc:1027
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
Definition: fe.cc:1176
std::vector< int > adjust_line_dof_index_for_line_orientation_table
Definition: fe.h:2347
virtual ~FiniteElement()=default
virtual void convert_generalized_support_point_values_to_dof_values(const std::vector< Vector< double > > &support_point_values, std::vector< double > &nodal_values) const
Definition: fe.cc:1097
const std::vector< bool > restriction_is_additive_flags
Definition: fe.h:2419
UpdateFlags update_each
Definition: fe.h:702
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > system_to_base_table
Definition: fe.h:2382
virtual Tensor< 2, dim > shape_grad_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe.cc:216
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:1162