deal.II version 9.8.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
fe.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 1998 - 2025 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_fe_h
14#define dealii_fe_h
15
16#include <deal.II/base/config.h>
17
20#include <deal.II/fe/fe_data.h>
23#include <deal.II/fe/mapping.h>
25
27#include <deal.II/lac/vector.h>
28
29#include <memory>
30
31
33
34// Forward declarations:
35#ifndef DOXYGEN
36template <int dim, int spacedim>
37class FEValuesBase;
38template <int dim, int spacedim>
39class FEValues;
40template <int dim, int spacedim>
41class FEFaceValues;
42template <int dim, int spacedim>
43class FESubfaceValues;
44namespace NonMatching
45{
46 template <int dim>
48}
49template <int dim, int spacedim>
50class FESystem;
51#endif
52
651template <int dim, int spacedim = dim>
653 public FiniteElementData<dim>
654{
655public:
659 static constexpr unsigned int space_dimension = spacedim;
660
686 {
687 public:
693
697 virtual ~InternalDataBase() = default;
698
703
718 UpdateFlags update_each;
719
723 virtual std::size_t
725 };
726
727public:
771 const std::vector<bool> &restriction_is_additive_flags,
772 const std::vector<ComponentMask> &nonzero_components);
773
778
783
788 virtual ~FiniteElement() override = default;
789
798 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>, unsigned int>
799 operator^(const unsigned int multiplicity) const;
800
812 virtual std::unique_ptr<FiniteElement<dim, spacedim>>
813 clone() const = 0;
814
825 virtual std::string
826 get_name() const = 0;
827
832
853 virtual double
854 shape_value(const unsigned int i, const Point<dim> &p) const;
855
862 virtual double
863 shape_value_component(const unsigned int i,
864 const Point<dim> &p,
865 const unsigned int component) const;
866
888 virtual Tensor<1, dim>
889 shape_grad(const unsigned int i, const Point<dim> &p) const;
890
897 virtual Tensor<1, dim>
898 shape_grad_component(const unsigned int i,
899 const Point<dim> &p,
900 const unsigned int component) const;
901
923 virtual Tensor<2, dim>
924 shape_grad_grad(const unsigned int i, const Point<dim> &p) const;
925
932 virtual Tensor<2, dim>
933 shape_grad_grad_component(const unsigned int i,
934 const Point<dim> &p,
935 const unsigned int component) const;
936
958 virtual Tensor<3, dim>
959 shape_3rd_derivative(const unsigned int i, const Point<dim> &p) const;
960
968 virtual Tensor<3, dim>
969 shape_3rd_derivative_component(const unsigned int i,
970 const Point<dim> &p,
971 const unsigned int component) const;
972
994 virtual Tensor<4, dim>
995 shape_4th_derivative(const unsigned int i, const Point<dim> &p) const;
996
1004 virtual Tensor<4, dim>
1006 const Point<dim> &p,
1007 const unsigned int component) const;
1018 virtual bool
1019 has_support_on_face(const unsigned int shape_index,
1020 const unsigned int face_index) const;
1021
1027
1058 virtual const FullMatrix<double> &
1059 get_restriction_matrix(const unsigned int child,
1060 const RefinementCase<dim> &refinement_case =
1062
1092 virtual const FullMatrix<double> &
1093 get_prolongation_matrix(const unsigned int child,
1094 const RefinementCase<dim> &refinement_case =
1096
1118 bool
1120
1136 bool
1138
1160 bool
1162
1178 bool
1180
1181
1190 bool
1191 restriction_is_additive(const unsigned int index) const;
1192
1204 const FullMatrix<double> &
1205 constraints(const ::internal::SubfaceCase<dim> &subface_case =
1207
1223 bool
1225 const ::internal::SubfaceCase<dim> &subface_case =
1227
1228
1250 virtual bool
1252
1253
1265 virtual void
1267 FullMatrix<double> &matrix) const;
1269
1274
1275
1287 virtual void
1289 FullMatrix<double> &matrix,
1290 const unsigned int face_no = 0) const;
1291
1292
1304 virtual void
1306 const unsigned int subface,
1307 FullMatrix<double> &matrix,
1308 const unsigned int face_no = 0) const;
1310
1311
1316
1332 virtual std::vector<std::pair<unsigned int, unsigned int>>
1334
1339 virtual std::vector<std::pair<unsigned int, unsigned int>>
1341
1350 virtual std::vector<std::pair<unsigned int, unsigned int>>
1352 const unsigned int face_no = 0) const;
1353
1371 const unsigned int codim = 0) const;
1372
1374
1405 virtual bool
1407
1412 bool
1414
1450 std::pair<unsigned int, unsigned int>
1451 system_to_component_index(const unsigned int index) const;
1452
1462 unsigned int
1463 component_to_system_index(const unsigned int component,
1464 const unsigned int index) const;
1465
1475 std::pair<unsigned int, unsigned int>
1476 face_system_to_component_index(const unsigned int index,
1477 const unsigned int face_no = 0) const;
1478
1485 unsigned int
1487 const unsigned int index,
1488 const unsigned int face_no,
1489 const types::geometric_orientation combined_orientation) const;
1490
1539 virtual unsigned int
1540 face_to_cell_index(const unsigned int face_dof_index,
1541 const unsigned int face,
1542 const types::geometric_orientation combined_orientation =
1544
1554 unsigned int
1556 const unsigned int index,
1557 const types::geometric_orientation combined_orientation) const;
1558
1575 const ComponentMask &
1576 get_nonzero_components(const unsigned int i) const;
1577
1588 unsigned int
1589 n_nonzero_components(const unsigned int i) const;
1590
1599 bool
1601
1612 bool
1613 is_primitive(const unsigned int i) const;
1614
1631 virtual const Table<2, bool> &
1633
1645 unsigned int
1647
1652 virtual const FiniteElement<dim, spacedim> &
1653 base_element(const unsigned int index) const;
1654
1661 unsigned int
1662 element_multiplicity(const unsigned int index) const;
1663
1758 get_sub_fe(const ComponentMask &mask) const;
1759
1768 virtual const FiniteElement<dim, spacedim> &
1769 get_sub_fe(const unsigned int first_component,
1770 const unsigned int n_selected_components) const;
1771
1794 std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1795 system_to_base_index(const unsigned int index) const;
1796
1805 std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
1806 face_system_to_base_index(const unsigned int index,
1807 const unsigned int face_no = 0) const;
1808
1814 first_block_of_base(const unsigned int b) const;
1815
1828 std::pair<unsigned int, unsigned int>
1829 component_to_base_index(const unsigned int component) const;
1830
1831
1836 std::pair<unsigned int, unsigned int>
1837 block_to_base_index(const unsigned int block) const;
1838
1842 std::pair<unsigned int, types::global_dof_index>
1843 system_to_block_index(const unsigned int component) const;
1844
1848 unsigned int
1849 component_to_block_index(const unsigned int component) const;
1850
1866 bool
1867 shape_function_belongs_to(const unsigned int shape_function,
1868 const FEValuesExtractors::Scalar &component) const;
1869
1885 bool
1886 shape_function_belongs_to(const unsigned int shape_function,
1888
1889
1905 bool
1907 const unsigned int shape_function,
1909
1910
1921 bool
1923 const unsigned int shape_function,
1926
1931
1946
1961
1977 const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const;
1978
1995
2016 BlockMask
2018
2035 BlockMask
2037
2055 BlockMask
2057
2080 BlockMask
2082
2098 virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
2100
2102
2107
2138 const std::vector<Point<dim>> &
2140
2167 bool
2169
2182 virtual Point<dim>
2183 unit_support_point(const unsigned int index) const;
2184
2211 const std::vector<Point<dim - 1>> &
2212 get_unit_face_support_points(const unsigned int face_no = 0) const;
2213
2225 bool
2226 has_face_support_points(const unsigned int face_no = 0) const;
2227
2232 virtual Point<dim - 1>
2233 unit_face_support_point(const unsigned int index,
2234 const unsigned int face_no = 0) const;
2235
2263 const std::vector<Point<dim>> &
2265
2280 bool
2282
2329 get_associated_geometry_primitive(const unsigned int cell_dof_index) const;
2330
2331
2409 virtual void
2411 const std::vector<Vector<double>> &support_point_values,
2412 std::vector<double> &nodal_values) const;
2413
2415
2424 virtual std::size_t
2426
2433 int,
2434 << "The shape function with index " << arg1
2435 << " is not primitive, i.e. it is vector-valued and "
2436 << "has more than one non-zero vector component. This "
2437 << "function cannot be called for these shape functions. "
2438 << "Maybe you want to use the same function with the "
2439 << "_component suffix?");
2453 "You are trying to access the values or derivatives of shape functions "
2454 "on the reference cell of an element that does not define its shape "
2455 "functions through mapping from the reference cell. Consequently, "
2456 "you cannot ask for shape function values or derivatives on the "
2457 "reference cell.");
2458
2466 "You are trying to access the support points of a finite "
2467 "element that either has no support points at all, or for "
2468 "which the corresponding tables have not been implemented.");
2469
2477 "You are trying to access the matrices that describe how "
2478 "to embed a finite element function on one cell into the "
2479 "finite element space on one of its children (i.e., the "
2480 "'embedding' or 'prolongation' matrices). However, the "
2481 "current finite element can either not define this sort of "
2482 "operation, or it has not yet been implemented.");
2483
2492 "You are trying to access the matrices that describe how "
2493 "to restrict a finite element function from the children "
2494 "of one cell to the finite element space defined on their "
2495 "parent (i.e., the 'restriction' or 'projection' matrices). "
2496 "However, the current finite element can either not define "
2497 "this sort of operation, or it has not yet been "
2498 "implemented.");
2499
2505 int,
2506 int,
2507 << "The interface matrix has a size of " << arg1 << 'x' << arg2
2508 << ", which is not reasonable for the current element "
2509 "in the present dimension.");
2515
2516protected:
2530 void
2532 const bool isotropic_restriction_only = false,
2533 const bool isotropic_prolongation_only = false);
2534
2547 std::vector<std::vector<FullMatrix<double>>> restriction;
2548
2561 std::vector<std::vector<FullMatrix<double>>> prolongation;
2562
2574
2585 std::vector<Point<dim>> unit_support_points;
2586
2592 std::vector<std::vector<Point<dim - 1>>> unit_face_support_points;
2593
2598 std::vector<Point<dim>> generalized_support_points;
2599
2604 std::vector<std::vector<Point<dim - 1>>> generalized_face_support_points;
2605
2622
2635
2639 std::vector<std::pair<unsigned int, unsigned int>> system_to_component_table;
2640
2650 std::vector<std::vector<std::pair<unsigned int, unsigned int>>>
2652
2669 std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>
2671
2675 std::vector<
2676 std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>>
2678
2684
2705 std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int>>
2707
2713 const std::vector<bool> restriction_is_additive_flags;
2714
2722 const std::vector<ComponentMask> nonzero_components;
2723
2731 const std::vector<unsigned int> n_nonzero_components_table;
2732
2739
2747
2762
2768 static std::vector<unsigned int>
2770 const std::vector<ComponentMask> &nonzero_components);
2771
2792 virtual UpdateFlags
2793 requires_update_flags(const UpdateFlags update_flags) const = 0;
2794
2872 virtual std::unique_ptr<InternalDataBase>
2873 get_data(const UpdateFlags update_flags,
2875 const Quadrature<dim> &quadrature,
2877 FiniteElementRelatedData<dim, spacedim> &output_data) const = 0;
2878
2921 virtual std::unique_ptr<InternalDataBase>
2922 get_face_data(const UpdateFlags update_flags,
2924 const hp::QCollection<dim - 1> &quadrature,
2926 FiniteElementRelatedData<dim, spacedim> &output_data) const;
2927
2931 virtual std::unique_ptr<InternalDataBase>
2933 const UpdateFlags update_flags,
2935 const Quadrature<dim - 1> &quadrature,
2937 &output_data) const;
2938
2982 virtual std::unique_ptr<InternalDataBase>
2984 const UpdateFlags update_flags,
2986 const Quadrature<dim - 1> &quadrature,
2988 spacedim>
2989 &output_data) const;
2990
3071 virtual void
3074 const CellSimilarity::Similarity cell_similarity,
3075 const Quadrature<dim> &quadrature,
3077 const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
3079 &mapping_data,
3080 const InternalDataBase &fe_internal,
3082 spacedim>
3083 &output_data) const = 0;
3084
3127 virtual void
3130 const unsigned int face_no,
3131 const hp::QCollection<dim - 1> &quadrature,
3133 const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
3135 &mapping_data,
3136 const InternalDataBase &fe_internal,
3138 spacedim>
3139 &output_data) const;
3140
3144 virtual void
3147 const unsigned int face_no,
3148 const Quadrature<dim - 1> &quadrature,
3150 const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
3152 &mapping_data,
3153 const InternalDataBase &fe_internal,
3155 &output_data) const;
3156
3202 virtual void
3205 const unsigned int face_no,
3206 const unsigned int sub_no,
3207 const Quadrature<dim - 1> &quadrature,
3209 const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
3211 &mapping_data,
3212 const InternalDataBase &fe_internal,
3214 spacedim>
3215 &output_data) const = 0;
3216
3217 friend class InternalDataBase;
3218 friend class FEValuesBase<dim, spacedim>;
3219 friend class FEValues<dim, spacedim>;
3220 friend class FEFaceValues<dim, spacedim>;
3221 friend class FESubfaceValues<dim, spacedim>;
3222 friend class NonMatching::FEImmersedSurfaceValues<dim>;
3223 friend class FESystem<dim, spacedim>;
3224
3225 // explicitly check for sensible template arguments, but not on windows
3226 // because MSVC creates bogus warnings during normal compilation
3227#ifndef DEAL_II_MSVC
3228 static_assert(dim <= spacedim,
3229 "The dimension <dim> of a FiniteElement must be less than or "
3230 "equal to the space dimension <spacedim> in which it lives.");
3231#endif
3232};
3233
3234
3235//----------------------------------------------------------------------//
3236#ifndef DOXYGEN
3237
3238template <int dim, int spacedim>
3239inline std::pair<unsigned int, unsigned int>
3241 const unsigned int index) const
3242{
3244 Assert(is_primitive(index),
3246 index)));
3247 return system_to_component_table[index];
3248}
3249
3250
3251
3252template <int dim, int spacedim>
3253inline unsigned int
3255{
3256 return base_to_block_indices.size();
3257}
3258
3259
3260
3261template <int dim, int spacedim>
3262inline unsigned int
3264 const unsigned int index) const
3265{
3266 return static_cast<unsigned int>(base_to_block_indices.block_size(index));
3267}
3268
3269
3270
3271template <int dim, int spacedim>
3272inline unsigned int
3274 const unsigned int component,
3275 const unsigned int index) const
3276{
3277 AssertIndexRange(component, this->n_components());
3278 const std::vector<std::pair<unsigned int, unsigned int>>::const_iterator it =
3279 std::find(system_to_component_table.begin(),
3281 std::pair<unsigned int, unsigned int>(component, index));
3282
3284 ExcMessage("You are asking for the number of the shape function "
3285 "within a system element that corresponds to vector "
3286 "component " +
3287 Utilities::int_to_string(component) +
3288 " and within this to "
3289 "index " +
3291 ". But no such "
3292 "shape function exists."));
3293 return std::distance(system_to_component_table.begin(), it);
3294}
3295
3296
3297
3298template <int dim, int spacedim>
3299inline std::pair<unsigned int, unsigned int>
3301 const unsigned int index,
3302 const unsigned int face_no) const
3303{
3305 index,
3306 face_system_to_component_table[this->n_unique_faces() == 1 ? 0 : face_no]
3307 .size());
3308
3309 // in debug mode, check whether the
3310 // function is primitive, since
3311 // otherwise the result may have no
3312 // meaning
3313 //
3314 // since the primitivity tables are
3315 // all geared towards cell dof
3316 // indices, rather than face dof
3317 // indices, we have to work a
3318 // little bit...
3319 //
3320 // in 1d, the face index is equal
3321 // to the cell index
3322 Assert(is_primitive(this->face_to_cell_index(index, face_no)),
3324 index)));
3325
3327 0 :
3328 face_no][index];
3329}
3330
3331
3332
3333template <int dim, int spacedim>
3334inline std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
3336 const unsigned int index) const
3337{
3340}
3341
3342
3343
3344template <int dim, int spacedim>
3345inline std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
3347 const unsigned int index,
3348 const unsigned int face_no) const
3349{
3351 index,
3352 face_system_to_base_table[this->n_unique_faces() == 1 ? 0 : face_no]
3353 .size());
3354 return face_system_to_base_table[this->n_unique_faces() == 1 ? 0 : face_no]
3355 [index];
3356}
3357
3358
3359
3360template <int dim, int spacedim>
3363 const unsigned int index) const
3364{
3365 return base_to_block_indices.block_start(index);
3366}
3367
3368
3369
3370template <int dim, int spacedim>
3371inline std::pair<unsigned int, unsigned int>
3373 const unsigned int index) const
3374{
3376
3377 return component_to_base_table[index].first;
3378}
3379
3380
3381
3382template <int dim, int spacedim>
3383inline std::pair<unsigned int, unsigned int>
3385 const unsigned int index) const
3386{
3388}
3389
3390
3391
3392template <int dim, int spacedim>
3393inline std::pair<unsigned int, types::global_dof_index>
3395 const unsigned int index) const
3396{
3397 AssertIndexRange(index, this->n_dofs_per_cell());
3398 // The block is computed simply as
3399 // first block of this base plus
3400 // the index within the base blocks
3401 return std::pair<unsigned int, types::global_dof_index>(
3402 first_block_of_base(system_to_base_table[index].first.first) +
3403 system_to_base_table[index].first.second,
3404 system_to_base_table[index].second);
3405}
3406
3407
3408
3409template <int dim, int spacedim>
3410inline bool
3412 const unsigned int shape_function,
3413 const FEValuesExtractors::Scalar &component) const
3414{
3415 AssertIndexRange(shape_function, this->n_dofs_per_cell());
3416 AssertIndexRange(component.component, this->n_components());
3417
3418 if (is_primitive(shape_function))
3419 return (system_to_component_table[shape_function].first ==
3421 else
3422 return nonzero_components[shape_function][component.component];
3423}
3424
3425
3426
3427template <int dim, int spacedim>
3428inline bool
3430 const unsigned int shape_function,
3432{
3433 AssertIndexRange(shape_function, this->n_dofs_per_cell());
3434 AssertIndexRange(components.first_vector_component, this->n_components());
3435 AssertIndexRange(components.first_vector_component + dim,
3436 this->n_components() + 1);
3437
3438 if (is_primitive(shape_function))
3439 return ((system_to_component_table[shape_function].first >=
3440 components.first_vector_component) &&
3441 (system_to_component_table[shape_function].first <
3442 components.first_vector_component + dim));
3443 else
3444 // Return whether there is overlap between the nonzero components
3445 // of the current shape function and the selected components of
3446 // the extractor:
3447 {
3448 for (unsigned int i = components.first_vector_component;
3449 i < components.first_vector_component + dim;
3450 ++i)
3451 if (nonzero_components[shape_function][i])
3452 return true;
3453 return false;
3454 }
3455}
3456
3457
3458
3459template <int dim, int spacedim>
3460inline bool
3462 const unsigned int shape_function,
3464{
3465 AssertIndexRange(shape_function, this->n_dofs_per_cell());
3466 AssertIndexRange(components.first_tensor_component, this->n_components());
3467 AssertIndexRange(components.first_tensor_component + dim,
3468 this->n_components() + 1);
3469
3470 if (is_primitive(shape_function))
3471 return ((system_to_component_table[shape_function].first >=
3472 components.first_tensor_component) &&
3473 (system_to_component_table[shape_function].first <
3474 components.first_tensor_component +
3476 else
3477 // Return whether there is overlap between the nonzero components
3478 // of the current shape function and the selected components of
3479 // the extractor:
3480 {
3481 for (unsigned int i = components.first_tensor_component;
3482 i < components.first_tensor_component +
3484 ++i)
3485 if (nonzero_components[shape_function][i])
3486 return true;
3487 return false;
3488 }
3489}
3490
3491
3492
3493template <int dim, int spacedim>
3494inline bool
3496 const unsigned int shape_function,
3498{
3499 AssertIndexRange(shape_function, this->n_dofs_per_cell());
3500 AssertIndexRange(components.first_tensor_component, this->n_components());
3501 AssertIndexRange(components.first_tensor_component + dim,
3502 this->n_components() + 1);
3503
3504 if (is_primitive(shape_function))
3505 return ((system_to_component_table[shape_function].first >=
3506 components.first_tensor_component) &&
3507 (system_to_component_table[shape_function].first <
3508 components.first_tensor_component +
3510 else
3511 // Return whether there is overlap between the nonzero components
3512 // of the current shape function and the selected components of
3513 // the extractor:
3514 {
3515 for (unsigned int i = components.first_tensor_component;
3516 i < components.first_tensor_component +
3518 ++i)
3519 if (nonzero_components[shape_function][i])
3520 return true;
3521 return false;
3522 }
3523}
3524
3525
3526
3527template <int dim, int spacedim>
3528inline bool
3530 const unsigned int index) const
3531{
3532 AssertIndexRange(index, this->n_dofs_per_cell());
3533 return restriction_is_additive_flags[index];
3534}
3535
3536
3537
3538template <int dim, int spacedim>
3539inline const ComponentMask &
3541{
3543 return nonzero_components[i];
3544}
3545
3546
3547
3548template <int dim, int spacedim>
3549inline unsigned int
3551{
3554}
3555
3556
3557
3558template <int dim, int spacedim>
3559inline bool
3561{
3562 return cached_primitivity;
3563}
3564
3565
3566
3567template <int dim, int spacedim>
3568inline bool
3569FiniteElement<dim, spacedim>::is_primitive(const unsigned int i) const
3570{
3572
3573 // return primitivity of a shape
3574 // function by checking whether it
3575 // has more than one non-zero
3576 // component or not. we could cache
3577 // this value in an array of bools,
3578 // but accessing a bit-vector (as
3579 // std::vector<bool> is) is
3580 // probably more expensive than
3581 // just comparing against 1
3582 //
3583 // for good measure, short circuit the test
3584 // if the entire FE is primitive
3585 return (is_primitive() || (n_nonzero_components_table[i] == 1));
3586}
3587
3588
3589
3590template <int dim, int spacedim>
3591inline const Table<2, bool> &
3593{
3595}
3596
3597
3598
3599template <int dim, int spacedim>
3600inline GeometryPrimitive
3602 const unsigned int cell_dof_index) const
3603{
3604 AssertIndexRange(cell_dof_index, this->n_dofs_per_cell());
3605
3606 // just go through the usual cases, taking into account how DoFs
3607 // are enumerated on the reference cell
3608 if (cell_dof_index < this->get_first_line_index())
3610 else if (cell_dof_index < this->get_first_quad_index(0))
3612 else if (cell_dof_index < this->get_first_hex_index())
3614 else
3616}
3617
3618#endif
3619
3621
3622#endif
*  *  const_iterator()=default
size_type block_size(const unsigned int i) const
unsigned int size() const
size_type block_start(const unsigned int i) const
std::pair< unsigned int, size_type > global_to_local(const size_type i) const
virtual unsigned int face_to_cell_index(const unsigned int face_dof_index, const unsigned int face, const types::geometric_orientation combined_orientation=numbers::default_geometric_orientation) const override
unsigned int get_first_line_index() const
const unsigned int components
Definition fe_data.h:444
unsigned int n_dofs_per_cell() const
unsigned int get_first_quad_index(const unsigned int quad_no=0) const
unsigned int n_components() const
unsigned int n_unique_faces() const
FiniteElementData(const std::vector< unsigned int > &dofs_per_object, const unsigned int n_components, const unsigned int degree, const Conformity conformity=unknown, const BlockIndices &block_indices=BlockIndices())
Definition fe_data.cc:112
unsigned int get_first_hex_index() const
virtual ~InternalDataBase()=default
InternalDataBase(const InternalDataBase &)=delete
virtual std::size_t memory_consumption() const
bool constraints_are_implemented(const ::internal::SubfaceCase< dim > &subface_case=::internal::SubfaceCase< dim >::case_isotropic) const
bool shape_function_belongs_to(const unsigned int shape_function, const FEValuesExtractors::Vector &components) const
std::pair< unsigned int, types::global_dof_index > system_to_block_index(const unsigned int component) const
bool isotropic_prolongation_is_implemented() const
virtual std::string get_name() const =0
virtual Point< dim > unit_support_point(const unsigned int index) const
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const
const std::vector< unsigned int > n_nonzero_components_table
Definition fe.h:2731
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 const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
const ComponentMask & get_nonzero_components(const unsigned int i) const
virtual void fill_fe_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature< dim > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
std::vector< std::vector< Point< dim - 1 > > > unit_face_support_points
Definition fe.h:2592
bool prolongation_is_implemented() const
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
ComponentMask component_mask(const BlockMask &block_mask) const
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const
ComponentMask component_mask(const FEValuesExtractors::SymmetricTensor< 2 > &sym_tensor) const
virtual std::unique_ptr< InternalDataBase > get_face_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const hp::QCollection< dim - 1 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const
std::pair< unsigned int, unsigned int > component_to_base_index(const unsigned int component) const
virtual Point< dim - 1 > unit_face_support_point(const unsigned int index, const unsigned int face_no=0) const
bool is_primitive(const unsigned int i) const
static std::vector< unsigned int > compute_n_nonzero_components(const std::vector< ComponentMask > &nonzero_components)
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
bool shape_function_belongs_to(const unsigned int shape_function, const FEValuesExtractors::Scalar &component) const
bool has_face_support_points(const unsigned int face_no=0) const
const bool cached_primitivity
Definition fe.h:2738
virtual const FiniteElement< dim, spacedim > & get_sub_fe(const unsigned int first_component, const unsigned int n_selected_components) const
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other, const unsigned int face_no=0) const
ComponentMask component_mask(const FEValuesExtractors::Scalar &scalar) const
bool operator!=(const FiniteElement< dim, spacedim > &) const
ComponentMask component_mask(const FEValuesExtractors::Vector &vector) const
bool has_support_points() const
std::vector< std::vector< FullMatrix< double > > > restriction
Definition fe.h:2547
bool has_generalized_support_points() const
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
std::vector< Table< 2, int > > adjust_quad_dof_index_for_face_orientation_table
Definition fe.h:2621
virtual bool operator==(const FiniteElement< dim, spacedim > &fe) const
bool shape_function_belongs_to(const unsigned int shape_function, const FEValuesExtractors::SymmetricTensor< 2 > &components) const
const std::vector< Point< dim > > & get_unit_support_points() const
virtual void fill_fe_face_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const hp::QCollection< 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
static constexpr unsigned int space_dimension
Definition fe.h:659
BlockIndices base_to_block_indices
Definition fe.h:2683
bool is_primitive() const
void reinit_restriction_and_prolongation_matrices(const bool isotropic_restriction_only=false, const bool isotropic_prolongation_only=false)
const std::vector< Point< dim - 1 > > & get_unit_face_support_points(const unsigned int face_no=0) const
bool isotropic_restriction_is_implemented() const
std::vector< std::vector< Point< dim - 1 > > > generalized_face_support_points
Definition fe.h:2604
std::pair< unsigned int, unsigned int > block_to_base_index(const unsigned int block) const
std::vector< int > adjust_line_dof_index_for_line_orientation_table
Definition fe.h:2634
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
bool restriction_is_additive(const unsigned int index) const
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 FiniteElement< dim, spacedim > & get_sub_fe(const ComponentMask &mask) const
virtual Tensor< 4, dim > shape_4th_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
unsigned int adjust_quad_dof_index_for_face_orientation(const unsigned int index, const unsigned int face_no, const types::geometric_orientation combined_orientation) const
FiniteElement(const FiniteElement< dim, spacedim > &)=default
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix, const unsigned int face_no=0) const
unsigned int component_to_block_index(const unsigned int component) const
BlockMask block_mask(const FEValuesExtractors::Scalar &scalar) const
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const =0
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
virtual Tensor< 3, dim > shape_3rd_derivative(const unsigned int i, const Point< dim > &p) const
std::pair< unsigned int, unsigned int > system_to_component_index(const unsigned int index) const
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > system_to_base_table
Definition fe.h:2670
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
virtual void convert_generalized_support_point_values_to_dof_values(const std::vector< Vector< double > > &support_point_values, std::vector< double > &nodal_values) const
FiniteElement(const FiniteElementData< dim > &fe_data, const std::vector< bool > &restriction_is_additive_flags, const std::vector< ComponentMask > &nonzero_components)
BlockMask block_mask(const FEValuesExtractors::Vector &vector) const
BlockMask block_mask(const ComponentMask &component_mask) const
bool shape_function_belongs_to(const unsigned int shape_function, const FEValuesExtractors::Tensor< 2 > &components) const
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > system_to_base_index(const unsigned int index) const
std::vector< std::pair< unsigned int, unsigned int > > system_to_component_table
Definition fe.h:2639
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > face_system_to_base_index(const unsigned int index, const unsigned int face_no=0) const
virtual Tensor< 3, dim > shape_3rd_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
const FullMatrix< double > & constraints(const ::internal::SubfaceCase< dim > &subface_case=::internal::SubfaceCase< dim >::case_isotropic) const
unsigned int element_multiplicity(const unsigned int index) const
std::pair< std::unique_ptr< FiniteElement< dim, spacedim > >, unsigned int > operator^(const unsigned int multiplicity) const
unsigned int adjust_line_dof_index_for_line_orientation(const unsigned int index, const types::geometric_orientation combined_orientation) const
const std::vector< bool > restriction_is_additive_flags
Definition fe.h:2713
virtual ~FiniteElement() override=default
virtual unsigned int face_to_cell_index(const unsigned int face_dof_index, const unsigned int face, const types::geometric_orientation combined_orientation=numbers::default_geometric_orientation) const
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > component_to_base_table
Definition fe.h:2706
TableIndices< 2 > interface_constraints_size() const
std::vector< std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > > face_system_to_base_table
Definition fe.h:2677
std::vector< Point< dim > > unit_support_points
Definition fe.h:2585
virtual Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
bool restriction_is_implemented() const
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
std::vector< std::vector< std::pair< unsigned int, unsigned int > > > face_system_to_component_table
Definition fe.h:2651
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
FiniteElement(FiniteElement< dim, spacedim > &&)=default
unsigned int n_nonzero_components(const unsigned int i) const
FullMatrix< double > interface_constraints
Definition fe.h:2573
const std::vector< Point< dim > > & get_generalized_support_points() const
BlockMask block_mask(const FEValuesExtractors::SymmetricTensor< 2 > &sym_tensor) const
unsigned int n_base_elements() const
virtual Tensor< 2, dim > shape_grad_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
Table< 2, bool > local_dof_sparsity_pattern
Definition fe.h:2746
virtual double shape_value(const unsigned int i, const Point< dim > &p) const
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix, const unsigned int face_no=0) const
virtual const Table< 2, bool > & get_local_dof_sparsity_pattern() const
virtual std::size_t memory_consumption() const
virtual Tensor< 4, dim > shape_4th_derivative(const unsigned int i, const Point< dim > &p) const
GeometryPrimitive get_associated_geometry_primitive(const unsigned int cell_dof_index) const
std::vector< Point< dim > > generalized_support_points
Definition fe.h:2598
unsigned int component_to_system_index(const unsigned int component, const unsigned int index) const
const std::vector< ComponentMask > nonzero_components
Definition fe.h:2722
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
std::pair< unsigned int, unsigned int > face_system_to_component_index(const unsigned int index, const unsigned int face_no=0) const
virtual bool hp_constraints_are_implemented() const
std::vector< std::vector< FullMatrix< double > > > prolongation
Definition fe.h:2561
types::global_dof_index first_block_of_base(const unsigned int b) const
Abstract base class for mapping classes.
Definition mapping.h:318
Definition point.h:111
static constexpr unsigned int n_independent_components
static constexpr unsigned int n_independent_components
Definition tensor.h:496
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
#define DeclException0(Exception0)
static ::ExceptionBase & ExcShapeFunctionNotPrimitive(int arg1)
#define Assert(cond, exc)
static ::ExceptionBase & ExcWrongInterfaceMatrixSize(int arg1, int arg2)
#define DeclException2(Exception2, type1, type2, outsequence)
static ::ExceptionBase & ExcUnitShapeValuesDoNotExist()
static ::ExceptionBase & ExcProjectionVoid()
#define AssertIndexRange(index, range)
#define DeclExceptionMsg(Exception, defaulttext)
static ::ExceptionBase & ExcFENotPrimitive()
static ::ExceptionBase & ExcEmbeddingVoid()
#define DeclException1(Exception1, type1, outsequence)
static ::ExceptionBase & ExcInterpolationNotImplemented()
static ::ExceptionBase & ExcMessage(std::string arg1)
static ::ExceptionBase & ExcFEHasNoSupportPoints()
TriaIterator< CellAccessor< dim, spacedim > > cell_iterator
Definition tria.h:1624
MappingQ< dim, spacedim > StaticMappingQ1< dim, spacedim >::mapping
Definition mapping_q1.h:101
*  *  *  ScaleZFunction< dim, Number, components >::ScaleZFunction *  component(component)
std::string int_to_string(const unsigned int value, const unsigned int digits=numbers::invalid_unsigned_int)
Definition utilities.cc:464
constexpr types::geometric_orientation default_geometric_orientation
Definition types.h:350
unsigned int global_dof_index
Definition types.h:92
std::uint8_t geometric_orientation
Definition types.h:38