16 #ifndef dealii_fe_interface_values_h
17 #define dealii_fe_interface_values_h
33 template <
int dim,
int spacedim>
46 template <
int dim,
int spacedim = dim>
65 template <
class InputVector,
class OutputVector>
68 OutputVector & local_dof_values)
const;
76 template <
int dim,
int spacedim = dim>
112 template <
typename Number>
121 template <
typename Number>
131 template <
typename Number>
141 template <
typename Number>
149 const unsigned int component);
177 const unsigned int interface_dof_index,
178 const unsigned int q_point)
const;
199 const unsigned int q_point)
const;
208 jump(
const unsigned int interface_dof_index,
209 const unsigned int q_point)
const;
223 const unsigned int q_point)
const;
233 const unsigned int q_point)
const;
247 const unsigned int q_point)
const;
257 const unsigned int q_point)
const;
271 const unsigned int q_point)
const;
281 const unsigned int q_point)
const;
302 const unsigned int q_point)
const;
312 const unsigned int q_point)
const;
321 average(
const unsigned int interface_dof_index,
322 const unsigned int q_point)
const;
336 const unsigned int q_point)
const;
346 const unsigned int q_point)
const;
361 const unsigned int q_point)
const;
371 const unsigned int q_point)
const;
399 template <
class InputVector>
402 const bool here_or_there,
403 const InputVector &fe_function,
429 template <
class InputVector>
432 const bool here_or_there,
433 const InputVector &local_dof_values,
457 template <
class InputVector>
460 const InputVector &fe_function,
471 template <
class InputVector>
474 const InputVector &local_dof_values,
491 template <
class InputVector>
494 const InputVector &fe_function,
505 template <
class InputVector>
508 const InputVector &local_dof_values,
525 template <
class InputVector>
528 const InputVector &fe_function,
539 template <
class InputVector>
542 const InputVector &local_dof_values,
560 template <
class InputVector>
563 const InputVector &fe_function,
566 &third_derivatives)
const;
575 template <
class InputVector>
578 const InputVector &local_dof_values,
581 &third_derivatives)
const;
603 template <
class InputVector>
606 const InputVector &fe_function,
617 template <
class InputVector>
620 const InputVector &local_dof_values,
637 template <
class InputVector>
640 const InputVector &fe_function,
651 template <
class InputVector>
654 const InputVector &local_dof_values,
671 template <
class InputVector>
674 const InputVector &fe_function,
685 template <
class InputVector>
688 const InputVector &local_dof_values,
706 template <
int dim,
int spacedim = dim>
745 template <
typename Number>
754 template <
typename Number>
764 template <
typename Number>
774 template <
typename Number>
782 const unsigned int first_vector_component);
810 const unsigned int interface_dof_index,
811 const unsigned int q_point)
const;
831 const unsigned int q_point)
const;
840 jump(
const unsigned int interface_dof_index,
841 const unsigned int q_point)
const;
854 const unsigned int q_point)
const;
863 const unsigned int q_point)
const;
877 const unsigned int q_point)
const;
886 const unsigned int q_point)
const;
900 const unsigned int q_point)
const;
910 const unsigned int q_point)
const;
930 const unsigned int q_point)
const;
939 average(
const unsigned int interface_dof_index,
940 const unsigned int q_point)
const;
953 const unsigned int q_point)
const;
963 const unsigned int q_point)
const;
978 const unsigned int q_point)
const;
987 const unsigned int q_point)
const;
1015 template <
class InputVector>
1018 const bool here_or_there,
1019 const InputVector &fe_function,
1045 template <
class InputVector>
1048 const bool here_or_there,
1049 const InputVector &local_dof_values,
1073 template <
class InputVector>
1076 const InputVector &fe_function,
1087 template <
class InputVector>
1090 const InputVector &local_dof_values,
1107 template <
class InputVector>
1110 const InputVector &fe_function,
1121 template <
class InputVector>
1124 const InputVector &local_dof_values,
1141 template <
class InputVector>
1144 const InputVector &fe_function,
1155 template <
class InputVector>
1158 const InputVector &local_dof_values,
1176 template <
class InputVector>
1179 const InputVector &fe_function,
1182 &third_derivatives)
const;
1191 template <
class InputVector>
1194 const InputVector &local_dof_values,
1197 &third_derivatives)
const;
1219 template <
class InputVector>
1222 const InputVector &fe_function,
1233 template <
class InputVector>
1236 const InputVector &local_dof_values,
1253 template <
class InputVector>
1256 const InputVector &fe_function,
1267 template <
class InputVector>
1270 const InputVector &local_dof_values,
1287 template <
class InputVector>
1290 const InputVector &fe_function,
1301 template <
class InputVector>
1304 const InputVector &local_dof_values,
1327 template <
int dim,
int spacedim,
typename Extractor>
1338 template <
int dim,
int spacedim>
1341 using type = typename ::FEInterfaceViews::Scalar<dim, spacedim>;
1351 template <
int dim,
int spacedim>
1354 using type = typename ::FEInterfaceViews::Vector<dim, spacedim>;
1365 template <
int dim,
int spacedim,
typename Extractor>
1366 using View = typename ::internal::FEInterfaceViews::
1367 ViewType<dim, spacedim, Extractor>::type;
1396 template <
int dim,
int spacedim = dim>
1498 template <
class CellIteratorType,
class CellNeighborIteratorType>
1501 const unsigned int face_no,
1502 const unsigned int sub_face_no,
1503 const CellNeighborIteratorType &cell_neighbor,
1504 const unsigned int face_no_neighbor,
1505 const unsigned int sub_face_no_neighbor,
1540 template <
class CellIteratorType>
1543 const unsigned int face_no,
1652 JxW(
const unsigned int quadrature_point)
const;
1659 const std::vector<double> &
1671 const std::vector<Tensor<1, spacedim>> &
1689 const std::vector<Point<spacedim>> &
1745 std::vector<types::global_dof_index>
1760 std::array<unsigned int, 2>
1772 normal(
const unsigned int q_point_index)
const;
1806 const unsigned int interface_dof_index,
1807 const unsigned int q_point,
1808 const unsigned int component = 0)
const;
1839 const unsigned int q_point,
1840 const unsigned int component = 0)
const;
1849 jump(
const unsigned int interface_dof_index,
1850 const unsigned int q_point,
1851 const unsigned int component = 0)
const;
1868 const unsigned int q_point,
1869 const unsigned int component = 0)
const;
1879 const unsigned int q_point,
1880 const unsigned int component = 0)
const;
1898 const unsigned int q_point,
1899 const unsigned int component = 0)
const;
1909 const unsigned int q_point,
1910 const unsigned int component = 0)
const;
1927 const unsigned int q_point,
1928 const unsigned int component = 0)
const;
1938 const unsigned int q_point,
1939 const unsigned int component = 0)
const;
1965 const unsigned int q_point,
1966 const unsigned int component = 0)
const;
1976 const unsigned int q_point,
1977 const unsigned int component = 0)
const;
1994 const unsigned int q_point,
1995 const unsigned int component = 0)
const;
2005 const unsigned int q_point,
2006 const unsigned int component = 0)
const;
2024 const unsigned int q_point,
2025 const unsigned int component = 0)
const;
2035 const unsigned int q_point,
2036 const unsigned int component = 0)
const;
2057 template <
class InputVector>
2060 const InputVector & fe_function,
2061 std::vector<typename InputVector::value_type> &
values)
const;
2071 template <
class InputVector>
2074 const InputVector &fe_function,
2085 template <
class InputVector>
2088 const InputVector &fe_function,
2100 template <
class InputVector>
2103 const InputVector &fe_function,
2105 &third_derivatives)
const;
2122 template <
class InputVector>
2125 const InputVector & fe_function,
2126 std::vector<typename InputVector::value_type> &
values)
const;
2135 template <
class InputVector>
2138 const InputVector &fe_function,
2149 template <
class InputVector>
2152 const InputVector &fe_function,
2200 std::vector<std::array<unsigned int, 2>>
dofmap;
2238 std::unique_ptr<FESubfaceValues<dim, spacedim>>
2258 std::unique_ptr<hp::FESubfaceValues<dim, spacedim>>
2265 std::unique_ptr<hp::FEFaceValues<dim, spacedim>>
2272 std::unique_ptr<hp::FESubfaceValues<dim, spacedim>>
2282 "The current function doesn't make sense when used with a "
2283 "FEInterfaceValues object with hp-capabilities.");
2292 "The current function doesn't make sense when used with a "
2293 "FEInterfaceValues object without hp-capabilities.");
2313 template <
int dim,
int spacedim>
2319 : n_quadrature_points(quadrature.size())
2320 , fe_face_values(nullptr)
2321 , fe_face_values_neighbor(nullptr)
2322 , internal_fe_face_values(
2327 , internal_fe_subface_values(
2332 , internal_fe_face_values_neighbor(
2337 , internal_fe_subface_values_neighbor(
2346 template <
int dim,
int spacedim>
2360 template <
int dim,
int spacedim>
2366 : n_quadrature_points(quadrature.max_n_quadrature_points())
2367 , fe_face_values(nullptr)
2368 , fe_face_values_neighbor(nullptr)
2369 , internal_fe_face_values(
2374 , internal_fe_subface_values(
2379 , internal_fe_face_values_neighbor(
2384 , internal_fe_subface_values_neighbor(
2393 template <
int dim,
int spacedim>
2399 : n_quadrature_points(quadrature_collection.max_n_quadrature_points())
2400 , fe_face_values(nullptr)
2401 , fe_face_values_neighbor(nullptr)
2402 , internal_hp_fe_face_values(
2403 std::make_unique<
hp::
FEFaceValues<dim, spacedim>>(mapping_collection,
2405 quadrature_collection,
2407 , internal_hp_fe_subface_values(
2411 quadrature_collection,
2413 , internal_hp_fe_face_values_neighbor(
2414 std::make_unique<
hp::
FEFaceValues<dim, spacedim>>(mapping_collection,
2416 quadrature_collection,
2418 , internal_hp_fe_subface_values_neighbor(
2422 quadrature_collection,
2430 template <
int dim,
int spacedim>
2437 quadrature_collection,
2443 template <
int dim,
int spacedim>
2444 template <
class CellIteratorType,
class CellNeighborIteratorType>
2447 const CellIteratorType & cell,
2448 const unsigned int face_no,
2449 const unsigned int sub_face_no,
2450 const CellNeighborIteratorType &cell_neighbor,
2451 const unsigned int face_no_neighbor,
2452 const unsigned int sub_face_no_neighbor,
2453 const unsigned int q_index,
2454 const unsigned int mapping_index,
2457 Assert(internal_fe_face_values || internal_hp_fe_face_values,
2460 if (internal_fe_face_values)
2464 internal_fe_face_values->reinit(cell, face_no);
2465 fe_face_values = internal_fe_face_values.get();
2469 internal_fe_subface_values->reinit(cell, face_no, sub_face_no);
2470 fe_face_values = internal_fe_subface_values.get();
2474 internal_fe_face_values_neighbor->reinit(cell_neighbor,
2476 fe_face_values_neighbor = internal_fe_face_values_neighbor.get();
2480 internal_fe_subface_values_neighbor->reinit(cell_neighbor,
2482 sub_face_no_neighbor);
2483 fe_face_values_neighbor = internal_fe_subface_values_neighbor.get();
2487 fe_face_values_neighbor->n_quadrature_points);
2489 const_cast<unsigned int &
>(this->n_quadrature_points) =
2490 fe_face_values->n_quadrature_points;
2492 else if (internal_hp_fe_face_values)
2494 const unsigned int dominated_fe_index =
2495 internal_hp_fe_face_values->get_fe_collection().find_dominated_fe(
2496 {cell->active_fe_index(), cell_neighbor->active_fe_index()});
2498 const unsigned int used_q_index =
2501 const unsigned int used_mapping_index =
2508 internal_hp_fe_face_values->reinit(
2509 cell, face_no, used_q_index, used_mapping_index,
fe_index);
2511 internal_hp_fe_face_values->get_present_fe_values());
2515 internal_hp_fe_subface_values->
reinit(
2516 cell, face_no, sub_face_no, used_q_index, used_mapping_index);
2519 internal_hp_fe_subface_values->get_present_fe_values());
2523 internal_hp_fe_face_values_neighbor->
reinit(cell_neighbor,
2526 used_mapping_index);
2529 internal_hp_fe_face_values_neighbor->get_present_fe_values());
2533 internal_hp_fe_subface_values_neighbor->
reinit(cell_neighbor,
2535 sub_face_no_neighbor,
2537 used_mapping_index);
2539 fe_face_values_neighbor =
2541 internal_hp_fe_subface_values_neighbor->get_present_fe_values());
2545 fe_face_values_neighbor->n_quadrature_points);
2547 const_cast<unsigned int &
>(this->n_quadrature_points) =
2548 fe_face_values->n_quadrature_points;
2554 std::vector<types::global_dof_index> v(
2555 fe_face_values->get_fe().n_dofs_per_cell());
2556 cell->get_active_or_mg_dof_indices(v);
2557 std::vector<types::global_dof_index> v2(
2558 fe_face_values_neighbor->get_fe().n_dofs_per_cell());
2559 cell_neighbor->get_active_or_mg_dof_indices(v2);
2563 std::map<types::global_dof_index, std::pair<unsigned int, unsigned int>>
2565 std::pair<unsigned int, unsigned int> invalid_entry(
2568 for (
unsigned int i = 0; i < v.size(); ++i)
2571 auto result = tempmap.insert(std::make_pair(v[i], invalid_entry));
2572 result.first->second.first = i;
2575 for (
unsigned int i = 0; i < v2.size(); ++i)
2578 auto result = tempmap.insert(std::make_pair(v2[i], invalid_entry));
2579 result.first->second.second = i;
2583 dofmap.resize(tempmap.size());
2584 interface_dof_indices.resize(tempmap.size());
2585 unsigned int idx = 0;
2586 for (
auto &x : tempmap)
2588 interface_dof_indices[idx] = x.first;
2589 dofmap[idx] = {{x.second.first, x.second.second}};
2597 template <
int dim,
int spacedim>
2598 template <
class CellIteratorType>
2601 const unsigned int face_no,
2602 const unsigned int q_index,
2603 const unsigned int mapping_index,
2606 Assert(internal_fe_face_values || internal_hp_fe_face_values,
2609 if (internal_fe_face_values)
2611 internal_fe_face_values->reinit(cell, face_no);
2612 fe_face_values = internal_fe_face_values.get();
2613 fe_face_values_neighbor =
nullptr;
2615 interface_dof_indices.resize(fe_face_values->get_fe().n_dofs_per_cell());
2616 cell->get_active_or_mg_dof_indices(interface_dof_indices);
2618 else if (internal_hp_fe_face_values)
2620 internal_hp_fe_face_values->reinit(
2621 cell, face_no, q_index, mapping_index,
fe_index);
2623 internal_hp_fe_face_values->get_present_fe_values());
2624 fe_face_values_neighbor =
nullptr;
2626 interface_dof_indices.resize(fe_face_values->get_fe().n_dofs_per_cell());
2627 cell->get_active_or_mg_dof_indices(interface_dof_indices);
2630 dofmap.resize(interface_dof_indices.size());
2631 for (
unsigned int i = 0; i < interface_dof_indices.size(); ++i)
2639 template <
int dim,
int spacedim>
2643 Assert(fe_face_values !=
nullptr,
2644 ExcMessage(
"This call requires a call to reinit() first."));
2645 return fe_face_values->JxW(q);
2650 template <
int dim,
int spacedim>
2651 const std::vector<double> &
2654 Assert(fe_face_values !=
nullptr,
2655 ExcMessage(
"This call requires a call to reinit() first."));
2656 return fe_face_values->get_JxW_values();
2661 template <
int dim,
int spacedim>
2662 const std::vector<Tensor<1, spacedim>> &
2665 Assert(fe_face_values !=
nullptr,
2666 ExcMessage(
"This call requires a call to reinit() first."));
2667 return fe_face_values->get_normal_vectors();
2672 template <
int dim,
int spacedim>
2676 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2677 return internal_fe_face_values->get_mapping();
2682 template <
int dim,
int spacedim>
2686 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2687 return internal_fe_face_values->get_fe();
2692 template <
int dim,
int spacedim>
2696 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2697 return internal_fe_face_values->get_quadrature();
2702 template <
int dim,
int spacedim>
2706 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2707 return internal_hp_fe_face_values->get_mapping_collection();
2712 template <
int dim,
int spacedim>
2716 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2717 return internal_hp_fe_face_values->get_fe_collection();
2722 template <
int dim,
int spacedim>
2726 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2727 return internal_hp_fe_face_values->get_quadrature_collection();
2732 template <
int dim,
int spacedim>
2736 if (internal_hp_fe_face_values || internal_hp_fe_subface_values ||
2737 internal_hp_fe_face_values_neighbor ||
2738 internal_hp_fe_subface_values_neighbor)
2748 Assert(internal_fe_face_values || internal_fe_subface_values ||
2749 internal_fe_face_values_neighbor ||
2750 internal_fe_subface_values_neighbor,
2762 template <
int dim,
int spacedim>
2766 return {0
U, n_quadrature_points};
2771 template <
int dim,
int spacedim>
2772 const std::vector<Point<spacedim>> &
2775 Assert(fe_face_values !=
nullptr,
2776 ExcMessage(
"This call requires a call to reinit() first."));
2777 return fe_face_values->get_quadrature_points();
2782 template <
int dim,
int spacedim>
2786 return internal_fe_face_values->get_update_flags();
2791 template <
int dim,
int spacedim>
2795 return get_fe_face_values(
cell_index).get_cell();
2800 template <
int dim,
int spacedim>
2805 return get_fe_face_values(
cell_index).get_face_number();
2810 template <
int dim,
int spacedim>
2815 interface_dof_indices.size() > 0,
2817 "n_current_interface_dofs() is only available after a call to reinit()."));
2818 return interface_dof_indices.size();
2823 template <
int dim,
int spacedim>
2827 return {0
U, n_current_interface_dofs()};
2832 template <
int dim,
int spacedim>
2836 return fe_face_values_neighbor ==
nullptr;
2841 template <
int dim,
int spacedim>
2842 std::vector<types::global_dof_index>
2845 return interface_dof_indices;
2850 template <
int dim,
int spacedim>
2851 std::array<unsigned int, 2>
2853 const unsigned int interface_dof_index)
const
2856 return dofmap[interface_dof_index];
2861 template <
int dim,
int spacedim>
2870 "You are on a boundary, so you can only ask for the first FEFaceValues object."));
2872 return (
cell_index == 0) ? *fe_face_values : *fe_face_values_neighbor;
2877 template <
int dim,
int spacedim>
2881 return fe_face_values->normal_vector(q_point_index);
2886 template <
int dim,
int spacedim>
2889 const bool here_or_there,
2890 const unsigned int interface_dof_index,
2891 const unsigned int q_point,
2892 const unsigned int component)
const
2894 const auto dof_pair = dofmap[interface_dof_index];
2897 return get_fe_face_values(0).shape_value_component(dof_pair[0],
2901 return get_fe_face_values(1).shape_value_component(dof_pair[1],
2910 template <
int dim,
int spacedim>
2913 const unsigned int interface_dof_index,
2914 const unsigned int q_point,
2915 const unsigned int component)
const
2917 const auto dof_pair = dofmap[interface_dof_index];
2922 value += get_fe_face_values(0).shape_value_component(dof_pair[0],
2926 value -= get_fe_face_values(1).shape_value_component(dof_pair[1],
2934 template <
int dim,
int spacedim>
2937 const unsigned int q_point,
2938 const unsigned int component)
const
2940 return jump_in_shape_values(interface_dof_index, q_point, component);
2945 template <
int dim,
int spacedim>
2948 const unsigned int interface_dof_index,
2949 const unsigned int q_point,
2950 const unsigned int component)
const
2952 const auto dof_pair = dofmap[interface_dof_index];
2955 return get_fe_face_values(0).shape_value_component(dof_pair[0],
2962 value += 0.5 * get_fe_face_values(0).shape_value_component(dof_pair[0],
2966 value += 0.5 * get_fe_face_values(1).shape_value_component(dof_pair[1],
2975 template <
int dim,
int spacedim>
2978 const unsigned int interface_dof_index,
2979 const unsigned int q_point,
2980 const unsigned int component)
const
2982 return average_of_shape_values(interface_dof_index, q_point, component);
2987 template <
int dim,
int spacedim>
2990 const unsigned int interface_dof_index,
2991 const unsigned int q_point,
2992 const unsigned int component)
const
2994 const auto dof_pair = dofmap[interface_dof_index];
2997 return get_fe_face_values(0).shape_grad_component(dof_pair[0],
3004 value += 0.5 * get_fe_face_values(0).shape_grad_component(dof_pair[0],
3008 value += 0.5 * get_fe_face_values(1).shape_grad_component(dof_pair[1],
3017 template <
int dim,
int spacedim>
3020 const unsigned int interface_dof_index,
3021 const unsigned int q_point,
3022 const unsigned int component)
const
3024 return average_of_shape_gradients(interface_dof_index, q_point, component);
3029 template <
int dim,
int spacedim>
3032 const unsigned int interface_dof_index,
3033 const unsigned int q_point,
3034 const unsigned int component)
const
3036 const auto dof_pair = dofmap[interface_dof_index];
3039 return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3046 value += 0.5 * get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3050 value += 0.5 * get_fe_face_values(1).shape_hessian_component(dof_pair[1],
3059 template <
int dim,
int spacedim>
3062 const unsigned int interface_dof_index,
3063 const unsigned int q_point,
3064 const unsigned int component)
const
3066 return average_of_shape_hessians(interface_dof_index, q_point, component);
3071 template <
int dim,
int spacedim>
3074 const unsigned int interface_dof_index,
3075 const unsigned int q_point,
3076 const unsigned int component)
const
3078 const auto dof_pair = dofmap[interface_dof_index];
3081 return get_fe_face_values(0).shape_grad_component(dof_pair[0],
3088 value += get_fe_face_values(0).shape_grad_component(dof_pair[0],
3092 value -= get_fe_face_values(1).shape_grad_component(dof_pair[1],
3101 template <
int dim,
int spacedim>
3104 const unsigned int interface_dof_index,
3105 const unsigned int q_point,
3106 const unsigned int component)
const
3108 return jump_in_shape_gradients(interface_dof_index, q_point, component);
3113 template <
int dim,
int spacedim>
3116 const unsigned int interface_dof_index,
3117 const unsigned int q_point,
3118 const unsigned int component)
const
3120 const auto dof_pair = dofmap[interface_dof_index];
3123 return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3130 value += get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3134 value -= get_fe_face_values(1).shape_hessian_component(dof_pair[1],
3143 template <
int dim,
int spacedim>
3146 const unsigned int interface_dof_index,
3147 const unsigned int q_point,
3148 const unsigned int component)
const
3150 return jump_in_shape_hessians(interface_dof_index, q_point, component);
3155 template <
int dim,
int spacedim>
3158 const unsigned int interface_dof_index,
3159 const unsigned int q_point,
3160 const unsigned int component)
const
3162 const auto dof_pair = dofmap[interface_dof_index];
3165 return get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3172 value += get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3176 value -= get_fe_face_values(1).shape_3rd_derivative_component(dof_pair[1],
3185 template <
int dim,
int spacedim>
3188 const unsigned int interface_dof_index,
3189 const unsigned int q_point,
3190 const unsigned int component)
const
3192 return jump_in_shape_3rd_derivatives(interface_dof_index, q_point, component);
3197 template <
int dim,
int spacedim>
3198 template <
class InputVector>
3201 const InputVector & fe_function,
3202 std::vector<typename InputVector::value_type> &
values)
const
3207 this->operator[](scalar).get_jump_in_function_values(fe_function,
values);
3212 template <
int dim,
int spacedim>
3213 template <
class InputVector>
3216 const InputVector &fe_function,
3223 this->operator[](scalar).get_jump_in_function_gradients(fe_function,
3229 template <
int dim,
int spacedim>
3230 template <
class InputVector>
3233 const InputVector &fe_function,
3240 this->operator[](scalar).get_jump_in_function_hessians(fe_function,
hessians);
3245 template <
int dim,
int spacedim>
3246 template <
class InputVector>
3249 const InputVector &fe_function,
3251 &third_derivatives)
const
3256 this->operator[](scalar).get_jump_in_function_third_derivatives(
3257 fe_function, third_derivatives);
3262 template <
int dim,
int spacedim>
3263 template <
class InputVector>
3266 const InputVector & fe_function,
3267 std::vector<typename InputVector::value_type> &
values)
const
3272 this->operator[](scalar).get_average_of_function_values(fe_function,
values);
3277 template <
int dim,
int spacedim>
3278 template <
class InputVector>
3281 const InputVector &fe_function,
3288 this->operator[](scalar).get_average_of_function_gradients(fe_function,
3294 template <
int dim,
int spacedim>
3295 template <
class InputVector>
3298 const InputVector &fe_function,
3305 this->operator[](scalar).get_average_of_function_hessians(fe_function,
3312 template <
int dim,
int spacedim>
3317 const unsigned int n_components =
3318 (this->has_hp_capabilities() ? this->get_fe_collection().n_components() :
3319 this->get_fe().n_components());
3327 template <
int dim,
int spacedim>
3332 const unsigned int n_components =
3333 (this->has_hp_capabilities() ? this->get_fe_collection().n_components() :
3334 this->get_fe().n_components());
3335 const unsigned int n_vectors =
3350 template <
int dim,
int spacedim>
3353 : fe_interface(&fe_interface)
3358 template <
int dim,
int spacedim>
3361 const unsigned int component)
3362 : Base<dim, spacedim>(fe_interface)
3363 , extractor(component)
3368 template <
int dim,
int spacedim>
3369 template <
class InputVector,
class OutputVector>
3371 Base<dim, spacedim>::get_local_dof_values(
3372 const InputVector &dof_values,
3373 OutputVector & local_dof_values)
const
3375 const auto &interface_dof_indices =
3376 this->fe_interface->get_interface_dof_indices();
3378 AssertDimension(interface_dof_indices.size(), local_dof_values.size());
3380 for (
unsigned int i : this->fe_interface->dof_indices())
3381 local_dof_values[i] = dof_values(interface_dof_indices[i]);
3386 template <
int dim,
int spacedim>
3389 const unsigned int interface_dof_index,
3390 const unsigned int q_point)
const
3392 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3395 return (*(this->fe_interface->fe_face_values))[extractor].value(
3396 dof_pair[0], q_point);
3399 return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3400 dof_pair[1], q_point);
3407 template <
int dim,
int spacedim>
3409 Scalar<dim, spacedim>::jump_in_values(
const unsigned int interface_dof_index,
3410 const unsigned int q_point)
const
3412 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3414 value_type
value = 0.0;
3418 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3423 (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3424 dof_pair[1], q_point);
3431 template <
int dim,
int spacedim>
3433 Scalar<dim, spacedim>::jump(
const unsigned int interface_dof_index,
3434 const unsigned int q_point)
const
3436 return jump_in_values(interface_dof_index, q_point);
3441 template <
int dim,
int spacedim>
3443 Scalar<dim, spacedim>::average_of_values(
3444 const unsigned int interface_dof_index,
3445 const unsigned int q_point)
const
3447 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3449 if (this->fe_interface->at_boundary())
3450 return (*(this->fe_interface->fe_face_values))[extractor].value(
3451 dof_pair[0], q_point);
3453 value_type
value = 0.0;
3458 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3463 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3464 dof_pair[1], q_point);
3471 template <
int dim,
int spacedim>
3473 Scalar<dim, spacedim>::average(
const unsigned int interface_dof_index,
3474 const unsigned int q_point)
const
3476 return average_of_values(interface_dof_index, q_point);
3481 template <
int dim,
int spacedim>
3483 Scalar<dim, spacedim>::average_of_gradients(
3484 const unsigned int interface_dof_index,
3485 const unsigned int q_point)
const
3487 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3489 if (this->fe_interface->at_boundary())
3490 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3491 dof_pair[0], q_point);
3493 gradient_type
value;
3498 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3502 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3503 .gradient(dof_pair[1], q_point);
3509 template <
int dim,
int spacedim>
3511 Scalar<dim, spacedim>::average_gradient(
3512 const unsigned int interface_dof_index,
3513 const unsigned int q_point)
const
3515 return average_of_gradients(interface_dof_index, q_point);
3520 template <
int dim,
int spacedim>
3522 Scalar<dim, spacedim>::jump_in_gradients(
3523 const unsigned int interface_dof_index,
3524 const unsigned int q_point)
const
3526 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3528 if (this->fe_interface->at_boundary())
3529 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3530 dof_pair[0], q_point);
3532 gradient_type
value;
3536 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3541 (*(this->fe_interface->fe_face_values_neighbor))[extractor].gradient(
3542 dof_pair[1], q_point);
3549 template <
int dim,
int spacedim>
3551 Scalar<dim, spacedim>::jump_gradient(
const unsigned int interface_dof_index,
3552 const unsigned int q_point)
const
3554 return jump_in_gradients(interface_dof_index, q_point);
3559 template <
int dim,
int spacedim>
3561 Scalar<dim, spacedim>::average_of_hessians(
3562 const unsigned int interface_dof_index,
3563 const unsigned int q_point)
const
3565 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3567 if (this->fe_interface->at_boundary())
3568 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3569 dof_pair[0], q_point);
3576 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3580 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3581 .hessian(dof_pair[1], q_point);
3588 template <
int dim,
int spacedim>
3590 Scalar<dim, spacedim>::average_hessian(
const unsigned int interface_dof_index,
3591 const unsigned int q_point)
const
3593 return average_of_hessians(interface_dof_index, q_point);
3598 template <
int dim,
int spacedim>
3600 Scalar<dim, spacedim>::jump_in_third_derivatives(
3601 const unsigned int interface_dof_index,
3602 const unsigned int q_point)
const
3604 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3606 if (this->fe_interface->at_boundary())
3607 return (*(this->fe_interface->fe_face_values))[extractor]
3608 .third_derivative(dof_pair[0], q_point);
3610 third_derivative_type
value;
3614 (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
3615 dof_pair[0], q_point);
3618 value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3619 .third_derivative(dof_pair[1], q_point);
3626 template <
int dim,
int spacedim>
3628 Scalar<dim, spacedim>::jump_3rd_derivative(
3629 const unsigned int interface_dof_index,
3630 const unsigned int q_point)
const
3632 return jump_in_third_derivatives(interface_dof_index, q_point);
3637 template <
int dim,
int spacedim>
3639 Scalar<dim, spacedim>::jump_in_hessians(
3640 const unsigned int interface_dof_index,
3641 const unsigned int q_point)
const
3643 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3645 if (this->fe_interface->at_boundary())
3646 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3647 dof_pair[0], q_point);
3653 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3658 (*(this->fe_interface->fe_face_values_neighbor))[extractor].hessian(
3659 dof_pair[1], q_point);
3666 template <
int dim,
int spacedim>
3668 Scalar<dim, spacedim>::jump_hessian(
const unsigned int interface_dof_index,
3669 const unsigned int q_point)
const
3671 return jump_in_hessians(interface_dof_index, q_point);
3676 template <
int dim,
int spacedim>
3677 template <
class InputVector>
3680 const bool here_or_there,
3681 const InputVector &local_dof_values,
3682 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
3687 for (
const auto dof_index : this->fe_interface->dof_indices())
3688 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3693 values[q_index] += local_dof_values[dof_index] *
3694 value(here_or_there, dof_index, q_index);
3700 template <
int dim,
int spacedim>
3701 template <
class InputVector>
3704 const bool here_or_there,
3705 const InputVector &fe_function,
3706 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
3709 std::vector<typename InputVector::value_type> local_dof_values(
3710 this->fe_interface->n_current_interface_dofs());
3711 this->get_local_dof_values(fe_function, local_dof_values);
3713 get_function_values_from_local_dof_values(here_or_there,
3720 template <
int dim,
int spacedim>
3721 template <
class InputVector>
3723 Scalar<dim, spacedim>::get_jump_in_function_values_from_local_dof_values(
3724 const InputVector &local_dof_values,
3725 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
3730 for (
const auto dof_index : this->fe_interface->dof_indices())
3731 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3737 local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
3743 template <
int dim,
int spacedim>
3744 template <
class InputVector>
3746 Scalar<dim, spacedim>::get_jump_in_function_values(
3747 const InputVector &fe_function,
3748 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
3751 std::vector<typename InputVector::value_type> local_dof_values(
3752 this->fe_interface->n_current_interface_dofs());
3753 this->get_local_dof_values(fe_function, local_dof_values);
3755 get_jump_in_function_values_from_local_dof_values(local_dof_values,
values);
3760 template <
int dim,
int spacedim>
3761 template <
class InputVector>
3763 Scalar<dim, spacedim>::get_jump_in_function_gradients_from_local_dof_values(
3764 const InputVector &local_dof_values,
3765 std::vector<solution_gradient_type<typename InputVector::value_type>>
3770 for (
const auto dof_index : this->fe_interface->dof_indices())
3771 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3777 local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
3783 template <
int dim,
int spacedim>
3784 template <
class InputVector>
3786 Scalar<dim, spacedim>::get_jump_in_function_gradients(
3787 const InputVector &fe_function,
3788 std::vector<solution_gradient_type<typename InputVector::value_type>>
3791 std::vector<typename InputVector::value_type> local_dof_values(
3792 this->fe_interface->n_current_interface_dofs());
3793 this->get_local_dof_values(fe_function, local_dof_values);
3795 get_jump_in_function_gradients_from_local_dof_values(local_dof_values,
3801 template <
int dim,
int spacedim>
3802 template <
class InputVector>
3804 Scalar<dim, spacedim>::get_average_of_function_values_from_local_dof_values(
3805 const InputVector &local_dof_values,
3806 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
3811 for (
const auto dof_index : this->fe_interface->dof_indices())
3812 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3818 local_dof_values[dof_index] * average_of_values(dof_index, q_index);
3824 template <
int dim,
int spacedim>
3825 template <
class InputVector>
3827 Scalar<dim, spacedim>::get_average_of_function_values(
3828 const InputVector &fe_function,
3829 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
3832 std::vector<typename InputVector::value_type> local_dof_values(
3833 this->fe_interface->n_current_interface_dofs());
3834 this->get_local_dof_values(fe_function, local_dof_values);
3836 get_average_of_function_values_from_local_dof_values(local_dof_values,
3842 template <
int dim,
int spacedim>
3843 template <
class InputVector>
3845 Scalar<dim, spacedim>::
3846 get_average_of_function_gradients_from_local_dof_values(
3847 const InputVector &local_dof_values,
3848 std::vector<solution_gradient_type<typename InputVector::value_type>>
3853 for (
const auto dof_index : this->fe_interface->dof_indices())
3854 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3859 gradients[q_index] += local_dof_values[dof_index] *
3860 average_of_gradients(dof_index, q_index);
3866 template <
int dim,
int spacedim>
3867 template <
class InputVector>
3869 Scalar<dim, spacedim>::get_average_of_function_gradients(
3870 const InputVector &fe_function,
3871 std::vector<solution_gradient_type<typename InputVector::value_type>>
3874 std::vector<typename InputVector::value_type> local_dof_values(
3875 this->fe_interface->n_current_interface_dofs());
3876 this->get_local_dof_values(fe_function, local_dof_values);
3878 get_average_of_function_gradients_from_local_dof_values(local_dof_values,
3884 template <
int dim,
int spacedim>
3885 template <
class InputVector>
3887 Scalar<dim, spacedim>::get_jump_in_function_hessians_from_local_dof_values(
3888 const InputVector &local_dof_values,
3889 std::vector<solution_hessian_type<typename InputVector::value_type>>
3894 for (
const auto dof_index : this->fe_interface->dof_indices())
3895 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3901 local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
3907 template <
int dim,
int spacedim>
3908 template <
class InputVector>
3910 Scalar<dim, spacedim>::get_jump_in_function_hessians(
3911 const InputVector &fe_function,
3912 std::vector<solution_hessian_type<typename InputVector::value_type>>
3915 std::vector<typename InputVector::value_type> local_dof_values(
3916 this->fe_interface->n_current_interface_dofs());
3917 this->get_local_dof_values(fe_function, local_dof_values);
3919 get_jump_in_function_hessians_from_local_dof_values(local_dof_values,
3925 template <
int dim,
int spacedim>
3926 template <
class InputVector>
3928 Scalar<dim, spacedim>::get_average_of_function_hessians_from_local_dof_values(
3929 const InputVector &local_dof_values,
3930 std::vector<solution_hessian_type<typename InputVector::value_type>>
3935 for (
unsigned int dof_index : this->fe_interface->dof_indices())
3936 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3941 hessians[q_index] += local_dof_values[dof_index] *
3942 average_of_hessians(dof_index, q_index);
3948 template <
int dim,
int spacedim>
3949 template <
class InputVector>
3951 Scalar<dim, spacedim>::get_average_of_function_hessians(
3952 const InputVector &fe_function,
3953 std::vector<solution_hessian_type<typename InputVector::value_type>>
3956 std::vector<typename InputVector::value_type> local_dof_values(
3957 this->fe_interface->n_current_interface_dofs());
3958 this->get_local_dof_values(fe_function, local_dof_values);
3960 get_average_of_function_hessians_from_local_dof_values(local_dof_values,
3966 template <
int dim,
int spacedim>
3967 template <
class InputVector>
3969 Scalar<dim, spacedim>::
3970 get_jump_in_function_third_derivatives_from_local_dof_values(
3971 const InputVector &local_dof_values,
3973 solution_third_derivative_type<typename InputVector::value_type>>
3974 &third_derivatives)
const
3977 this->fe_interface->n_quadrature_points);
3979 for (
unsigned int dof_index : this->fe_interface->dof_indices())
3980 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3983 third_derivatives[q_index] = 0.;
3985 third_derivatives[q_index] +=
3986 local_dof_values[dof_index] *
3987 jump_in_third_derivatives(dof_index, q_index);
3993 template <
int dim,
int spacedim>
3994 template <
class InputVector>
3996 Scalar<dim, spacedim>::get_jump_in_function_third_derivatives(
3997 const InputVector &fe_function,
3999 solution_third_derivative_type<typename InputVector::value_type>>
4000 &third_derivatives)
const
4002 std::vector<typename InputVector::value_type> local_dof_values(
4003 this->fe_interface->n_current_interface_dofs());
4004 this->get_local_dof_values(fe_function, local_dof_values);
4006 get_jump_in_function_third_derivatives_from_local_dof_values(
4007 local_dof_values, third_derivatives);
4012 template <
int dim,
int spacedim>
4015 const unsigned int first_vector_component)
4016 : Base<dim, spacedim>(fe_interface)
4017 , extractor(first_vector_component)
4022 template <
int dim,
int spacedim>
4025 const unsigned int interface_dof_index,
4026 const unsigned int q_point)
const
4028 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4031 return (*(this->fe_interface->fe_face_values))[extractor].value(
4032 dof_pair[0], q_point);
4035 return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
4036 dof_pair[1], q_point);
4038 return value_type();
4043 template <
int dim,
int spacedim>
4046 const unsigned int q_point)
const
4048 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4054 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
4059 (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
4060 dof_pair[1], q_point);
4067 template <
int dim,
int spacedim>
4070 const unsigned int q_point)
const
4072 return jump_in_values(interface_dof_index, q_point);
4077 template <
int dim,
int spacedim>
4080 const unsigned int interface_dof_index,
4081 const unsigned int q_point)
const
4083 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4085 if (this->fe_interface->at_boundary())
4086 return (*(this->fe_interface->fe_face_values))[extractor].value(
4087 dof_pair[0], q_point);
4094 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
4099 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
4100 dof_pair[1], q_point);
4107 template <
int dim,
int spacedim>
4110 const unsigned int q_point)
const
4112 return average_of_values(interface_dof_index, q_point);
4117 template <
int dim,
int spacedim>
4120 const unsigned int interface_dof_index,
4121 const unsigned int q_point)
const
4123 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4125 if (this->fe_interface->at_boundary())
4126 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
4127 dof_pair[0], q_point);
4129 gradient_type
value;
4134 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
4138 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4139 .gradient(dof_pair[1], q_point);
4146 template <
int dim,
int spacedim>
4149 const unsigned int interface_dof_index,
4150 const unsigned int q_point)
const
4152 return average_of_gradients(interface_dof_index, q_point);
4157 template <
int dim,
int spacedim>
4160 const unsigned int interface_dof_index,
4161 const unsigned int q_point)
const
4163 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4165 if (this->fe_interface->at_boundary())
4166 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
4167 dof_pair[0], q_point);
4169 gradient_type
value;
4173 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
4178 (*(this->fe_interface->fe_face_values_neighbor))[extractor].gradient(
4179 dof_pair[1], q_point);
4186 template <
int dim,
int spacedim>
4189 const unsigned int q_point)
const
4191 return jump_in_gradients(interface_dof_index, q_point);
4196 template <
int dim,
int spacedim>
4199 const unsigned int interface_dof_index,
4200 const unsigned int q_point)
const
4202 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4204 if (this->fe_interface->at_boundary())
4205 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
4206 dof_pair[0], q_point);
4213 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
4217 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4218 .hessian(dof_pair[1], q_point);
4225 template <
int dim,
int spacedim>
4228 const unsigned int q_point)
const
4230 return average_of_hessians(interface_dof_index, q_point);
4235 template <
int dim,
int spacedim>
4238 const unsigned int interface_dof_index,
4239 const unsigned int q_point)
const
4241 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4243 if (this->fe_interface->at_boundary())
4244 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
4245 dof_pair[0], q_point);
4251 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
4256 (*(this->fe_interface->fe_face_values_neighbor))[extractor].hessian(
4257 dof_pair[1], q_point);
4264 template <
int dim,
int spacedim>
4267 const unsigned int q_point)
const
4269 return jump_in_hessians(interface_dof_index, q_point);
4274 template <
int dim,
int spacedim>
4277 const unsigned int interface_dof_index,
4278 const unsigned int q_point)
const
4280 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4282 if (this->fe_interface->at_boundary())
4283 return (*(this->fe_interface->fe_face_values))[extractor]
4284 .third_derivative(dof_pair[0], q_point);
4286 third_derivative_type
value;
4290 (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
4291 dof_pair[0], q_point);
4294 value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4295 .third_derivative(dof_pair[1], q_point);
4302 template <
int dim,
int spacedim>
4305 const unsigned int interface_dof_index,
4306 const unsigned int q_point)
const
4308 return jump_in_third_derivatives(interface_dof_index, q_point);
4313 template <
int dim,
int spacedim>
4314 template <
class InputVector>
4317 const bool here_or_there,
4318 const InputVector &local_dof_values,
4319 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
4324 for (
const auto dof_index : this->fe_interface->dof_indices())
4325 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4330 values[q_index] += local_dof_values[dof_index] *
4331 value(here_or_there, dof_index, q_index);
4337 template <
int dim,
int spacedim>
4338 template <
class InputVector>
4341 const bool here_or_there,
4342 const InputVector &fe_function,
4343 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
4346 std::vector<typename InputVector::value_type> local_dof_values(
4347 this->fe_interface->n_current_interface_dofs());
4348 this->get_local_dof_values(fe_function, local_dof_values);
4350 get_function_values_from_local_dof_values(here_or_there,
4357 template <
int dim,
int spacedim>
4358 template <
class InputVector>
4361 const InputVector &local_dof_values,
4362 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
4367 for (
const auto dof_index : this->fe_interface->dof_indices())
4368 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4374 local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
4380 template <
int dim,
int spacedim>
4381 template <
class InputVector>
4384 const InputVector &fe_function,
4385 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
4388 std::vector<typename InputVector::value_type> local_dof_values(
4389 this->fe_interface->n_current_interface_dofs());
4390 this->get_local_dof_values(fe_function, local_dof_values);
4392 get_jump_in_function_values_from_local_dof_values(local_dof_values,
values);
4397 template <
int dim,
int spacedim>
4398 template <
class InputVector>
4401 const InputVector &local_dof_values,
4402 std::vector<solution_gradient_type<typename InputVector::value_type>>
4407 for (
const auto dof_index : this->fe_interface->dof_indices())
4408 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4414 local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
4420 template <
int dim,
int spacedim>
4421 template <
class InputVector>
4424 const InputVector &fe_function,
4425 std::vector<solution_gradient_type<typename InputVector::value_type>>
4428 std::vector<typename InputVector::value_type> local_dof_values(
4429 this->fe_interface->n_current_interface_dofs());
4430 this->get_local_dof_values(fe_function, local_dof_values);
4432 get_jump_in_function_gradients_from_local_dof_values(local_dof_values,
4438 template <
int dim,
int spacedim>
4439 template <
class InputVector>
4442 const InputVector &local_dof_values,
4443 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
4448 for (
const auto dof_index : this->fe_interface->dof_indices())
4449 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4455 local_dof_values[dof_index] * average_of_values(dof_index, q_index);
4461 template <
int dim,
int spacedim>
4462 template <
class InputVector>
4465 const InputVector &fe_function,
4466 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
4469 std::vector<typename InputVector::value_type> local_dof_values(
4470 this->fe_interface->n_current_interface_dofs());
4471 this->get_local_dof_values(fe_function, local_dof_values);
4473 get_average_of_function_values_from_local_dof_values(local_dof_values,
4479 template <
int dim,
int spacedim>
4480 template <
class InputVector>
4484 const InputVector &local_dof_values,
4485 std::vector<solution_gradient_type<typename InputVector::value_type>>
4490 for (
const auto dof_index : this->fe_interface->dof_indices())
4491 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4496 gradients[q_index] += local_dof_values[dof_index] *
4497 average_of_gradients(dof_index, q_index);
4503 template <
int dim,
int spacedim>
4504 template <
class InputVector>
4507 const InputVector &fe_function,
4508 std::vector<solution_gradient_type<typename InputVector::value_type>>
4511 std::vector<typename InputVector::value_type> local_dof_values(
4512 this->fe_interface->n_current_interface_dofs());
4513 this->get_local_dof_values(fe_function, local_dof_values);
4515 get_average_of_function_gradients_from_local_dof_values(local_dof_values,
4521 template <
int dim,
int spacedim>
4522 template <
class InputVector>
4525 const InputVector &local_dof_values,
4526 std::vector<solution_hessian_type<typename InputVector::value_type>>
4531 for (
const auto dof_index : this->fe_interface->dof_indices())
4532 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4538 local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
4544 template <
int dim,
int spacedim>
4545 template <
class InputVector>
4548 const InputVector &fe_function,
4549 std::vector<solution_hessian_type<typename InputVector::value_type>>
4552 std::vector<typename InputVector::value_type> local_dof_values(
4553 this->fe_interface->n_current_interface_dofs());
4554 this->get_local_dof_values(fe_function, local_dof_values);
4556 get_jump_in_function_hessians_from_local_dof_values(local_dof_values,
4562 template <
int dim,
int spacedim>
4563 template <
class InputVector>
4566 const InputVector &local_dof_values,
4567 std::vector<solution_hessian_type<typename InputVector::value_type>>
4572 for (
unsigned int dof_index : this->fe_interface->dof_indices())
4573 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4578 hessians[q_index] += local_dof_values[dof_index] *
4579 average_of_hessians(dof_index, q_index);
4585 template <
int dim,
int spacedim>
4586 template <
class InputVector>
4589 const InputVector &fe_function,
4590 std::vector<solution_hessian_type<typename InputVector::value_type>>
4593 std::vector<typename InputVector::value_type> local_dof_values(
4594 this->fe_interface->n_current_interface_dofs());
4595 this->get_local_dof_values(fe_function, local_dof_values);
4597 get_average_of_function_hessians_from_local_dof_values(local_dof_values,
4603 template <
int dim,
int spacedim>
4604 template <
class InputVector>
4608 const InputVector &local_dof_values,
4610 solution_third_derivative_type<typename InputVector::value_type>>
4611 &third_derivatives)
const
4614 this->fe_interface->n_quadrature_points);
4616 for (
unsigned int dof_index : this->fe_interface->dof_indices())
4617 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4620 third_derivatives[q_index] = 0.;
4622 third_derivatives[q_index] +=
4623 local_dof_values[dof_index] *
4624 jump_in_third_derivatives(dof_index, q_index);
4630 template <
int dim,
int spacedim>
4631 template <
class InputVector>
4634 const InputVector &fe_function,
4636 solution_third_derivative_type<typename InputVector::value_type>>
4637 &third_derivatives)
const
4639 std::vector<typename InputVector::value_type> local_dof_values(
4640 this->fe_interface->n_current_interface_dofs());
4641 this->get_local_dof_values(fe_function, local_dof_values);
4643 get_jump_in_function_third_derivatives_from_local_dof_values(
4644 local_dof_values, third_derivatives);
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, level_dof_access >> &cell, const unsigned int face_no)
const std::vector< Tensor< 1, spacedim > > & get_normal_vectors() const
std::unique_ptr< FEFaceValues< dim, spacedim > > internal_fe_face_values
std::vector< types::global_dof_index > get_interface_dof_indices() const
UpdateFlags get_update_flags() const
Tensor< 1, spacedim > jump_in_shape_gradients(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
Tensor< 1, spacedim > normal(const unsigned int q_point_index) const
FEFaceValuesBase< dim, spacedim > * fe_face_values_neighbor
Tensor< 2, spacedim > average_hessian(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
const hp::QCollection< dim - 1 > & get_quadrature_collection() const
void get_jump_in_function_third_derivatives(const InputVector &fe_function, std::vector< Tensor< 3, spacedim, typename InputVector::value_type >> &third_derivatives) const
const FEInterfaceViews::Scalar< dim, spacedim > operator[](const FEValuesExtractors::Scalar &scalar) const
Tensor< 1, spacedim > average_of_shape_gradients(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
FEInterfaceValues(const Mapping< dim, spacedim > &mapping, const FiniteElement< dim, spacedim > &fe, const Quadrature< dim - 1 > &quadrature, const UpdateFlags update_flags)
void reinit(const CellIteratorType &cell, const unsigned int face_no, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int)
FEInterfaceValues(const hp::MappingCollection< dim, spacedim > &mapping_collection, const hp::FECollection< dim, spacedim > &fe_collection, const hp::QCollection< dim - 1 > &quadrature_collection, const UpdateFlags update_flags)
std::unique_ptr< hp::FESubfaceValues< dim, spacedim > > internal_hp_fe_subface_values
const unsigned int n_quadrature_points
const Mapping< dim, spacedim > & get_mapping() const
bool has_hp_capabilities() const
Tensor< 1, spacedim > jump_gradient(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
std::array< unsigned int, 2 > interface_dof_to_dof_indices(const unsigned int interface_dof_index) const
unsigned n_current_interface_dofs() const
Tensor< 1, spacedim > average_gradient(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
double average_of_shape_values(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
double average(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
std::unique_ptr< FESubfaceValues< dim, spacedim > > internal_fe_subface_values
double shape_value(const bool here_or_there, const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
const hp::MappingCollection< dim, spacedim > & get_mapping_collection() const
const FEFaceValuesBase< dim, spacedim > & get_fe_face_values(const unsigned int cell_index) const
void get_jump_in_function_gradients(const InputVector &fe_function, std::vector< Tensor< 1, spacedim, typename InputVector::value_type >> &gradients) const
std_cxx20::ranges::iota_view< unsigned int, unsigned int > quadrature_point_indices() const
void get_average_of_function_hessians(const InputVector &fe_function, std::vector< Tensor< 2, spacedim, typename InputVector::value_type >> &hessians) const
std::unique_ptr< hp::FESubfaceValues< dim, spacedim > > internal_hp_fe_subface_values_neighbor
FEInterfaceValues(const hp::FECollection< dim, spacedim > &fe_collection, const hp::QCollection< dim - 1 > &quadrature_collection, const UpdateFlags update_flags)
const std::vector< Point< spacedim > > & get_quadrature_points() const
double jump(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
Tensor< 2, spacedim > jump_in_shape_hessians(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
const Triangulation< dim, spacedim >::cell_iterator get_cell(const unsigned int cell_index) const
FEInterfaceValues(const Mapping< dim, spacedim > &mapping, const FiniteElement< dim, spacedim > &fe, const hp::QCollection< dim - 1 > &quadrature, const UpdateFlags update_flags)
FEFaceValuesBase< dim, spacedim > * fe_face_values
std::vector< types::global_dof_index > interface_dof_indices
std::unique_ptr< FESubfaceValues< dim, spacedim > > internal_fe_subface_values_neighbor
const std::vector< double > & get_JxW_values() const
const FEInterfaceViews::Vector< dim, spacedim > operator[](const FEValuesExtractors::Vector &vector) const
std::vector< std::array< unsigned int, 2 > > dofmap
const hp::FECollection< dim, spacedim > & get_fe_collection() const
double JxW(const unsigned int quadrature_point) const
void get_average_of_function_values(const InputVector &fe_function, std::vector< typename InputVector::value_type > &values) const
const Quadrature< dim - 1 > & get_quadrature() const
std::unique_ptr< hp::FEFaceValues< dim, spacedim > > internal_hp_fe_face_values_neighbor
double jump_in_shape_values(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
unsigned int get_face_number(const unsigned int cell_index) const
void get_jump_in_function_hessians(const InputVector &fe_function, std::vector< Tensor< 2, spacedim, typename InputVector::value_type >> &hessians) const
FEInterfaceValues(const FiniteElement< dim, spacedim > &fe, const Quadrature< dim - 1 > &quadrature, const UpdateFlags update_flags)
void reinit(const CellIteratorType &cell, const unsigned int face_no, const unsigned int sub_face_no, const CellNeighborIteratorType &cell_neighbor, const unsigned int face_no_neighbor, const unsigned int sub_face_no_neighbor, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int)
Tensor< 3, spacedim > jump_3rd_derivative(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
std::unique_ptr< hp::FEFaceValues< dim, spacedim > > internal_hp_fe_face_values
Tensor< 2, spacedim > jump_hessian(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
const FiniteElement< dim, spacedim > & get_fe() const
Tensor< 2, spacedim > average_of_shape_hessians(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
std::unique_ptr< FEFaceValues< dim, spacedim > > internal_fe_face_values_neighbor
std_cxx20::ranges::iota_view< unsigned int, unsigned int > dof_indices() const
void get_jump_in_function_values(const InputVector &fe_function, std::vector< typename InputVector::value_type > &values) const
Tensor< 3, spacedim > jump_in_shape_3rd_derivatives(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
void get_average_of_function_gradients(const InputVector &fe_function, std::vector< Tensor< 1, spacedim, typename InputVector::value_type >> &gradients) const
void get_local_dof_values(const InputVector &dof_values, OutputVector &local_dof_values) const
Base(const FEInterfaceValues< dim, spacedim > &fe_interface)
const FEInterfaceValues< dim, spacedim > * fe_interface
void get_average_of_function_hessians(const InputVector &fe_function, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
gradient_type average_gradient(const unsigned int interface_dof_index, const unsigned int q_point) const
gradient_type jump_in_gradients(const unsigned int interface_dof_index, const unsigned int q_point) const
hessian_type jump_hessian(const unsigned int interface_dof_index, const unsigned int q_point) const
gradient_type jump_gradient(const unsigned int interface_dof_index, const unsigned int q_point) const
hessian_type jump_in_hessians(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_jump_in_function_values(const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
void get_average_of_function_values(const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
void get_average_of_function_values_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
void get_function_values(const bool here_or_there, const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
const FEValuesExtractors::Scalar extractor
void get_jump_in_function_values_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
value_type jump(const unsigned int interface_dof_index, const unsigned int q_point) const
typename FEValuesViews::Scalar< dim, spacedim >::gradient_type gradient_type
hessian_type average_of_hessians(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_function_values_from_local_dof_values(const bool here_or_there, const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
value_type value(const bool here_or_there, const unsigned int interface_dof_index, const unsigned int q_point) const
value_type average(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_jump_in_function_gradients(const InputVector &fe_function, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
void get_jump_in_function_gradients_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
value_type average_value(const unsigned int interface_dof_index, const unsigned int q_point) const
hessian_type average_hessian(const unsigned int interface_dof_index, const unsigned int q_point) const
typename ProductType< Number, value_type >::type solution_value_type
typename ProductType< Number, third_derivative_type >::type solution_third_derivative_type
void get_jump_in_function_hessians_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
void get_average_of_function_gradients_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
void get_average_of_function_gradients(const InputVector &fe_function, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
Scalar(const FEInterfaceValues< dim, spacedim > &fe_interface, const unsigned int component)
void get_jump_in_function_hessians(const InputVector &fe_function, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
typename FEValuesViews::Scalar< dim, spacedim >::hessian_type hessian_type
void get_jump_in_function_third_derivatives(const InputVector &fe_function, std::vector< solution_third_derivative_type< typename InputVector::value_type >> &third_derivatives) const
third_derivative_type jump_in_third_derivatives(const unsigned int interface_dof_index, const unsigned int q_point) const
gradient_type average_of_gradients(const unsigned int interface_dof_index, const unsigned int q_point) const
third_derivative_type jump_3rd_derivative(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_jump_in_function_third_derivatives_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_third_derivative_type< typename InputVector::value_type >> &third_derivatives) const
void get_average_of_function_hessians_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
value_type average_of_values(const unsigned int interface_dof_index, const unsigned int q_point) const
value_type jump_in_values(const unsigned int interface_dof_index, const unsigned int q_point) const
typename FEValuesViews::Scalar< dim, spacedim >::third_derivative_type third_derivative_type
typename ProductType< Number, hessian_type >::type solution_hessian_type
typename ProductType< Number, gradient_type >::type solution_gradient_type
void get_function_values_from_local_dof_values(const bool here_or_there, const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
const FEValuesExtractors::Vector extractor
void get_jump_in_function_hessians(const InputVector &fe_function, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
void get_average_of_function_hessians(const InputVector &fe_function, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
void get_jump_in_function_gradients(const InputVector &fe_function, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
void get_jump_in_function_hessians_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
hessian_type average_hessian(const unsigned int interface_dof_index, const unsigned int q_point) const
value_type average(const unsigned int interface_dof_index, const unsigned int q_point) const
Vector(const FEInterfaceValues< dim, spacedim > &fe_interface, const unsigned int first_vector_component)
void get_jump_in_function_gradients_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
void get_jump_in_function_third_derivatives(const InputVector &fe_function, std::vector< solution_third_derivative_type< typename InputVector::value_type >> &third_derivatives) const
void get_average_of_function_values(const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
typename ProductType< Number, gradient_type >::type solution_gradient_type
hessian_type jump_hessian(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_average_of_function_hessians_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
typename ProductType< Number, value_type >::type solution_value_type
typename FEValuesViews::Vector< dim, spacedim >::value_type value_type
value_type value(const bool here_or_there, const unsigned int interface_dof_index, const unsigned int q_point) const
third_derivative_type jump_in_third_derivatives(const unsigned int interface_dof_index, const unsigned int q_point) const
third_derivative_type jump_3rd_derivative(const unsigned int interface_dof_index, const unsigned int q_point) const
value_type jump_in_values(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_jump_in_function_values_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
void get_average_of_function_gradients(const InputVector &fe_function, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
value_type jump(const unsigned int interface_dof_index, const unsigned int q_point) const
typename ProductType< Number, hessian_type >::type solution_hessian_type
void get_average_of_function_values_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
gradient_type jump_gradient(const unsigned int interface_dof_index, const unsigned int q_point) const
value_type average_of_values(const unsigned int interface_dof_index, const unsigned int q_point) const
hessian_type jump_in_hessians(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_function_values(const bool here_or_there, const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
gradient_type average_of_gradients(const unsigned int interface_dof_index, const unsigned int q_point) const
typename ProductType< Number, third_derivative_type >::type solution_third_derivative_type
void get_jump_in_function_values(const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
typename FEValuesViews::Vector< dim, spacedim >::gradient_type gradient_type
gradient_type jump_in_gradients(const unsigned int interface_dof_index, const unsigned int q_point) const
typename FEValuesViews::Vector< dim, spacedim >::third_derivative_type third_derivative_type
void get_jump_in_function_third_derivatives_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_third_derivative_type< typename InputVector::value_type >> &third_derivatives) const
void get_average_of_function_gradients_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
gradient_type average_gradient(const unsigned int interface_dof_index, const unsigned int q_point) const
hessian_type average_of_hessians(const unsigned int interface_dof_index, const unsigned int q_point) const
typename FEValuesViews::Vector< dim, spacedim >::hessian_type hessian_type
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, level_dof_access >> &cell, const unsigned int face_no, const unsigned int subface_no)
value_type value(const unsigned int shape_function, const unsigned int q_point) const
void get_function_values_from_local_dof_values(const InputVector &dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
void get_function_values(const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
::Tensor< 1, spacedim > gradient_type
::Tensor< 2, spacedim > hessian_type
::Tensor< 3, spacedim > third_derivative_type
#define DEAL_II_DEPRECATED
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcOnlyAvailableWithHP()
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcNotInitialized()
static ::ExceptionBase & ExcOnlyAvailableWithoutHP()
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
#define DeclExceptionMsg(Exception, defaulttext)
static ::ExceptionBase & ExcMessage(std::string arg1)
const Mapping< dim, spacedim > & get_default_linear_mapping(const Triangulation< dim, spacedim > &triangulation)
typename ::internal::FEInterfaceViews::ViewType< dim, spacedim, Extractor >::type View
void reference_cell(Triangulation< dim, spacedim > &tria, const ReferenceCell &reference_cell)
static const unsigned int invalid_unsigned_int
boost::integer_range< IncrementableType > iota_view
unsigned short int fe_index
typename internal::ProductTypeImpl< typename std::decay< T >::type, typename std::decay< U >::type >::type type