Reference documentation for deal.II version Git d9cfe2b8ef 2020-05-28 12:56:35 -0400
\(\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 
647 template <int dim, int spacedim = dim>
648 class FiniteElement : public Subscriptor, public FiniteElementData<dim>
649 {
650 public:
654  static const unsigned int space_dimension = spacedim;
655 
683  {
684  public:
690 
694  virtual ~InternalDataBase() = default;
695 
699  InternalDataBase(const InternalDataBase &) = delete;
700 
716 
720  virtual std::size_t
721  memory_consumption() const;
722  };
723 
724 public:
767  FiniteElement(const FiniteElementData<dim> & fe_data,
768  const std::vector<bool> & restriction_is_additive_flags,
769  const std::vector<ComponentMask> &nonzero_components);
770 
774  FiniteElement(FiniteElement<dim, spacedim> &&) = default; // NOLINT
775 
779  FiniteElement(const FiniteElement<dim, spacedim> &) = default;
780 
785  virtual ~FiniteElement() override = default;
786 
795  std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>, unsigned int>
796  operator^(const unsigned int multiplicity) const;
797 
809  virtual std::unique_ptr<FiniteElement<dim, spacedim>>
810  clone() const = 0;
811 
822  virtual std::string
823  get_name() const = 0;
824 
847  operator[](const unsigned int fe_index) const;
848 
874  virtual double
875  shape_value(const unsigned int i, const Point<dim> &p) const;
876 
883  virtual double
884  shape_value_component(const unsigned int i,
885  const Point<dim> & p,
886  const unsigned int component) const;
887 
909  virtual Tensor<1, dim>
910  shape_grad(const unsigned int i, const Point<dim> &p) const;
911 
918  virtual Tensor<1, dim>
919  shape_grad_component(const unsigned int i,
920  const Point<dim> & p,
921  const unsigned int component) const;
922 
944  virtual Tensor<2, dim>
945  shape_grad_grad(const unsigned int i, const Point<dim> &p) const;
946 
953  virtual Tensor<2, dim>
954  shape_grad_grad_component(const unsigned int i,
955  const Point<dim> & p,
956  const unsigned int component) const;
957 
979  virtual Tensor<3, dim>
980  shape_3rd_derivative(const unsigned int i, const Point<dim> &p) const;
981 
988  virtual Tensor<3, dim>
989  shape_3rd_derivative_component(const unsigned int i,
990  const Point<dim> & p,
991  const unsigned int component) const;
992 
1014  virtual Tensor<4, dim>
1015  shape_4th_derivative(const unsigned int i, const Point<dim> &p) const;
1016 
1023  virtual Tensor<4, dim>
1024  shape_4th_derivative_component(const unsigned int i,
1025  const Point<dim> & p,
1026  const unsigned int component) const;
1037  virtual bool
1038  has_support_on_face(const unsigned int shape_index,
1039  const unsigned int face_index) const;
1040 
1042 
1062  virtual const FullMatrix<double> &
1063  get_restriction_matrix(const unsigned int child,
1064  const RefinementCase<dim> &refinement_case =
1066 
1096  virtual const FullMatrix<double> &
1097  get_prolongation_matrix(const unsigned int child,
1098  const RefinementCase<dim> &refinement_case =
1100 
1122  bool
1124 
1140  bool
1142 
1164  bool
1166 
1182  bool
1184 
1185 
1194  bool
1195  restriction_is_additive(const unsigned int index) const;
1196 
1208  const FullMatrix<double> &
1209  constraints(const ::internal::SubfaceCase<dim> &subface_case =
1211 
1227  bool
1229  const ::internal::SubfaceCase<dim> &subface_case =
1231 
1232 
1254  virtual bool
1256 
1257 
1269  virtual void
1271  FullMatrix<double> & matrix) const;
1273 
1291  virtual void
1293  FullMatrix<double> &matrix) const;
1294 
1295 
1307  virtual void
1309  const unsigned int subface,
1310  FullMatrix<double> &matrix) const;
1312 
1313 
1334  virtual std::vector<std::pair<unsigned int, unsigned int>>
1336 
1341  virtual std::vector<std::pair<unsigned int, unsigned int>>
1343 
1348  virtual std::vector<std::pair<unsigned int, unsigned int>>
1350 
1364  const FiniteElement<dim, spacedim> &fe_other) const final;
1365 
1383  const unsigned int codim = 0) const;
1384 
1386 
1417  virtual bool
1418  operator==(const FiniteElement<dim, spacedim> &fe) const;
1419 
1424  bool
1426 
1462  std::pair<unsigned int, unsigned int>
1463  system_to_component_index(const unsigned int index) const;
1464 
1474  unsigned int
1475  component_to_system_index(const unsigned int component,
1476  const unsigned int index) const;
1477 
1487  std::pair<unsigned int, unsigned int>
1488  face_system_to_component_index(const unsigned int index) const;
1489 
1498  unsigned int
1499  adjust_quad_dof_index_for_face_orientation(const unsigned int index,
1500  const bool face_orientation,
1501  const bool face_flip,
1502  const bool face_rotation) const;
1503 
1558  virtual unsigned int
1559  face_to_cell_index(const unsigned int face_dof_index,
1560  const unsigned int face,
1561  const bool face_orientation = true,
1562  const bool face_flip = false,
1563  const bool face_rotation = false) const;
1564 
1572  unsigned int
1573  adjust_line_dof_index_for_line_orientation(const unsigned int index,
1574  const bool line_orientation) const;
1575 
1592  const ComponentMask &
1593  get_nonzero_components(const unsigned int i) const;
1594 
1605  unsigned int
1606  n_nonzero_components(const unsigned int i) const;
1607 
1616  bool
1617  is_primitive() const;
1618 
1629  bool
1630  is_primitive(const unsigned int i) const;
1631 
1643  unsigned int
1644  n_base_elements() const;
1645 
1650  virtual const FiniteElement<dim, spacedim> &
1651  base_element(const unsigned int index) const;
1652 
1659  unsigned int
1660  element_multiplicity(const unsigned int index) const;
1661 
1735  get_sub_fe(const ComponentMask &mask) const;
1736 
1745  virtual const FiniteElement<dim, spacedim> &
1746  get_sub_fe(const unsigned int first_component,
1747  const unsigned int n_selected_components) const;
1748 
1771  std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1772  system_to_base_index(const unsigned int index) const;
1773 
1782  std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1783  face_system_to_base_index(const unsigned int index) const;
1784 
1790  first_block_of_base(const unsigned int b) const;
1791 
1804  std::pair<unsigned int, unsigned int>
1805  component_to_base_index(const unsigned int component) const;
1806 
1807 
1812  std::pair<unsigned int, unsigned int>
1813  block_to_base_index(const unsigned int block) const;
1814 
1818  std::pair<unsigned int, types::global_dof_index>
1819  system_to_block_index(const unsigned int component) const;
1820 
1824  unsigned int
1825  component_to_block_index(const unsigned int component) const;
1826 
1828 
1847  component_mask(const FEValuesExtractors::Scalar &scalar) const;
1848 
1862  component_mask(const FEValuesExtractors::Vector &vector) const;
1863 
1879  const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const;
1880 
1896  component_mask(const BlockMask &block_mask) const;
1897 
1918  BlockMask
1919  block_mask(const FEValuesExtractors::Scalar &scalar) const;
1920 
1937  BlockMask
1938  block_mask(const FEValuesExtractors::Vector &vector) const;
1939 
1957  BlockMask
1958  block_mask(const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const;
1959 
1982  BlockMask
1983  block_mask(const ComponentMask &component_mask) const;
1984 
2000  virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
2001  get_constant_modes() const;
2002 
2004 
2040  const std::vector<Point<dim>> &
2041  get_unit_support_points() const;
2042 
2060  bool
2061  has_support_points() const;
2062 
2075  virtual Point<dim>
2076  unit_support_point(const unsigned int index) const;
2077 
2104  const std::vector<Point<dim - 1>> &
2106 
2115  bool
2116  has_face_support_points() const;
2117 
2122  virtual Point<dim - 1>
2123  unit_face_support_point(const unsigned int index) const;
2124 
2137  const std::vector<Point<dim>> &
2139 
2149  bool
2151 
2196  get_associated_geometry_primitive(const unsigned int cell_dof_index) const;
2197 
2198 
2276  virtual void
2278  const std::vector<Vector<double>> &support_point_values,
2279  std::vector<double> & nodal_values) const;
2280 
2282 
2291  virtual std::size_t
2292  memory_consumption() const;
2293 
2300  int,
2301  << "The shape function with index " << arg1
2302  << " is not primitive, i.e. it is vector-valued and "
2303  << "has more than one non-zero vector component. This "
2304  << "function cannot be called for these shape functions. "
2305  << "Maybe you want to use the same function with the "
2306  << "_component suffix?");
2320  "You are trying to access the values or derivatives of shape functions "
2321  "on the reference cell of an element that does not define its shape "
2322  "functions through mapping from the reference cell. Consequently, "
2323  "you cannot ask for shape function values or derivatives on the "
2324  "reference cell.");
2325 
2333  "You are trying to access the support points of a finite "
2334  "element that either has no support points at all, or for "
2335  "which the corresponding tables have not been implemented.");
2336 
2344  "You are trying to access the matrices that describe how "
2345  "to embed a finite element function on one cell into the "
2346  "finite element space on one of its children (i.e., the "
2347  "'embedding' or 'prolongation' matrices). However, the "
2348  "current finite element can either not define this sort of "
2349  "operation, or it has not yet been implemented.");
2350 
2359  "You are trying to access the matrices that describe how "
2360  "to restrict a finite element function from the children "
2361  "of one cell to the finite element space defined on their "
2362  "parent (i.e., the 'restriction' or 'projection' matrices). "
2363  "However, the current finite element can either not define "
2364  "this sort of operation, or it has not yet been "
2365  "implemented.");
2366 
2372  int,
2373  int,
2374  << "The interface matrix has a size of " << arg1 << "x" << arg2
2375  << ", which is not reasonable for the current element "
2376  "in the present dimension.");
2382 
2383 protected:
2397  void
2399  const bool isotropic_restriction_only = false,
2400  const bool isotropic_prolongation_only = false);
2401 
2414  std::vector<std::vector<FullMatrix<double>>> restriction;
2415 
2428  std::vector<std::vector<FullMatrix<double>>> prolongation;
2429 
2441 
2452  std::vector<Point<dim>> unit_support_points;
2453 
2459  std::vector<Point<dim - 1>> unit_face_support_points;
2460 
2465  std::vector<Point<dim>> generalized_support_points;
2466 
2472 
2489 
2504 
2508  std::vector<std::pair<unsigned int, unsigned int>> system_to_component_table;
2509 
2519  std::vector<std::pair<unsigned int, unsigned int>>
2521 
2538  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>
2540 
2544  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>
2546 
2552 
2573  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>
2575 
2581  const std::vector<bool> restriction_is_additive_flags;
2582 
2590  const std::vector<ComponentMask> nonzero_components;
2591 
2599  const std::vector<unsigned int> n_nonzero_components_table;
2600 
2607 
2621 
2627  static std::vector<unsigned int>
2629  const std::vector<ComponentMask> &nonzero_components);
2630 
2651  virtual UpdateFlags
2652  requires_update_flags(const UpdateFlags update_flags) const = 0;
2653 
2730  virtual std::unique_ptr<InternalDataBase>
2731  get_data(const UpdateFlags update_flags,
2732  const Mapping<dim, spacedim> &mapping,
2733  const Quadrature<dim> & quadrature,
2735  FiniteElementRelatedData<dim, spacedim> &output_data) const = 0;
2736 
2778  virtual std::unique_ptr<InternalDataBase>
2779  get_face_data(const UpdateFlags update_flags,
2780  const Mapping<dim, spacedim> &mapping,
2781  const Quadrature<dim - 1> & quadrature,
2783  FiniteElementRelatedData<dim, spacedim> &output_data) const;
2784 
2826  virtual std::unique_ptr<InternalDataBase>
2828  const UpdateFlags update_flags,
2829  const Mapping<dim, spacedim> &mapping,
2830  const Quadrature<dim - 1> & quadrature,
2832  spacedim>
2833  &output_data) const;
2834 
2915  virtual void
2917  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
2918  const CellSimilarity::Similarity cell_similarity,
2919  const Quadrature<dim> & quadrature,
2920  const Mapping<dim, spacedim> & mapping,
2921  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
2922  const ::internal::FEValuesImplementation::MappingRelatedData<dim,
2923  spacedim>
2924  & mapping_data,
2925  const InternalDataBase &fe_internal,
2927  spacedim>
2928  &output_data) const = 0;
2929 
2972  virtual void
2974  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
2975  const unsigned int face_no,
2976  const Quadrature<dim - 1> & quadrature,
2977  const Mapping<dim, spacedim> & mapping,
2978  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
2979  const ::internal::FEValuesImplementation::MappingRelatedData<dim,
2980  spacedim>
2981  & mapping_data,
2982  const InternalDataBase &fe_internal,
2984  spacedim>
2985  &output_data) const = 0;
2986 
3032  virtual void
3034  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
3035  const unsigned int face_no,
3036  const unsigned int sub_no,
3037  const Quadrature<dim - 1> & quadrature,
3038  const Mapping<dim, spacedim> & mapping,
3039  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
3040  const ::internal::FEValuesImplementation::MappingRelatedData<dim,
3041  spacedim>
3042  & mapping_data,
3043  const InternalDataBase &fe_internal,
3045  spacedim>
3046  &output_data) const = 0;
3047 
3048  friend class InternalDataBase;
3049  friend class FEValuesBase<dim, spacedim>;
3050  friend class FEValues<dim, spacedim>;
3051  friend class FEFaceValues<dim, spacedim>;
3052  friend class FESubfaceValues<dim, spacedim>;
3053  friend class FESystem<dim, spacedim>;
3054 
3055  // explicitly check for sensible template arguments, but not on windows
3056  // because MSVC creates bogus warnings during normal compilation
3057 #ifndef DEAL_II_MSVC
3058  static_assert(dim <= spacedim,
3059  "The dimension <dim> of a FiniteElement must be less than or "
3060  "equal to the space dimension <spacedim> in which it lives.");
3061 #endif
3062 };
3063 
3064 
3065 //----------------------------------------------------------------------//
3066 
3067 
3068 template <int dim, int spacedim>
3070  operator[](const unsigned int fe_index) const
3071 {
3072  (void)fe_index;
3073  Assert(fe_index == 0,
3074  ExcMessage("A fe_index of zero is the only index allowed here"));
3075  return *this;
3076 }
3077 
3078 
3079 
3080 template <int dim, int spacedim>
3081 inline std::pair<unsigned int, unsigned int>
3083  const unsigned int index) const
3084 {
3086  Assert(is_primitive(index),
3088  index)));
3089  return system_to_component_table[index];
3090 }
3091 
3092 
3093 
3094 template <int dim, int spacedim>
3095 inline unsigned int
3097 {
3098  return base_to_block_indices.size();
3099 }
3100 
3101 
3102 
3103 template <int dim, int spacedim>
3104 inline unsigned int
3106  const unsigned int index) const
3107 {
3108  return static_cast<unsigned int>(base_to_block_indices.block_size(index));
3109 }
3110 
3111 
3112 
3113 template <int dim, int spacedim>
3114 inline unsigned int
3116  const unsigned int component,
3117  const unsigned int index) const
3118 {
3119  AssertIndexRange(component, this->n_components());
3120  const std::vector<std::pair<unsigned int, unsigned int>>::const_iterator it =
3121  std::find(system_to_component_table.begin(),
3123  std::pair<unsigned int, unsigned int>(component, index));
3124 
3125  Assert(it != system_to_component_table.end(),
3126  ExcMessage("You are asking for the number of the shape function "
3127  "within a system element that corresponds to vector "
3128  "component " +
3129  Utilities::int_to_string(component) +
3130  " and within this to "
3131  "index " +
3132  Utilities::int_to_string(index) +
3133  ". But no such "
3134  "shape function exists."));
3135  return std::distance(system_to_component_table.begin(), it);
3136 }
3137 
3138 
3139 
3140 template <int dim, int spacedim>
3141 inline std::pair<unsigned int, unsigned int>
3143  const unsigned int index) const
3144 {
3146 
3147  // in debug mode, check whether the
3148  // function is primitive, since
3149  // otherwise the result may have no
3150  // meaning
3151  //
3152  // since the primitivity tables are
3153  // all geared towards cell dof
3154  // indices, rather than face dof
3155  // indices, we have to work a
3156  // little bit...
3157  //
3158  // in 1d, the face index is equal
3159  // to the cell index
3160  Assert(is_primitive(this->face_to_cell_index(index, 0)),
3162  index)));
3163 
3164  return face_system_to_component_table[index];
3165 }
3166 
3167 
3168 
3169 template <int dim, int spacedim>
3170 inline std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
3172  const unsigned int index) const
3173 {
3174  AssertIndexRange(index, system_to_base_table.size());
3175  return system_to_base_table[index];
3176 }
3177 
3178 
3179 
3180 template <int dim, int spacedim>
3181 inline std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
3183  const unsigned int index) const
3184 {
3186  return face_system_to_base_table[index];
3187 }
3188 
3189 
3190 
3191 template <int dim, int spacedim>
3194  const unsigned int index) const
3195 {
3196  return base_to_block_indices.block_start(index);
3197 }
3198 
3199 
3200 
3201 template <int dim, int spacedim>
3202 inline std::pair<unsigned int, unsigned int>
3204  const unsigned int index) const
3205 {
3207 
3208  return component_to_base_table[index].first;
3209 }
3210 
3211 
3212 
3213 template <int dim, int spacedim>
3214 inline std::pair<unsigned int, unsigned int>
3216  const unsigned int index) const
3217 {
3218  return base_to_block_indices.global_to_local(index);
3219 }
3220 
3221 
3222 
3223 template <int dim, int spacedim>
3224 inline std::pair<unsigned int, types::global_dof_index>
3226  const unsigned int index) const
3227 {
3228  AssertIndexRange(index, this->dofs_per_cell);
3229  // The block is computed simply as
3230  // first block of this base plus
3231  // the index within the base blocks
3232  return std::pair<unsigned int, types::global_dof_index>(
3234  system_to_base_table[index].first.second,
3235  system_to_base_table[index].second);
3236 }
3237 
3238 
3239 
3240 template <int dim, int spacedim>
3241 inline bool
3243  const unsigned int index) const
3244 {
3245  AssertIndexRange(index, this->dofs_per_cell);
3246  return restriction_is_additive_flags[index];
3247 }
3248 
3249 
3250 
3251 template <int dim, int spacedim>
3252 inline const ComponentMask &
3254 {
3255  AssertIndexRange(i, this->dofs_per_cell);
3256  return nonzero_components[i];
3257 }
3258 
3259 
3260 
3261 template <int dim, int spacedim>
3262 inline unsigned int
3264 {
3265  AssertIndexRange(i, this->dofs_per_cell);
3266  return n_nonzero_components_table[i];
3267 }
3268 
3269 
3270 
3271 template <int dim, int spacedim>
3272 inline bool
3274 {
3275  return cached_primitivity;
3276 }
3277 
3278 
3279 
3280 template <int dim, int spacedim>
3281 inline bool
3283 {
3284  AssertIndexRange(i, this->dofs_per_cell);
3285 
3286  // return primitivity of a shape
3287  // function by checking whether it
3288  // has more than one non-zero
3289  // component or not. we could cache
3290  // this value in an array of bools,
3291  // but accessing a bit-vector (as
3292  // std::vector<bool> is) is
3293  // probably more expensive than
3294  // just comparing against 1
3295  //
3296  // for good measure, short circuit the test
3297  // if the entire FE is primitive
3298  return (is_primitive() || (n_nonzero_components_table[i] == 1));
3299 }
3300 
3301 
3302 
3303 template <int dim, int spacedim>
3304 inline GeometryPrimitive
3306  const unsigned int cell_dof_index) const
3307 {
3308  AssertIndexRange(cell_dof_index, this->dofs_per_cell);
3309 
3310  // just go through the usual cases, taking into account how DoFs
3311  // are enumerated on the reference cell
3312  if (cell_dof_index < this->first_line_index)
3314  else if (cell_dof_index < this->first_quad_index)
3315  return GeometryPrimitive::line;
3316  else if (cell_dof_index < this->first_hex_index)
3317  return GeometryPrimitive::quad;
3318  else
3319  return GeometryPrimitive::hex;
3320 }
3321 
3322 
3323 
3325 
3326 #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:258
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:3242
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:2414
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:541
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:967
virtual Point< dim - 1 > unit_face_support_point(const unsigned int index) const
Definition: fe.cc:1075
std::vector< Point< dim > > generalized_support_points
Definition: fe.h:2465
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:2440
Contents is actually a matrix.
bool operator!=(const FiniteElement< dim, spacedim > &) const
Definition: fe.cc:982
unsigned int n_nonzero_components(const unsigned int i) const
Definition: fe.h:3263
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:1098
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:1038
const std::vector< Point< dim - 1 > > & get_unit_face_support_points() const
Definition: fe.cc:1050
bool restriction_is_implemented() const
Definition: fe.cc:706
const std::vector< Point< dim > > & get_generalized_support_points() const
Definition: fe.cc:1016
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:1649
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:2574
bool has_generalized_support_points() const
Definition: fe.cc:1029
std::vector< Point< dim - 1 > > unit_face_support_points
Definition: fe.h:2459
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:1201
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:3273
static ::ExceptionBase & ExcInterpolationNotImplemented()
std::vector< Point< dim - 1 > > generalized_face_support_points
Definition: fe.h:2471
const std::vector< unsigned int > n_nonzero_components_table
Definition: fe.h:2599
bool has_face_support_points() const
Definition: fe.cc:1066
std::vector< Point< dim > > unit_support_points
Definition: fe.h:2452
bool has_support_points() const
Definition: fe.cc:1007
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:1234
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:253
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:518
std::vector< std::vector< FullMatrix< double > > > prolongation
Definition: fe.h:2428
std::pair< unsigned int, unsigned int > component_to_base_index(const unsigned int component) const
Definition: fe.h:3203
#define Assert(cond, exc)
Definition: exceptions.h:1419
unsigned int element_multiplicity(const unsigned int index) const
Definition: fe.h:3105
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
virtual FiniteElementDomination::Domination compare_for_face_domination(const FiniteElement< dim, spacedim > &fe_other) const final
Definition: fe.cc:944
Abstract base class for mapping classes.
Definition: mapping.h:302
GeometryPrimitive get_associated_geometry_primitive(const unsigned int cell_dof_index) const
Definition: fe.h:3305
Definition: fe.h:44
const ComponentMask & get_nonzero_components(const unsigned int i) const
Definition: fe.h:3253
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:496
#define DeclException0(Exception0)
Definition: exceptions.h:473
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:362
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:3142
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:1252
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:3215
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:1163
const unsigned int dofs_per_cell
Definition: fe_base.h:282
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:3193
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:991
unsigned int component_to_system_index(const unsigned int component, const unsigned int index) const
Definition: fe.h:3115
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:1216
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:2488
std::pair< unsigned int, unsigned int > system_to_component_index(const unsigned int index) const
Definition: fe.h:3082
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const
Definition: fe.cc:954
const FiniteElement< dim, spacedim > & operator[](const unsigned int fe_index) const
Definition: fe.h:3070
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > face_system_to_base_index(const unsigned int index) const
Definition: fe.h:3182
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:3171
std::pair< unsigned int, types::global_dof_index > system_to_block_index(const unsigned int component) const
Definition: fe.h:3225
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:361
std::vector< std::pair< unsigned int, unsigned int > > system_to_component_table
Definition: fe.h:2508
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:248
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:2606
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:2590
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:2539
std::vector< std::pair< unsigned int, unsigned int > > face_system_to_component_table
Definition: fe.h:2520
virtual ~FiniteElement() override=default
bool isotropic_restriction_is_implemented() const
Definition: fe.cc:762
BlockIndices base_to_block_indices
Definition: fe.h:2551
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > face_system_to_base_table
Definition: fe.h:2545
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:3096
unsigned int size() const
static const unsigned int space_dimension
Definition: fe.h:654
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
#define DEAL_II_DEPRECATED
Definition: config.h:151
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:2503
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:1150
const std::vector< bool > restriction_is_additive_flags
Definition: fe.h:2581
UpdateFlags update_each
Definition: fe.h:715
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:1088
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