16 #ifndef dealii_fe_values_h 17 #define dealii_fe_values_h 20 #include <deal.II/base/config.h> 22 #include <deal.II/base/derivative_form.h> 23 #include <deal.II/base/exceptions.h> 24 #include <deal.II/base/point.h> 25 #include <deal.II/base/quadrature.h> 26 #include <deal.II/base/subscriptor.h> 28 #include <deal.II/base/table.h> 29 #include <deal.II/base/vector_slice.h> 31 #include <deal.II/dofs/dof_accessor.h> 32 #include <deal.II/dofs/dof_handler.h> 34 #include <deal.II/fe/fe.h> 35 #include <deal.II/fe/fe_update_flags.h> 36 #include <deal.II/fe/fe_values_extractors.h> 37 #include <deal.II/fe/mapping.h> 39 #include <deal.II/grid/tria.h> 40 #include <deal.II/grid/tria_iterator.h> 42 #include <deal.II/hp/dof_handler.h> 46 #include <type_traits> 52 #ifdef DEAL_II_WITH_PETSC 56 DEAL_II_NAMESPACE_OPEN
58 template <
int dim,
int spacedim = dim>
67 template <
int dim,
class NumberType =
double>
76 template <
class NumberType>
88 template <
class NumberType>
100 template <
class NumberType>
143 template <
int dim,
int spacedim = dim>
179 template <
typename Number>
261 const unsigned int component);
284 value(
const unsigned int shape_function,
const unsigned int q_point)
const;
297 gradient(
const unsigned int shape_function,
298 const unsigned int q_point)
const;
311 hessian(
const unsigned int shape_function,
312 const unsigned int q_point)
const;
325 third_derivative(
const unsigned int shape_function,
326 const unsigned int q_point)
const;
345 template <
class InputVector>
348 const InputVector &fe_function,
350 typename InputVector::value_type>::type>
375 template <
class InputVector>
377 get_function_values_from_local_dof_values(
378 const InputVector &dof_values,
400 template <
class InputVector>
402 get_function_gradients(
403 const InputVector &fe_function,
405 typename InputVector::value_type>::type>
411 template <
class InputVector>
413 get_function_gradients_from_local_dof_values(
414 const InputVector &dof_values,
436 template <
class InputVector>
438 get_function_hessians(
439 const InputVector &fe_function,
441 typename InputVector::value_type>::type>
447 template <
class InputVector>
449 get_function_hessians_from_local_dof_values(
450 const InputVector &dof_values,
474 template <
class InputVector>
476 get_function_laplacians(
477 const InputVector &fe_function,
479 typename InputVector::value_type>::type>
485 template <
class InputVector>
487 get_function_laplacians_from_local_dof_values(
488 const InputVector &dof_values,
512 template <
class InputVector>
514 get_function_third_derivatives(
515 const InputVector &fe_function,
517 typename InputVector::value_type>::type>
518 &third_derivatives)
const;
523 template <
class InputVector>
525 get_function_third_derivatives_from_local_dof_values(
526 const InputVector & dof_values,
580 template <
int dim,
int spacedim = dim>
626 using curl_type = typename ::internal::CurlType<spacedim>::type;
646 template <
typename Number>
728 bool is_nonzero_shape_function_component[spacedim];
739 unsigned int row_index[spacedim];
750 unsigned int single_nonzero_component_index;
767 const unsigned int first_vector_component);
793 value(
const unsigned int shape_function,
const unsigned int q_point)
const;
809 gradient(
const unsigned int shape_function,
810 const unsigned int q_point)
const;
828 symmetric_gradient(
const unsigned int shape_function,
829 const unsigned int q_point)
const;
842 divergence(
const unsigned int shape_function,
843 const unsigned int q_point)
const;
866 curl(
const unsigned int shape_function,
const unsigned int q_point)
const;
879 hessian(
const unsigned int shape_function,
880 const unsigned int q_point)
const;
893 third_derivative(
const unsigned int shape_function,
894 const unsigned int q_point)
const;
913 template <
class InputVector>
916 const InputVector &fe_function,
918 typename InputVector::value_type>::type>
943 template <
class InputVector>
945 get_function_values_from_local_dof_values(
946 const InputVector &dof_values,
968 template <
class InputVector>
970 get_function_gradients(
971 const InputVector &fe_function,
973 typename InputVector::value_type>::type>
979 template <
class InputVector>
981 get_function_gradients_from_local_dof_values(
982 const InputVector &dof_values,
1010 template <
class InputVector>
1012 get_function_symmetric_gradients(
1013 const InputVector &fe_function,
1015 typename InputVector::value_type>::type>
1016 &symmetric_gradients)
const;
1021 template <
class InputVector>
1023 get_function_symmetric_gradients_from_local_dof_values(
1024 const InputVector & dof_values,
1046 template <
class InputVector>
1048 get_function_divergences(
1049 const InputVector &fe_function,
1051 typename InputVector::value_type>::type>
1052 &divergences)
const;
1057 template <
class InputVector>
1059 get_function_divergences_from_local_dof_values(
1060 const InputVector &dof_values,
1063 &divergences)
const;
1083 template <
class InputVector>
1086 const InputVector &fe_function,
1088 typename ProductType<curl_type, typename InputVector::value_type>::type>
1094 template <
class InputVector>
1096 get_function_curls_from_local_dof_values(
1097 const InputVector &dof_values,
1119 template <
class InputVector>
1121 get_function_hessians(
1122 const InputVector &fe_function,
1124 typename InputVector::value_type>::type>
1130 template <
class InputVector>
1132 get_function_hessians_from_local_dof_values(
1133 const InputVector &dof_values,
1156 template <
class InputVector>
1158 get_function_laplacians(
1159 const InputVector &fe_function,
1161 typename InputVector::value_type>::type>
1167 template <
class InputVector>
1169 get_function_laplacians_from_local_dof_values(
1170 const InputVector &dof_values,
1193 template <
class InputVector>
1195 get_function_third_derivatives(
1196 const InputVector &fe_function,
1198 typename InputVector::value_type>::type>
1199 &third_derivatives)
const;
1204 template <
class InputVector>
1206 get_function_third_derivatives_from_local_dof_values(
1207 const InputVector & dof_values,
1230 template <
int rank,
int dim,
int spacedim = dim>
1257 template <
int dim,
int spacedim>
1284 template <
typename Number>
1293 typename SymmetricTensor<2, dim, spacedim>::value_type>::type;
1301 typename SymmetricTensor<2, dim, spacedim>::divergence_type>::type;
1308 struct ShapeFunctionData
1318 bool is_nonzero_shape_function_component
1319 [value_type::n_independent_components];
1330 unsigned int row_index[value_type::n_independent_components];
1363 const unsigned int first_tensor_component);
1390 value(
const unsigned int shape_function,
const unsigned int q_point)
const;
1406 divergence(
const unsigned int shape_function,
1407 const unsigned int q_point)
const;
1426 template <
class InputVector>
1428 get_function_values(
1429 const InputVector &fe_function,
1431 typename InputVector::value_type>::type>
1456 template <
class InputVector>
1458 get_function_values_from_local_dof_values(
1459 const InputVector &dof_values,
1485 template <
class InputVector>
1487 get_function_divergences(
1488 const InputVector &fe_function,
1490 typename InputVector::value_type>::type>
1491 &divergences)
const;
1496 template <
class InputVector>
1498 get_function_divergences_from_local_dof_values(
1499 const InputVector &dof_values,
1502 &divergences)
const;
1523 template <
int rank,
int dim,
int spacedim = dim>
1546 template <
int dim,
int spacedim>
1571 template <
typename Number>
1588 typename Tensor<2, dim, spacedim>::divergence_type>::type;
1596 typename Tensor<2, dim, spacedim>::gradient_type>::type;
1603 struct ShapeFunctionData
1613 bool is_nonzero_shape_function_component
1614 [value_type::n_independent_components];
1625 unsigned int row_index[value_type::n_independent_components];
1658 const unsigned int first_tensor_component);
1685 value(
const unsigned int shape_function,
const unsigned int q_point)
const;
1701 divergence(
const unsigned int shape_function,
1702 const unsigned int q_point)
const;
1718 gradient(
const unsigned int shape_function,
1719 const unsigned int q_point)
const;
1738 template <
class InputVector>
1740 get_function_values(
1741 const InputVector &fe_function,
1743 typename InputVector::value_type>::type>
1768 template <
class InputVector>
1770 get_function_values_from_local_dof_values(
1771 const InputVector &dof_values,
1797 template <
class InputVector>
1799 get_function_divergences(
1800 const InputVector &fe_function,
1802 typename InputVector::value_type>::type>
1803 &divergences)
const;
1808 template <
class InputVector>
1810 get_function_divergences_from_local_dof_values(
1811 const InputVector &dof_values,
1814 &divergences)
const;
1832 template <
class InputVector>
1834 get_function_gradients(
1835 const InputVector &fe_function,
1837 typename InputVector::value_type>::type>
1843 template <
class InputVector>
1845 get_function_gradients_from_local_dof_values(
1846 const InputVector &dof_values,
1883 template <
int dim,
int spacedim>
1890 std::vector<::FEValuesViews::Scalar<dim, spacedim>>
scalars;
1891 std::vector<::FEValuesViews::Vector<dim, spacedim>> vectors;
1892 std::vector<::FEValuesViews::SymmetricTensor<2, dim, spacedim>>
1893 symmetric_second_order_tensors;
1894 std::vector<::FEValuesViews::Tensor<2, dim, spacedim>>
1895 second_order_tensors;
2009 template <
int dim,
int spacedim>
2016 static const unsigned int dimension = dim;
2021 static const unsigned int space_dimension = spacedim;
2044 const unsigned int dofs_per_cell,
2081 shape_value(
const unsigned int function_no,
2082 const unsigned int point_no)
const;
2105 shape_value_component(
const unsigned int function_no,
2106 const unsigned int point_no,
2107 const unsigned int component)
const;
2135 shape_grad(
const unsigned int function_no,
2136 const unsigned int quadrature_point)
const;
2155 shape_grad_component(
const unsigned int function_no,
2156 const unsigned int point_no,
2157 const unsigned int component)
const;
2179 shape_hessian(
const unsigned int function_no,
2180 const unsigned int point_no)
const;
2199 shape_hessian_component(
const unsigned int function_no,
2200 const unsigned int point_no,
2201 const unsigned int component)
const;
2223 shape_3rd_derivative(
const unsigned int function_no,
2224 const unsigned int point_no)
const;
2243 shape_3rd_derivative_component(
const unsigned int function_no,
2244 const unsigned int point_no,
2245 const unsigned int component)
const;
2289 template <
class InputVector>
2291 get_function_values(
2292 const InputVector & fe_function,
2293 std::vector<typename InputVector::value_type> &values)
const;
2308 template <
class InputVector>
2310 get_function_values(
2311 const InputVector & fe_function,
2312 std::vector<Vector<typename InputVector::value_type>> &values)
const;
2332 template <
class InputVector>
2334 get_function_values(
2335 const InputVector & fe_function,
2336 const VectorSlice<
const std::vector<types::global_dof_index>> &indices,
2337 std::vector<typename InputVector::value_type> &values)
const;
2360 template <
class InputVector>
2362 get_function_values(
2363 const InputVector & fe_function,
2364 const VectorSlice<
const std::vector<types::global_dof_index>> &indices,
2365 std::vector<Vector<typename InputVector::value_type>> &values)
const;
2398 template <
class InputVector>
2400 get_function_values(
2401 const InputVector & fe_function,
2402 const VectorSlice<
const std::vector<types::global_dof_index>> &indices,
2403 VectorSlice<std::vector<std::vector<typename InputVector::value_type>>>
2405 const bool quadrature_points_fastest)
const;
2449 template <
class InputVector>
2451 get_function_gradients(
2452 const InputVector &fe_function,
2472 template <
class InputVector>
2474 get_function_gradients(
2475 const InputVector &fe_function,
2486 template <
class InputVector>
2488 get_function_gradients(
2489 const InputVector & fe_function,
2490 const VectorSlice<
const std::vector<types::global_dof_index>> &indices,
2500 template <
class InputVector>
2502 get_function_gradients(
2503 const InputVector & fe_function,
2504 const VectorSlice<
const std::vector<types::global_dof_index>> &indices,
2508 bool quadrature_points_fastest =
false)
const;
2554 template <
class InputVector>
2556 get_function_hessians(
2557 const InputVector &fe_function,
2578 template <
class InputVector>
2580 get_function_hessians(
2581 const InputVector &fe_function,
2585 bool quadrature_points_fastest =
false)
const;
2591 template <
class InputVector>
2593 get_function_hessians(
2594 const InputVector & fe_function,
2595 const VectorSlice<
const std::vector<types::global_dof_index>> &indices,
2605 template <
class InputVector>
2607 get_function_hessians(
2608 const InputVector & fe_function,
2609 const VectorSlice<
const std::vector<types::global_dof_index>> &indices,
2613 bool quadrature_points_fastest =
false)
const;
2657 template <
class InputVector>
2659 get_function_laplacians(
2660 const InputVector & fe_function,
2661 std::vector<typename InputVector::value_type> &laplacians)
const;
2682 template <
class InputVector>
2684 get_function_laplacians(
2685 const InputVector & fe_function,
2686 std::vector<Vector<typename InputVector::value_type>> &laplacians)
const;
2694 template <
class InputVector>
2696 get_function_laplacians(
2697 const InputVector & fe_function,
2698 const VectorSlice<
const std::vector<types::global_dof_index>> &indices,
2699 std::vector<typename InputVector::value_type> &laplacians)
const;
2707 template <
class InputVector>
2709 get_function_laplacians(
2710 const InputVector & fe_function,
2711 const VectorSlice<
const std::vector<types::global_dof_index>> &indices,
2712 std::vector<Vector<typename InputVector::value_type>> &laplacians)
const;
2720 template <
class InputVector>
2722 get_function_laplacians(
2723 const InputVector & fe_function,
2724 const VectorSlice<
const std::vector<types::global_dof_index>> &indices,
2725 std::vector<std::vector<typename InputVector::value_type>> & laplacians,
2726 bool quadrature_points_fastest =
false)
const;
2772 template <
class InputVector>
2774 get_function_third_derivatives(
2775 const InputVector &fe_function,
2777 &third_derivatives)
const;
2797 template <
class InputVector>
2799 get_function_third_derivatives(
2800 const InputVector &fe_function,
2803 & third_derivatives,
2804 bool quadrature_points_fastest =
false)
const;
2810 template <
class InputVector>
2812 get_function_third_derivatives(
2813 const InputVector & fe_function,
2814 const VectorSlice<
const std::vector<types::global_dof_index>> &indices,
2816 &third_derivatives)
const;
2824 template <
class InputVector>
2826 get_function_third_derivatives(
2827 const InputVector & fe_function,
2828 const VectorSlice<
const std::vector<types::global_dof_index>> &indices,
2832 bool quadrature_points_fastest =
false)
const;
2844 quadrature_point(
const unsigned int q)
const;
2851 const std::vector<Point<spacedim>> &
2852 get_quadrature_points()
const;
2870 JxW(
const unsigned int quadrature_point)
const;
2875 const std::vector<double> &
2876 get_JxW_values()
const;
2885 jacobian(
const unsigned int quadrature_point)
const;
2893 const std::vector<DerivativeForm<1, dim, spacedim>> &
2894 get_jacobians()
const;
2904 jacobian_grad(
const unsigned int quadrature_point)
const;
2912 const std::vector<DerivativeForm<2, dim, spacedim>> &
2913 get_jacobian_grads()
const;
2924 jacobian_pushed_forward_grad(
const unsigned int quadrature_point)
const;
2932 const std::vector<Tensor<3, spacedim>> &
2933 get_jacobian_pushed_forward_grads()
const;
2943 jacobian_2nd_derivative(
const unsigned int quadrature_point)
const;
2951 const std::vector<DerivativeForm<3, dim, spacedim>> &
2952 get_jacobian_2nd_derivatives()
const;
2964 jacobian_pushed_forward_2nd_derivative(
2965 const unsigned int quadrature_point)
const;
2973 const std::vector<Tensor<4, spacedim>> &
2974 get_jacobian_pushed_forward_2nd_derivatives()
const;
2985 jacobian_3rd_derivative(
const unsigned int quadrature_point)
const;
2993 const std::vector<DerivativeForm<4, dim, spacedim>> &
2994 get_jacobian_3rd_derivatives()
const;
3006 jacobian_pushed_forward_3rd_derivative(
3007 const unsigned int quadrature_point)
const;
3015 const std::vector<Tensor<5, spacedim>> &
3016 get_jacobian_pushed_forward_3rd_derivatives()
const;
3025 inverse_jacobian(
const unsigned int quadrature_point)
const;
3033 const std::vector<DerivativeForm<1, spacedim, dim>> &
3034 get_inverse_jacobians()
const;
3050 normal_vector(
const unsigned int i)
const;
3063 const std::vector<Tensor<1, spacedim>> &
3064 get_all_normal_vectors()
const;
3073 const std::vector<Tensor<1, spacedim>> &
3074 get_normal_vectors()
const;
3136 get_mapping()
const;
3148 get_update_flags()
const;
3162 get_cell_similarity()
const;
3169 memory_consumption()
const;
3182 <<
"You are requesting information from an FEValues/FEFaceValues/FESubfaceValues " 3183 <<
"object for which this kind of information has not been computed. What " 3184 <<
"information these objects compute is determined by the update_* flags you " 3185 <<
"pass to the constructor. Here, the operation you are attempting requires " 3187 <<
"> flag to be set, but it was apparently not specified " 3188 <<
"upon construction.");
3198 "The FiniteElement you provided to FEValues and the FiniteElement that belongs " 3199 "to the DoFHandler that provided the cell iterator do not match.");
3207 <<
"The shape function with index " << arg1
3208 <<
" is not primitive, i.e. it is vector-valued and " 3209 <<
"has more than one non-zero vector component. This " 3210 <<
"function cannot be called for these shape functions. " 3211 <<
"Maybe you want to use the same function with the " 3212 <<
"_component suffix?");
3222 "The given FiniteElement is not a primitive element but the requested operation " 3223 "only works for those. See FiniteElement::is_primitive() for more information.");
3254 class CellIteratorBase;
3260 template <
typename CI>
3295 invalidate_present_cell();
3307 maybe_invalidate_previous_present_cell(
3321 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>
3345 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
3371 compute_update_flags(
const UpdateFlags update_flags)
const;
3386 check_cell_similarity(
3416 template <
int,
int,
int>
3417 friend class FEValuesViews::SymmetricTensor;
3418 template <
int,
int,
int>
3419 friend class FEValuesViews::Tensor;
3434 template <
int dim,
int spacedim = dim>
3442 static const unsigned int integral_dimension = dim;
3468 template <
template <
int,
int>
class DoFHandlerType,
bool level_dof_access>
3471 level_dof_access>> &cell);
3494 get_quadrature()
const;
3501 memory_consumption()
const;
3518 get_present_fe_values()
const;
3553 template <
int dim,
int spacedim = dim>
3561 static const unsigned int integral_dimension = dim - 1;
3575 const unsigned int dofs_per_cell,
3589 boundary_form(
const unsigned int i)
const;
3597 const std::vector<Tensor<1, spacedim>> &
3598 get_boundary_forms()
const;
3605 get_face_index()
const;
3612 get_quadrature()
const;
3619 memory_consumption()
const;
3650 template <
int dim,
int spacedim = dim>
3658 static const unsigned int dimension = dim;
3660 static const unsigned int space_dimension = spacedim;
3666 static const unsigned int integral_dimension = dim - 1;
3690 template <
template <
int,
int>
class DoFHandlerType,
bool level_dof_access>
3693 level_dof_access>> &cell,
3694 const unsigned int face_no);
3711 const unsigned int face_no);
3728 get_present_fe_values()
const;
3744 do_reinit(
const unsigned int face_no);
3765 template <
int dim,
int spacedim = dim>
3772 static const unsigned int dimension = dim;
3777 static const unsigned int space_dimension = spacedim;
3783 static const unsigned int integral_dimension = dim - 1;
3809 template <
template <
int,
int>
class DoFHandlerType,
bool level_dof_access>
3812 level_dof_access>> &cell,
3813 const unsigned int face_no,
3814 const unsigned int subface_no);
3831 const unsigned int face_no,
3832 const unsigned int subface_no);
3849 get_present_fe_values()
const;
3879 do_reinit(
const unsigned int face_no,
const unsigned int subface_no);
3890 template <
int dim,
int spacedim>
3891 inline typename Scalar<dim, spacedim>::value_type
3892 Scalar<dim, spacedim>::value(
const unsigned int shape_function,
3893 const unsigned int q_point)
const 3895 Assert(shape_function < fe_values->fe->dofs_per_cell,
3896 ExcIndexRange(shape_function, 0, fe_values->fe->dofs_per_cell));
3900 "update_values"))));
3905 if (shape_function_data[shape_function].is_nonzero_shape_function_component)
3906 return fe_values->finite_element_output.shape_values(
3907 shape_function_data[shape_function].row_index, q_point);
3914 template <
int dim,
int spacedim>
3915 inline typename Scalar<dim, spacedim>::gradient_type
3916 Scalar<dim, spacedim>::gradient(
const unsigned int shape_function,
3917 const unsigned int q_point)
const 3919 Assert(shape_function < fe_values->fe->dofs_per_cell,
3920 ExcIndexRange(shape_function, 0, fe_values->fe->dofs_per_cell));
3923 "update_gradients")));
3928 if (shape_function_data[shape_function].is_nonzero_shape_function_component)
3929 return fe_values->finite_element_output
3930 .shape_gradients[shape_function_data[shape_function].row_index]
3933 return gradient_type();
3938 template <
int dim,
int spacedim>
3939 inline typename Scalar<dim, spacedim>::hessian_type
3940 Scalar<dim, spacedim>::hessian(
const unsigned int shape_function,
3941 const unsigned int q_point)
const 3943 Assert(shape_function < fe_values->fe->dofs_per_cell,
3944 ExcIndexRange(shape_function, 0, fe_values->fe->dofs_per_cell));
3947 "update_hessians")));
3952 if (shape_function_data[shape_function].is_nonzero_shape_function_component)
3953 return fe_values->finite_element_output
3954 .shape_hessians[shape_function_data[shape_function].row_index][q_point];
3956 return hessian_type();
3961 template <
int dim,
int spacedim>
3962 inline typename Scalar<dim, spacedim>::third_derivative_type
3963 Scalar<dim, spacedim>::third_derivative(
const unsigned int shape_function,
3964 const unsigned int q_point)
const 3966 Assert(shape_function < fe_values->fe->dofs_per_cell,
3967 ExcIndexRange(shape_function, 0, fe_values->fe->dofs_per_cell));
3970 "update_3rd_derivatives")));
3975 if (shape_function_data[shape_function].is_nonzero_shape_function_component)
3976 return fe_values->finite_element_output
3977 .shape_3rd_derivatives[shape_function_data[shape_function].row_index]
3980 return third_derivative_type();
3985 template <
int dim,
int spacedim>
3987 Vector<dim, spacedim>::value(
const unsigned int shape_function,
3988 const unsigned int q_point)
const 3990 Assert(shape_function < fe_values->fe->dofs_per_cell,
3991 ExcIndexRange(shape_function, 0, fe_values->fe->dofs_per_cell));
3998 shape_function_data[shape_function].single_nonzero_component;
4000 return value_type();
4003 value_type return_value;
4004 return_value[shape_function_data[shape_function]
4005 .single_nonzero_component_index] =
4006 fe_values->finite_element_output.shape_values(snc, q_point);
4007 return return_value;
4011 value_type return_value;
4012 for (
unsigned int d = 0; d < dim; ++d)
4013 if (shape_function_data[shape_function]
4014 .is_nonzero_shape_function_component[d])
4015 return_value[d] = fe_values->finite_element_output.shape_values(
4016 shape_function_data[shape_function].row_index[d], q_point);
4018 return return_value;
4024 template <
int dim,
int spacedim>
4025 inline typename Vector<dim, spacedim>::gradient_type
4026 Vector<dim, spacedim>::gradient(
const unsigned int shape_function,
4027 const unsigned int q_point)
const 4029 Assert(shape_function < fe_values->fe->dofs_per_cell,
4030 ExcIndexRange(shape_function, 0, fe_values->fe->dofs_per_cell));
4033 "update_gradients")));
4037 shape_function_data[shape_function].single_nonzero_component;
4039 return gradient_type();
4042 gradient_type return_value;
4043 return_value[shape_function_data[shape_function]
4044 .single_nonzero_component_index] =
4045 fe_values->finite_element_output.shape_gradients[snc][q_point];
4046 return return_value;
4050 gradient_type return_value;
4051 for (
unsigned int d = 0; d < dim; ++d)
4052 if (shape_function_data[shape_function]
4053 .is_nonzero_shape_function_component[d])
4055 fe_values->finite_element_output.shape_gradients
4056 [shape_function_data[shape_function].row_index[d]][q_point];
4058 return return_value;
4064 template <
int dim,
int spacedim>
4065 inline typename Vector<dim, spacedim>::divergence_type
4066 Vector<dim, spacedim>::divergence(
const unsigned int shape_function,
4067 const unsigned int q_point)
const 4070 Assert(shape_function < fe_values->fe->dofs_per_cell,
4071 ExcIndexRange(shape_function, 0, fe_values->fe->dofs_per_cell));
4074 "update_gradients")));
4078 shape_function_data[shape_function].single_nonzero_component;
4080 return divergence_type();
4082 return fe_values->finite_element_output
4083 .shape_gradients[snc][q_point][shape_function_data[shape_function]
4084 .single_nonzero_component_index];
4087 divergence_type return_value = 0;
4088 for (
unsigned int d = 0; d < dim; ++d)
4089 if (shape_function_data[shape_function]
4090 .is_nonzero_shape_function_component[d])
4092 fe_values->finite_element_output.shape_gradients
4093 [shape_function_data[shape_function].row_index[d]][q_point][d];
4095 return return_value;
4101 template <
int dim,
int spacedim>
4102 inline typename Vector<dim, spacedim>::curl_type
4103 Vector<dim, spacedim>::curl(
const unsigned int shape_function,
4104 const unsigned int q_point)
const 4108 Assert(shape_function < fe_values->fe->dofs_per_cell,
4109 ExcIndexRange(shape_function, 0, fe_values->fe->dofs_per_cell));
4112 "update_gradients")));
4115 shape_function_data[shape_function].single_nonzero_component;
4127 "Computing the curl in 1d is not a useful operation"));
4135 curl_type return_value;
4138 if (shape_function_data[shape_function]
4139 .single_nonzero_component_index == 0)
4141 -1.0 * fe_values->finite_element_output
4142 .shape_gradients[snc][q_point][1];
4144 return_value[0] = fe_values->finite_element_output
4145 .shape_gradients[snc][q_point][0];
4147 return return_value;
4152 curl_type return_value;
4154 return_value[0] = 0.0;
4156 if (shape_function_data[shape_function]
4157 .is_nonzero_shape_function_component[0])
4159 fe_values->finite_element_output
4160 .shape_gradients[shape_function_data[shape_function]
4161 .row_index[0]][q_point][1];
4163 if (shape_function_data[shape_function]
4164 .is_nonzero_shape_function_component[1])
4166 fe_values->finite_element_output
4167 .shape_gradients[shape_function_data[shape_function]
4168 .row_index[1]][q_point][0];
4170 return return_value;
4178 curl_type return_value;
4180 switch (shape_function_data[shape_function]
4181 .single_nonzero_component_index)
4185 return_value[0] = 0;
4186 return_value[1] = fe_values->finite_element_output
4187 .shape_gradients[snc][q_point][2];
4189 -1.0 * fe_values->finite_element_output
4190 .shape_gradients[snc][q_point][1];
4191 return return_value;
4197 -1.0 * fe_values->finite_element_output
4198 .shape_gradients[snc][q_point][2];
4199 return_value[1] = 0;
4200 return_value[2] = fe_values->finite_element_output
4201 .shape_gradients[snc][q_point][0];
4202 return return_value;
4207 return_value[0] = fe_values->finite_element_output
4208 .shape_gradients[snc][q_point][1];
4210 -1.0 * fe_values->finite_element_output
4211 .shape_gradients[snc][q_point][0];
4212 return_value[2] = 0;
4213 return return_value;
4220 curl_type return_value;
4222 for (
unsigned int i = 0; i < dim; ++i)
4223 return_value[i] = 0.0;
4225 if (shape_function_data[shape_function]
4226 .is_nonzero_shape_function_component[0])
4229 fe_values->finite_element_output
4230 .shape_gradients[shape_function_data[shape_function]
4231 .row_index[0]][q_point][2];
4233 fe_values->finite_element_output
4234 .shape_gradients[shape_function_data[shape_function]
4235 .row_index[0]][q_point][1];
4238 if (shape_function_data[shape_function]
4239 .is_nonzero_shape_function_component[1])
4242 fe_values->finite_element_output
4243 .shape_gradients[shape_function_data[shape_function]
4244 .row_index[1]][q_point][2];
4246 fe_values->finite_element_output
4247 .shape_gradients[shape_function_data[shape_function]
4248 .row_index[1]][q_point][0];
4251 if (shape_function_data[shape_function]
4252 .is_nonzero_shape_function_component[2])
4255 fe_values->finite_element_output
4256 .shape_gradients[shape_function_data[shape_function]
4257 .row_index[2]][q_point][1];
4259 fe_values->finite_element_output
4260 .shape_gradients[shape_function_data[shape_function]
4261 .row_index[2]][q_point][0];
4264 return return_value;
4275 template <
int dim,
int spacedim>
4276 inline typename Vector<dim, spacedim>::hessian_type
4277 Vector<dim, spacedim>::hessian(
const unsigned int shape_function,
4278 const unsigned int q_point)
const 4281 Assert(shape_function < fe_values->fe->dofs_per_cell,
4282 ExcIndexRange(shape_function, 0, fe_values->fe->dofs_per_cell));
4285 "update_hessians")));
4289 shape_function_data[shape_function].single_nonzero_component;
4291 return hessian_type();
4294 hessian_type return_value;
4295 return_value[shape_function_data[shape_function]
4296 .single_nonzero_component_index] =
4297 fe_values->finite_element_output.shape_hessians[snc][q_point];
4298 return return_value;
4302 hessian_type return_value;
4303 for (
unsigned int d = 0; d < dim; ++d)
4304 if (shape_function_data[shape_function]
4305 .is_nonzero_shape_function_component[d])
4307 fe_values->finite_element_output.shape_hessians
4308 [shape_function_data[shape_function].row_index[d]][q_point];
4310 return return_value;
4316 template <
int dim,
int spacedim>
4317 inline typename Vector<dim, spacedim>::third_derivative_type
4318 Vector<dim, spacedim>::third_derivative(
const unsigned int shape_function,
4319 const unsigned int q_point)
const 4322 Assert(shape_function < fe_values->fe->dofs_per_cell,
4323 ExcIndexRange(shape_function, 0, fe_values->fe->dofs_per_cell));
4326 "update_3rd_derivatives")));
4330 shape_function_data[shape_function].single_nonzero_component;
4332 return third_derivative_type();
4335 third_derivative_type return_value;
4336 return_value[shape_function_data[shape_function]
4337 .single_nonzero_component_index] =
4338 fe_values->finite_element_output.shape_3rd_derivatives[snc][q_point];
4339 return return_value;
4343 third_derivative_type return_value;
4344 for (
unsigned int d = 0; d < dim; ++d)
4345 if (shape_function_data[shape_function]
4346 .is_nonzero_shape_function_component[d])
4348 fe_values->finite_element_output.shape_3rd_derivatives
4349 [shape_function_data[shape_function].row_index[d]][q_point];
4351 return return_value;
4363 inline ::SymmetricTensor<2, 1>
4364 symmetrize_single_row(
const unsigned int n, const ::Tensor<1, 1> &t)
4369 const double array[1] = {t[0]};
4370 return ::SymmetricTensor<2, 1>(array);
4375 inline ::SymmetricTensor<2, 2>
4376 symmetrize_single_row(
const unsigned int n, const ::Tensor<1, 2> &t)
4382 const double array[3] = {t[0], 0, t[1] / 2};
4383 return ::SymmetricTensor<2, 2>(array);
4387 const double array[3] = {0, t[1], t[0] / 2};
4388 return ::SymmetricTensor<2, 2>(array);
4393 return ::SymmetricTensor<2, 2>();
4400 inline ::SymmetricTensor<2, 3>
4401 symmetrize_single_row(
const unsigned int n, const ::Tensor<1, 3> &t)
4407 const double array[6] = {t[0], 0, 0, t[1] / 2, t[2] / 2, 0};
4408 return ::SymmetricTensor<2, 3>(array);
4412 const double array[6] = {0, t[1], 0, t[0] / 2, 0, t[2] / 2};
4413 return ::SymmetricTensor<2, 3>(array);
4417 const double array[6] = {0, 0, t[2], 0, t[0] / 2, t[1] / 2};
4418 return ::SymmetricTensor<2, 3>(array);
4423 return ::SymmetricTensor<2, 3>();
4431 template <
int dim,
int spacedim>
4432 inline typename Vector<dim, spacedim>::symmetric_gradient_type
4433 Vector<dim, spacedim>::symmetric_gradient(
const unsigned int shape_function,
4434 const unsigned int q_point)
const 4436 Assert(shape_function < fe_values->fe->dofs_per_cell,
4437 ExcIndexRange(shape_function, 0, fe_values->fe->dofs_per_cell));
4440 "update_gradients")));
4444 shape_function_data[shape_function].single_nonzero_component;
4446 return symmetric_gradient_type();
4448 return internal::symmetrize_single_row(
4449 shape_function_data[shape_function].single_nonzero_component_index,
4450 fe_values->finite_element_output.shape_gradients[snc][q_point]);
4453 gradient_type return_value;
4454 for (
unsigned int d = 0; d < dim; ++d)
4455 if (shape_function_data[shape_function]
4456 .is_nonzero_shape_function_component[d])
4458 fe_values->finite_element_output.shape_gradients
4459 [shape_function_data[shape_function].row_index[d]][q_point];
4467 template <
int dim,
int spacedim>
4470 const unsigned int q_point)
const 4472 Assert(shape_function < fe_values->fe->dofs_per_cell,
4473 ExcIndexRange(shape_function, 0, fe_values->fe->dofs_per_cell));
4481 shape_function_data[shape_function].single_nonzero_component;
4486 return value_type();
4490 value_type return_value;
4491 const unsigned int comp =
4492 shape_function_data[shape_function].single_nonzero_component_index;
4493 return_value[value_type::unrolled_to_component_indices(comp)] =
4494 fe_values->finite_element_output.shape_values(snc, q_point);
4495 return return_value;
4499 value_type return_value;
4500 for (
unsigned int d = 0; d < value_type::n_independent_components; ++d)
4501 if (shape_function_data[shape_function]
4502 .is_nonzero_shape_function_component[d])
4503 return_value[value_type::unrolled_to_component_indices(d)] =
4504 fe_values->finite_element_output.shape_values(
4505 shape_function_data[shape_function].row_index[d], q_point);
4506 return return_value;
4512 template <
int dim,
int spacedim>
4515 const unsigned int shape_function,
4516 const unsigned int q_point)
const 4518 Assert(shape_function < fe_values->fe->dofs_per_cell,
4519 ExcIndexRange(shape_function, 0, fe_values->fe->dofs_per_cell));
4522 "update_gradients")));
4525 shape_function_data[shape_function].single_nonzero_component;
4530 return divergence_type();
4553 const unsigned int comp =
4554 shape_function_data[shape_function].single_nonzero_component_index;
4555 const unsigned int ii =
4556 value_type::unrolled_to_component_indices(comp)[0];
4557 const unsigned int jj =
4558 value_type::unrolled_to_component_indices(comp)[1];
4571 const ::Tensor<1, spacedim> &phi_grad =
4572 fe_values->finite_element_output.shape_gradients[snc][q_point];
4574 divergence_type return_value;
4575 return_value[ii] = phi_grad[jj];
4578 return_value[jj] = phi_grad[ii];
4580 return return_value;
4585 divergence_type return_value;
4586 return return_value;
4592 template <
int dim,
int spacedim>
4595 const unsigned int q_point)
const 4597 Assert(shape_function < fe_values->fe->dofs_per_cell,
4598 ExcIndexRange(shape_function, 0, fe_values->fe->dofs_per_cell));
4606 shape_function_data[shape_function].single_nonzero_component;
4611 return value_type();
4615 value_type return_value;
4616 const unsigned int comp =
4617 shape_function_data[shape_function].single_nonzero_component_index;
4620 return_value[indices] =
4621 fe_values->finite_element_output.shape_values(snc, q_point);
4622 return return_value;
4626 value_type return_value;
4627 for (
unsigned int d = 0; d < dim * dim; ++d)
4628 if (shape_function_data[shape_function]
4629 .is_nonzero_shape_function_component[d])
4633 return_value[indices] =
4634 fe_values->finite_element_output.shape_values(
4635 shape_function_data[shape_function].row_index[d], q_point);
4637 return return_value;
4643 template <
int dim,
int spacedim>
4646 const unsigned int q_point)
const 4648 Assert(shape_function < fe_values->fe->dofs_per_cell,
4649 ExcIndexRange(shape_function, 0, fe_values->fe->dofs_per_cell));
4652 "update_gradients")));
4655 shape_function_data[shape_function].single_nonzero_component;
4660 return divergence_type();
4674 const unsigned int comp =
4675 shape_function_data[shape_function].single_nonzero_component_index;
4678 const unsigned int ii = indices[0];
4679 const unsigned int jj = indices[1];
4681 const ::Tensor<1, spacedim> &phi_grad =
4682 fe_values->finite_element_output.shape_gradients[snc][q_point];
4684 divergence_type return_value;
4686 return_value[ii] = phi_grad[jj];
4688 return return_value;
4693 divergence_type return_value;
4694 return return_value;
4700 template <
int dim,
int spacedim>
4703 const unsigned int q_point)
const 4705 Assert(shape_function < fe_values->fe->dofs_per_cell,
4706 ExcIndexRange(shape_function, 0, fe_values->fe->dofs_per_cell));
4709 "update_gradients")));
4712 shape_function_data[shape_function].single_nonzero_component;
4717 return gradient_type();
4731 const unsigned int comp =
4732 shape_function_data[shape_function].single_nonzero_component_index;
4735 const unsigned int ii = indices[0];
4736 const unsigned int jj = indices[1];
4738 const ::Tensor<1, spacedim> &phi_grad =
4739 fe_values->finite_element_output.shape_gradients[snc][q_point];
4741 gradient_type return_value;
4742 return_value[ii][jj] = phi_grad;
4744 return return_value;
4749 gradient_type return_value;
4750 return return_value;
4762 template <
int dim,
int spacedim>
4769 fe_values_views_cache.scalars.size()));
4771 return fe_values_views_cache.scalars[scalar.
component];
4776 template <
int dim,
int spacedim>
4783 fe_values_views_cache.vectors.size()));
4790 template <
int dim,
int spacedim>
4797 fe_values_views_cache.symmetric_second_order_tensors.size(),
4800 fe_values_views_cache.symmetric_second_order_tensors.size()));
4802 return fe_values_views_cache
4808 template <
int dim,
int spacedim>
4814 fe_values_views_cache.second_order_tensors.size(),
4817 fe_values_views_cache.second_order_tensors.size()));
4819 return fe_values_views_cache
4825 template <
int dim,
int spacedim>
4826 inline const double &
4828 const unsigned int j)
const 4833 Assert(fe->is_primitive(i), ExcShapeFunctionNotPrimitive(i));
4834 Assert(present_cell.get() !=
nullptr,
4835 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
4838 if (fe->is_primitive())
4839 return this->finite_element_output.shape_values(i, j);
4850 const unsigned int row =
4851 this->finite_element_output
4852 .shape_function_to_row_table[i * fe->n_components() +
4853 fe->system_to_component_index(i).first];
4854 return this->finite_element_output.shape_values(row, j);
4860 template <
int dim,
int spacedim>
4863 const unsigned int i,
4864 const unsigned int j,
4865 const unsigned int component)
const 4868 Assert(this->update_flags & update_values,
4870 Assert(component < fe->n_components(),
4872 Assert(present_cell.get() !=
nullptr,
4873 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
4878 if (fe->get_nonzero_components(i)[component] ==
false)
4884 const unsigned int row =
4885 this->finite_element_output
4886 .shape_function_to_row_table[i * fe->n_components() + component];
4887 return this->finite_element_output.shape_values(row, j);
4892 template <
int dim,
int spacedim>
4895 const unsigned int j)
const 4900 Assert(fe->is_primitive(i), ExcShapeFunctionNotPrimitive(i));
4901 Assert(present_cell.get() !=
nullptr,
4902 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
4905 if (fe->is_primitive())
4906 return this->finite_element_output.shape_gradients[i][j];
4917 const unsigned int row =
4918 this->finite_element_output
4919 .shape_function_to_row_table[i * fe->n_components() +
4920 fe->system_to_component_index(i).first];
4921 return this->finite_element_output.shape_gradients[row][j];
4927 template <
int dim,
int spacedim>
4930 const unsigned int i,
4931 const unsigned int j,
4932 const unsigned int component)
const 4935 Assert(this->update_flags & update_gradients,
4937 Assert(component < fe->n_components(),
4939 Assert(present_cell.get() !=
nullptr,
4940 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
4944 if (fe->get_nonzero_components(i)[component] ==
false)
4950 const unsigned int row =
4951 this->finite_element_output
4952 .shape_function_to_row_table[i * fe->n_components() + component];
4953 return this->finite_element_output.shape_gradients[row][j];
4958 template <
int dim,
int spacedim>
4961 const unsigned int j)
const 4966 Assert(fe->is_primitive(i), ExcShapeFunctionNotPrimitive(i));
4967 Assert(present_cell.get() !=
nullptr,
4968 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
4971 if (fe->is_primitive())
4972 return this->finite_element_output.shape_hessians[i][j];
4983 const unsigned int row =
4984 this->finite_element_output
4985 .shape_function_to_row_table[i * fe->n_components() +
4986 fe->system_to_component_index(i).first];
4987 return this->finite_element_output.shape_hessians[row][j];
4993 template <
int dim,
int spacedim>
4996 const unsigned int i,
4997 const unsigned int j,
4998 const unsigned int component)
const 5001 Assert(this->update_flags & update_hessians,
5003 Assert(component < fe->n_components(),
5005 Assert(present_cell.get() !=
nullptr,
5006 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5010 if (fe->get_nonzero_components(i)[component] ==
false)
5016 const unsigned int row =
5017 this->finite_element_output
5018 .shape_function_to_row_table[i * fe->n_components() + component];
5019 return this->finite_element_output.shape_hessians[row][j];
5024 template <
int dim,
int spacedim>
5027 const unsigned int j)
const 5030 Assert(this->update_flags & update_hessians,
5032 Assert(fe->is_primitive(i), ExcShapeFunctionNotPrimitive(i));
5033 Assert(present_cell.get() !=
nullptr,
5034 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5037 if (fe->is_primitive())
5038 return this->finite_element_output.shape_3rd_derivatives[i][j];
5049 const unsigned int row =
5050 this->finite_element_output
5051 .shape_function_to_row_table[i * fe->n_components() +
5052 fe->system_to_component_index(i).first];
5053 return this->finite_element_output.shape_3rd_derivatives[row][j];
5059 template <
int dim,
int spacedim>
5062 const unsigned int i,
5063 const unsigned int j,
5064 const unsigned int component)
const 5067 Assert(this->update_flags & update_hessians,
5069 Assert(component < fe->n_components(),
5071 Assert(present_cell.get() !=
nullptr,
5072 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5076 if (fe->get_nonzero_components(i)[component] ==
false)
5082 const unsigned int row =
5083 this->finite_element_output
5084 .shape_function_to_row_table[i * fe->n_components() + component];
5085 return this->finite_element_output.shape_3rd_derivatives[row][j];
5090 template <
int dim,
int spacedim>
5099 template <
int dim,
int spacedim>
5108 template <
int dim,
int spacedim>
5112 return this->update_flags;
5117 template <
int dim,
int spacedim>
5118 inline const std::vector<Point<spacedim>> &
5123 Assert(present_cell.get() !=
nullptr,
5124 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5125 return this->mapping_output.quadrature_points;
5130 template <
int dim,
int spacedim>
5131 inline const std::vector<double> &
5136 Assert(present_cell.get() !=
nullptr,
5137 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5138 return this->mapping_output.JxW_values;
5143 template <
int dim,
int spacedim>
5144 inline const std::vector<DerivativeForm<1, dim, spacedim>> &
5149 Assert(present_cell.get() !=
nullptr,
5150 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5151 return this->mapping_output.jacobians;
5156 template <
int dim,
int spacedim>
5157 inline const std::vector<DerivativeForm<2, dim, spacedim>> &
5162 Assert(present_cell.get() !=
nullptr,
5163 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5164 return this->mapping_output.jacobian_grads;
5169 template <
int dim,
int spacedim>
5172 const unsigned int i)
const 5176 Assert(present_cell.get() !=
nullptr,
5177 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5178 return this->mapping_output.jacobian_pushed_forward_grads[i];
5183 template <
int dim,
int spacedim>
5184 inline const std::vector<Tensor<3, spacedim>> &
5187 Assert(this->update_flags & update_jacobian_pushed_forward_grads,
5189 Assert(present_cell.get() !=
nullptr,
5190 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5191 return this->mapping_output.jacobian_pushed_forward_grads;
5196 template <
int dim,
int spacedim>
5202 Assert(present_cell.get() !=
nullptr,
5203 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5204 return this->mapping_output.jacobian_2nd_derivatives[i];
5209 template <
int dim,
int spacedim>
5210 inline const std::vector<DerivativeForm<3, dim, spacedim>> &
5213 Assert(this->update_flags & update_jacobian_2nd_derivatives,
5215 Assert(present_cell.get() !=
nullptr,
5216 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5217 return this->mapping_output.jacobian_2nd_derivatives;
5222 template <
int dim,
int spacedim>
5225 const unsigned int i)
const 5229 "update_jacobian_pushed_forward_2nd_derivatives"));
5230 Assert(present_cell.get() !=
nullptr,
5231 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5232 return this->mapping_output.jacobian_pushed_forward_2nd_derivatives[i];
5237 template <
int dim,
int spacedim>
5238 inline const std::vector<Tensor<4, spacedim>> &
5241 Assert(this->update_flags & update_jacobian_pushed_forward_2nd_derivatives,
5243 "update_jacobian_pushed_forward_2nd_derivatives"));
5244 Assert(present_cell.get() !=
nullptr,
5245 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5246 return this->mapping_output.jacobian_pushed_forward_2nd_derivatives;
5251 template <
int dim,
int spacedim>
5257 Assert(present_cell.get() !=
nullptr,
5258 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5259 return this->mapping_output.jacobian_3rd_derivatives[i];
5264 template <
int dim,
int spacedim>
5265 inline const std::vector<DerivativeForm<4, dim, spacedim>> &
5268 Assert(this->update_flags & update_jacobian_3rd_derivatives,
5270 Assert(present_cell.get() !=
nullptr,
5271 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5272 return this->mapping_output.jacobian_3rd_derivatives;
5277 template <
int dim,
int spacedim>
5280 const unsigned int i)
const 5284 "update_jacobian_pushed_forward_3rd_derivatives"));
5285 Assert(present_cell.get() !=
nullptr,
5286 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5287 return this->mapping_output.jacobian_pushed_forward_3rd_derivatives[i];
5292 template <
int dim,
int spacedim>
5293 inline const std::vector<Tensor<5, spacedim>> &
5296 Assert(this->update_flags & update_jacobian_pushed_forward_3rd_derivatives,
5298 "update_jacobian_pushed_forward_3rd_derivatives"));
5299 Assert(present_cell.get() !=
nullptr,
5300 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5301 return this->mapping_output.jacobian_pushed_forward_3rd_derivatives;
5306 template <
int dim,
int spacedim>
5307 inline const std::vector<DerivativeForm<1, spacedim, dim>> &
5312 Assert(present_cell.get() !=
nullptr,
5313 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5314 return this->mapping_output.inverse_jacobians;
5319 template <
int dim,
int spacedim>
5323 Assert(this->update_flags & update_quadrature_points,
5325 Assert(i < this->mapping_output.quadrature_points.size(),
5326 ExcIndexRange(i, 0, this->mapping_output.quadrature_points.size()));
5327 Assert(present_cell.get() !=
nullptr,
5328 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5330 return this->mapping_output.quadrature_points[i];
5335 template <
int dim,
int spacedim>
5339 Assert(this->update_flags & update_JxW_values,
5341 Assert(i < this->mapping_output.JxW_values.size(),
5342 ExcIndexRange(i, 0, this->mapping_output.JxW_values.size()));
5343 Assert(present_cell.get() !=
nullptr,
5344 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5346 return this->mapping_output.JxW_values[i];
5351 template <
int dim,
int spacedim>
5355 Assert(this->update_flags & update_jacobians,
5357 Assert(i < this->mapping_output.jacobians.size(),
5358 ExcIndexRange(i, 0, this->mapping_output.jacobians.size()));
5359 Assert(present_cell.get() !=
nullptr,
5360 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5362 return this->mapping_output.jacobians[i];
5367 template <
int dim,
int spacedim>
5371 Assert(this->update_flags & update_jacobian_grads,
5373 Assert(i < this->mapping_output.jacobian_grads.size(),
5374 ExcIndexRange(i, 0, this->mapping_output.jacobian_grads.size()));
5375 Assert(present_cell.get() !=
nullptr,
5376 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5378 return this->mapping_output.jacobian_grads[i];
5383 template <
int dim,
int spacedim>
5387 Assert(this->update_flags & update_inverse_jacobians,
5389 Assert(i < this->mapping_output.inverse_jacobians.size(),
5390 ExcIndexRange(i, 0, this->mapping_output.inverse_jacobians.size()));
5391 Assert(present_cell.get() !=
nullptr,
5392 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5394 return this->mapping_output.inverse_jacobians[i];
5399 template <
int dim,
int spacedim>
5405 "update_normal_vectors")));
5406 Assert(i < this->mapping_output.normal_vectors.size(),
5407 ExcIndexRange(i, 0, this->mapping_output.normal_vectors.size()));
5408 Assert(present_cell.get() !=
nullptr,
5409 ExcMessage(
"FEValues object is not reinit'ed to any cell"));
5411 return this->mapping_output.normal_vectors[i];
5419 template <
int dim,
int spacedim>
5428 template <
int dim,
int spacedim>
5439 template <
int dim,
int spacedim>
5443 return present_face_index;
5449 template <
int dim,
int spacedim>
5458 template <
int dim,
int spacedim>
5467 template <
int dim,
int spacedim>
5476 template <
int dim,
int spacedim>
5480 Assert(i < this->mapping_output.boundary_forms.size(),
5481 ExcIndexRange(i, 0, this->mapping_output.boundary_forms.size()));
5484 "update_boundary_forms")));
5486 return this->mapping_output.boundary_forms[i];
5491 DEAL_II_NAMESPACE_CLOSE
Transformed quadrature weights.
const std::vector< Tensor< 4, spacedim > > & get_jacobian_pushed_forward_2nd_derivatives() const
const Tensor< 3, spacedim > & shape_3rd_derivative(const unsigned int function_no, const unsigned int point_no) const
double shape_value_component(const unsigned int function_no, const unsigned int point_no, const unsigned int component) const
const DerivativeForm< 1, spacedim, dim > & inverse_jacobian(const unsigned int quadrature_point) const
typename ProductType< Number, typename Vector< dim, spacedim >::curl_type >::type curl_type
const Tensor< 1, spacedim > & shape_grad(const unsigned int function_no, const unsigned int quadrature_point) const
const DerivativeForm< 1, dim, spacedim > & jacobian(const unsigned int quadrature_point) const
std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > fe_data
CellSimilarity::Similarity cell_similarity
typename ProductType< Number, typename Tensor< 2, dim, spacedim >::gradient_type >::type gradient_type
const FEFaceValues< dim, spacedim > & get_present_fe_values() const
typename ProductType< Number, typename SymmetricTensor< 2, dim, spacedim >::value_type >::type value_type
unsigned int present_face_index
std::vector< ShapeFunctionData > shape_function_data
static::ExceptionBase & ExcAccessToUninitializedField()
const SmartPointer< const FEValuesBase< dim, spacedim > > fe_values
const DerivativeForm< 3, dim, spacedim > & jacobian_2nd_derivative(const unsigned int quadrature_point) const
const unsigned int dofs_per_cell
typename::internal::CurlType< spacedim >::type curl_type
const unsigned int component
const Quadrature< dim-1 > quadrature
const Tensor< 1, spacedim > & normal_vector(const unsigned int i) const
const Tensor< 3, spacedim > & jacobian_pushed_forward_grad(const unsigned int quadrature_point) const
unsigned int get_face_index() const
int single_nonzero_component
Outer normal vector, not normalized.
typename ProductType< Number, typename Scalar< dim, spacedim >::hessian_type >::type hessian_type
std::unique_ptr< const CellIteratorBase > present_cell
const unsigned int first_tensor_component
Transformed quadrature points.
const std::vector< DerivativeForm< 4, dim, spacedim > > & get_jacobian_3rd_derivatives() const
typename ProductType< Number, typename Scalar< dim, spacedim >::value_type >::type value_type
const SmartPointer< const Mapping< dim, spacedim >, FEValuesBase< dim, spacedim > > mapping
static::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
const std::vector< double > & get_JxW_values() const
::internal::FEValuesViews::Cache< dim, spacedim > fe_values_views_cache
const std::vector< DerivativeForm< 1, dim, spacedim > > & get_jacobians() const
UpdateFlags get_update_flags() const
static::ExceptionBase & ExcFENotPrimitive()
const Quadrature< dim > & get_quadrature() const
typename ProductType< Number, typename Vector< dim, spacedim >::gradient_type >::type gradient_type
const std::vector< DerivativeForm< 3, dim, spacedim > > & get_jacobian_2nd_derivatives() const
typename ProductType< Number, typename Scalar< dim, spacedim >::gradient_type >::type gradient_type
typename ProductType< Number, typename Tensor< 2, dim, spacedim >::value_type >::type value_type
static::ExceptionBase & ExcMessage(std::string arg1)
const std::vector< Point< spacedim > > & get_quadrature_points() const
const unsigned int first_tensor_component
const std::vector< Tensor< 5, spacedim > > & get_jacobian_pushed_forward_3rd_derivatives() const
const Quadrature< dim-1 > & get_quadrature() const
typename ProductType< Number, typename Vector< dim, spacedim >::third_derivative_type >::type third_derivative_type
#define DeclException1(Exception1, type1, outsequence)
const Tensor< 2, spacedim > & shape_hessian(const unsigned int function_no, const unsigned int point_no) const
Third derivatives of shape functions.
std::vector< ShapeFunctionData > shape_function_data
#define Assert(cond, exc)
Tensor< 3, spacedim > shape_3rd_derivative_component(const unsigned int function_no, const unsigned int point_no, const unsigned int component) const
Abstract base class for mapping classes.
std::vector< ShapeFunctionData > shape_function_data
#define DeclExceptionMsg(Exception, defaulttext)
const Quadrature< dim > quadrature
const FEValuesViews::Scalar< dim, spacedim > & operator[](const FEValuesExtractors::Scalar &scalar) const
const unsigned int first_vector_component
#define DeclException0(Exception0)
const FiniteElement< dim, spacedim > & get_fe() const
const std::vector< Tensor< 3, spacedim > > & get_jacobian_pushed_forward_grads() const
unsigned int single_nonzero_component_index
std::unique_ptr< typename Mapping< dim, spacedim >::InternalDataBase > mapping_data
typename Tensor< rank_-1, dim, Number >::tensor_type value_type
SymmetricTensor< 2, dim, Number > symmetrize(const Tensor< 2, dim, Number > &t)
const FEValues< dim, spacedim > & get_present_fe_values() const
Second derivatives of shape functions.
Gradient of volume element.
typename ProductType< Number, typename SymmetricTensor< 2, dim, spacedim >::divergence_type >::type divergence_type
static TableIndices< rank_ > unrolled_to_component_indices(const unsigned int i)
std::vector<::FEValuesViews::Scalar< dim, spacedim > > scalars
const unsigned int n_quadrature_points
const double & shape_value(const unsigned int function_no, const unsigned int point_no) const
const FESubfaceValues< dim, spacedim > & get_present_fe_values() const
boost::signals2::connection tria_listener_mesh_transform
typename ProductType< Number, typename Vector< dim, spacedim >::value_type >::type value_type
int single_nonzero_component
const Tensor< 5, spacedim > & jacobian_pushed_forward_3rd_derivative(const unsigned int quadrature_point) const
const Tensor< 4, spacedim > & jacobian_pushed_forward_2nd_derivative(const unsigned int quadrature_point) const
unsigned int single_nonzero_component_index
typename ProductType< Number, typename Vector< dim, spacedim >::symmetric_gradient_type >::type symmetric_gradient_type
typename ProductType< Number, typename Vector< dim, spacedim >::divergence_type >::type divergence_type
typename ProductType< Number, typename Vector< dim, spacedim >::hessian_type >::type hessian_type
Shape function gradients.
typename ProductType< Number, typename Tensor< 2, dim, spacedim >::divergence_type >::type divergence_type
const SmartPointer< const FEValuesBase< dim, spacedim > > fe_values
const std::vector< DerivativeForm< 1, spacedim, dim > > & get_inverse_jacobians() const
const SmartPointer< const FEValuesBase< dim, spacedim > > fe_values
static::ExceptionBase & ExcNotImplemented()
bool is_nonzero_shape_function_component
const SmartPointer< const FEValuesBase< dim, spacedim > > fe_values
boost::signals2::connection tria_listener_refinement
::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > finite_element_output
const DerivativeForm< 4, dim, spacedim > & jacobian_3rd_derivative(const unsigned int quadrature_point) const
typename ProductType< Number, typename Vector< dim, spacedim >::value_type >::type laplacian_type
const std::vector< DerivativeForm< 2, dim, spacedim > > & get_jacobian_grads() const
const Point< spacedim > & quadrature_point(const unsigned int q) const
::internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > mapping_output
const Mapping< dim, spacedim > & get_mapping() const
int single_nonzero_component
Tensor< 1, spacedim > shape_grad_component(const unsigned int function_no, const unsigned int point_no, const unsigned int component) const
typename ProductType< Number, typename Scalar< dim, spacedim >::value_type >::type laplacian_type
double JxW(const unsigned int quadrature_point) const
typename ProductType< Number, typename Scalar< dim, spacedim >::third_derivative_type >::type third_derivative_type
std::vector< ShapeFunctionData > shape_function_data
const DerivativeForm< 2, dim, spacedim > & jacobian_grad(const unsigned int quadrature_point) const
static::ExceptionBase & ExcInternalError()
const SmartPointer< const FiniteElement< dim, spacedim >, FEValuesBase< dim, spacedim > > fe
const Tensor< 1, spacedim > & boundary_form(const unsigned int i) const
Tensor< 2, spacedim > shape_hessian_component(const unsigned int function_no, const unsigned int point_no, const unsigned int component) const