Reference documentation for deal.II version 9.1.0-pre
fe.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 2018 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>
22 #include <deal.II/fe/component_mask.h>
23 #include <deal.II/fe/fe_base.h>
24 #include <deal.II/fe/fe_update_flags.h>
25 #include <deal.II/fe/fe_values_extractors.h>
26 #include <deal.II/fe/mapping.h>
27 
28 #include <memory>
29 
30 
31 DEAL_II_NAMESPACE_OPEN
32 
33 template <int dim, int spacedim>
35 template <int dim, int spacedim>
36 class FEValues;
37 template <int dim, int spacedim>
39 template <int dim, int spacedim>
41 template <int dim, int spacedim>
42 class FESystem;
43 
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 
680  {
681  private:
685  InternalDataBase(const InternalDataBase &) = delete;
686 
687  public:
693 
697  virtual ~InternalDataBase() = default;
698 
714 
718  virtual std::size_t
719  memory_consumption() const;
720  };
721 
722 public:
765  FiniteElement(const FiniteElementData<dim> & fe_data,
766  const std::vector<bool> & restriction_is_additive_flags,
767  const std::vector<ComponentMask> &nonzero_components);
768 
772  FiniteElement(FiniteElement<dim, spacedim> &&) = default; // NOLINT
773 
777  FiniteElement(const FiniteElement<dim, spacedim> &) = default;
778 
783  virtual ~FiniteElement() override = default;
784 
793  std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>, unsigned int>
794  operator^(const unsigned int multiplicity) const;
795 
807  virtual std::unique_ptr<FiniteElement<dim, spacedim>>
808  clone() const = 0;
809 
820  virtual std::string
821  get_name() const = 0;
822 
845  operator[](const unsigned int fe_index) const;
846 
872  virtual double
873  shape_value(const unsigned int i, const Point<dim> &p) const;
874 
881  virtual double
882  shape_value_component(const unsigned int i,
883  const Point<dim> & p,
884  const unsigned int component) const;
885 
907  virtual Tensor<1, dim>
908  shape_grad(const unsigned int i, const Point<dim> &p) const;
909 
916  virtual Tensor<1, dim>
917  shape_grad_component(const unsigned int i,
918  const Point<dim> & p,
919  const unsigned int component) const;
920 
942  virtual Tensor<2, dim>
943  shape_grad_grad(const unsigned int i, const Point<dim> &p) const;
944 
951  virtual Tensor<2, dim>
952  shape_grad_grad_component(const unsigned int i,
953  const Point<dim> & p,
954  const unsigned int component) const;
955 
977  virtual Tensor<3, dim>
978  shape_3rd_derivative(const unsigned int i, const Point<dim> &p) const;
979 
986  virtual Tensor<3, dim>
987  shape_3rd_derivative_component(const unsigned int i,
988  const Point<dim> & p,
989  const unsigned int component) const;
990 
1012  virtual Tensor<4, dim>
1013  shape_4th_derivative(const unsigned int i, const Point<dim> &p) const;
1014 
1021  virtual Tensor<4, dim>
1022  shape_4th_derivative_component(const unsigned int i,
1023  const Point<dim> & p,
1024  const unsigned int component) const;
1035  virtual bool
1036  has_support_on_face(const unsigned int shape_index,
1037  const unsigned int face_index) const;
1038 
1040 
1060  virtual const FullMatrix<double> &
1061  get_restriction_matrix(const unsigned int child,
1062  const RefinementCase<dim> &refinement_case =
1064 
1094  virtual const FullMatrix<double> &
1095  get_prolongation_matrix(const unsigned int child,
1096  const RefinementCase<dim> &refinement_case =
1098 
1120  bool
1122 
1138  bool
1140 
1162  bool
1164 
1180  bool
1182 
1183 
1192  bool
1193  restriction_is_additive(const unsigned int index) const;
1194 
1206  const FullMatrix<double> &
1207  constraints(const ::internal::SubfaceCase<dim> &subface_case =
1209 
1225  bool
1227  const ::internal::SubfaceCase<dim> &subface_case =
1229 
1230 
1252  virtual bool
1254 
1255 
1267  virtual void
1269  FullMatrix<double> & matrix) const;
1271 
1289  virtual void
1291  FullMatrix<double> &matrix) const;
1292 
1293 
1305  virtual void
1307  const unsigned int subface,
1308  FullMatrix<double> &matrix) const;
1310 
1311 
1332  virtual std::vector<std::pair<unsigned int, unsigned int>>
1334 
1339  virtual std::vector<std::pair<unsigned int, unsigned int>>
1341 
1346  virtual std::vector<std::pair<unsigned int, unsigned int>>
1348 
1360  const FiniteElement<dim, spacedim> &fe_other) const;
1361 
1363 
1394  virtual bool
1395  operator==(const FiniteElement<dim, spacedim> &fe) const;
1396 
1401  bool
1403 
1439  std::pair<unsigned int, unsigned int>
1440  system_to_component_index(const unsigned int index) const;
1441 
1451  unsigned int
1452  component_to_system_index(const unsigned int component,
1453  const unsigned int index) const;
1454 
1464  std::pair<unsigned int, unsigned int>
1465  face_system_to_component_index(const unsigned int index) const;
1466 
1475  unsigned int
1476  adjust_quad_dof_index_for_face_orientation(const unsigned int index,
1477  const bool face_orientation,
1478  const bool face_flip,
1479  const bool face_rotation) const;
1480 
1535  virtual unsigned int
1536  face_to_cell_index(const unsigned int face_dof_index,
1537  const unsigned int face,
1538  const bool face_orientation = true,
1539  const bool face_flip = false,
1540  const bool face_rotation = false) const;
1541 
1549  unsigned int
1550  adjust_line_dof_index_for_line_orientation(const unsigned int index,
1551  const bool line_orientation) const;
1552 
1569  const ComponentMask &
1570  get_nonzero_components(const unsigned int i) const;
1571 
1582  unsigned int
1583  n_nonzero_components(const unsigned int i) const;
1584 
1593  bool
1594  is_primitive() const;
1595 
1606  bool
1607  is_primitive(const unsigned int i) const;
1608 
1620  unsigned int
1621  n_base_elements() const;
1622 
1627  virtual const FiniteElement<dim, spacedim> &
1628  base_element(const unsigned int index) const;
1629 
1636  unsigned int
1637  element_multiplicity(const unsigned int index) const;
1638 
1712  get_sub_fe(const ComponentMask &mask) const;
1713 
1722  virtual const FiniteElement<dim, spacedim> &
1723  get_sub_fe(const unsigned int first_component,
1724  const unsigned int n_selected_components) const;
1725 
1748  std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1749  system_to_base_index(const unsigned int index) const;
1750 
1759  std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1760  face_system_to_base_index(const unsigned int index) const;
1761 
1767  first_block_of_base(const unsigned int b) const;
1768 
1781  std::pair<unsigned int, unsigned int>
1782  component_to_base_index(const unsigned int component) const;
1783 
1784 
1789  std::pair<unsigned int, unsigned int>
1790  block_to_base_index(const unsigned int block) const;
1791 
1795  std::pair<unsigned int, types::global_dof_index>
1796  system_to_block_index(const unsigned int component) const;
1797 
1801  unsigned int
1802  component_to_block_index(const unsigned int component) const;
1803 
1805 
1824  component_mask(const FEValuesExtractors::Scalar &scalar) const;
1825 
1839  component_mask(const FEValuesExtractors::Vector &vector) const;
1840 
1856  const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const;
1857 
1873  component_mask(const BlockMask &block_mask) const;
1874 
1895  BlockMask
1896  block_mask(const FEValuesExtractors::Scalar &scalar) const;
1897 
1914  BlockMask
1915  block_mask(const FEValuesExtractors::Vector &vector) const;
1916 
1934  BlockMask
1935  block_mask(const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const;
1936 
1959  BlockMask
1960  block_mask(const ComponentMask &component_mask) const;
1961 
1977  virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
1978  get_constant_modes() const;
1979 
1981 
2017  const std::vector<Point<dim>> &
2018  get_unit_support_points() const;
2019 
2037  bool
2038  has_support_points() const;
2039 
2052  virtual Point<dim>
2053  unit_support_point(const unsigned int index) const;
2054 
2081  const std::vector<Point<dim - 1>> &
2083 
2092  bool
2093  has_face_support_points() const;
2094 
2099  virtual Point<dim - 1>
2100  unit_face_support_point(const unsigned int index) const;
2101 
2114  const std::vector<Point<dim>> &
2116 
2126  bool
2128 
2137  DEAL_II_DEPRECATED
2138  const std::vector<Point<dim - 1>> &
2140 
2153  DEAL_II_DEPRECATED
2154  bool
2156 
2201  get_associated_geometry_primitive(const unsigned int cell_dof_index) const;
2202 
2203 
2281  virtual void
2283  const std::vector<Vector<double>> &support_point_values,
2284  std::vector<double> & nodal_values) const;
2285 
2287 
2296  virtual std::size_t
2297  memory_consumption() const;
2298 
2305  int,
2306  << "The shape function with index " << arg1
2307  << " is not primitive, i.e. it is vector-valued and "
2308  << "has more than one non-zero vector component. This "
2309  << "function cannot be called for these shape functions. "
2310  << "Maybe you want to use the same function with the "
2311  << "_component suffix?");
2325  "You are trying to access the values or derivatives of shape functions "
2326  "on the reference cell of an element that does not define its shape "
2327  "functions through mapping from the reference cell. Consequently, "
2328  "you cannot ask for shape function values or derivatives on the "
2329  "reference cell.");
2330 
2338  "You are trying to access the support points of a finite "
2339  "element that either has no support points at all, or for "
2340  "which the corresponding tables have not been implemented.");
2341 
2349  "You are trying to access the matrices that describe how "
2350  "to embed a finite element function on one cell into the "
2351  "finite element space on one of its children (i.e., the "
2352  "'embedding' or 'prolongation' matrices). However, the "
2353  "current finite element can either not define this sort of "
2354  "operation, or it has not yet been implemented.");
2355 
2364  "You are trying to access the matrices that describe how "
2365  "to restrict a finite element function from the children "
2366  "of one cell to the finite element space defined on their "
2367  "parent (i.e., the 'restriction' or 'projection' matrices). "
2368  "However, the current finite element can either not define "
2369  "this sort of operation, or it has not yet been "
2370  "implemented.");
2371 
2377  int,
2378  int,
2379  << "The interface matrix has a size of " << arg1 << "x" << arg2
2380  << ", which is not reasonable for the current element "
2381  "in the present dimension.");
2387 
2388 protected:
2402  void
2404  const bool isotropic_restriction_only = false,
2405  const bool isotropic_prolongation_only = false);
2406 
2419  std::vector<std::vector<FullMatrix<double>>> restriction;
2420 
2433  std::vector<std::vector<FullMatrix<double>>> prolongation;
2434 
2446 
2457  std::vector<Point<dim>> unit_support_points;
2458 
2464  std::vector<Point<dim - 1>> unit_face_support_points;
2465 
2470  std::vector<Point<dim>> generalized_support_points;
2471 
2477 
2494 
2509 
2513  std::vector<std::pair<unsigned int, unsigned int>> system_to_component_table;
2514 
2524  std::vector<std::pair<unsigned int, unsigned int>>
2526 
2543  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>
2545 
2549  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>
2551 
2557 
2578  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>
2580 
2586  const std::vector<bool> restriction_is_additive_flags;
2587 
2595  const std::vector<ComponentMask> nonzero_components;
2596 
2604  const std::vector<unsigned int> n_nonzero_components_table;
2605 
2612 
2626 
2632  static std::vector<unsigned int>
2634  const std::vector<ComponentMask> &nonzero_components);
2635 
2656  virtual UpdateFlags
2657  requires_update_flags(const UpdateFlags update_flags) const = 0;
2658 
2735  virtual std::unique_ptr<InternalDataBase>
2736  get_data(const UpdateFlags update_flags,
2737  const Mapping<dim, spacedim> &mapping,
2738  const Quadrature<dim> & quadrature,
2740  FiniteElementRelatedData<dim, spacedim> &output_data) const = 0;
2741 
2783  virtual std::unique_ptr<InternalDataBase>
2784  get_face_data(const UpdateFlags update_flags,
2785  const Mapping<dim, spacedim> &mapping,
2786  const Quadrature<dim - 1> & quadrature,
2788  FiniteElementRelatedData<dim, spacedim> &output_data) const;
2789 
2831  virtual std::unique_ptr<InternalDataBase>
2833  const UpdateFlags update_flags,
2834  const Mapping<dim, spacedim> &mapping,
2835  const Quadrature<dim - 1> & quadrature,
2837  spacedim>
2838  &output_data) const;
2839 
2920  virtual void
2922  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
2923  const CellSimilarity::Similarity cell_similarity,
2924  const Quadrature<dim> & quadrature,
2925  const Mapping<dim, spacedim> & mapping,
2926  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
2927  const ::internal::FEValuesImplementation::MappingRelatedData<dim,
2928  spacedim>
2929  & mapping_data,
2930  const InternalDataBase &fe_internal,
2932  spacedim>
2933  &output_data) const = 0;
2934 
2977  virtual void
2979  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
2980  const unsigned int face_no,
2981  const Quadrature<dim - 1> & quadrature,
2982  const Mapping<dim, spacedim> & mapping,
2983  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
2984  const ::internal::FEValuesImplementation::MappingRelatedData<dim,
2985  spacedim>
2986  & mapping_data,
2987  const InternalDataBase &fe_internal,
2989  spacedim>
2990  &output_data) const = 0;
2991 
3037  virtual void
3039  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
3040  const unsigned int face_no,
3041  const unsigned int sub_no,
3042  const Quadrature<dim - 1> & quadrature,
3043  const Mapping<dim, spacedim> & mapping,
3044  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
3045  const ::internal::FEValuesImplementation::MappingRelatedData<dim,
3046  spacedim>
3047  & mapping_data,
3048  const InternalDataBase &fe_internal,
3050  spacedim>
3051  &output_data) const = 0;
3052 
3053  friend class InternalDataBase;
3054  friend class FEValuesBase<dim, spacedim>;
3055  friend class FEValues<dim, spacedim>;
3056  friend class FEFaceValues<dim, spacedim>;
3057  friend class FESubfaceValues<dim, spacedim>;
3058  friend class FESystem<dim, spacedim>;
3059 
3060  // explicitly check for sensible template arguments, but not on windows
3061  // because MSVC creates bogus warnings during normal compilation
3062 #ifndef DEAL_II_MSVC
3063  static_assert(dim <= spacedim,
3064  "The dimension <dim> of a FiniteElement must be less than or "
3065  "equal to the space dimension <spacedim> in which it lives.");
3066 #endif
3067 };
3068 
3069 
3070 //----------------------------------------------------------------------//
3071 
3072 
3073 template <int dim, int spacedim>
3075  operator[](const unsigned int fe_index) const
3076 {
3077  (void)fe_index;
3078  Assert(fe_index == 0,
3079  ExcMessage("A fe_index of zero is the only index allowed here"));
3080  return *this;
3081 }
3082 
3083 
3084 
3085 template <int dim, int spacedim>
3086 inline std::pair<unsigned int, unsigned int>
3088  const unsigned int index) const
3089 {
3090  Assert(index < system_to_component_table.size(),
3091  ExcIndexRange(index, 0, system_to_component_table.size()));
3092  Assert(is_primitive(index),
3094  index)));
3095  return system_to_component_table[index];
3096 }
3097 
3098 
3099 
3100 template <int dim, int spacedim>
3101 inline unsigned int
3103 {
3104  return base_to_block_indices.size();
3105 }
3106 
3107 
3108 
3109 template <int dim, int spacedim>
3110 inline unsigned int
3112  const unsigned int index) const
3113 {
3114  return static_cast<unsigned int>(base_to_block_indices.block_size(index));
3115 }
3116 
3117 
3118 
3119 template <int dim, int spacedim>
3120 inline unsigned int
3122  const unsigned int component,
3123  const unsigned int index) const
3124 {
3125  AssertIndexRange(component, this->n_components());
3126  const std::vector<std::pair<unsigned int, unsigned int>>::const_iterator it =
3127  std::find(system_to_component_table.begin(),
3129  std::pair<unsigned int, unsigned int>(component, index));
3130 
3131  Assert(it != system_to_component_table.end(),
3132  ExcMessage("You are asking for the number of the shape function "
3133  "within a system element that corresponds to vector "
3134  "component " +
3135  Utilities::int_to_string(component) +
3136  " and within this to "
3137  "index " +
3138  Utilities::int_to_string(index) +
3139  ". But no such "
3140  "shape function exists."));
3141  return std::distance(system_to_component_table.begin(), it);
3142 }
3143 
3144 
3145 
3146 template <int dim, int spacedim>
3147 inline std::pair<unsigned int, unsigned int>
3149  const unsigned int index) const
3150 {
3151  Assert(index < face_system_to_component_table.size(),
3152  ExcIndexRange(index, 0, face_system_to_component_table.size()));
3153 
3154  // in debug mode, check whether the
3155  // function is primitive, since
3156  // otherwise the result may have no
3157  // meaning
3158  //
3159  // since the primitivity tables are
3160  // all geared towards cell dof
3161  // indices, rather than face dof
3162  // indices, we have to work a
3163  // little bit...
3164  //
3165  // in 1d, the face index is equal
3166  // to the cell index
3167  Assert(is_primitive(this->face_to_cell_index(index, 0)),
3169  index)));
3170 
3171  return face_system_to_component_table[index];
3172 }
3173 
3174 
3175 
3176 template <int dim, int spacedim>
3177 inline std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
3179  const unsigned int index) const
3180 {
3181  Assert(index < system_to_base_table.size(),
3182  ExcIndexRange(index, 0, system_to_base_table.size()));
3183  return system_to_base_table[index];
3184 }
3185 
3186 
3187 
3188 template <int dim, int spacedim>
3189 inline std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
3191  const unsigned int index) const
3192 {
3193  Assert(index < face_system_to_base_table.size(),
3194  ExcIndexRange(index, 0, face_system_to_base_table.size()));
3195  return face_system_to_base_table[index];
3196 }
3197 
3198 
3199 
3200 template <int dim, int spacedim>
3203  const unsigned int index) const
3204 {
3205  return base_to_block_indices.block_start(index);
3206 }
3207 
3208 
3209 
3210 template <int dim, int spacedim>
3211 inline std::pair<unsigned int, unsigned int>
3213  const unsigned int index) const
3214 {
3215  Assert(index < component_to_base_table.size(),
3216  ExcIndexRange(index, 0, component_to_base_table.size()));
3217 
3218  return component_to_base_table[index].first;
3219 }
3220 
3221 
3222 
3223 template <int dim, int spacedim>
3224 inline std::pair<unsigned int, unsigned int>
3226  const unsigned int index) const
3227 {
3228  return base_to_block_indices.global_to_local(index);
3229 }
3230 
3231 
3232 
3233 template <int dim, int spacedim>
3234 inline std::pair<unsigned int, types::global_dof_index>
3236  const unsigned int index) const
3237 {
3238  Assert(index < this->dofs_per_cell,
3239  ExcIndexRange(index, 0, this->dofs_per_cell));
3240  // The block is computed simply as
3241  // first block of this base plus
3242  // the index within the base blocks
3243  return std::pair<unsigned int, types::global_dof_index>(
3244  first_block_of_base(system_to_base_table[index].first.first) +
3245  system_to_base_table[index].first.second,
3246  system_to_base_table[index].second);
3247 }
3248 
3249 
3250 
3251 template <int dim, int spacedim>
3252 inline bool
3254  const unsigned int index) const
3255 {
3256  Assert(index < this->dofs_per_cell,
3257  ExcIndexRange(index, 0, this->dofs_per_cell));
3258  return restriction_is_additive_flags[index];
3259 }
3260 
3261 
3262 
3263 template <int dim, int spacedim>
3264 inline const ComponentMask &
3266 {
3267  Assert(i < this->dofs_per_cell, ExcIndexRange(i, 0, this->dofs_per_cell));
3268  return nonzero_components[i];
3269 }
3270 
3271 
3272 
3273 template <int dim, int spacedim>
3274 inline unsigned int
3276 {
3277  Assert(i < this->dofs_per_cell, ExcIndexRange(i, 0, this->dofs_per_cell));
3278  return n_nonzero_components_table[i];
3279 }
3280 
3281 
3282 
3283 template <int dim, int spacedim>
3284 inline bool
3286 {
3287  return cached_primitivity;
3288 }
3289 
3290 
3291 
3292 template <int dim, int spacedim>
3293 inline bool
3295 {
3296  Assert(i < this->dofs_per_cell, ExcIndexRange(i, 0, this->dofs_per_cell));
3297 
3298  // return primitivity of a shape
3299  // function by checking whether it
3300  // has more than one non-zero
3301  // component or not. we could cache
3302  // this value in an array of bools,
3303  // but accessing a bit-vector (as
3304  // std::vector<bool> is) is
3305  // probably more expensive than
3306  // just comparing against 1
3307  //
3308  // for good measure, short circuit the test
3309  // if the entire FE is primitive
3310  return (is_primitive() || (n_nonzero_components_table[i] == 1));
3311 }
3312 
3313 
3314 
3315 template <int dim, int spacedim>
3316 inline GeometryPrimitive
3318  const unsigned int cell_dof_index) const
3319 {
3320  Assert(cell_dof_index < this->dofs_per_cell,
3321  ExcIndexRange(cell_dof_index, 0, this->dofs_per_cell));
3322 
3323  // just go through the usual cases, taking into account how DoFs
3324  // are enumerated on the reference cell
3325  if (cell_dof_index < this->first_line_index)
3327  else if (cell_dof_index < this->first_quad_index)
3328  return GeometryPrimitive::line;
3329  else if (cell_dof_index < this->first_hex_index)
3330  return GeometryPrimitive::quad;
3331  else
3332  return GeometryPrimitive::hex;
3333 }
3334 
3335 
3336 
3337 DEAL_II_NAMESPACE_CLOSE
3338 
3339 #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:273
bool prolongation_is_implemented() const
Definition: fe.cc:696
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:1185
const std::vector< Point< dim > > & get_unit_support_points() const
Definition: fe.cc:1000
std::vector< std::vector< FullMatrix< double > > > restriction
Definition: fe.h:2419
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:420
std::pair< unsigned int, types::global_dof_index > system_to_block_index(const unsigned int component) const
Definition: fe.h:3235
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:942
std::vector< Point< dim > > generalized_support_points
Definition: fe.h:2470
FullMatrix< double > interface_constraints
Definition: fe.h:2445
FiniteElement(const FiniteElementData< dim > &fe_data, const std::vector< bool > &restriction_is_additive_flags, const std::vector< ComponentMask > &nonzero_components)
Definition: fe.cc:57
unsigned int component_to_system_index(const unsigned int component, const unsigned int index) const
Definition: fe.h:3121
virtual Tensor< 3, dim > shape_3rd_derivative(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:229
static::ExceptionBase & ExcUnitShapeValuesDoNotExist()
bool isotropic_restriction_is_implemented() const
Definition: fe.cc:780
const std::vector< Point< dim-1 > > & get_generalized_face_support_points() const
Definition: fe.cc:1085
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
Definition: fe.cc:882
bool constraints_are_implemented(const ::internal::SubfaceCase< dim > &subface_case=::internal::SubfaceCase< dim >::case_isotropic) const
Definition: fe.cc:808
#define AssertIndexRange(index, range)
Definition: exceptions.h:1407
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:953
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > component_to_base_table
Definition: fe.h:2579
std::vector< Point< dim-1 > > unit_face_support_points
Definition: fe.h:2464
virtual bool hp_constraints_are_implemented() const
Definition: fe.cc:821
bool isotropic_prolongation_is_implemented() const
Definition: fe.cc:752
const FiniteElement< dim, spacedim > & get_sub_fe(const ComponentMask &mask) const
Definition: fe.cc:1133
TableIndices< 2 > interface_constraints_size() const
Definition: fe.cc:857
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const =0
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:1236
bool operator!=(const FiniteElement< dim, spacedim > &) const
Definition: fe.cc:991
bool is_primitive() const
Definition: fe.h:3285
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
Definition: fe.cc:1123
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
static::ExceptionBase & ExcInterpolationNotImplemented()
std::vector< Point< dim-1 > > generalized_face_support_points
Definition: fe.h:2476
const std::vector< unsigned int > n_nonzero_components_table
Definition: fe.h:2604
static::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
BlockMask block_mask(const FEValuesExtractors::Scalar &scalar) const
Definition: fe.cc:465
unsigned long long int global_dof_index
Definition: types.h:72
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
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:931
std::vector< Point< dim > > unit_support_points
Definition: fe.h:2457
bool restriction_is_implemented() const
Definition: fe.cc:724
unsigned int element_multiplicity(const unsigned int index) const
Definition: fe.h:3111
size_type block_start(const unsigned int i) const
static::ExceptionBase & ExcFENotPrimitive()
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
Definition: fe.cc:335
static::ExceptionBase & ExcMessage(std::string arg1)
const unsigned int first_quad_index
Definition: fe_base.h:268
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:408
std::vector< std::vector< FullMatrix< double > > > prolongation
Definition: fe.h:2433
std::pair< unsigned int, unsigned int > block_to_base_index(const unsigned int block) const
Definition: fe.h:3225
#define Assert(cond, exc)
Definition: exceptions.h:1227
unsigned int component_to_block_index(const unsigned int component) const
Definition: fe.cc:366
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:3275
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:634
Abstract base class for mapping classes.
Definition: dof_tools.h:57
Definition: fe.h:42
std::pair< unsigned int, unsigned int > component_to_base_index(const unsigned int component) const
Definition: fe.h:3212
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:397
#define DeclException0(Exception0)
Definition: exceptions.h:385
unsigned int adjust_line_dof_index_for_line_orientation(const unsigned int index, const bool line_orientation) const
Definition: fe.cc:670
static::ExceptionBase & ExcWrongInterfaceMatrixSize(int arg1, int arg2)
GeometryPrimitive get_associated_geometry_primitive(const unsigned int cell_dof_index) const
Definition: fe.h:3317
const ComponentMask & get_nonzero_components(const unsigned int i) const
Definition: fe.h:3265
virtual Point< dim > unit_support_point(const unsigned int index) const
Definition: fe.cc:1047
const FullMatrix< double > & constraints(const ::internal::SubfaceCase< dim > &subface_case=::internal::SubfaceCase< dim >::case_isotropic) const
Definition: fe.cc:830
virtual std::string get_name() const =0
unsigned int n_base_elements() const
Definition: fe.h:3102
static::ExceptionBase & ExcProjectionVoid()
bool has_generalized_support_points() const
Definition: fe.cc:1038
virtual Point< dim-1 > unit_face_support_point(const unsigned int index) const
Definition: fe.cc:1109
virtual bool operator==(const FiniteElement< dim, spacedim > &fe) const
Definition: fe.cc:976
unsigned int n_components() const
std::pair< unsigned int, unsigned int > face_system_to_component_index(const unsigned int index) const
Definition: fe.h:3148
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > system_to_base_index(const unsigned int index) const
Definition: fe.h:3178
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:96
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
Definition: fe.cc:898
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const
Definition: fe.cc:914
size_type block_size(const unsigned int i) const
const FiniteElement< dim, spacedim > & operator[](const unsigned int fe_index) const
Definition: fe.h:3075
const unsigned int dofs_per_cell
Definition: fe_base.h:297
static::ExceptionBase & ExcShapeFunctionNotPrimitive(int arg1)
const std::vector< Point< dim > > & get_generalized_support_points() const
Definition: fe.cc:1025
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:1251
bool restriction_is_additive(const unsigned int index) const
Definition: fe.h:3253
virtual Tensor< 3, dim > shape_3rd_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe.cc:240
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:1269
Table< 2, int > adjust_quad_dof_index_for_face_orientation_table
Definition: fe.h:2493
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:551
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
Definition: fe.cc:306
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:3190
virtual std::size_t memory_consumption() const
Definition: fe.cc:49
std::pair< unsigned int, unsigned int > system_to_component_index(const unsigned int index) const
Definition: fe.h:3087
virtual FiniteElementDomination::Domination compare_for_face_domination(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:964
std::vector< std::pair< unsigned int, unsigned int > > system_to_component_table
Definition: fe.h:2513
virtual Tensor< 4, dim > shape_4th_derivative(const unsigned int i, const Point< dim > &p) const
Definition: fe.cc:253
ComponentMask component_mask(const FEValuesExtractors::Scalar &scalar) const
Definition: fe.cc:379
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
Definition: fe.h:36
const unsigned int first_line_index
Definition: fe_base.h:263
const bool cached_primitivity
Definition: fe.h:2611
const std::vector< ComponentMask > nonzero_components
Definition: fe.h:2595
void reinit_restriction_and_prolongation_matrices(const bool isotropic_restriction_only=false, const bool isotropic_prolongation_only=false)
Definition: fe.cc:276
virtual Tensor< 4, dim > shape_4th_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
Definition: fe.cc:264
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > system_to_base_table
Definition: fe.h:2544
bool has_generalized_face_support_points() const
Definition: fe.cc:1100
unsigned int size() const
std::vector< std::pair< unsigned int, unsigned int > > face_system_to_component_table
Definition: fe.h:2525
virtual ~FiniteElement() override=default
std::pair< std::unique_ptr< FiniteElement< dim, spacedim > >, unsigned int > operator^(const unsigned int multiplicity) const
Definition: fe.cc:150
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 std::vector< Point< dim-1 > > & get_unit_face_support_points() const
Definition: fe.cc:1060
BlockIndices base_to_block_indices
Definition: fe.h:2556
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > face_system_to_base_table
Definition: fe.h:2550
bool has_support_points() const
Definition: fe.cc:1016
types::global_dof_index first_block_of_base(const unsigned int b) const
Definition: fe.h:3202
static const unsigned int space_dimension
Definition: fe.h:651
bool has_face_support_points() const
Definition: fe.cc:1076
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
Definition: fe.cc:1287
std::vector< int > adjust_line_dof_index_for_line_orientation_table
Definition: fe.h:2508
const std::vector< bool > restriction_is_additive_flags
Definition: fe.h:2586
UpdateFlags update_each
Definition: fe.h:713
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:1198
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