Reference documentation for deal.II version Git 1dafe5d 2017-11-23 14:01:03 +0100
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 
1648  get_sub_fe (const ComponentMask &mask) const;
1649 
1657  virtual
1659  get_sub_fe (const unsigned int first_component,
1660  const unsigned int n_selected_components) const;
1661 
1683  std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1684  system_to_base_index (const unsigned int index) const;
1685 
1694  std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1695  face_system_to_base_index (const unsigned int index) const;
1696 
1701  types::global_dof_index first_block_of_base (const unsigned int b) const;
1702 
1715  std::pair<unsigned int, unsigned int>
1716  component_to_base_index (const unsigned int component) const;
1717 
1718 
1723  std::pair<unsigned int,unsigned int>
1724  block_to_base_index (const unsigned int block) const;
1725 
1729  std::pair<unsigned int,types::global_dof_index>
1730  system_to_block_index (const unsigned int component) const;
1731 
1735  unsigned int
1736  component_to_block_index (const unsigned int component) const;
1737 
1739 
1758  component_mask (const FEValuesExtractors::Scalar &scalar) const;
1759 
1773  component_mask (const FEValuesExtractors::Vector &vector) const;
1774 
1789  component_mask (const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const;
1790 
1806  component_mask (const BlockMask &block_mask) const;
1807 
1828  BlockMask
1829  block_mask (const FEValuesExtractors::Scalar &scalar) const;
1830 
1847  BlockMask
1848  block_mask (const FEValuesExtractors::Vector &vector) const;
1849 
1867  BlockMask
1868  block_mask (const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const;
1869 
1892  BlockMask
1893  block_mask (const ComponentMask &component_mask) const;
1894 
1910  virtual std::pair<Table<2,bool>,std::vector<unsigned int> >
1911  get_constant_modes () const;
1912 
1914 
1950  const std::vector<Point<dim> > &
1951  get_unit_support_points () const;
1952 
1970  bool has_support_points () const;
1971 
1984  virtual
1985  Point<dim>
1986  unit_support_point (const unsigned int index) const;
1987 
2014  const std::vector<Point<dim-1> > &
2016 
2025  bool has_face_support_points () const;
2026 
2031  virtual
2032  Point<dim-1>
2033  unit_face_support_point (const unsigned int index) const;
2034 
2047  const std::vector<Point<dim> > &
2049 
2059  bool has_generalized_support_points () const;
2060 
2069  DEAL_II_DEPRECATED
2070  const std::vector<Point<dim-1> > &
2072 
2085  DEAL_II_DEPRECATED
2086  bool
2088 
2133  get_associated_geometry_primitive (const unsigned int cell_dof_index) const;
2134 
2135 
2211  virtual
2212  void
2213  convert_generalized_support_point_values_to_dof_values (const std::vector<Vector<double> > &support_point_values,
2214  std::vector<double> &nodal_values) const;
2215 
2217 
2226  virtual std::size_t memory_consumption () const;
2227 
2234  int,
2235  << "The shape function with index " << arg1
2236  << " is not primitive, i.e. it is vector-valued and "
2237  << "has more than one non-zero vector component. This "
2238  << "function cannot be called for these shape functions. "
2239  << "Maybe you want to use the same function with the "
2240  << "_component suffix?");
2253  "You are trying to access the values or derivatives of shape functions "
2254  "on the reference cell of an element that does not define its shape "
2255  "functions through mapping from the reference cell. Consequently, "
2256  "you cannot ask for shape function values or derivatives on the "
2257  "reference cell.");
2258 
2266  "You are trying to access the support points of a finite "
2267  "element that either has no support points at all, or for "
2268  "which the corresponding tables have not been implemented.");
2269 
2277  "You are trying to access the matrices that describe how "
2278  "to embed a finite element function on one cell into the "
2279  "finite element space on one of its children (i.e., the "
2280  "'embedding' or 'prolongation' matrices). However, the "
2281  "current finite element can either not define this sort of "
2282  "operation, or it has not yet been implemented.");
2283 
2292  "You are trying to access the matrices that describe how "
2293  "to restrict a finite element function from the children "
2294  "of one cell to the finite element space defined on their "
2295  "parent (i.e., the 'restriction' or 'projection' matrices). "
2296  "However, the current finite element can either not define "
2297  "this sort of operation, or it has not yet been "
2298  "implemented.");
2299 
2305  int, int,
2306  << "The interface matrix has a size of " << arg1
2307  << "x" << arg2
2308  << ", which is not reasonable for the current element "
2309  "in the present dimension.");
2315 
2316 protected:
2317 
2331  void reinit_restriction_and_prolongation_matrices(const bool isotropic_restriction_only=false,
2332  const bool isotropic_prolongation_only=false);
2333 
2346  std::vector<std::vector<FullMatrix<double> > > restriction;
2347 
2360  std::vector<std::vector<FullMatrix<double> > > prolongation;
2361 
2373 
2384  std::vector<Point<dim> > unit_support_points;
2385 
2391  std::vector<Point<dim-1> > unit_face_support_points;
2392 
2397  std::vector<Point<dim> > generalized_support_points;
2398 
2404 
2421 
2436 
2440  std::vector<std::pair<unsigned int, unsigned int> > system_to_component_table;
2441 
2451  std::vector<std::pair<unsigned int, unsigned int> > face_system_to_component_table;
2452 
2469  std::vector<std::pair<std::pair<unsigned int,unsigned int>,unsigned int> >
2471 
2475  std::vector<std::pair<std::pair<unsigned int,unsigned int>,unsigned int> >
2477 
2483 
2504  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int> >
2506 
2512  const std::vector<bool> restriction_is_additive_flags;
2513 
2521  const std::vector<ComponentMask> nonzero_components;
2522 
2530  const std::vector<unsigned int> n_nonzero_components_table;
2531 
2538 
2551  interface_constraints_size () const;
2552 
2558  static
2559  std::vector<unsigned int>
2560  compute_n_nonzero_components (const std::vector<ComponentMask> &nonzero_components);
2561 
2582  virtual
2583  UpdateFlags
2584  requires_update_flags (const UpdateFlags update_flags) const = 0;
2585 
2662  virtual
2663  InternalDataBase *
2664  get_data (const UpdateFlags update_flags,
2665  const Mapping<dim,spacedim> &mapping,
2666  const Quadrature<dim> &quadrature,
2668 
2710  virtual
2711  InternalDataBase *
2712  get_face_data (const UpdateFlags update_flags,
2713  const Mapping<dim,spacedim> &mapping,
2714  const Quadrature<dim-1> &quadrature,
2716 
2758  virtual
2759  InternalDataBase *
2760  get_subface_data (const UpdateFlags update_flags,
2761  const Mapping<dim,spacedim> &mapping,
2762  const Quadrature<dim-1> &quadrature,
2764 
2845  virtual
2846  void
2848  const CellSimilarity::Similarity cell_similarity,
2849  const Quadrature<dim> &quadrature,
2850  const Mapping<dim,spacedim> &mapping,
2851  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
2852  const ::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
2853  const InternalDataBase &fe_internal,
2855 
2898  virtual
2899  void
2901  const unsigned int face_no,
2902  const Quadrature<dim-1> &quadrature,
2903  const Mapping<dim,spacedim> &mapping,
2904  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
2905  const ::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
2906  const InternalDataBase &fe_internal,
2908 
2954  virtual
2955  void
2957  const unsigned int face_no,
2958  const unsigned int sub_no,
2959  const Quadrature<dim-1> &quadrature,
2960  const Mapping<dim,spacedim> &mapping,
2961  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
2962  const ::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
2963  const InternalDataBase &fe_internal,
2965 
2966  friend class InternalDataBase;
2967  friend class FEValuesBase<dim,spacedim>;
2968  friend class FEValues<dim,spacedim>;
2969  friend class FEFaceValues<dim,spacedim>;
2970  friend class FESubfaceValues<dim,spacedim>;
2971  friend class FESystem<dim,spacedim>;
2972 
2973  // explicitly check for sensible template arguments, but not on windows
2974  // because MSVC creates bogus warnings during normal compilation
2975 #ifndef DEAL_II_MSVC
2976  static_assert (dim<=spacedim,
2977  "The dimension <dim> of a FiniteElement must be less than or "
2978  "equal to the space dimension <spacedim> in which it lives.");
2979 #endif
2980 
2981 };
2982 
2983 
2984 //----------------------------------------------------------------------//
2985 
2986 
2987 template <int dim, int spacedim>
2988 inline
2990 FiniteElement<dim,spacedim>::operator[] (const unsigned int fe_index) const
2991 {
2992  (void)fe_index;
2993  Assert (fe_index == 0,
2994  ExcMessage ("A fe_index of zero is the only index allowed here"));
2995  return *this;
2996 }
2997 
2998 
2999 
3000 template <int dim, int spacedim>
3001 inline
3002 std::pair<unsigned int,unsigned int>
3004 {
3005  Assert (index < system_to_component_table.size(),
3006  ExcIndexRange(index, 0, system_to_component_table.size()));
3007  Assert (is_primitive (index),
3009  return system_to_component_table[index];
3010 }
3011 
3012 
3013 
3014 template <int dim, int spacedim>
3015 inline
3016 unsigned int
3018 {
3019  return base_to_block_indices.size();
3020 }
3021 
3022 
3023 
3024 template <int dim, int spacedim>
3025 inline
3026 unsigned int
3028 {
3029  return static_cast<unsigned int>(base_to_block_indices.block_size(index));
3030 }
3031 
3032 
3033 
3034 template <int dim, int spacedim>
3035 inline
3036 unsigned int
3038  const unsigned int index) const
3039 {
3040  AssertIndexRange(component, this->n_components());
3041  const std::vector<std::pair<unsigned int, unsigned int> >::const_iterator
3042  it = std::find(system_to_component_table.begin(), system_to_component_table.end(),
3043  std::pair<unsigned int, unsigned int>(component, index));
3044 
3045  Assert(it != system_to_component_table.end(),
3046  ExcMessage ("You are asking for the number of the shape function "
3047  "within a system element that corresponds to vector "
3048  "component " + Utilities::int_to_string(component) + " and within this to "
3049  "index " + Utilities::int_to_string(index) + ". But no such "
3050  "shape function exists."));
3051  return std::distance(system_to_component_table.begin(), it);
3052 }
3053 
3054 
3055 
3056 template <int dim, int spacedim>
3057 inline
3058 std::pair<unsigned int,unsigned int>
3060 {
3061  Assert(index < face_system_to_component_table.size(),
3062  ExcIndexRange(index, 0, face_system_to_component_table.size()));
3063 
3064  // in debug mode, check whether the
3065  // function is primitive, since
3066  // otherwise the result may have no
3067  // meaning
3068  //
3069  // since the primitivity tables are
3070  // all geared towards cell dof
3071  // indices, rather than face dof
3072  // indices, we have to work a
3073  // little bit...
3074  //
3075  // in 1d, the face index is equal
3076  // to the cell index
3077  Assert (is_primitive(this->face_to_cell_index(index, 0)),
3079 
3080  return face_system_to_component_table[index];
3081 }
3082 
3083 
3084 
3085 
3086 template <int dim, int spacedim>
3087 inline
3088 std::pair<std::pair<unsigned int,unsigned int>,unsigned int>
3090 {
3091  Assert (index < system_to_base_table.size(),
3092  ExcIndexRange(index, 0, system_to_base_table.size()));
3093  return system_to_base_table[index];
3094 }
3095 
3096 
3097 
3098 
3099 template <int dim, int spacedim>
3100 inline
3101 std::pair<std::pair<unsigned int,unsigned int>,unsigned int>
3103 {
3104  Assert(index < face_system_to_base_table.size(),
3105  ExcIndexRange(index, 0, face_system_to_base_table.size()));
3106  return face_system_to_base_table[index];
3107 }
3108 
3109 
3110 
3111 template <int dim, int spacedim>
3112 inline
3115 {
3116  return base_to_block_indices.block_start(index);
3117 }
3118 
3119 
3120 
3121 template <int dim, int spacedim>
3122 inline
3123 std::pair<unsigned int,unsigned int>
3125 {
3126  Assert(index < component_to_base_table.size(),
3127  ExcIndexRange(index, 0, component_to_base_table.size()));
3128 
3129  return component_to_base_table[index].first;
3130 }
3131 
3132 
3133 
3134 template <int dim, int spacedim>
3135 inline
3136 std::pair<unsigned int,unsigned int>
3138 {
3139  return base_to_block_indices.global_to_local(index);
3140 }
3141 
3142 
3143 
3144 template <int dim, int spacedim>
3145 inline
3146 std::pair<unsigned int,types::global_dof_index>
3148 {
3149  Assert (index < this->dofs_per_cell,
3150  ExcIndexRange(index, 0, this->dofs_per_cell));
3151  // The block is computed simply as
3152  // first block of this base plus
3153  // the index within the base blocks
3154  return std::pair<unsigned int, types::global_dof_index>(
3155  first_block_of_base(system_to_base_table[index].first.first)
3156  + system_to_base_table[index].first.second,
3157  system_to_base_table[index].second);
3158 }
3159 
3160 
3161 
3162 template <int dim, int spacedim>
3163 inline
3164 bool
3166 {
3167  Assert(index < this->dofs_per_cell,
3168  ExcIndexRange(index, 0, this->dofs_per_cell));
3169  return restriction_is_additive_flags[index];
3170 }
3171 
3172 
3173 
3174 template <int dim, int spacedim>
3175 inline
3176 const ComponentMask &
3178 {
3179  Assert (i < this->dofs_per_cell, ExcIndexRange (i, 0, this->dofs_per_cell));
3180  return nonzero_components[i];
3181 }
3182 
3183 
3184 
3185 template <int dim, int spacedim>
3186 inline
3187 unsigned int
3189 {
3190  Assert (i < this->dofs_per_cell, ExcIndexRange (i, 0, this->dofs_per_cell));
3191  return n_nonzero_components_table[i];
3192 }
3193 
3194 
3195 
3196 template <int dim, int spacedim>
3197 inline
3198 bool
3200 {
3201  return cached_primitivity;
3202 }
3203 
3204 
3205 
3206 template <int dim, int spacedim>
3207 inline
3208 bool
3209 FiniteElement<dim,spacedim>::is_primitive (const unsigned int i) const
3210 {
3211  Assert (i < this->dofs_per_cell, ExcIndexRange (i, 0, this->dofs_per_cell));
3212 
3213  // return primitivity of a shape
3214  // function by checking whether it
3215  // has more than one non-zero
3216  // component or not. we could cache
3217  // this value in an array of bools,
3218  // but accessing a bit-vector (as
3219  // std::vector<bool> is) is
3220  // probably more expensive than
3221  // just comparing against 1
3222  //
3223  // for good measure, short circuit the test
3224  // if the entire FE is primitive
3225  return (is_primitive() ||
3226  (n_nonzero_components_table[i] == 1));
3227 }
3228 
3229 
3230 
3231 template <int dim, int spacedim>
3232 inline
3235 {
3236  Assert (cell_dof_index < this->dofs_per_cell,
3237  ExcIndexRange (cell_dof_index, 0, this->dofs_per_cell));
3238 
3239  // just go through the usual cases, taking into account how DoFs
3240  // are enumerated on the reference cell
3241  if (cell_dof_index < this->first_line_index)
3243  else if (cell_dof_index < this->first_quad_index)
3244  return GeometryPrimitive::line;
3245  else if (cell_dof_index < this->first_hex_index)
3246  return GeometryPrimitive::quad;
3247  else
3248  return GeometryPrimitive::hex;
3249 }
3250 
3251 
3252 
3253 DEAL_II_NAMESPACE_CLOSE
3254 
3255 #endif
static::ExceptionBase & ExcFEHasNoSupportPoints()
virtual double shape_value(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:159
const unsigned int first_hex_index
Definition: fe_base.h:271
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:1133
const std::vector< Point< dim > > & get_unit_support_points() const
Definition: fe.cc:949
std::vector< std::vector< FullMatrix< double > > > restriction
Definition: fe.h:2346
#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:3147
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:906
std::vector< Point< dim > > generalized_support_points
Definition: fe.h:2397
FullMatrix< double > interface_constraints
Definition: fe.h:2372
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:3037
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
const std::vector< Point< dim-1 > > & get_generalized_face_support_points() const
Definition: fe.cc:1034
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:2420
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:917
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > component_to_base_table
Definition: fe.h:2505
virtual bool hp_constraints_are_implemented() const
Definition: fe.cc:784
bool isotropic_prolongation_is_implemented() const
Definition: fe.cc:720
const FiniteElement< dim, spacedim > & get_sub_fe(const ComponentMask &mask) const
Definition: fe.cc:1083
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:1182
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > face_system_to_base_table
Definition: fe.h:2476
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:828
bool is_primitive() const
Definition: fe.h:3199
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
Definition: fe.cc:1071
static::ExceptionBase & ExcInterpolationNotImplemented()
const std::vector< unsigned int > n_nonzero_components_table
Definition: fe.h:2530
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:895
std::vector< Point< dim > > unit_support_points
Definition: fe.h:2384
bool restriction_is_implemented() const
Definition: fe.cc:694
unsigned int element_multiplicity(const unsigned int index) const
Definition: fe.h:3027
size_type block_start(const unsigned int i) const
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)
const unsigned int first_quad_index
Definition: fe_base.h:266
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:593
std::vector< std::vector< FullMatrix< double > > > prolongation
Definition: fe.h:2360
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:3137
#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:3188
bool operator==(const FiniteElement< dim, spacedim > &) const
Definition: fe.cc:938
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:2391
Definition: fe.h:36
std::pair< unsigned int, unsigned int > component_to_base_index(const unsigned int component) const
Definition: fe.h:3124
#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:3234
const ComponentMask & get_nonzero_components(const unsigned int i) const
Definition: fe.h:3177
virtual Point< dim > unit_support_point(const unsigned int index) const
Definition: fe.cc:996
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:3017
static::ExceptionBase & ExcProjectionVoid()
bool has_generalized_support_points() const
Definition: fe.cc:987
virtual Point< dim-1 > unit_face_support_point(const unsigned int index) const
Definition: fe.cc:1058
std::pair< unsigned int, unsigned int > face_system_to_component_index(const unsigned int index) const
Definition: fe.h:3059
virtual std::size_t memory_consumption() const
Definition: fe.cc:1162
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > system_to_base_index(const unsigned int index) const
Definition: fe.h:3089
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:182
std::pair< unsigned int, size_type > global_to_local(const size_type i) const
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:862
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const
Definition: fe.cc:878
size_type block_size(const unsigned int i) const
const FiniteElement< dim, spacedim > & operator[](const unsigned int fe_index) const
Definition: fe.h:2990
const unsigned int dofs_per_cell
Definition: fe_base.h:295
static::ExceptionBase & ExcShapeFunctionNotPrimitive(int arg1)
std::vector< Point< dim-1 > > generalized_face_support_points
Definition: fe.h:2403
const std::vector< Point< dim > > & get_generalized_support_points() const
Definition: fe.cc:974
bool restriction_is_additive(const unsigned int index) const
Definition: fe.h:3165
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()
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > face_system_to_base_index(const unsigned int index) const
Definition: fe.h:3102
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:3003
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:928
std::vector< std::pair< unsigned int, unsigned int > > system_to_component_table
Definition: fe.h:2440
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 unsigned int first_line_index
Definition: fe_base.h:261
const bool cached_primitivity
Definition: fe.h:2537
const std::vector< ComponentMask > nonzero_components
Definition: fe.h:2521
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
bool has_generalized_face_support_points() const
Definition: fe.cc:1049
unsigned int size() const
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:1197
std::vector< std::pair< unsigned int, unsigned int > > face_system_to_component_table
Definition: fe.h:2451
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:1009
BlockIndices base_to_block_indices
Definition: fe.h:2482
unsigned int n_components(const DoFHandler< dim, spacedim > &dh)
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:965
types::global_dof_index first_block_of_base(const unsigned int b) const
Definition: fe.h:3114
static const unsigned int space_dimension
Definition: fe.h:640
bool has_face_support_points() const
Definition: fe.cc:1025
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
Definition: fe.cc:1225
std::vector< int > adjust_line_dof_index_for_line_orientation_table
Definition: fe.h:2435
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:1146
const std::vector< bool > restriction_is_additive_flags
Definition: fe.h:2512
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:2470
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:1211