Reference documentation for deal.II version Git 4abc4a1666 2020-07-04 19:58:34 +0200
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
fe.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 2020 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_fe_h
17 #define dealii_fe_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/fe/block_mask.h>
23 #include <deal.II/fe/fe_base.h>
26 #include <deal.II/fe/mapping.h>
27 
29 
30 #include <memory>
31 
32 
34 
35 template <int dim, int spacedim>
37 template <int dim, int spacedim>
38 class FEValues;
39 template <int dim, int spacedim>
41 template <int dim, int spacedim>
43 template <int dim, int spacedim>
44 class FESystem;
45 
644 template <int dim, int spacedim = dim>
645 class FiniteElement : public Subscriptor, public FiniteElementData<dim>
646 {
647 public:
651  static const unsigned int space_dimension = spacedim;
652 
678  {
679  public:
685 
689  virtual ~InternalDataBase() = default;
690 
694  InternalDataBase(const InternalDataBase &) = delete;
695 
711 
715  virtual std::size_t
716  memory_consumption() const;
717  };
718 
719 public:
762  FiniteElement(const FiniteElementData<dim> & fe_data,
763  const std::vector<bool> & restriction_is_additive_flags,
764  const std::vector<ComponentMask> &nonzero_components);
765 
769  FiniteElement(FiniteElement<dim, spacedim> &&) = default; // NOLINT
770 
774  FiniteElement(const FiniteElement<dim, spacedim> &) = default;
775 
780  virtual ~FiniteElement() override = default;
781 
790  std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>, unsigned int>
791  operator^(const unsigned int multiplicity) const;
792 
804  virtual std::unique_ptr<FiniteElement<dim, spacedim>>
805  clone() const = 0;
806 
817  virtual std::string
818  get_name() const = 0;
819 
842  operator[](const unsigned int fe_index) const;
843 
869  virtual double
870  shape_value(const unsigned int i, const Point<dim> &p) const;
871 
878  virtual double
879  shape_value_component(const unsigned int i,
880  const Point<dim> & p,
881  const unsigned int component) const;
882 
904  virtual Tensor<1, dim>
905  shape_grad(const unsigned int i, const Point<dim> &p) const;
906 
913  virtual Tensor<1, dim>
914  shape_grad_component(const unsigned int i,
915  const Point<dim> & p,
916  const unsigned int component) const;
917 
939  virtual Tensor<2, dim>
940  shape_grad_grad(const unsigned int i, const Point<dim> &p) const;
941 
948  virtual Tensor<2, dim>
949  shape_grad_grad_component(const unsigned int i,
950  const Point<dim> & p,
951  const unsigned int component) const;
952 
974  virtual Tensor<3, dim>
975  shape_3rd_derivative(const unsigned int i, const Point<dim> &p) const;
976 
983  virtual Tensor<3, dim>
984  shape_3rd_derivative_component(const unsigned int i,
985  const Point<dim> & p,
986  const unsigned int component) const;
987 
1009  virtual Tensor<4, dim>
1010  shape_4th_derivative(const unsigned int i, const Point<dim> &p) const;
1011 
1018  virtual Tensor<4, dim>
1019  shape_4th_derivative_component(const unsigned int i,
1020  const Point<dim> & p,
1021  const unsigned int component) const;
1032  virtual bool
1033  has_support_on_face(const unsigned int shape_index,
1034  const unsigned int face_index) const;
1035 
1037 
1057  virtual const FullMatrix<double> &
1058  get_restriction_matrix(const unsigned int child,
1059  const RefinementCase<dim> &refinement_case =
1061 
1091  virtual const FullMatrix<double> &
1092  get_prolongation_matrix(const unsigned int child,
1093  const RefinementCase<dim> &refinement_case =
1095 
1117  bool
1119 
1135  bool
1137 
1159  bool
1161 
1177  bool
1179 
1180 
1189  bool
1190  restriction_is_additive(const unsigned int index) const;
1191 
1203  const FullMatrix<double> &
1204  constraints(const ::internal::SubfaceCase<dim> &subface_case =
1206 
1222  bool
1224  const ::internal::SubfaceCase<dim> &subface_case =
1226 
1227 
1249  virtual bool
1251 
1252 
1264  virtual void
1266  FullMatrix<double> & matrix) const;
1268 
1286  virtual void
1288  FullMatrix<double> &matrix) const;
1289 
1290 
1302  virtual void
1304  const unsigned int subface,
1305  FullMatrix<double> &matrix) const;
1307 
1308 
1329  virtual std::vector<std::pair<unsigned int, unsigned int>>
1331 
1336  virtual std::vector<std::pair<unsigned int, unsigned int>>
1338 
1343  virtual std::vector<std::pair<unsigned int, unsigned int>>
1345 
1363  const unsigned int codim = 0) const;
1364 
1366 
1397  virtual bool
1398  operator==(const FiniteElement<dim, spacedim> &fe) const;
1399 
1404  bool
1406 
1442  std::pair<unsigned int, unsigned int>
1443  system_to_component_index(const unsigned int index) const;
1444 
1454  unsigned int
1455  component_to_system_index(const unsigned int component,
1456  const unsigned int index) const;
1457 
1467  std::pair<unsigned int, unsigned int>
1468  face_system_to_component_index(const unsigned int index) const;
1469 
1478  unsigned int
1479  adjust_quad_dof_index_for_face_orientation(const unsigned int index,
1480  const bool face_orientation,
1481  const bool face_flip,
1482  const bool face_rotation) const;
1483 
1538  virtual unsigned int
1539  face_to_cell_index(const unsigned int face_dof_index,
1540  const unsigned int face,
1541  const bool face_orientation = true,
1542  const bool face_flip = false,
1543  const bool face_rotation = false) const;
1544 
1552  unsigned int
1553  adjust_line_dof_index_for_line_orientation(const unsigned int index,
1554  const bool line_orientation) const;
1555 
1572  const ComponentMask &
1573  get_nonzero_components(const unsigned int i) const;
1574 
1585  unsigned int
1586  n_nonzero_components(const unsigned int i) const;
1587 
1596  bool
1597  is_primitive() const;
1598 
1609  bool
1610  is_primitive(const unsigned int i) const;
1611 
1623  unsigned int
1624  n_base_elements() const;
1625 
1630  virtual const FiniteElement<dim, spacedim> &
1631  base_element(const unsigned int index) const;
1632 
1639  unsigned int
1640  element_multiplicity(const unsigned int index) const;
1641 
1715  get_sub_fe(const ComponentMask &mask) const;
1716 
1725  virtual const FiniteElement<dim, spacedim> &
1726  get_sub_fe(const unsigned int first_component,
1727  const unsigned int n_selected_components) const;
1728 
1751  std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1752  system_to_base_index(const unsigned int index) const;
1753 
1762  std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1763  face_system_to_base_index(const unsigned int index) const;
1764 
1770  first_block_of_base(const unsigned int b) const;
1771 
1784  std::pair<unsigned int, unsigned int>
1785  component_to_base_index(const unsigned int component) const;
1786 
1787 
1792  std::pair<unsigned int, unsigned int>
1793  block_to_base_index(const unsigned int block) const;
1794 
1798  std::pair<unsigned int, types::global_dof_index>
1799  system_to_block_index(const unsigned int component) const;
1800 
1804  unsigned int
1805  component_to_block_index(const unsigned int component) const;
1806 
1808 
1827  component_mask(const FEValuesExtractors::Scalar &scalar) const;
1828 
1842  component_mask(const FEValuesExtractors::Vector &vector) const;
1843 
1859  const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const;
1860 
1876  component_mask(const BlockMask &block_mask) const;
1877 
1898  BlockMask
1899  block_mask(const FEValuesExtractors::Scalar &scalar) const;
1900 
1917  BlockMask
1918  block_mask(const FEValuesExtractors::Vector &vector) const;
1919 
1937  BlockMask
1938  block_mask(const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const;
1939 
1962  BlockMask
1963  block_mask(const ComponentMask &component_mask) const;
1964 
1980  virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
1981  get_constant_modes() const;
1982 
1984 
2020  const std::vector<Point<dim>> &
2021  get_unit_support_points() const;
2022 
2040  bool
2041  has_support_points() const;
2042 
2055  virtual Point<dim>
2056  unit_support_point(const unsigned int index) const;
2057 
2084  const std::vector<Point<dim - 1>> &
2086 
2095  bool
2096  has_face_support_points() const;
2097 
2102  virtual Point<dim - 1>
2103  unit_face_support_point(const unsigned int index) const;
2104 
2117  const std::vector<Point<dim>> &
2119 
2129  bool
2131 
2176  get_associated_geometry_primitive(const unsigned int cell_dof_index) const;
2177 
2178 
2256  virtual void
2258  const std::vector<Vector<double>> &support_point_values,
2259  std::vector<double> & nodal_values) const;
2260 
2262 
2271  virtual std::size_t
2272  memory_consumption() const;
2273 
2280  int,
2281  << "The shape function with index " << arg1
2282  << " is not primitive, i.e. it is vector-valued and "
2283  << "has more than one non-zero vector component. This "
2284  << "function cannot be called for these shape functions. "
2285  << "Maybe you want to use the same function with the "
2286  << "_component suffix?");
2300  "You are trying to access the values or derivatives of shape functions "
2301  "on the reference cell of an element that does not define its shape "
2302  "functions through mapping from the reference cell. Consequently, "
2303  "you cannot ask for shape function values or derivatives on the "
2304  "reference cell.");
2305 
2313  "You are trying to access the support points of a finite "
2314  "element that either has no support points at all, or for "
2315  "which the corresponding tables have not been implemented.");
2316 
2324  "You are trying to access the matrices that describe how "
2325  "to embed a finite element function on one cell into the "
2326  "finite element space on one of its children (i.e., the "
2327  "'embedding' or 'prolongation' matrices). However, the "
2328  "current finite element can either not define this sort of "
2329  "operation, or it has not yet been implemented.");
2330 
2339  "You are trying to access the matrices that describe how "
2340  "to restrict a finite element function from the children "
2341  "of one cell to the finite element space defined on their "
2342  "parent (i.e., the 'restriction' or 'projection' matrices). "
2343  "However, the current finite element can either not define "
2344  "this sort of operation, or it has not yet been "
2345  "implemented.");
2346 
2352  int,
2353  int,
2354  << "The interface matrix has a size of " << arg1 << "x" << arg2
2355  << ", which is not reasonable for the current element "
2356  "in the present dimension.");
2362 
2363 protected:
2377  void
2379  const bool isotropic_restriction_only = false,
2380  const bool isotropic_prolongation_only = false);
2381 
2394  std::vector<std::vector<FullMatrix<double>>> restriction;
2395 
2408  std::vector<std::vector<FullMatrix<double>>> prolongation;
2409 
2421 
2432  std::vector<Point<dim>> unit_support_points;
2433 
2439  std::vector<Point<dim - 1>> unit_face_support_points;
2440 
2445  std::vector<Point<dim>> generalized_support_points;
2446 
2452 
2469 
2484 
2488  std::vector<std::pair<unsigned int, unsigned int>> system_to_component_table;
2489 
2499  std::vector<std::pair<unsigned int, unsigned int>>
2501 
2518  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>
2520 
2524  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>
2526 
2532 
2553  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>
2555 
2561  const std::vector<bool> restriction_is_additive_flags;
2562 
2570  const std::vector<ComponentMask> nonzero_components;
2571 
2579  const std::vector<unsigned int> n_nonzero_components_table;
2580 
2587 
2601 
2607  static std::vector<unsigned int>
2609  const std::vector<ComponentMask> &nonzero_components);
2610 
2631  virtual UpdateFlags
2632  requires_update_flags(const UpdateFlags update_flags) const = 0;
2633 
2710  virtual std::unique_ptr<InternalDataBase>
2711  get_data(const UpdateFlags update_flags,
2712  const Mapping<dim, spacedim> &mapping,
2713  const Quadrature<dim> & quadrature,
2715  FiniteElementRelatedData<dim, spacedim> &output_data) const = 0;
2716 
2758  virtual std::unique_ptr<InternalDataBase>
2759  get_face_data(const UpdateFlags update_flags,
2760  const Mapping<dim, spacedim> &mapping,
2761  const Quadrature<dim - 1> & quadrature,
2763  FiniteElementRelatedData<dim, spacedim> &output_data) const;
2764 
2806  virtual std::unique_ptr<InternalDataBase>
2808  const UpdateFlags update_flags,
2809  const Mapping<dim, spacedim> &mapping,
2810  const Quadrature<dim - 1> & quadrature,
2812  spacedim>
2813  &output_data) const;
2814 
2895  virtual void
2897  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
2898  const CellSimilarity::Similarity cell_similarity,
2899  const Quadrature<dim> & quadrature,
2900  const Mapping<dim, spacedim> & mapping,
2901  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
2902  const ::internal::FEValuesImplementation::MappingRelatedData<dim,
2903  spacedim>
2904  & mapping_data,
2905  const InternalDataBase &fe_internal,
2907  spacedim>
2908  &output_data) const = 0;
2909 
2952  virtual void
2954  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
2955  const unsigned int face_no,
2956  const Quadrature<dim - 1> & quadrature,
2957  const Mapping<dim, spacedim> & mapping,
2958  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
2959  const ::internal::FEValuesImplementation::MappingRelatedData<dim,
2960  spacedim>
2961  & mapping_data,
2962  const InternalDataBase &fe_internal,
2964  spacedim>
2965  &output_data) const = 0;
2966 
3012  virtual void
3014  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
3015  const unsigned int face_no,
3016  const unsigned int sub_no,
3017  const Quadrature<dim - 1> & quadrature,
3018  const Mapping<dim, spacedim> & mapping,
3019  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
3020  const ::internal::FEValuesImplementation::MappingRelatedData<dim,
3021  spacedim>
3022  & mapping_data,
3023  const InternalDataBase &fe_internal,
3025  spacedim>
3026  &output_data) const = 0;
3027 
3028  friend class InternalDataBase;
3029  friend class FEValuesBase<dim, spacedim>;
3030  friend class FEValues<dim, spacedim>;
3031  friend class FEFaceValues<dim, spacedim>;
3032  friend class FESubfaceValues<dim, spacedim>;
3033  friend class FESystem<dim, spacedim>;
3034 
3035  // explicitly check for sensible template arguments, but not on windows
3036  // because MSVC creates bogus warnings during normal compilation
3037 #ifndef DEAL_II_MSVC
3038  static_assert(dim <= spacedim,
3039  "The dimension <dim> of a FiniteElement must be less than or "
3040  "equal to the space dimension <spacedim> in which it lives.");
3041 #endif
3042 };
3043 
3044 
3045 //----------------------------------------------------------------------//
3046 
3047 
3048 template <int dim, int spacedim>
3050  operator[](const unsigned int fe_index) const
3051 {
3052  (void)fe_index;
3053  Assert(fe_index == 0,
3054  ExcMessage("A fe_index of zero is the only index allowed here"));
3055  return *this;
3056 }
3057 
3058 
3059 
3060 template <int dim, int spacedim>
3061 inline std::pair<unsigned int, unsigned int>
3063  const unsigned int index) const
3064 {
3066  Assert(is_primitive(index),
3068  index)));
3069  return system_to_component_table[index];
3070 }
3071 
3072 
3073 
3074 template <int dim, int spacedim>
3075 inline unsigned int
3077 {
3078  return base_to_block_indices.size();
3079 }
3080 
3081 
3082 
3083 template <int dim, int spacedim>
3084 inline unsigned int
3086  const unsigned int index) const
3087 {
3088  return static_cast<unsigned int>(base_to_block_indices.block_size(index));
3089 }
3090 
3091 
3092 
3093 template <int dim, int spacedim>
3094 inline unsigned int
3096  const unsigned int component,
3097  const unsigned int index) const
3098 {
3099  AssertIndexRange(component, this->n_components());
3100  const std::vector<std::pair<unsigned int, unsigned int>>::const_iterator it =
3101  std::find(system_to_component_table.begin(),
3103  std::pair<unsigned int, unsigned int>(component, index));
3104 
3105  Assert(it != system_to_component_table.end(),
3106  ExcMessage("You are asking for the number of the shape function "
3107  "within a system element that corresponds to vector "
3108  "component " +
3109  Utilities::int_to_string(component) +
3110  " and within this to "
3111  "index " +
3112  Utilities::int_to_string(index) +
3113  ". But no such "
3114  "shape function exists."));
3115  return std::distance(system_to_component_table.begin(), it);
3116 }
3117 
3118 
3119 
3120 template <int dim, int spacedim>
3121 inline std::pair<unsigned int, unsigned int>
3123  const unsigned int index) const
3124 {
3126 
3127  // in debug mode, check whether the
3128  // function is primitive, since
3129  // otherwise the result may have no
3130  // meaning
3131  //
3132  // since the primitivity tables are
3133  // all geared towards cell dof
3134  // indices, rather than face dof
3135  // indices, we have to work a
3136  // little bit...
3137  //
3138  // in 1d, the face index is equal
3139  // to the cell index
3140  Assert(is_primitive(this->face_to_cell_index(index, 0)),
3142  index)));
3143 
3144  return face_system_to_component_table[index];
3145 }
3146 
3147 
3148 
3149 template <int dim, int spacedim>
3150 inline std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
3152  const unsigned int index) const
3153 {
3154  AssertIndexRange(index, system_to_base_table.size());
3155  return system_to_base_table[index];
3156 }
3157 
3158 
3159 
3160 template <int dim, int spacedim>
3161 inline std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
3163  const unsigned int index) const
3164 {
3166  return face_system_to_base_table[index];
3167 }
3168 
3169 
3170 
3171 template <int dim, int spacedim>
3174  const unsigned int index) const
3175 {
3176  return base_to_block_indices.block_start(index);
3177 }
3178 
3179 
3180 
3181 template <int dim, int spacedim>
3182 inline std::pair<unsigned int, unsigned int>
3184  const unsigned int index) const
3185 {
3187 
3188  return component_to_base_table[index].first;
3189 }
3190 
3191 
3192 
3193 template <int dim, int spacedim>
3194 inline std::pair<unsigned int, unsigned int>
3196  const unsigned int index) const
3197 {
3198  return base_to_block_indices.global_to_local(index);
3199 }
3200 
3201 
3202 
3203 template <int dim, int spacedim>
3204 inline std::pair<unsigned int, types::global_dof_index>
3206  const unsigned int index) const
3207 {
3208  AssertIndexRange(index, this->dofs_per_cell);
3209  // The block is computed simply as
3210  // first block of this base plus
3211  // the index within the base blocks
3212  return std::pair<unsigned int, types::global_dof_index>(
3214  system_to_base_table[index].first.second,
3215  system_to_base_table[index].second);
3216 }
3217 
3218 
3219 
3220 template <int dim, int spacedim>
3221 inline bool
3223  const unsigned int index) const
3224 {
3225  AssertIndexRange(index, this->dofs_per_cell);
3226  return restriction_is_additive_flags[index];
3227 }
3228 
3229 
3230 
3231 template <int dim, int spacedim>
3232 inline const ComponentMask &
3234 {
3235  AssertIndexRange(i, this->dofs_per_cell);
3236  return nonzero_components[i];
3237 }
3238 
3239 
3240 
3241 template <int dim, int spacedim>
3242 inline unsigned int
3244 {
3245  AssertIndexRange(i, this->dofs_per_cell);
3246  return n_nonzero_components_table[i];
3247 }
3248 
3249 
3250 
3251 template <int dim, int spacedim>
3252 inline bool
3254 {
3255  return cached_primitivity;
3256 }
3257 
3258 
3259 
3260 template <int dim, int spacedim>
3261 inline bool
3263 {
3264  AssertIndexRange(i, this->dofs_per_cell);
3265 
3266  // return primitivity of a shape
3267  // function by checking whether it
3268  // has more than one non-zero
3269  // component or not. we could cache
3270  // this value in an array of bools,
3271  // but accessing a bit-vector (as
3272  // std::vector<bool> is) is
3273  // probably more expensive than
3274  // just comparing against 1
3275  //
3276  // for good measure, short circuit the test
3277  // if the entire FE is primitive
3278  return (is_primitive() || (n_nonzero_components_table[i] == 1));
3279 }
3280 
3281 
3282 
3283 template <int dim, int spacedim>
3284 inline GeometryPrimitive
3286  const unsigned int cell_dof_index) const
3287 {
3288  AssertIndexRange(cell_dof_index, this->dofs_per_cell);
3289 
3290  // just go through the usual cases, taking into account how DoFs
3291  // are enumerated on the reference cell
3292  if (cell_dof_index < this->first_line_index)
3294  else if (cell_dof_index < this->first_quad_index)
3295  return GeometryPrimitive::line;
3296  else if (cell_dof_index < this->first_hex_index)
3297  return GeometryPrimitive::quad;
3298  else
3299  return GeometryPrimitive::hex;
3300 }
3301 
3302 
3303 
3305 
3306 #endif
static ::ExceptionBase & ExcFEHasNoSupportPoints()
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::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
const unsigned int first_hex_index
Definition: fe_base.h:256
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const =0
BlockMask block_mask(const FEValuesExtractors::Scalar &scalar) const
Definition: fe.cc:451
bool restriction_is_additive(const unsigned int index) const
Definition: fe.h:3222
virtual Tensor< 2, dim > shape_grad_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe.cc:215
std::vector< std::vector< FullMatrix< double > > > restriction
Definition: fe.h:2394
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:538
virtual std::size_t memory_consumption() const
Definition: fe.cc:49
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
Definition: fe.cc:878
virtual bool operator==(const FiniteElement< dim, spacedim > &fe) const
Definition: fe.cc:957
virtual Point< dim - 1 > unit_face_support_point(const unsigned int index) const
Definition: fe.cc:1065
std::vector< Point< dim > > generalized_support_points
Definition: fe.h:2445
virtual Tensor< 3, dim > shape_3rd_derivative(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:228
FullMatrix< double > interface_constraints
Definition: fe.h:2420
Contents is actually a matrix.
bool operator!=(const FiniteElement< dim, spacedim > &) const
Definition: fe.cc:972
unsigned int n_nonzero_components(const unsigned int i) const
Definition: fe.h:3243
FiniteElement(const FiniteElementData< dim > &fe_data, const std::vector< bool > &restriction_is_additive_flags, const std::vector< ComponentMask > &nonzero_components)
Definition: fe.cc:57
const FiniteElement< dim, spacedim > & get_sub_fe(const ComponentMask &mask) const
Definition: fe.cc:1088
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe.cc:169
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
Definition: fe.cc:862
static ::ExceptionBase & ExcUnitShapeValuesDoNotExist()
virtual Point< dim > unit_support_point(const unsigned int index) const
Definition: fe.cc:1028
const std::vector< Point< dim - 1 > > & get_unit_face_support_points() const
Definition: fe.cc:1040
bool restriction_is_implemented() const
Definition: fe.cc:706
const std::vector< Point< dim > > & get_generalized_support_points() const
Definition: fe.cc:1006
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:181
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
#define AssertIndexRange(index, range)
Definition: exceptions.h:1628
virtual ~InternalDataBase()=default
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:933
bool isotropic_prolongation_is_implemented() const
Definition: fe.cc:734
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > component_to_base_table
Definition: fe.h:2554
bool has_generalized_support_points() const
Definition: fe.cc:1019
std::vector< Point< dim - 1 > > unit_face_support_points
Definition: fe.h:2439
ComponentMask component_mask(const FEValuesExtractors::Scalar &scalar) const
Definition: fe.cc:365
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const =0
static std::vector< unsigned int > compute_n_nonzero_components(const std::vector< ComponentMask > &nonzero_components)
Definition: fe.cc:1191
size_type block_size(const unsigned int i) const
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
Definition: fe.cc:328
bool is_primitive() const
Definition: fe.h:3253
static ::ExceptionBase & ExcInterpolationNotImplemented()
std::vector< Point< dim - 1 > > generalized_face_support_points
Definition: fe.h:2451
const std::vector< unsigned int > n_nonzero_components_table
Definition: fe.h:2579
bool has_face_support_points() const
Definition: fe.cc:1056
std::vector< Point< dim > > unit_support_points
Definition: fe.h:2432
bool has_support_points() const
Definition: fe.cc:997
virtual std::unique_ptr< InternalDataBase > get_subface_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim - 1 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const
Definition: fe.cc:1224
unsigned int component_to_block_index(const unsigned int component) const
Definition: fe.cc:353
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:812
virtual Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe.cc:192
const unsigned int first_quad_index
Definition: fe_base.h:251
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:515
std::vector< std::vector< FullMatrix< double > > > prolongation
Definition: fe.h:2408
std::pair< unsigned int, unsigned int > component_to_base_index(const unsigned int component) const
Definition: fe.h:3183
#define Assert(cond, exc)
Definition: exceptions.h:1403
unsigned int element_multiplicity(const unsigned int index) const
Definition: fe.h:3085
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: mapping.h:301
GeometryPrimitive get_associated_geometry_primitive(const unsigned int cell_dof_index) const
Definition: fe.h:3285
Definition: fe.h:44
const ComponentMask & get_nonzero_components(const unsigned int i) const
Definition: fe.h:3233
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:493
#define DeclException0(Exception0)
Definition: exceptions.h:470
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const
Definition: fe.cc:894
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:363
bool constraints_are_implemented(const ::internal::SubfaceCase< dim > &subface_case=::internal::SubfaceCase< dim >::case_isotropic) const
Definition: fe.cc:790
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:3122
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::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
Definition: fe.cc:1242
virtual std::string get_name() const =0
static ::ExceptionBase & ExcProjectionVoid()
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:911
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:537
std::string int_to_string(const unsigned int value, const unsigned int digits=numbers::invalid_unsigned_int)
Definition: utilities.cc:474
std::pair< unsigned int, unsigned int > block_to_base_index(const unsigned int block) const
Definition: fe.h:3195
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:1153
const unsigned int dofs_per_cell
Definition: fe_base.h:280
static ::ExceptionBase & ExcShapeFunctionNotPrimitive(int arg1)
SymmetricTensor< 2, dim, Number > b(const Tensor< 2, dim, Number > &F)
Point< 2 > first
Definition: grid_out.cc:4352
types::global_dof_index first_block_of_base(const unsigned int b) const
Definition: fe.h:3173
unsigned int adjust_line_dof_index_for_line_orientation(const unsigned int index, const bool line_orientation) const
Definition: fe.cc:653
const std::vector< Point< dim > > & get_unit_support_points() const
Definition: fe.cc:981
unsigned int component_to_system_index(const unsigned int component, const unsigned int index) const
Definition: fe.h:3095
virtual std::unique_ptr< InternalDataBase > get_face_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim - 1 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const
Definition: fe.cc:1206
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:922
Table< 2, int > adjust_quad_dof_index_for_face_orientation_table
Definition: fe.h:2468
std::pair< unsigned int, unsigned int > system_to_component_index(const unsigned int index) const
Definition: fe.h:3062
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const
Definition: fe.cc:944
const FiniteElement< dim, spacedim > & operator[](const unsigned int fe_index) const
Definition: fe.h:3050
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > face_system_to_base_index(const unsigned int index) const
Definition: fe.h:3162
static ::ExceptionBase & ExcEmbeddingVoid()
virtual double shape_value(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:158
unsigned int n_components() const
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > system_to_base_index(const unsigned int index) const
Definition: fe.h:3151
std::pair< unsigned int, types::global_dof_index > system_to_block_index(const unsigned int component) const
Definition: fe.h:3205
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:362
std::vector< std::pair< unsigned int, unsigned int > > system_to_component_table
Definition: fe.h:2488
virtual bool hp_constraints_are_implemented() const
Definition: fe.cc:803
size_type block_start(const unsigned int i) const
Definition: fe.h:38
bool prolongation_is_implemented() const
Definition: fe.cc:678
const unsigned int first_line_index
Definition: fe_base.h:246
virtual Tensor< 4, dim > shape_4th_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe.cc:263
const bool cached_primitivity
Definition: fe.h:2586
virtual Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:204
const std::vector< ComponentMask > nonzero_components
Definition: fe.h:2570
void reinit_restriction_and_prolongation_matrices(const bool isotropic_restriction_only=false, const bool isotropic_prolongation_only=false)
Definition: fe.cc:275
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > system_to_base_table
Definition: fe.h:2519
std::vector< std::pair< unsigned int, unsigned int > > face_system_to_component_table
Definition: fe.h:2500
virtual ~FiniteElement() override=default
bool isotropic_restriction_is_implemented() const
Definition: fe.cc:762
BlockIndices base_to_block_indices
Definition: fe.h:2531
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > face_system_to_base_table
Definition: fe.h:2525
virtual Tensor< 4, dim > shape_4th_derivative(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:252
unsigned int n_base_elements() const
Definition: fe.h:3076
unsigned int size() const
static const unsigned int space_dimension
Definition: fe.h:651
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:618
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::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
std::vector< int > adjust_line_dof_index_for_line_orientation_table
Definition: fe.h:2483
TableIndices< 2 > interface_constraints_size() const
Definition: fe.cc:839
std::pair< unsigned int, size_type > global_to_local(const size_type i) const
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const
Definition: fe.cc:1140
const std::vector< bool > restriction_is_additive_flags
Definition: fe.h:2561
UpdateFlags update_each
Definition: fe.h:710
std::pair< std::unique_ptr< FiniteElement< dim, spacedim > >, unsigned int > operator^(const unsigned int multiplicity) const
Definition: fe.cc:149
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
Definition: fe.cc:1078
virtual std::unique_ptr< InternalDataBase > get_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const =0