Reference documentation for deal.II version Git 6a05540 2018-06-21 10:59:02 -0400
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 
640 template <int dim, int spacedim = dim>
641 class FiniteElement : public Subscriptor, public FiniteElementData<dim>
642 {
643 public:
647  static const unsigned int space_dimension = spacedim;
648 
676  {
677  private:
681  InternalDataBase(const InternalDataBase &) = delete;
682 
683  public:
689 
693  virtual ~InternalDataBase() = default;
694 
710 
714  virtual std::size_t
715  memory_consumption() const;
716  };
717 
718 public:
761  FiniteElement(const FiniteElementData<dim> & fe_data,
762  const std::vector<bool> & restriction_is_additive_flags,
763  const std::vector<ComponentMask> &nonzero_components);
764 
768  FiniteElement(FiniteElement<dim, spacedim> &&) = default; // NOLINT
769 
773  FiniteElement(const FiniteElement<dim, spacedim> &) = default;
774 
779  virtual ~FiniteElement() override = default;
780 
789  std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>, unsigned int>
790  operator^(const unsigned int multiplicity) const;
791 
803  virtual std::unique_ptr<FiniteElement<dim, spacedim>>
804  clone() const = 0;
805 
816  virtual std::string
817  get_name() const = 0;
818 
841  operator[](const unsigned int fe_index) const;
842 
868  virtual double
869  shape_value(const unsigned int i, const Point<dim> &p) const;
870 
877  virtual double
878  shape_value_component(const unsigned int i,
879  const Point<dim> & p,
880  const unsigned int component) const;
881 
903  virtual Tensor<1, dim>
904  shape_grad(const unsigned int i, const Point<dim> &p) const;
905 
912  virtual Tensor<1, dim>
913  shape_grad_component(const unsigned int i,
914  const Point<dim> & p,
915  const unsigned int component) const;
916 
938  virtual Tensor<2, dim>
939  shape_grad_grad(const unsigned int i, const Point<dim> &p) const;
940 
947  virtual Tensor<2, dim>
948  shape_grad_grad_component(const unsigned int i,
949  const Point<dim> & p,
950  const unsigned int component) const;
951 
973  virtual Tensor<3, dim>
974  shape_3rd_derivative(const unsigned int i, const Point<dim> &p) const;
975 
982  virtual Tensor<3, dim>
983  shape_3rd_derivative_component(const unsigned int i,
984  const Point<dim> & p,
985  const unsigned int component) const;
986 
1008  virtual Tensor<4, dim>
1009  shape_4th_derivative(const unsigned int i, const Point<dim> &p) const;
1010 
1017  virtual Tensor<4, dim>
1018  shape_4th_derivative_component(const unsigned int i,
1019  const Point<dim> & p,
1020  const unsigned int component) const;
1031  virtual bool
1032  has_support_on_face(const unsigned int shape_index,
1033  const unsigned int face_index) const;
1034 
1036 
1056  virtual const FullMatrix<double> &
1057  get_restriction_matrix(const unsigned int child,
1058  const RefinementCase<dim> &refinement_case =
1060 
1090  virtual const FullMatrix<double> &
1091  get_prolongation_matrix(const unsigned int child,
1092  const RefinementCase<dim> &refinement_case =
1094 
1116  bool
1118 
1134  bool
1136 
1158  bool
1160 
1176  bool
1178 
1179 
1188  bool
1189  restriction_is_additive(const unsigned int index) const;
1190 
1202  const FullMatrix<double> &
1203  constraints(const ::internal::SubfaceCase<dim> &subface_case =
1205 
1221  bool
1223  const ::internal::SubfaceCase<dim> &subface_case =
1225 
1226 
1248  virtual bool
1250 
1251 
1263  virtual void
1265  FullMatrix<double> & matrix) const;
1267 
1285  virtual void
1287  FullMatrix<double> &matrix) const;
1288 
1289 
1301  virtual void
1303  const unsigned int subface,
1304  FullMatrix<double> &matrix) const;
1306 
1307 
1328  virtual std::vector<std::pair<unsigned int, unsigned int>>
1330 
1335  virtual std::vector<std::pair<unsigned int, unsigned int>>
1337 
1342  virtual std::vector<std::pair<unsigned int, unsigned int>>
1344 
1356  const FiniteElement<dim, spacedim> &fe_other) const;
1357 
1359 
1390  virtual bool
1391  operator==(const FiniteElement<dim, spacedim> &fe) const;
1392 
1397  bool
1399 
1435  std::pair<unsigned int, unsigned int>
1436  system_to_component_index(const unsigned int index) const;
1437 
1447  unsigned int
1448  component_to_system_index(const unsigned int component,
1449  const unsigned int index) const;
1450 
1460  std::pair<unsigned int, unsigned int>
1461  face_system_to_component_index(const unsigned int index) const;
1462 
1471  unsigned int
1472  adjust_quad_dof_index_for_face_orientation(const unsigned int index,
1473  const bool face_orientation,
1474  const bool face_flip,
1475  const bool face_rotation) const;
1476 
1531  virtual unsigned int
1532  face_to_cell_index(const unsigned int face_dof_index,
1533  const unsigned int face,
1534  const bool face_orientation = true,
1535  const bool face_flip = false,
1536  const bool face_rotation = false) const;
1537 
1545  unsigned int
1546  adjust_line_dof_index_for_line_orientation(const unsigned int index,
1547  const bool line_orientation) const;
1548 
1565  const ComponentMask &
1566  get_nonzero_components(const unsigned int i) const;
1567 
1578  unsigned int
1579  n_nonzero_components(const unsigned int i) const;
1580 
1589  bool
1590  is_primitive() const;
1591 
1602  bool
1603  is_primitive(const unsigned int i) const;
1604 
1616  unsigned int
1617  n_base_elements() const;
1618 
1623  virtual const FiniteElement<dim, spacedim> &
1624  base_element(const unsigned int index) const;
1625 
1632  unsigned int
1633  element_multiplicity(const unsigned int index) const;
1634 
1708  get_sub_fe(const ComponentMask &mask) const;
1709 
1718  virtual const FiniteElement<dim, spacedim> &
1719  get_sub_fe(const unsigned int first_component,
1720  const unsigned int n_selected_components) const;
1721 
1744  std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1745  system_to_base_index(const unsigned int index) const;
1746 
1755  std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1756  face_system_to_base_index(const unsigned int index) const;
1757 
1763  first_block_of_base(const unsigned int b) const;
1764 
1777  std::pair<unsigned int, unsigned int>
1778  component_to_base_index(const unsigned int component) const;
1779 
1780 
1785  std::pair<unsigned int, unsigned int>
1786  block_to_base_index(const unsigned int block) const;
1787 
1791  std::pair<unsigned int, types::global_dof_index>
1792  system_to_block_index(const unsigned int component) const;
1793 
1797  unsigned int
1798  component_to_block_index(const unsigned int component) const;
1799 
1801 
1820  component_mask(const FEValuesExtractors::Scalar &scalar) const;
1821 
1835  component_mask(const FEValuesExtractors::Vector &vector) const;
1836 
1852  const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const;
1853 
1869  component_mask(const BlockMask &block_mask) const;
1870 
1891  BlockMask
1892  block_mask(const FEValuesExtractors::Scalar &scalar) const;
1893 
1910  BlockMask
1911  block_mask(const FEValuesExtractors::Vector &vector) const;
1912 
1930  BlockMask
1931  block_mask(const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const;
1932 
1955  BlockMask
1956  block_mask(const ComponentMask &component_mask) const;
1957 
1973  virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
1974  get_constant_modes() const;
1975 
1977 
2013  const std::vector<Point<dim>> &
2014  get_unit_support_points() const;
2015 
2033  bool
2034  has_support_points() const;
2035 
2048  virtual Point<dim>
2049  unit_support_point(const unsigned int index) const;
2050 
2077  const std::vector<Point<dim - 1>> &
2079 
2088  bool
2089  has_face_support_points() const;
2090 
2095  virtual Point<dim - 1>
2096  unit_face_support_point(const unsigned int index) const;
2097 
2110  const std::vector<Point<dim>> &
2112 
2122  bool
2124 
2133  DEAL_II_DEPRECATED
2134  const std::vector<Point<dim - 1>> &
2136 
2149  DEAL_II_DEPRECATED
2150  bool
2152 
2197  get_associated_geometry_primitive(const unsigned int cell_dof_index) const;
2198 
2199 
2277  virtual void
2279  const std::vector<Vector<double>> &support_point_values,
2280  std::vector<double> & nodal_values) const;
2281 
2283 
2292  virtual std::size_t
2293  memory_consumption() const;
2294 
2301  int,
2302  << "The shape function with index " << arg1
2303  << " is not primitive, i.e. it is vector-valued and "
2304  << "has more than one non-zero vector component. This "
2305  << "function cannot be called for these shape functions. "
2306  << "Maybe you want to use the same function with the "
2307  << "_component suffix?");
2321  "You are trying to access the values or derivatives of shape functions "
2322  "on the reference cell of an element that does not define its shape "
2323  "functions through mapping from the reference cell. Consequently, "
2324  "you cannot ask for shape function values or derivatives on the "
2325  "reference cell.");
2326 
2334  "You are trying to access the support points of a finite "
2335  "element that either has no support points at all, or for "
2336  "which the corresponding tables have not been implemented.");
2337 
2345  "You are trying to access the matrices that describe how "
2346  "to embed a finite element function on one cell into the "
2347  "finite element space on one of its children (i.e., the "
2348  "'embedding' or 'prolongation' matrices). However, the "
2349  "current finite element can either not define this sort of "
2350  "operation, or it has not yet been implemented.");
2351 
2360  "You are trying to access the matrices that describe how "
2361  "to restrict a finite element function from the children "
2362  "of one cell to the finite element space defined on their "
2363  "parent (i.e., the 'restriction' or 'projection' matrices). "
2364  "However, the current finite element can either not define "
2365  "this sort of operation, or it has not yet been "
2366  "implemented.");
2367 
2373  int,
2374  int,
2375  << "The interface matrix has a size of " << arg1 << "x" << arg2
2376  << ", which is not reasonable for the current element "
2377  "in the present dimension.");
2383 
2384 protected:
2398  void
2400  const bool isotropic_restriction_only = false,
2401  const bool isotropic_prolongation_only = false);
2402 
2415  std::vector<std::vector<FullMatrix<double>>> restriction;
2416 
2429  std::vector<std::vector<FullMatrix<double>>> prolongation;
2430 
2442 
2453  std::vector<Point<dim>> unit_support_points;
2454 
2460  std::vector<Point<dim - 1>> unit_face_support_points;
2461 
2466  std::vector<Point<dim>> generalized_support_points;
2467 
2473 
2490 
2505 
2509  std::vector<std::pair<unsigned int, unsigned int>> system_to_component_table;
2510 
2520  std::vector<std::pair<unsigned int, unsigned int>>
2522 
2539  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>
2541 
2545  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>
2547 
2553 
2574  std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>
2576 
2582  const std::vector<bool> restriction_is_additive_flags;
2583 
2591  const std::vector<ComponentMask> nonzero_components;
2592 
2600  const std::vector<unsigned int> n_nonzero_components_table;
2601 
2608 
2622 
2628  static std::vector<unsigned int>
2630  const std::vector<ComponentMask> &nonzero_components);
2631 
2652  virtual UpdateFlags
2653  requires_update_flags(const UpdateFlags update_flags) const = 0;
2654 
2731  virtual std::unique_ptr<InternalDataBase>
2732  get_data(const UpdateFlags update_flags,
2733  const Mapping<dim, spacedim> &mapping,
2734  const Quadrature<dim> & quadrature,
2736  FiniteElementRelatedData<dim, spacedim> &output_data) const = 0;
2737 
2779  virtual std::unique_ptr<InternalDataBase>
2780  get_face_data(const UpdateFlags update_flags,
2781  const Mapping<dim, spacedim> &mapping,
2782  const Quadrature<dim - 1> & quadrature,
2784  FiniteElementRelatedData<dim, spacedim> &output_data) const;
2785 
2827  virtual std::unique_ptr<InternalDataBase>
2829  const UpdateFlags update_flags,
2830  const Mapping<dim, spacedim> &mapping,
2831  const Quadrature<dim - 1> & quadrature,
2833  spacedim>
2834  &output_data) const;
2835 
2916  virtual void
2918  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
2919  const CellSimilarity::Similarity cell_similarity,
2920  const Quadrature<dim> & quadrature,
2921  const Mapping<dim, spacedim> & mapping,
2922  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
2923  const ::internal::FEValuesImplementation::MappingRelatedData<dim,
2924  spacedim>
2925  & mapping_data,
2926  const InternalDataBase &fe_internal,
2928  spacedim>
2929  &output_data) const = 0;
2930 
2973  virtual void
2975  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
2976  const unsigned int face_no,
2977  const Quadrature<dim - 1> & quadrature,
2978  const Mapping<dim, spacedim> & mapping,
2979  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
2980  const ::internal::FEValuesImplementation::MappingRelatedData<dim,
2981  spacedim>
2982  & mapping_data,
2983  const InternalDataBase &fe_internal,
2985  spacedim>
2986  &output_data) const = 0;
2987 
3033  virtual void
3035  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
3036  const unsigned int face_no,
3037  const unsigned int sub_no,
3038  const Quadrature<dim - 1> & quadrature,
3039  const Mapping<dim, spacedim> & mapping,
3040  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
3041  const ::internal::FEValuesImplementation::MappingRelatedData<dim,
3042  spacedim>
3043  & mapping_data,
3044  const InternalDataBase &fe_internal,
3046  spacedim>
3047  &output_data) const = 0;
3048 
3049  friend class InternalDataBase;
3050  friend class FEValuesBase<dim, spacedim>;
3051  friend class FEValues<dim, spacedim>;
3052  friend class FEFaceValues<dim, spacedim>;
3053  friend class FESubfaceValues<dim, spacedim>;
3054  friend class FESystem<dim, spacedim>;
3055 
3056  // explicitly check for sensible template arguments, but not on windows
3057  // because MSVC creates bogus warnings during normal compilation
3058 #ifndef DEAL_II_MSVC
3059  static_assert(dim <= spacedim,
3060  "The dimension <dim> of a FiniteElement must be less than or "
3061  "equal to the space dimension <spacedim> in which it lives.");
3062 #endif
3063 };
3064 
3065 
3066 //----------------------------------------------------------------------//
3067 
3068 
3069 template <int dim, int spacedim>
3071  operator[](const unsigned int fe_index) const
3072 {
3073  (void)fe_index;
3074  Assert(fe_index == 0,
3075  ExcMessage("A fe_index of zero is the only index allowed here"));
3076  return *this;
3077 }
3078 
3079 
3080 
3081 template <int dim, int spacedim>
3082 inline std::pair<unsigned int, unsigned int>
3084  const unsigned int index) const
3085 {
3086  Assert(index < system_to_component_table.size(),
3087  ExcIndexRange(index, 0, system_to_component_table.size()));
3088  Assert(is_primitive(index),
3090  index)));
3091  return system_to_component_table[index];
3092 }
3093 
3094 
3095 
3096 template <int dim, int spacedim>
3097 inline unsigned int
3099 {
3100  return base_to_block_indices.size();
3101 }
3102 
3103 
3104 
3105 template <int dim, int spacedim>
3106 inline unsigned int
3108  const unsigned int index) const
3109 {
3110  return static_cast<unsigned int>(base_to_block_indices.block_size(index));
3111 }
3112 
3113 
3114 
3115 template <int dim, int spacedim>
3116 inline unsigned int
3118  const unsigned int component,
3119  const unsigned int index) const
3120 {
3121  AssertIndexRange(component, this->n_components());
3122  const std::vector<std::pair<unsigned int, unsigned int>>::const_iterator it =
3123  std::find(system_to_component_table.begin(),
3125  std::pair<unsigned int, unsigned int>(component, index));
3126 
3127  Assert(it != system_to_component_table.end(),
3128  ExcMessage("You are asking for the number of the shape function "
3129  "within a system element that corresponds to vector "
3130  "component " +
3131  Utilities::int_to_string(component) +
3132  " and within this to "
3133  "index " +
3134  Utilities::int_to_string(index) +
3135  ". But no such "
3136  "shape function exists."));
3137  return std::distance(system_to_component_table.begin(), it);
3138 }
3139 
3140 
3141 
3142 template <int dim, int spacedim>
3143 inline std::pair<unsigned int, unsigned int>
3145  const unsigned int index) const
3146 {
3147  Assert(index < face_system_to_component_table.size(),
3148  ExcIndexRange(index, 0, face_system_to_component_table.size()));
3149 
3150  // in debug mode, check whether the
3151  // function is primitive, since
3152  // otherwise the result may have no
3153  // meaning
3154  //
3155  // since the primitivity tables are
3156  // all geared towards cell dof
3157  // indices, rather than face dof
3158  // indices, we have to work a
3159  // little bit...
3160  //
3161  // in 1d, the face index is equal
3162  // to the cell index
3163  Assert(is_primitive(this->face_to_cell_index(index, 0)),
3165  index)));
3166 
3167  return face_system_to_component_table[index];
3168 }
3169 
3170 
3171 
3172 template <int dim, int spacedim>
3173 inline std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
3175  const unsigned int index) const
3176 {
3177  Assert(index < system_to_base_table.size(),
3178  ExcIndexRange(index, 0, system_to_base_table.size()));
3179  return system_to_base_table[index];
3180 }
3181 
3182 
3183 
3184 template <int dim, int spacedim>
3185 inline std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
3187  const unsigned int index) const
3188 {
3189  Assert(index < face_system_to_base_table.size(),
3190  ExcIndexRange(index, 0, face_system_to_base_table.size()));
3191  return face_system_to_base_table[index];
3192 }
3193 
3194 
3195 
3196 template <int dim, int spacedim>
3199  const unsigned int index) const
3200 {
3201  return base_to_block_indices.block_start(index);
3202 }
3203 
3204 
3205 
3206 template <int dim, int spacedim>
3207 inline std::pair<unsigned int, unsigned int>
3209  const unsigned int index) const
3210 {
3211  Assert(index < component_to_base_table.size(),
3212  ExcIndexRange(index, 0, component_to_base_table.size()));
3213 
3214  return component_to_base_table[index].first;
3215 }
3216 
3217 
3218 
3219 template <int dim, int spacedim>
3220 inline std::pair<unsigned int, unsigned int>
3222  const unsigned int index) const
3223 {
3224  return base_to_block_indices.global_to_local(index);
3225 }
3226 
3227 
3228 
3229 template <int dim, int spacedim>
3230 inline std::pair<unsigned int, types::global_dof_index>
3232  const unsigned int index) const
3233 {
3234  Assert(index < this->dofs_per_cell,
3235  ExcIndexRange(index, 0, this->dofs_per_cell));
3236  // The block is computed simply as
3237  // first block of this base plus
3238  // the index within the base blocks
3239  return std::pair<unsigned int, types::global_dof_index>(
3240  first_block_of_base(system_to_base_table[index].first.first) +
3241  system_to_base_table[index].first.second,
3242  system_to_base_table[index].second);
3243 }
3244 
3245 
3246 
3247 template <int dim, int spacedim>
3248 inline bool
3250  const unsigned int index) const
3251 {
3252  Assert(index < this->dofs_per_cell,
3253  ExcIndexRange(index, 0, this->dofs_per_cell));
3254  return restriction_is_additive_flags[index];
3255 }
3256 
3257 
3258 
3259 template <int dim, int spacedim>
3260 inline const ComponentMask &
3262 {
3263  Assert(i < this->dofs_per_cell, ExcIndexRange(i, 0, this->dofs_per_cell));
3264  return nonzero_components[i];
3265 }
3266 
3267 
3268 
3269 template <int dim, int spacedim>
3270 inline unsigned int
3272 {
3273  Assert(i < this->dofs_per_cell, ExcIndexRange(i, 0, this->dofs_per_cell));
3274  return n_nonzero_components_table[i];
3275 }
3276 
3277 
3278 
3279 template <int dim, int spacedim>
3280 inline bool
3282 {
3283  return cached_primitivity;
3284 }
3285 
3286 
3287 
3288 template <int dim, int spacedim>
3289 inline bool
3291 {
3292  Assert(i < this->dofs_per_cell, ExcIndexRange(i, 0, this->dofs_per_cell));
3293 
3294  // return primitivity of a shape
3295  // function by checking whether it
3296  // has more than one non-zero
3297  // component or not. we could cache
3298  // this value in an array of bools,
3299  // but accessing a bit-vector (as
3300  // std::vector<bool> is) is
3301  // probably more expensive than
3302  // just comparing against 1
3303  //
3304  // for good measure, short circuit the test
3305  // if the entire FE is primitive
3306  return (is_primitive() || (n_nonzero_components_table[i] == 1));
3307 }
3308 
3309 
3310 
3311 template <int dim, int spacedim>
3312 inline GeometryPrimitive
3314  const unsigned int cell_dof_index) const
3315 {
3316  Assert(cell_dof_index < this->dofs_per_cell,
3317  ExcIndexRange(cell_dof_index, 0, this->dofs_per_cell));
3318 
3319  // just go through the usual cases, taking into account how DoFs
3320  // are enumerated on the reference cell
3321  if (cell_dof_index < this->first_line_index)
3323  else if (cell_dof_index < this->first_quad_index)
3324  return GeometryPrimitive::line;
3325  else if (cell_dof_index < this->first_hex_index)
3326  return GeometryPrimitive::quad;
3327  else
3328  return GeometryPrimitive::hex;
3329 }
3330 
3331 
3332 
3333 DEAL_II_NAMESPACE_CLOSE
3334 
3335 #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:2415
#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:3231
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:2466
FullMatrix< double > interface_constraints
Definition: fe.h:2441
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:3117
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:2575
std::vector< Point< dim-1 > > unit_face_support_points
Definition: fe.h:2460
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:3281
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: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:2472
const std::vector< unsigned int > n_nonzero_components_table
Definition: fe.h:2600
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:931
std::vector< Point< dim > > unit_support_points
Definition: fe.h:2453
bool restriction_is_implemented() const
Definition: fe.cc:724
unsigned int element_multiplicity(const unsigned int index) const
Definition: fe.h:3107
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:2429
unsigned int global_dof_index
Definition: types.h:89
std::pair< unsigned int, unsigned int > block_to_base_index(const unsigned int block) const
Definition: fe.h:3221
#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:3271
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:3208
#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:3313
const ComponentMask & get_nonzero_components(const unsigned int i) const
Definition: fe.h:3261
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:3098
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
std::pair< unsigned int, unsigned int > face_system_to_component_index(const unsigned int index) const
Definition: fe.h:3144
virtual std::size_t memory_consumption() const
Definition: fe.cc:1215
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > system_to_base_index(const unsigned int index) const
Definition: fe.h:3174
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:3071
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:3249
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:2489
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:3186
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:3083
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:2509
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:2607
const std::vector< ComponentMask > nonzero_components
Definition: fe.h:2591
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:2540
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:2521
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:2552
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:2546
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:3198
static const unsigned int space_dimension
Definition: fe.h:647
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:2504
const std::vector< bool > restriction_is_additive_flags
Definition: fe.h:2582
UpdateFlags update_each
Definition: fe.h:709
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