Reference documentation for deal.II version Git e7c9a24 2019-02-08 08:26:19 +0100
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
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 <deal.II/lac/full_matrix.h>
29 
30 #include <memory>
31 
32 
33 DEAL_II_NAMESPACE_OPEN
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 
646 template <int dim, int spacedim = dim>
647 class FiniteElement : public Subscriptor, public FiniteElementData<dim>
648 {
649 public:
653  static const unsigned int space_dimension = spacedim;
654 
682  {
683  public:
689 
693  virtual ~InternalDataBase() = default;
694 
698  InternalDataBase(const InternalDataBase &) = delete;
699 
715 
719  virtual std::size_t
720  memory_consumption() const;
721  };
722 
723 public:
766  FiniteElement(const FiniteElementData<dim> & fe_data,
767  const std::vector<bool> & restriction_is_additive_flags,
768  const std::vector<ComponentMask> &nonzero_components);
769 
773  FiniteElement(FiniteElement<dim, spacedim> &&) = default; // NOLINT
774 
778  FiniteElement(const FiniteElement<dim, spacedim> &) = default;
779 
784  virtual ~FiniteElement() override = default;
785 
794  std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>, unsigned int>
795  operator^(const unsigned int multiplicity) const;
796 
808  virtual std::unique_ptr<FiniteElement<dim, spacedim>>
809  clone() const = 0;
810 
821  virtual std::string
822  get_name() const = 0;
823 
846  operator[](const unsigned int fe_index) const;
847 
873  virtual double
874  shape_value(const unsigned int i, const Point<dim> &p) const;
875 
882  virtual double
883  shape_value_component(const unsigned int i,
884  const Point<dim> & p,
885  const unsigned int component) const;
886 
908  virtual Tensor<1, dim>
909  shape_grad(const unsigned int i, const Point<dim> &p) const;
910 
917  virtual Tensor<1, dim>
918  shape_grad_component(const unsigned int i,
919  const Point<dim> & p,
920  const unsigned int component) const;
921 
943  virtual Tensor<2, dim>
944  shape_grad_grad(const unsigned int i, const Point<dim> &p) const;
945 
952  virtual Tensor<2, dim>
953  shape_grad_grad_component(const unsigned int i,
954  const Point<dim> & p,
955  const unsigned int component) const;
956 
978  virtual Tensor<3, dim>
979  shape_3rd_derivative(const unsigned int i, const Point<dim> &p) const;
980 
987  virtual Tensor<3, dim>
988  shape_3rd_derivative_component(const unsigned int i,
989  const Point<dim> & p,
990  const unsigned int component) const;
991 
1013  virtual Tensor<4, dim>
1014  shape_4th_derivative(const unsigned int i, const Point<dim> &p) const;
1015 
1022  virtual Tensor<4, dim>
1023  shape_4th_derivative_component(const unsigned int i,
1024  const Point<dim> & p,
1025  const unsigned int component) const;
1036  virtual bool
1037  has_support_on_face(const unsigned int shape_index,
1038  const unsigned int face_index) const;
1039 
1041 
1061  virtual const FullMatrix<double> &
1062  get_restriction_matrix(const unsigned int child,
1063  const RefinementCase<dim> &refinement_case =
1065 
1095  virtual const FullMatrix<double> &
1096  get_prolongation_matrix(const unsigned int child,
1097  const RefinementCase<dim> &refinement_case =
1099 
1121  bool
1123 
1139  bool
1141 
1163  bool
1165 
1181  bool
1183 
1184 
1193  bool
1194  restriction_is_additive(const unsigned int index) const;
1195 
1207  const FullMatrix<double> &
1208  constraints(const ::internal::SubfaceCase<dim> &subface_case =
1210 
1226  bool
1228  const ::internal::SubfaceCase<dim> &subface_case =
1230 
1231 
1253  virtual bool
1255 
1256 
1268  virtual void
1270  FullMatrix<double> & matrix) const;
1272 
1290  virtual void
1292  FullMatrix<double> &matrix) const;
1293 
1294 
1306  virtual void
1308  const unsigned int subface,
1309  FullMatrix<double> &matrix) const;
1311 
1312 
1333  virtual std::vector<std::pair<unsigned int, unsigned int>>
1335 
1340  virtual std::vector<std::pair<unsigned int, unsigned int>>
1342 
1347  virtual std::vector<std::pair<unsigned int, unsigned int>>
1349 
1361  DEAL_II_DEPRECATED virtual FiniteElementDomination::Domination
1363  const FiniteElement<dim, spacedim> &fe_other) const final;
1364 
1382  const unsigned int codim = 0) const;
1383 
1385 
1416  virtual bool
1417  operator==(const FiniteElement<dim, spacedim> &fe) const;
1418 
1423  bool
1425 
1461  std::pair<unsigned int, unsigned int>
1462  system_to_component_index(const unsigned int index) const;
1463 
1473  unsigned int
1474  component_to_system_index(const unsigned int component,
1475  const unsigned int index) const;
1476 
1486  std::pair<unsigned int, unsigned int>
1487  face_system_to_component_index(const unsigned int index) const;
1488 
1497  unsigned int
1498  adjust_quad_dof_index_for_face_orientation(const unsigned int index,
1499  const bool face_orientation,
1500  const bool face_flip,
1501  const bool face_rotation) const;
1502 
1557  virtual unsigned int
1558  face_to_cell_index(const unsigned int face_dof_index,
1559  const unsigned int face,
1560  const bool face_orientation = true,
1561  const bool face_flip = false,
1562  const bool face_rotation = false) const;
1563 
1571  unsigned int
1572  adjust_line_dof_index_for_line_orientation(const unsigned int index,
1573  const bool line_orientation) const;
1574 
1591  const ComponentMask &
1592  get_nonzero_components(const unsigned int i) const;
1593 
1604  unsigned int
1605  n_nonzero_components(const unsigned int i) const;
1606 
1615  bool
1616  is_primitive() const;
1617 
1628  bool
1629  is_primitive(const unsigned int i) const;
1630 
1642  unsigned int
1643  n_base_elements() const;
1644 
1649  virtual const FiniteElement<dim, spacedim> &
1650  base_element(const unsigned int index) const;
1651 
1658  unsigned int
1659  element_multiplicity(const unsigned int index) const;
1660 
1734  get_sub_fe(const ComponentMask &mask) const;
1735 
1744  virtual const FiniteElement<dim, spacedim> &
1745  get_sub_fe(const unsigned int first_component,
1746  const unsigned int n_selected_components) const;
1747 
1770  std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1771  system_to_base_index(const unsigned int index) const;
1772 
1781  std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1782  face_system_to_base_index(const unsigned int index) const;
1783 
1789  first_block_of_base(const unsigned int b) const;
1790 
1803  std::pair<unsigned int, unsigned int>
1804  component_to_base_index(const unsigned int component) const;
1805 
1806 
1811  std::pair<unsigned int, unsigned int>
1812  block_to_base_index(const unsigned int block) const;
1813 
1817  std::pair<unsigned int, types::global_dof_index>
1818  system_to_block_index(const unsigned int component) const;
1819 
1823  unsigned int
1824  component_to_block_index(const unsigned int component) const;
1825 
1827 
1846  component_mask(const FEValuesExtractors::Scalar &scalar) const;
1847 
1861  component_mask(const FEValuesExtractors::Vector &vector) const;
1862 
1878  const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const;
1879 
1895  component_mask(const BlockMask &block_mask) const;
1896 
1917  BlockMask
1918  block_mask(const FEValuesExtractors::Scalar &scalar) const;
1919 
1936  BlockMask
1937  block_mask(const FEValuesExtractors::Vector &vector) const;
1938 
1956  BlockMask
1957  block_mask(const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const;
1958 
1981  BlockMask
1982  block_mask(const ComponentMask &component_mask) const;
1983 
1999  virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
2000  get_constant_modes() const;
2001 
2003 
2039  const std::vector<Point<dim>> &
2040  get_unit_support_points() const;
2041 
2059  bool
2060  has_support_points() const;
2061 
2074  virtual Point<dim>
2075  unit_support_point(const unsigned int index) const;
2076 
2103  const std::vector<Point<dim - 1>> &
2105 
2114  bool
2115  has_face_support_points() const;
2116 
2121  virtual Point<dim - 1>
2122  unit_face_support_point(const unsigned int index) const;
2123 
2136  const std::vector<Point<dim>> &
2138 
2148  bool
2150 
2159  DEAL_II_DEPRECATED
2160  const std::vector<Point<dim - 1>> &
2162 
2175  DEAL_II_DEPRECATED
2176  bool
2178 
2223  get_associated_geometry_primitive(const unsigned int cell_dof_index) const;
2224 
2225 
2303  virtual void
2305  const std::vector<Vector<double>> &support_point_values,
2306  std::vector<double> & nodal_values) const;
2307 
2309 
2318  virtual std::size_t
2319  memory_consumption() const;
2320 
2327  int,
2328  << "The shape function with index " << arg1
2329  << " is not primitive, i.e. it is vector-valued and "
2330  << "has more than one non-zero vector component. This "
2331  << "function cannot be called for these shape functions. "
2332  << "Maybe you want to use the same function with the "
2333  << "_component suffix?");
2347  "You are trying to access the values or derivatives of shape functions "
2348  "on the reference cell of an element that does not define its shape "
2349  "functions through mapping from the reference cell. Consequently, "
2350  "you cannot ask for shape function values or derivatives on the "
2351  "reference cell.");
2352 
2360  "You are trying to access the support points of a finite "
2361  "element that either has no support points at all, or for "
2362  "which the corresponding tables have not been implemented.");
2363 
2371  "You are trying to access the matrices that describe how "
2372  "to embed a finite element function on one cell into the "
2373  "finite element space on one of its children (i.e., the "
2374  "'embedding' or 'prolongation' matrices). However, the "
2375  "current finite element can either not define this sort of "
2376  "operation, or it has not yet been implemented.");
2377 
2386  "You are trying to access the matrices that describe how "
2387  "to restrict a finite element function from the children "
2388  "of one cell to the finite element space defined on their "
2389  "parent (i.e., the 'restriction' or 'projection' matrices). "
2390  "However, the current finite element can either not define "
2391  "this sort of operation, or it has not yet been "
2392  "implemented.");
2393 
2399  int,
2400  int,
2401  << "The interface matrix has a size of " << arg1 << "x" << arg2
2402  << ", which is not reasonable for the current element "
2403  "in the present dimension.");
2409 
2410 protected:
2424  void
2426  const bool isotropic_restriction_only = false,
2427  const bool isotropic_prolongation_only = false);
2428 
2441  std::vector<std::vector<FullMatrix<double>>> restriction;
2442 
2455  std::vector<std::vector<FullMatrix<double>>> prolongation;
2456 
2468 
2479  std::vector<Point<dim>> unit_support_points;
2480 
2486  std::vector<Point<dim - 1>> unit_face_support_points;
2487 
2492  std::vector<Point<dim>> generalized_support_points;
2493 
2499 
2516 
2531 
2535  std::vector<std::pair<unsigned int, unsigned int>> system_to_component_table;
2536 
2546  std::vector<std::pair<unsigned int, unsigned int>>
2548 
2565  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>
2567 
2571  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>
2573 
2579 
2600  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>
2602 
2608  const std::vector<bool> restriction_is_additive_flags;
2609 
2617  const std::vector<ComponentMask> nonzero_components;
2618 
2626  const std::vector<unsigned int> n_nonzero_components_table;
2627 
2634 
2648 
2654  static std::vector<unsigned int>
2656  const std::vector<ComponentMask> &nonzero_components);
2657 
2678  virtual UpdateFlags
2679  requires_update_flags(const UpdateFlags update_flags) const = 0;
2680 
2757  virtual std::unique_ptr<InternalDataBase>
2758  get_data(const UpdateFlags update_flags,
2759  const Mapping<dim, spacedim> &mapping,
2760  const Quadrature<dim> & quadrature,
2762  FiniteElementRelatedData<dim, spacedim> &output_data) const = 0;
2763 
2805  virtual std::unique_ptr<InternalDataBase>
2806  get_face_data(const UpdateFlags update_flags,
2807  const Mapping<dim, spacedim> &mapping,
2808  const Quadrature<dim - 1> & quadrature,
2810  FiniteElementRelatedData<dim, spacedim> &output_data) const;
2811 
2853  virtual std::unique_ptr<InternalDataBase>
2855  const UpdateFlags update_flags,
2856  const Mapping<dim, spacedim> &mapping,
2857  const Quadrature<dim - 1> & quadrature,
2859  spacedim>
2860  &output_data) const;
2861 
2942  virtual void
2944  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
2945  const CellSimilarity::Similarity cell_similarity,
2946  const Quadrature<dim> & quadrature,
2947  const Mapping<dim, spacedim> & mapping,
2948  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
2949  const ::internal::FEValuesImplementation::MappingRelatedData<dim,
2950  spacedim>
2951  & mapping_data,
2952  const InternalDataBase &fe_internal,
2954  spacedim>
2955  &output_data) const = 0;
2956 
2999  virtual void
3001  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
3002  const unsigned int face_no,
3003  const Quadrature<dim - 1> & quadrature,
3004  const Mapping<dim, spacedim> & mapping,
3005  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
3006  const ::internal::FEValuesImplementation::MappingRelatedData<dim,
3007  spacedim>
3008  & mapping_data,
3009  const InternalDataBase &fe_internal,
3011  spacedim>
3012  &output_data) const = 0;
3013 
3059  virtual void
3061  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
3062  const unsigned int face_no,
3063  const unsigned int sub_no,
3064  const Quadrature<dim - 1> & quadrature,
3065  const Mapping<dim, spacedim> & mapping,
3066  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
3067  const ::internal::FEValuesImplementation::MappingRelatedData<dim,
3068  spacedim>
3069  & mapping_data,
3070  const InternalDataBase &fe_internal,
3072  spacedim>
3073  &output_data) const = 0;
3074 
3075  friend class InternalDataBase;
3076  friend class FEValuesBase<dim, spacedim>;
3077  friend class FEValues<dim, spacedim>;
3078  friend class FEFaceValues<dim, spacedim>;
3079  friend class FESubfaceValues<dim, spacedim>;
3080  friend class FESystem<dim, spacedim>;
3081 
3082  // explicitly check for sensible template arguments, but not on windows
3083  // because MSVC creates bogus warnings during normal compilation
3084 #ifndef DEAL_II_MSVC
3085  static_assert(dim <= spacedim,
3086  "The dimension <dim> of a FiniteElement must be less than or "
3087  "equal to the space dimension <spacedim> in which it lives.");
3088 #endif
3089 };
3090 
3091 
3092 //----------------------------------------------------------------------//
3093 
3094 
3095 template <int dim, int spacedim>
3097  operator[](const unsigned int fe_index) const
3098 {
3099  (void)fe_index;
3100  Assert(fe_index == 0,
3101  ExcMessage("A fe_index of zero is the only index allowed here"));
3102  return *this;
3103 }
3104 
3105 
3106 
3107 template <int dim, int spacedim>
3108 inline std::pair<unsigned int, unsigned int>
3110  const unsigned int index) const
3111 {
3112  Assert(index < system_to_component_table.size(),
3113  ExcIndexRange(index, 0, system_to_component_table.size()));
3114  Assert(is_primitive(index),
3116  index)));
3117  return system_to_component_table[index];
3118 }
3119 
3120 
3121 
3122 template <int dim, int spacedim>
3123 inline unsigned int
3125 {
3126  return base_to_block_indices.size();
3127 }
3128 
3129 
3130 
3131 template <int dim, int spacedim>
3132 inline unsigned int
3134  const unsigned int index) const
3135 {
3136  return static_cast<unsigned int>(base_to_block_indices.block_size(index));
3137 }
3138 
3139 
3140 
3141 template <int dim, int spacedim>
3142 inline unsigned int
3144  const unsigned int component,
3145  const unsigned int index) const
3146 {
3147  AssertIndexRange(component, this->n_components());
3148  const std::vector<std::pair<unsigned int, unsigned int>>::const_iterator it =
3149  std::find(system_to_component_table.begin(),
3151  std::pair<unsigned int, unsigned int>(component, index));
3152 
3153  Assert(it != system_to_component_table.end(),
3154  ExcMessage("You are asking for the number of the shape function "
3155  "within a system element that corresponds to vector "
3156  "component " +
3157  Utilities::int_to_string(component) +
3158  " and within this to "
3159  "index " +
3160  Utilities::int_to_string(index) +
3161  ". But no such "
3162  "shape function exists."));
3163  return std::distance(system_to_component_table.begin(), it);
3164 }
3165 
3166 
3167 
3168 template <int dim, int spacedim>
3169 inline std::pair<unsigned int, unsigned int>
3171  const unsigned int index) const
3172 {
3173  Assert(index < face_system_to_component_table.size(),
3174  ExcIndexRange(index, 0, face_system_to_component_table.size()));
3175 
3176  // in debug mode, check whether the
3177  // function is primitive, since
3178  // otherwise the result may have no
3179  // meaning
3180  //
3181  // since the primitivity tables are
3182  // all geared towards cell dof
3183  // indices, rather than face dof
3184  // indices, we have to work a
3185  // little bit...
3186  //
3187  // in 1d, the face index is equal
3188  // to the cell index
3189  Assert(is_primitive(this->face_to_cell_index(index, 0)),
3191  index)));
3192 
3193  return face_system_to_component_table[index];
3194 }
3195 
3196 
3197 
3198 template <int dim, int spacedim>
3199 inline std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
3201  const unsigned int index) const
3202 {
3203  Assert(index < system_to_base_table.size(),
3204  ExcIndexRange(index, 0, system_to_base_table.size()));
3205  return system_to_base_table[index];
3206 }
3207 
3208 
3209 
3210 template <int dim, int spacedim>
3211 inline std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
3213  const unsigned int index) const
3214 {
3215  Assert(index < face_system_to_base_table.size(),
3216  ExcIndexRange(index, 0, face_system_to_base_table.size()));
3217  return face_system_to_base_table[index];
3218 }
3219 
3220 
3221 
3222 template <int dim, int spacedim>
3225  const unsigned int index) const
3226 {
3227  return base_to_block_indices.block_start(index);
3228 }
3229 
3230 
3231 
3232 template <int dim, int spacedim>
3233 inline std::pair<unsigned int, unsigned int>
3235  const unsigned int index) const
3236 {
3237  Assert(index < component_to_base_table.size(),
3238  ExcIndexRange(index, 0, component_to_base_table.size()));
3239 
3240  return component_to_base_table[index].first;
3241 }
3242 
3243 
3244 
3245 template <int dim, int spacedim>
3246 inline std::pair<unsigned int, unsigned int>
3248  const unsigned int index) const
3249 {
3250  return base_to_block_indices.global_to_local(index);
3251 }
3252 
3253 
3254 
3255 template <int dim, int spacedim>
3256 inline std::pair<unsigned int, types::global_dof_index>
3258  const unsigned int index) const
3259 {
3260  Assert(index < this->dofs_per_cell,
3261  ExcIndexRange(index, 0, this->dofs_per_cell));
3262  // The block is computed simply as
3263  // first block of this base plus
3264  // the index within the base blocks
3265  return std::pair<unsigned int, types::global_dof_index>(
3266  first_block_of_base(system_to_base_table[index].first.first) +
3267  system_to_base_table[index].first.second,
3268  system_to_base_table[index].second);
3269 }
3270 
3271 
3272 
3273 template <int dim, int spacedim>
3274 inline bool
3276  const unsigned int index) const
3277 {
3278  Assert(index < this->dofs_per_cell,
3279  ExcIndexRange(index, 0, this->dofs_per_cell));
3280  return restriction_is_additive_flags[index];
3281 }
3282 
3283 
3284 
3285 template <int dim, int spacedim>
3286 inline const ComponentMask &
3288 {
3289  Assert(i < this->dofs_per_cell, ExcIndexRange(i, 0, this->dofs_per_cell));
3290  return nonzero_components[i];
3291 }
3292 
3293 
3294 
3295 template <int dim, int spacedim>
3296 inline unsigned int
3298 {
3299  Assert(i < this->dofs_per_cell, ExcIndexRange(i, 0, this->dofs_per_cell));
3300  return n_nonzero_components_table[i];
3301 }
3302 
3303 
3304 
3305 template <int dim, int spacedim>
3306 inline bool
3308 {
3309  return cached_primitivity;
3310 }
3311 
3312 
3313 
3314 template <int dim, int spacedim>
3315 inline bool
3317 {
3318  Assert(i < this->dofs_per_cell, ExcIndexRange(i, 0, this->dofs_per_cell));
3319 
3320  // return primitivity of a shape
3321  // function by checking whether it
3322  // has more than one non-zero
3323  // component or not. we could cache
3324  // this value in an array of bools,
3325  // but accessing a bit-vector (as
3326  // std::vector<bool> is) is
3327  // probably more expensive than
3328  // just comparing against 1
3329  //
3330  // for good measure, short circuit the test
3331  // if the entire FE is primitive
3332  return (is_primitive() || (n_nonzero_components_table[i] == 1));
3333 }
3334 
3335 
3336 
3337 template <int dim, int spacedim>
3338 inline GeometryPrimitive
3340  const unsigned int cell_dof_index) const
3341 {
3342  Assert(cell_dof_index < this->dofs_per_cell,
3343  ExcIndexRange(cell_dof_index, 0, this->dofs_per_cell));
3344 
3345  // just go through the usual cases, taking into account how DoFs
3346  // are enumerated on the reference cell
3347  if (cell_dof_index < this->first_line_index)
3349  else if (cell_dof_index < this->first_quad_index)
3350  return GeometryPrimitive::line;
3351  else if (cell_dof_index < this->first_hex_index)
3352  return GeometryPrimitive::quad;
3353  else
3354  return GeometryPrimitive::hex;
3355 }
3356 
3357 
3358 
3359 DEAL_II_NAMESPACE_CLOSE
3360 
3361 #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:258
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:1194
const std::vector< Point< dim > > & get_unit_support_points() const
Definition: fe.cc:1009
std::vector< std::vector< FullMatrix< double > > > restriction
Definition: fe.h:2441
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:541
std::pair< unsigned int, types::global_dof_index > system_to_block_index(const unsigned int component) const
Definition: fe.h:3257
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:940
std::vector< Point< dim > > generalized_support_points
Definition: fe.h:2492
FullMatrix< double > interface_constraints
Definition: fe.h:2467
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:3143
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:1094
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
Definition: fe.cc:880
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:1637
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:951
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > component_to_base_table
Definition: fe.h:2601
std::vector< Point< dim-1 > > unit_face_support_points
Definition: fe.h:2486
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:1142
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:1245
bool operator!=(const FiniteElement< dim, spacedim > &) const
Definition: fe.cc:1000
bool is_primitive() const
Definition: fe.h:3307
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 override
Definition: fe_system.cc:869
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
Definition: fe.cc:1132
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:2498
const std::vector< unsigned int > n_nonzero_components_table
Definition: fe.h:2626
static::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
BlockMask block_mask(const FEValuesExtractors::Scalar &scalar) const
Definition: fe.cc:465
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:929
std::vector< Point< dim > > unit_support_points
Definition: fe.h:2479
bool restriction_is_implemented() const
Definition: fe.cc:724
unsigned int element_multiplicity(const unsigned int index) const
Definition: fe.h:3133
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:253
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:518
std::vector< std::vector< FullMatrix< double > > > prolongation
Definition: fe.h:2455
std::pair< unsigned int, unsigned int > block_to_base_index(const unsigned int block) const
Definition: fe.h:3247
#define Assert(cond, exc)
Definition: exceptions.h:1407
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:3297
virtual FiniteElementDomination::Domination compare_for_face_domination(const FiniteElement< dim, spacedim > &fe_other) const final
Definition: fe.cc:962
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:44
std::pair< unsigned int, unsigned int > component_to_base_index(const unsigned int component) const
Definition: fe.h:3234
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:496
#define DeclException0(Exception0)
Definition: exceptions.h:473
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:3339
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const
Definition: fe.cc:972
const ComponentMask & get_nonzero_components(const unsigned int i) const
Definition: fe.h:3287
virtual Point< dim > unit_support_point(const unsigned int index) const
Definition: fe.cc:1056
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:3124
static::ExceptionBase & ExcProjectionVoid()
bool has_generalized_support_points() const
Definition: fe.cc:1047
virtual Point< dim-1 > unit_face_support_point(const unsigned int index) const
Definition: fe.cc:1118
virtual bool operator==(const FiniteElement< dim, spacedim > &fe) const
Definition: fe.cc:985
std::pair< unsigned int, unsigned int > face_system_to_component_index(const unsigned int index) const
Definition: fe.h:3170
virtual std::size_t memory_consumption() const
Definition: fe.cc:1224
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > system_to_base_index(const unsigned int index) const
Definition: fe.h:3200
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:296
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
Definition: fe.cc:896
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const
Definition: fe.cc:912
size_type block_size(const unsigned int i) const
const FiniteElement< dim, spacedim > & operator[](const unsigned int fe_index) const
Definition: fe.h:3097
const unsigned int dofs_per_cell
Definition: fe_base.h:282
static::ExceptionBase & ExcShapeFunctionNotPrimitive(int arg1)
const std::vector< Point< dim > > & get_generalized_support_points() const
Definition: fe.cc:1034
unsigned int global_dof_index
Definition: types.h:89
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:1260
bool restriction_is_additive(const unsigned int index) const
Definition: fe.h:3275
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:1278
Table< 2, int > adjust_quad_dof_index_for_face_orientation_table
Definition: fe.h:2515
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:3212
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:3109
std::vector< std::pair< unsigned int, unsigned int > > system_to_component_table
Definition: fe.h:2535
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:38
const unsigned int first_line_index
Definition: fe_base.h:248
const bool cached_primitivity
Definition: fe.h:2633
const std::vector< ComponentMask > nonzero_components
Definition: fe.h:2617
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:2566
bool has_generalized_face_support_points() const
Definition: fe.cc:1109
unsigned int size() const
std::vector< std::pair< unsigned int, unsigned int > > face_system_to_component_table
Definition: fe.h:2547
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:1069
BlockIndices base_to_block_indices
Definition: fe.h:2578
unsigned int n_components(const DoFHandler< dim, spacedim > &dh)
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > face_system_to_base_table
Definition: fe.h:2572
bool has_support_points() const
Definition: fe.cc:1025
types::global_dof_index first_block_of_base(const unsigned int b) const
Definition: fe.h:3224
static const unsigned int space_dimension
Definition: fe.h:653
bool has_face_support_points() const
Definition: fe.cc:1085
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
Definition: fe.cc:1296
std::vector< int > adjust_line_dof_index_for_line_orientation_table
Definition: fe.h:2530
const std::vector< bool > restriction_is_additive_flags
Definition: fe.h:2608
UpdateFlags update_each
Definition: fe.h:714
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:1207
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