15#ifndef dealii_fe_interface_values_h
16#define dealii_fe_interface_values_h
32template <
int dim,
int spacedim>
45 template <
int dim,
int spacedim = dim>
64 template <
class InputVector,
class OutputVector>
67 OutputVector &local_dof_values)
const;
75 template <
int dim,
int spacedim = dim>
111 template <
typename Number>
120 template <
typename Number>
130 template <
typename Number>
140 template <
typename Number>
148 const unsigned int component);
176 const unsigned int interface_dof_index,
177 const unsigned int q_point)
const;
198 const unsigned int q_point)
const;
212 const unsigned int q_point)
const;
226 const unsigned int q_point)
const;
240 const unsigned int q_point)
const;
261 const unsigned int q_point)
const;
275 const unsigned int q_point)
const;
290 const unsigned int q_point)
const;
318 template <
class InputVector>
321 const bool here_or_there,
322 const InputVector &fe_function,
348 template <
class InputVector>
351 const bool here_or_there,
352 const InputVector &local_dof_values,
376 template <
class InputVector>
379 const InputVector &fe_function,
390 template <
class InputVector>
393 const InputVector &local_dof_values,
410 template <
class InputVector>
413 const InputVector &fe_function,
424 template <
class InputVector>
427 const InputVector &local_dof_values,
444 template <
class InputVector>
447 const InputVector &fe_function,
458 template <
class InputVector>
461 const InputVector &local_dof_values,
479 template <
class InputVector>
482 const InputVector &fe_function,
485 &third_derivatives)
const;
494 template <
class InputVector>
497 const InputVector &local_dof_values,
500 &third_derivatives)
const;
522 template <
class InputVector>
525 const InputVector &fe_function,
536 template <
class InputVector>
539 const InputVector &local_dof_values,
556 template <
class InputVector>
559 const InputVector &fe_function,
570 template <
class InputVector>
573 const InputVector &local_dof_values,
590 template <
class InputVector>
593 const InputVector &fe_function,
604 template <
class InputVector>
607 const InputVector &local_dof_values,
625 template <
int dim,
int spacedim = dim>
664 template <
typename Number>
673 template <
typename Number>
683 template <
typename Number>
693 template <
typename Number>
701 const unsigned int first_vector_component);
729 const unsigned int interface_dof_index,
730 const unsigned int q_point)
const;
750 const unsigned int q_point)
const;
763 const unsigned int q_point)
const;
772 const unsigned int q_point)
const;
786 const unsigned int q_point)
const;
795 const unsigned int q_point)
const;
809 const unsigned int q_point)
const;
829 const unsigned int q_point)
const;
842 const unsigned int q_point)
const;
857 const unsigned int q_point)
const;
866 const unsigned int q_point)
const;
894 template <
class InputVector>
897 const bool here_or_there,
898 const InputVector &fe_function,
924 template <
class InputVector>
927 const bool here_or_there,
928 const InputVector &local_dof_values,
952 template <
class InputVector>
955 const InputVector &fe_function,
966 template <
class InputVector>
969 const InputVector &local_dof_values,
986 template <
class InputVector>
989 const InputVector &fe_function,
1000 template <
class InputVector>
1003 const InputVector &local_dof_values,
1020 template <
class InputVector>
1023 const InputVector &fe_function,
1034 template <
class InputVector>
1037 const InputVector &local_dof_values,
1055 template <
class InputVector>
1058 const InputVector &fe_function,
1061 &third_derivatives)
const;
1070 template <
class InputVector>
1073 const InputVector &local_dof_values,
1076 &third_derivatives)
const;
1098 template <
class InputVector>
1101 const InputVector &fe_function,
1112 template <
class InputVector>
1115 const InputVector &local_dof_values,
1132 template <
class InputVector>
1135 const InputVector &fe_function,
1146 template <
class InputVector>
1149 const InputVector &local_dof_values,
1166 template <
class InputVector>
1169 const InputVector &fe_function,
1180 template <
class InputVector>
1183 const InputVector &local_dof_values,
1206 template <
int dim,
int spacedim,
typename Extractor>
1217 template <
int dim,
int spacedim>
1220 using type = typename ::FEInterfaceViews::Scalar<dim, spacedim>;
1230 template <
int dim,
int spacedim>
1233 using type = typename ::FEInterfaceViews::Vector<dim, spacedim>;
1244 template <
int dim,
int spacedim,
typename Extractor>
1245 using View = typename ::internal::FEInterfaceViews::
1246 ViewType<dim, spacedim, Extractor>::type;
1275template <
int dim,
int spacedim = dim>
1292 const UpdateFlags update_flags);
1302 const UpdateFlags update_flags);
1312 const UpdateFlags update_flags);
1322 const UpdateFlags update_flags);
1329 const UpdateFlags update_flags);
1447 template <
typename CellIteratorType,
typename CellNeighborIteratorType>
1450 const unsigned int face_no,
1451 const unsigned int sub_face_no,
1452 const CellNeighborIteratorType &cell_neighbor,
1453 const unsigned int face_no_neighbor,
1454 const unsigned int sub_face_no_neighbor,
1486 template <
typename CellIteratorType>
1489 const unsigned int face_no,
1605 const std::vector<double> &
1618 DEAL_II_DEPRECATED_EARLY_WITH_COMMENT(
"Use the function normal_vector().")
1620 normal(const
unsigned int q_point_index) const;
1642 const
std::vector<
Tensor<1, spacedim>> &
1652 std_cxx20::ranges::iota_view<
unsigned int,
unsigned int>
1661 const
Point<spacedim> &
1669 const
std::vector<
Point<spacedim>> &
1712 std_cxx20::ranges::iota_view<
unsigned int,
unsigned int>
1725 std::vector<
types::global_dof_index>
1740 std::array<
unsigned int, 2>
1775 const
unsigned int interface_dof_index,
1776 const
unsigned int q_point,
1777 const
unsigned int component = 0) const;
1790 const
unsigned int interface_dof_index,
1791 const
unsigned int q_point,
1792 const
unsigned int component = 0) const;
1823 const
unsigned int q_point,
1824 const
unsigned int component = 0) const;
1841 const
unsigned int q_point,
1842 const
unsigned int component = 0) const;
1860 const
unsigned int q_point,
1861 const
unsigned int component = 0) const;
1878 const
unsigned int q_point,
1879 const
unsigned int component = 0) const;
1905 const
unsigned int q_point,
1906 const
unsigned int component = 0) const;
1923 const
unsigned int q_point,
1924 const
unsigned int component = 0) const;
1942 const
unsigned int q_point,
1943 const
unsigned int component = 0) const;
1964 template <class InputVector>
1967 const InputVector &fe_function,
1968 std::vector<typename InputVector::value_type> &values) const;
1978 template <class InputVector>
1981 const InputVector &fe_function,
1982 std::vector<
Tensor<1, spacedim, typename InputVector::value_type>>
1992 template <class InputVector>
1995 const InputVector &fe_function,
1996 std::vector<
Tensor<2, spacedim, typename InputVector::value_type>>
2007 template <class InputVector>
2010 const InputVector &fe_function,
2011 std::vector<
Tensor<3, spacedim, typename InputVector::value_type>>
2012 &third_derivatives) const;
2029 template <class InputVector>
2032 const InputVector &fe_function,
2033 std::vector<typename InputVector::value_type> &values) const;
2042 template <class InputVector>
2045 const InputVector &fe_function,
2046 std::vector<
Tensor<1, spacedim, typename InputVector::value_type>>
2056 template <class InputVector>
2059 const InputVector &fe_function,
2060 std::vector<
Tensor<2, spacedim, typename InputVector::value_type>>
2189 "The current function doesn't make sense when used with a "
2190 "FEInterfaceValues object with hp-capabilities.");
2199 "The current function doesn't make sense when used with a "
2200 "FEInterfaceValues object without hp-capabilities.");
2220template <
int dim,
int spacedim>
2225 const UpdateFlags update_flags)
2253template <
int dim,
int spacedim>
2267template <
int dim,
int spacedim>
2273 : n_quadrature_points(quadrature.max_n_quadrature_points())
2274 , fe_face_values(nullptr)
2275 , fe_face_values_neighbor(nullptr)
2276 , internal_fe_face_values(
2281 , internal_fe_subface_values(
2286 , internal_fe_face_values_neighbor(
2291 , internal_fe_subface_values_neighbor(
2300template <
int dim,
int spacedim>
2306 : n_quadrature_points(quadrature_collection.max_n_quadrature_points())
2307 , fe_face_values(nullptr)
2308 , fe_face_values_neighbor(nullptr)
2309 , internal_hp_fe_face_values(
2312 quadrature_collection,
2314 , internal_hp_fe_subface_values(
2318 quadrature_collection,
2320 , internal_hp_fe_face_values_neighbor(
2323 quadrature_collection,
2325 , internal_hp_fe_subface_values_neighbor(
2329 quadrature_collection,
2337template <
int dim,
int spacedim>
2344 quadrature_collection,
2350template <
int dim,
int spacedim>
2351template <
typename CellIteratorType,
typename CellNeighborIteratorType>
2354 const CellIteratorType &cell,
2355 const unsigned int face_no,
2356 const unsigned int sub_face_no,
2357 const CellNeighborIteratorType &cell_neighbor,
2358 const unsigned int face_no_neighbor,
2359 const unsigned int sub_face_no_neighbor,
2360 const unsigned int q_index,
2361 const unsigned int mapping_index,
2362 const unsigned int fe_index_in,
2363 const unsigned int fe_index_neighbor_in)
2365 Assert(internal_fe_face_values || internal_hp_fe_face_values,
2368 constexpr bool is_dof_cell_accessor =
2369 std::is_same_v<DoFCellAccessor<dim, spacedim, true>,
2370 typename CellIteratorType::AccessorType> ||
2371 std::is_same_v<DoFCellAccessor<dim, spacedim, false>,
2372 typename CellIteratorType::AccessorType>;
2374 constexpr bool is_dof_cell_accessor_neighbor =
2375 std::is_same_v<DoFCellAccessor<dim, spacedim, true>,
2376 typename CellNeighborIteratorType::AccessorType> ||
2377 std::is_same_v<DoFCellAccessor<dim, spacedim, false>,
2378 typename CellNeighborIteratorType::AccessorType>;
2380 unsigned int active_fe_index = 0;
2381 unsigned int active_fe_index_neighbor = 0;
2383 if (internal_fe_face_values)
2387 internal_fe_face_values->reinit(cell, face_no);
2388 fe_face_values = internal_fe_face_values.get();
2392 internal_fe_subface_values->reinit(cell, face_no, sub_face_no);
2393 fe_face_values = internal_fe_subface_values.get();
2397 internal_fe_face_values_neighbor->reinit(cell_neighbor,
2399 fe_face_values_neighbor = internal_fe_face_values_neighbor.get();
2403 internal_fe_subface_values_neighbor->reinit(cell_neighbor,
2405 sub_face_no_neighbor);
2406 fe_face_values_neighbor = internal_fe_subface_values_neighbor.get();
2410 fe_face_values_neighbor->n_quadrature_points);
2412 const_cast<unsigned int &
>(this->n_quadrature_points) =
2413 fe_face_values->n_quadrature_points;
2415 else if (internal_hp_fe_face_values)
2417 active_fe_index = fe_index_in;
2418 active_fe_index_neighbor =
2420 fe_index_neighbor_in :
2425 if constexpr (is_dof_cell_accessor)
2426 active_fe_index = cell->active_fe_index();
2428 active_fe_index = 0;
2433 if constexpr (is_dof_cell_accessor_neighbor)
2434 active_fe_index_neighbor = cell_neighbor->active_fe_index();
2436 active_fe_index_neighbor = 0;
2439 unsigned int used_q_index = q_index;
2440 unsigned int used_mapping_index = mapping_index;
2445 if (internal_hp_fe_face_values->get_quadrature_collection().size() == 1)
2449 if (internal_hp_fe_face_values->get_mapping_collection().size() == 1)
2450 used_mapping_index = 0;
2457 if (internal_hp_fe_face_values
2458 ->get_quadrature_collection()[active_fe_index] ==
2459 internal_hp_fe_face_values
2460 ->get_quadrature_collection()[active_fe_index_neighbor])
2461 used_q_index = active_fe_index;
2468 const unsigned int dominated_fe_index =
2471 internal_hp_fe_face_values->get_fe_collection()
2473 {active_fe_index, active_fe_index_neighbor}) :
2480 "You called this function with 'q_index' left at its "
2481 "default value, but this can only work if one of "
2482 "the two finite elements adjacent to this face "
2483 "dominates the other. See the documentation "
2484 "of this function for more information of how "
2485 "to deal with this situation."));
2486 used_q_index = dominated_fe_index;
2493 "You called this function with 'mapping_index' left "
2494 "at its default value, but this can only work if one "
2495 "of the two finite elements adjacent to this face "
2496 "dominates the other. See the documentation "
2497 "of this function for more information of how "
2498 "to deal with this situation."));
2499 used_mapping_index = dominated_fe_index;
2506 internal_hp_fe_face_values->reinit(
2507 cell, face_no, used_q_index, used_mapping_index, active_fe_index);
2509 internal_hp_fe_face_values->get_present_fe_values());
2513 internal_hp_fe_subface_values->reinit(cell,
2521 internal_hp_fe_subface_values->get_present_fe_values());
2525 internal_hp_fe_face_values_neighbor->reinit(cell_neighbor,
2529 active_fe_index_neighbor);
2532 internal_hp_fe_face_values_neighbor->get_present_fe_values());
2536 internal_hp_fe_subface_values_neighbor->reinit(
2539 sub_face_no_neighbor,
2542 active_fe_index_neighbor);
2544 fe_face_values_neighbor =
2546 internal_hp_fe_subface_values_neighbor->get_present_fe_values());
2550 fe_face_values_neighbor->n_quadrature_points);
2552 const_cast<unsigned int &
>(this->n_quadrature_points) =
2553 fe_face_values->n_quadrature_points;
2557 if constexpr (is_dof_cell_accessor_neighbor && is_dof_cell_accessor)
2560 std::vector<types::global_dof_index> v(
2561 fe_face_values->get_fe().n_dofs_per_cell());
2562 cell->get_active_or_mg_dof_indices(v);
2563 std::vector<types::global_dof_index> v2(
2564 fe_face_values_neighbor->get_fe().n_dofs_per_cell());
2565 cell_neighbor->get_active_or_mg_dof_indices(v2);
2569 std::map<types::global_dof_index, std::pair<unsigned int, unsigned int>>
2571 std::pair<unsigned int, unsigned int> invalid_entry(
2574 for (
unsigned int i = 0; i < v.size(); ++i)
2577 auto result = tempmap.insert(std::make_pair(v[i], invalid_entry));
2578 result.first->second.first = i;
2581 for (
unsigned int i = 0; i < v2.size(); ++i)
2584 auto result = tempmap.insert(std::make_pair(v2[i], invalid_entry));
2585 result.first->second.second = i;
2589 dofmap.resize(tempmap.size());
2590 interface_dof_indices.resize(tempmap.size());
2591 unsigned int idx = 0;
2592 for (
auto &x : tempmap)
2594 interface_dof_indices[idx] = x.first;
2595 dofmap[idx] = {{x.second.first, x.second.second}};
2601 const unsigned int n_dofs_per_cell_1 = fe_face_values->dofs_per_cell;
2602 const unsigned int n_dofs_per_cell_2 =
2603 fe_face_values_neighbor->dofs_per_cell;
2605 interface_dof_indices.resize(n_dofs_per_cell_1 + n_dofs_per_cell_2);
2606 dofmap.resize(n_dofs_per_cell_1 + n_dofs_per_cell_2);
2608 for (
unsigned int i = 0; i < n_dofs_per_cell_1; ++i)
2614 for (
unsigned int i = 0; i < n_dofs_per_cell_2; ++i)
2616 interface_dof_indices[i + n_dofs_per_cell_1] =
2625template <
int dim,
int spacedim>
2626template <
typename CellIteratorType>
2629 const unsigned int face_no,
2630 const unsigned int q_index,
2631 const unsigned int mapping_index,
2632 const unsigned int fe_index)
2634 Assert(internal_fe_face_values || internal_hp_fe_face_values,
2637 if (internal_fe_face_values)
2641 Assert((mapping_index == 0 ||
2647 internal_fe_face_values->reinit(cell, face_no);
2648 fe_face_values = internal_fe_face_values.get();
2649 fe_face_values_neighbor =
nullptr;
2651 else if (internal_hp_fe_face_values)
2653 internal_hp_fe_face_values->reinit(
2654 cell, face_no, q_index, mapping_index, fe_index);
2656 internal_hp_fe_face_values->get_present_fe_values());
2657 fe_face_values_neighbor =
nullptr;
2660 interface_dof_indices.resize(fe_face_values->get_fe().n_dofs_per_cell());
2662 if constexpr (std::is_same_v<
typename CellIteratorType::AccessorType,
2664 std::is_same_v<
typename CellIteratorType::AccessorType,
2667 cell->get_active_or_mg_dof_indices(interface_dof_indices);
2671 for (
auto &i : interface_dof_indices)
2675 dofmap.resize(interface_dof_indices.size());
2676 for (
unsigned int i = 0; i < interface_dof_indices.size(); ++i)
2682template <
int dim,
int spacedim>
2686 Assert(fe_face_values !=
nullptr,
2687 ExcMessage(
"This call requires a call to reinit() first."));
2688 return fe_face_values->JxW(q);
2693template <
int dim,
int spacedim>
2694const std::vector<double> &
2697 Assert(fe_face_values !=
nullptr,
2698 ExcMessage(
"This call requires a call to reinit() first."));
2699 return fe_face_values->get_JxW_values();
2704template <
int dim,
int spacedim>
2705const std::vector<Tensor<1, spacedim>> &
2708 Assert(fe_face_values !=
nullptr,
2709 ExcMessage(
"This call requires a call to reinit() first."));
2710 return fe_face_values->get_normal_vectors();
2715template <
int dim,
int spacedim>
2719 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2720 return internal_fe_face_values->get_mapping();
2725template <
int dim,
int spacedim>
2729 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2730 return internal_fe_face_values->get_fe();
2735template <
int dim,
int spacedim>
2739 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2740 return internal_fe_face_values->get_quadrature();
2745template <
int dim,
int spacedim>
2749 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2750 return internal_hp_fe_face_values->get_mapping_collection();
2755template <
int dim,
int spacedim>
2759 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2760 return internal_hp_fe_face_values->get_fe_collection();
2765template <
int dim,
int spacedim>
2769 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2770 return internal_hp_fe_face_values->get_quadrature_collection();
2775template <
int dim,
int spacedim>
2779 if (internal_hp_fe_face_values || internal_hp_fe_subface_values ||
2780 internal_hp_fe_face_values_neighbor ||
2781 internal_hp_fe_subface_values_neighbor)
2791 Assert(internal_fe_face_values || internal_fe_subface_values ||
2792 internal_fe_face_values_neighbor ||
2793 internal_fe_subface_values_neighbor,
2805template <
int dim,
int spacedim>
2810 0U, n_quadrature_points);
2815template <
int dim,
int spacedim>
2818 const unsigned int q_point)
const
2820 Assert(fe_face_values !=
nullptr,
2821 ExcMessage(
"This call requires a call to reinit() first."));
2822 return fe_face_values->quadrature_point(q_point);
2827template <
int dim,
int spacedim>
2828const std::vector<Point<spacedim>> &
2831 Assert(fe_face_values !=
nullptr,
2832 ExcMessage(
"This call requires a call to reinit() first."));
2833 return fe_face_values->get_quadrature_points();
2838template <
int dim,
int spacedim>
2842 if (has_hp_capabilities())
2843 return internal_hp_fe_face_values->get_update_flags();
2845 return internal_fe_face_values->get_update_flags();
2850template <
int dim,
int spacedim>
2854 return get_fe_face_values(cell_index).get_cell();
2859template <
int dim,
int spacedim>
2862 const unsigned int cell_index)
const
2864 return get_fe_face_values(cell_index).get_face_number();
2869template <
int dim,
int spacedim>
2874 interface_dof_indices.size() > 0,
2876 "n_current_interface_dofs() is only available after a call to reinit()."));
2877 return interface_dof_indices.size();
2882template <
int dim,
int spacedim>
2886 return {0
U, n_current_interface_dofs()};
2891template <
int dim,
int spacedim>
2895 return fe_face_values_neighbor ==
nullptr;
2900template <
int dim,
int spacedim>
2901std::vector<types::global_dof_index>
2904 return interface_dof_indices;
2909template <
int dim,
int spacedim>
2910std::array<unsigned int, 2>
2912 const unsigned int interface_dof_index)
const
2915 return dofmap[interface_dof_index];
2920template <
int dim,
int spacedim>
2923 const unsigned int cell_index)
const
2927 cell_index == 0 || !at_boundary(),
2929 "You are on a boundary, so you can only ask for the first FEFaceValues object."));
2931 return (cell_index == 0) ? *fe_face_values : *fe_face_values_neighbor;
2936template <
int dim,
int spacedim>
2940 return normal_vector(q_point_index);
2945template <
int dim,
int spacedim>
2948 const unsigned int q_point_index)
const
2950 return fe_face_values->normal_vector(q_point_index);
2955template <
int dim,
int spacedim>
2958 const bool here_or_there,
2959 const unsigned int interface_dof_index,
2960 const unsigned int q_point,
2961 const unsigned int component)
const
2963 const auto dof_pair = dofmap[interface_dof_index];
2966 return get_fe_face_values(0).shape_value_component(dof_pair[0],
2970 return get_fe_face_values(1).shape_value_component(dof_pair[1],
2978template <
int dim,
int spacedim>
2981 const bool here_or_there,
2982 const unsigned int interface_dof_index,
2983 const unsigned int q_point,
2984 const unsigned int component)
const
2986 const auto dof_pair = dofmap[interface_dof_index];
2991 value = get_fe_face_values(0).shape_grad_component(dof_pair[0],
2995 value = get_fe_face_values(1).shape_grad_component(dof_pair[1],
3002template <
int dim,
int spacedim>
3005 const unsigned int interface_dof_index,
3006 const unsigned int q_point,
3007 const unsigned int component)
const
3009 const auto dof_pair = dofmap[interface_dof_index];
3014 value += get_fe_face_values(0).shape_value_component(dof_pair[0],
3018 value -= get_fe_face_values(1).shape_value_component(dof_pair[1],
3026template <
int dim,
int spacedim>
3029 const unsigned int interface_dof_index,
3030 const unsigned int q_point,
3031 const unsigned int component)
const
3033 const auto dof_pair = dofmap[interface_dof_index];
3036 return get_fe_face_values(0).shape_value_component(dof_pair[0],
3043 value += 0.5 * get_fe_face_values(0).shape_value_component(dof_pair[0],
3047 value += 0.5 * get_fe_face_values(1).shape_value_component(dof_pair[1],
3056template <
int dim,
int spacedim>
3059 const unsigned int interface_dof_index,
3060 const unsigned int q_point,
3061 const unsigned int component)
const
3063 const auto dof_pair = dofmap[interface_dof_index];
3066 return get_fe_face_values(0).shape_grad_component(dof_pair[0],
3073 value += 0.5 * get_fe_face_values(0).shape_grad_component(dof_pair[0],
3077 value += 0.5 * get_fe_face_values(1).shape_grad_component(dof_pair[1],
3086template <
int dim,
int spacedim>
3089 const unsigned int interface_dof_index,
3090 const unsigned int q_point,
3091 const unsigned int component)
const
3093 const auto dof_pair = dofmap[interface_dof_index];
3096 return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3103 value += 0.5 * get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3107 value += 0.5 * get_fe_face_values(1).shape_hessian_component(dof_pair[1],
3116template <
int dim,
int spacedim>
3119 const unsigned int interface_dof_index,
3120 const unsigned int q_point,
3121 const unsigned int component)
const
3123 const auto dof_pair = dofmap[interface_dof_index];
3126 return get_fe_face_values(0).shape_grad_component(dof_pair[0],
3133 value += get_fe_face_values(0).shape_grad_component(dof_pair[0],
3137 value -= get_fe_face_values(1).shape_grad_component(dof_pair[1],
3146template <
int dim,
int spacedim>
3149 const unsigned int interface_dof_index,
3150 const unsigned int q_point,
3151 const unsigned int component)
const
3153 const auto dof_pair = dofmap[interface_dof_index];
3156 return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3163 value += get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3167 value -= get_fe_face_values(1).shape_hessian_component(dof_pair[1],
3176template <
int dim,
int spacedim>
3179 const unsigned int interface_dof_index,
3180 const unsigned int q_point,
3181 const unsigned int component)
const
3183 const auto dof_pair = dofmap[interface_dof_index];
3186 return get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3193 value += get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3197 value -= get_fe_face_values(1).shape_3rd_derivative_component(dof_pair[1],
3206template <
int dim,
int spacedim>
3207template <
class InputVector>
3210 const InputVector &fe_function,
3211 std::vector<typename InputVector::value_type> &values)
const
3216 this->operator[](scalar).get_jump_in_function_values(fe_function, values);
3221template <
int dim,
int spacedim>
3222template <
class InputVector>
3225 const InputVector &fe_function,
3232 this->operator[](scalar).get_jump_in_function_gradients(fe_function,
3238template <
int dim,
int spacedim>
3239template <
class InputVector>
3242 const InputVector &fe_function,
3249 this->operator[](scalar).get_jump_in_function_hessians(fe_function, hessians);
3254template <
int dim,
int spacedim>
3255template <
class InputVector>
3258 const InputVector &fe_function,
3260 &third_derivatives)
const
3265 this->operator[](scalar).get_jump_in_function_third_derivatives(
3266 fe_function, third_derivatives);
3271template <
int dim,
int spacedim>
3272template <
class InputVector>
3275 const InputVector &fe_function,
3276 std::vector<typename InputVector::value_type> &values)
const
3281 this->operator[](scalar).get_average_of_function_values(fe_function, values);
3286template <
int dim,
int spacedim>
3287template <
class InputVector>
3290 const InputVector &fe_function,
3297 this->operator[](scalar).get_average_of_function_gradients(fe_function,
3303template <
int dim,
int spacedim>
3304template <
class InputVector>
3307 const InputVector &fe_function,
3314 this->operator[](scalar).get_average_of_function_hessians(fe_function,
3321template <
int dim,
int spacedim>
3326 const unsigned int n_components =
3327 (this->has_hp_capabilities() ? this->get_fe_collection().n_components() :
3328 this->get_fe().n_components());
3336template <
int dim,
int spacedim>
3341 const unsigned int n_components =
3342 (this->has_hp_capabilities() ? this->get_fe_collection().n_components() :
3343 this->get_fe().n_components());
3344 const unsigned int n_vectors =
3359 template <
int dim,
int spacedim>
3361 const FEInterfaceValues<dim, spacedim> &fe_interface)
3362 : fe_interface(&fe_interface)
3367 template <
int dim,
int spacedim>
3368 Scalar<dim, spacedim>::Scalar(
3370 const unsigned int component)
3371 : Base<dim, spacedim>(fe_interface)
3372 , extractor(component)
3377 template <
int dim,
int spacedim>
3378 template <
class InputVector,
class OutputVector>
3380 Base<dim, spacedim>::get_local_dof_values(
3381 const InputVector &dof_values,
3382 OutputVector &local_dof_values)
const
3384 const auto &interface_dof_indices =
3385 this->fe_interface->get_interface_dof_indices();
3387 AssertDimension(interface_dof_indices.size(), local_dof_values.size());
3389 for (
const unsigned int i : this->fe_interface->dof_indices())
3390 local_dof_values[i] = dof_values(interface_dof_indices[i]);
3395 template <
int dim,
int spacedim>
3396 typename Scalar<dim, spacedim>::value_type
3397 Scalar<dim, spacedim>::value(
const bool here_or_there,
3398 const unsigned int interface_dof_index,
3399 const unsigned int q_point)
const
3401 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3404 return (*(this->fe_interface->fe_face_values))[extractor].value(
3405 dof_pair[0], q_point);
3408 return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3409 dof_pair[1], q_point);
3416 template <
int dim,
int spacedim>
3417 typename Scalar<dim, spacedim>::value_type
3418 Scalar<dim, spacedim>::jump_in_values(
const unsigned int interface_dof_index,
3419 const unsigned int q_point)
const
3421 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3423 value_type
value = 0.0;
3427 (*(this->fe_interface->fe_face_values))[extractor].
value(dof_pair[0],
3432 (*(this->fe_interface->fe_face_values_neighbor))[extractor].
value(
3433 dof_pair[1], q_point);
3440 template <
int dim,
int spacedim>
3441 typename Scalar<dim, spacedim>::value_type
3442 Scalar<dim, spacedim>::average_of_values(
3443 const unsigned int interface_dof_index,
3444 const unsigned int q_point)
const
3446 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3448 if (this->fe_interface->at_boundary())
3449 return (*(this->fe_interface->fe_face_values))[extractor].value(
3450 dof_pair[0], q_point);
3452 value_type
value = 0.0;
3457 (*(this->fe_interface->fe_face_values))[extractor].
value(dof_pair[0],
3462 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].
value(
3463 dof_pair[1], q_point);
3470 template <
int dim,
int spacedim>
3471 typename Scalar<dim, spacedim>::gradient_type
3472 Scalar<dim, spacedim>::average_of_gradients(
3473 const unsigned int interface_dof_index,
3474 const unsigned int q_point)
const
3476 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3478 if (this->fe_interface->at_boundary())
3479 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3480 dof_pair[0], q_point);
3482 gradient_type
value;
3487 (*(this->fe_interface->fe_face_values))[extractor].
gradient(dof_pair[0],
3491 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3499 template <
int dim,
int spacedim>
3500 typename Scalar<dim, spacedim>::gradient_type
3501 Scalar<dim, spacedim>::jump_in_gradients(
3502 const unsigned int interface_dof_index,
3503 const unsigned int q_point)
const
3505 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3507 if (this->fe_interface->at_boundary())
3508 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3509 dof_pair[0], q_point);
3511 gradient_type
value;
3515 (*(this->fe_interface->fe_face_values))[extractor].
gradient(dof_pair[0],
3520 (*(this->fe_interface->fe_face_values_neighbor))[extractor].
gradient(
3521 dof_pair[1], q_point);
3528 template <
int dim,
int spacedim>
3529 typename Scalar<dim, spacedim>::hessian_type
3530 Scalar<dim, spacedim>::average_of_hessians(
3531 const unsigned int interface_dof_index,
3532 const unsigned int q_point)
const
3534 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3536 if (this->fe_interface->at_boundary())
3537 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3538 dof_pair[0], q_point);
3545 (*(this->fe_interface->fe_face_values))[extractor].
hessian(dof_pair[0],
3549 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3550 .
hessian(dof_pair[1], q_point);
3557 template <
int dim,
int spacedim>
3558 typename Scalar<dim, spacedim>::third_derivative_type
3559 Scalar<dim, spacedim>::jump_in_third_derivatives(
3560 const unsigned int interface_dof_index,
3561 const unsigned int q_point)
const
3563 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3565 if (this->fe_interface->at_boundary())
3566 return (*(this->fe_interface->fe_face_values))[extractor]
3567 .third_derivative(dof_pair[0], q_point);
3569 third_derivative_type
value;
3573 (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
3574 dof_pair[0], q_point);
3577 value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3578 .third_derivative(dof_pair[1], q_point);
3585 template <
int dim,
int spacedim>
3586 typename Scalar<dim, spacedim>::hessian_type
3587 Scalar<dim, spacedim>::jump_in_hessians(
3588 const unsigned int interface_dof_index,
3589 const unsigned int q_point)
const
3591 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3593 if (this->fe_interface->at_boundary())
3594 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3595 dof_pair[0], q_point);
3601 (*(this->fe_interface->fe_face_values))[extractor].
hessian(dof_pair[0],
3606 (*(this->fe_interface->fe_face_values_neighbor))[extractor].
hessian(
3607 dof_pair[1], q_point);
3614 template <
int dim,
int spacedim>
3615 template <
class InputVector>
3617 Scalar<dim, spacedim>::get_function_values_from_local_dof_values(
3618 const bool here_or_there,
3619 const InputVector &local_dof_values,
3620 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3623 AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
3625 for (
const auto dof_index : this->fe_interface->dof_indices())
3626 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3629 values[q_index] = 0.;
3631 values[q_index] += local_dof_values[dof_index] *
3632 value(here_or_there, dof_index, q_index);
3638 template <
int dim,
int spacedim>
3639 template <
class InputVector>
3641 Scalar<dim, spacedim>::get_function_values(
3642 const bool here_or_there,
3643 const InputVector &fe_function,
3644 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3647 std::vector<typename InputVector::value_type> local_dof_values(
3648 this->fe_interface->n_current_interface_dofs());
3649 this->get_local_dof_values(fe_function, local_dof_values);
3651 get_function_values_from_local_dof_values(here_or_there,
3658 template <
int dim,
int spacedim>
3659 template <
class InputVector>
3661 Scalar<dim, spacedim>::get_jump_in_function_values_from_local_dof_values(
3662 const InputVector &local_dof_values,
3663 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3666 AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
3668 for (
const auto dof_index : this->fe_interface->dof_indices())
3669 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3672 values[q_index] = 0.;
3675 local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
3681 template <
int dim,
int spacedim>
3682 template <
class InputVector>
3684 Scalar<dim, spacedim>::get_jump_in_function_values(
3685 const InputVector &fe_function,
3686 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3689 std::vector<typename InputVector::value_type> local_dof_values(
3690 this->fe_interface->n_current_interface_dofs());
3691 this->get_local_dof_values(fe_function, local_dof_values);
3693 get_jump_in_function_values_from_local_dof_values(local_dof_values, values);
3698 template <
int dim,
int spacedim>
3699 template <
class InputVector>
3701 Scalar<dim, spacedim>::get_jump_in_function_gradients_from_local_dof_values(
3702 const InputVector &local_dof_values,
3703 std::vector<solution_gradient_type<typename InputVector::value_type>>
3708 for (
const auto dof_index : this->fe_interface->dof_indices())
3709 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3715 local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
3721 template <
int dim,
int spacedim>
3722 template <
class InputVector>
3724 Scalar<dim, spacedim>::get_jump_in_function_gradients(
3725 const InputVector &fe_function,
3726 std::vector<solution_gradient_type<typename InputVector::value_type>>
3729 std::vector<typename InputVector::value_type> local_dof_values(
3730 this->fe_interface->n_current_interface_dofs());
3731 this->get_local_dof_values(fe_function, local_dof_values);
3733 get_jump_in_function_gradients_from_local_dof_values(local_dof_values,
3739 template <
int dim,
int spacedim>
3740 template <
class InputVector>
3742 Scalar<dim, spacedim>::get_average_of_function_values_from_local_dof_values(
3743 const InputVector &local_dof_values,
3744 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3747 AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
3749 for (
const auto dof_index : this->fe_interface->dof_indices())
3750 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3753 values[q_index] = 0.;
3756 local_dof_values[dof_index] * average_of_values(dof_index, q_index);
3762 template <
int dim,
int spacedim>
3763 template <
class InputVector>
3765 Scalar<dim, spacedim>::get_average_of_function_values(
3766 const InputVector &fe_function,
3767 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3770 std::vector<typename InputVector::value_type> local_dof_values(
3771 this->fe_interface->n_current_interface_dofs());
3772 this->get_local_dof_values(fe_function, local_dof_values);
3774 get_average_of_function_values_from_local_dof_values(local_dof_values,
3780 template <
int dim,
int spacedim>
3781 template <
class InputVector>
3783 Scalar<dim, spacedim>::
3784 get_average_of_function_gradients_from_local_dof_values(
3785 const InputVector &local_dof_values,
3786 std::vector<solution_gradient_type<typename InputVector::value_type>>
3791 for (
const auto dof_index : this->fe_interface->dof_indices())
3792 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3797 gradients[q_index] += local_dof_values[dof_index] *
3798 average_of_gradients(dof_index, q_index);
3804 template <
int dim,
int spacedim>
3805 template <
class InputVector>
3807 Scalar<dim, spacedim>::get_average_of_function_gradients(
3808 const InputVector &fe_function,
3809 std::vector<solution_gradient_type<typename InputVector::value_type>>
3812 std::vector<typename InputVector::value_type> local_dof_values(
3813 this->fe_interface->n_current_interface_dofs());
3814 this->get_local_dof_values(fe_function, local_dof_values);
3816 get_average_of_function_gradients_from_local_dof_values(local_dof_values,
3822 template <
int dim,
int spacedim>
3823 template <
class InputVector>
3825 Scalar<dim, spacedim>::get_jump_in_function_hessians_from_local_dof_values(
3826 const InputVector &local_dof_values,
3827 std::vector<solution_hessian_type<typename InputVector::value_type>>
3832 for (
const auto dof_index : this->fe_interface->dof_indices())
3833 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3839 local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
3845 template <
int dim,
int spacedim>
3846 template <
class InputVector>
3848 Scalar<dim, spacedim>::get_jump_in_function_hessians(
3849 const InputVector &fe_function,
3850 std::vector<solution_hessian_type<typename InputVector::value_type>>
3853 std::vector<typename InputVector::value_type> local_dof_values(
3854 this->fe_interface->n_current_interface_dofs());
3855 this->get_local_dof_values(fe_function, local_dof_values);
3857 get_jump_in_function_hessians_from_local_dof_values(local_dof_values,
3863 template <
int dim,
int spacedim>
3864 template <
class InputVector>
3866 Scalar<dim, spacedim>::get_average_of_function_hessians_from_local_dof_values(
3867 const InputVector &local_dof_values,
3868 std::vector<solution_hessian_type<typename InputVector::value_type>>
3873 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
3874 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3879 hessians[q_index] += local_dof_values[dof_index] *
3880 average_of_hessians(dof_index, q_index);
3886 template <
int dim,
int spacedim>
3887 template <
class InputVector>
3889 Scalar<dim, spacedim>::get_average_of_function_hessians(
3890 const InputVector &fe_function,
3891 std::vector<solution_hessian_type<typename InputVector::value_type>>
3894 std::vector<typename InputVector::value_type> local_dof_values(
3895 this->fe_interface->n_current_interface_dofs());
3896 this->get_local_dof_values(fe_function, local_dof_values);
3898 get_average_of_function_hessians_from_local_dof_values(local_dof_values,
3904 template <
int dim,
int spacedim>
3905 template <
class InputVector>
3907 Scalar<dim, spacedim>::
3908 get_jump_in_function_third_derivatives_from_local_dof_values(
3909 const InputVector &local_dof_values,
3911 solution_third_derivative_type<typename InputVector::value_type>>
3912 &third_derivatives)
const
3915 this->fe_interface->n_quadrature_points);
3917 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
3918 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3921 third_derivatives[q_index] = 0.;
3923 third_derivatives[q_index] +=
3924 local_dof_values[dof_index] *
3925 jump_in_third_derivatives(dof_index, q_index);
3931 template <
int dim,
int spacedim>
3932 template <
class InputVector>
3934 Scalar<dim, spacedim>::get_jump_in_function_third_derivatives(
3935 const InputVector &fe_function,
3937 solution_third_derivative_type<typename InputVector::value_type>>
3938 &third_derivatives)
const
3940 std::vector<typename InputVector::value_type> local_dof_values(
3941 this->fe_interface->n_current_interface_dofs());
3942 this->get_local_dof_values(fe_function, local_dof_values);
3944 get_jump_in_function_third_derivatives_from_local_dof_values(
3945 local_dof_values, third_derivatives);
3950 template <
int dim,
int spacedim>
3953 const unsigned int first_vector_component)
3954 : Base<dim, spacedim>(fe_interface)
3955 , extractor(first_vector_component)
3960 template <
int dim,
int spacedim>
3963 const unsigned int interface_dof_index,
3964 const unsigned int q_point)
const
3966 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3969 return (*(this->fe_interface->fe_face_values))[extractor].value(
3970 dof_pair[0], q_point);
3973 return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3974 dof_pair[1], q_point);
3976 return value_type();
3981 template <
int dim,
int spacedim>
3984 const unsigned int q_point)
const
3986 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3992 (*(this->fe_interface->fe_face_values))[extractor].
value(dof_pair[0],
3997 (*(this->fe_interface->fe_face_values_neighbor))[extractor].
value(
3998 dof_pair[1], q_point);
4005 template <
int dim,
int spacedim>
4008 const unsigned int interface_dof_index,
4009 const unsigned int q_point)
const
4011 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4013 if (this->fe_interface->at_boundary())
4014 return (*(this->fe_interface->fe_face_values))[extractor].value(
4015 dof_pair[0], q_point);
4022 (*(this->fe_interface->fe_face_values))[extractor].
value(dof_pair[0],
4027 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].
value(
4028 dof_pair[1], q_point);
4035 template <
int dim,
int spacedim>
4038 const unsigned int interface_dof_index,
4039 const unsigned int q_point)
const
4041 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4043 if (this->fe_interface->at_boundary())
4044 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
4045 dof_pair[0], q_point);
4047 gradient_type
value;
4052 (*(this->fe_interface->fe_face_values))[extractor].
gradient(dof_pair[0],
4056 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4064 template <
int dim,
int spacedim>
4067 const unsigned int interface_dof_index,
4068 const unsigned int q_point)
const
4070 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4072 if (this->fe_interface->at_boundary())
4073 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
4074 dof_pair[0], q_point);
4076 gradient_type
value;
4080 (*(this->fe_interface->fe_face_values))[extractor].
gradient(dof_pair[0],
4085 (*(this->fe_interface->fe_face_values_neighbor))[extractor].
gradient(
4086 dof_pair[1], q_point);
4093 template <
int dim,
int spacedim>
4096 const unsigned int q_point)
const
4098 return jump_in_gradients(interface_dof_index, q_point);
4103 template <
int dim,
int spacedim>
4106 const unsigned int interface_dof_index,
4107 const unsigned int q_point)
const
4109 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4111 if (this->fe_interface->at_boundary())
4112 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
4113 dof_pair[0], q_point);
4120 (*(this->fe_interface->fe_face_values))[extractor].
hessian(dof_pair[0],
4124 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4125 .
hessian(dof_pair[1], q_point);
4132 template <
int dim,
int spacedim>
4135 const unsigned int q_point)
const
4137 return average_of_hessians(interface_dof_index, q_point);
4142 template <
int dim,
int spacedim>
4145 const unsigned int interface_dof_index,
4146 const unsigned int q_point)
const
4148 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4150 if (this->fe_interface->at_boundary())
4151 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
4152 dof_pair[0], q_point);
4158 (*(this->fe_interface->fe_face_values))[extractor].
hessian(dof_pair[0],
4163 (*(this->fe_interface->fe_face_values_neighbor))[extractor].
hessian(
4164 dof_pair[1], q_point);
4171 template <
int dim,
int spacedim>
4174 const unsigned int q_point)
const
4176 return jump_in_hessians(interface_dof_index, q_point);
4181 template <
int dim,
int spacedim>
4184 const unsigned int interface_dof_index,
4185 const unsigned int q_point)
const
4187 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4189 if (this->fe_interface->at_boundary())
4190 return (*(this->fe_interface->fe_face_values))[extractor]
4191 .third_derivative(dof_pair[0], q_point);
4193 third_derivative_type
value;
4197 (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
4198 dof_pair[0], q_point);
4201 value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4202 .third_derivative(dof_pair[1], q_point);
4209 template <
int dim,
int spacedim>
4210 template <
class InputVector>
4213 const bool here_or_there,
4214 const InputVector &local_dof_values,
4215 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4218 AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
4220 for (
const auto dof_index : this->fe_interface->dof_indices())
4221 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4224 values[q_index] = 0.;
4226 values[q_index] += local_dof_values[dof_index] *
4227 value(here_or_there, dof_index, q_index);
4233 template <
int dim,
int spacedim>
4234 template <
class InputVector>
4237 const bool here_or_there,
4238 const InputVector &fe_function,
4239 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4242 std::vector<typename InputVector::value_type> local_dof_values(
4243 this->fe_interface->n_current_interface_dofs());
4244 this->get_local_dof_values(fe_function, local_dof_values);
4246 get_function_values_from_local_dof_values(here_or_there,
4253 template <
int dim,
int spacedim>
4254 template <
class InputVector>
4257 const InputVector &local_dof_values,
4258 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4261 AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
4263 for (
const auto dof_index : this->fe_interface->dof_indices())
4264 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4267 values[q_index] = 0.;
4270 local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
4276 template <
int dim,
int spacedim>
4277 template <
class InputVector>
4280 const InputVector &fe_function,
4281 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4284 std::vector<typename InputVector::value_type> local_dof_values(
4285 this->fe_interface->n_current_interface_dofs());
4286 this->get_local_dof_values(fe_function, local_dof_values);
4288 get_jump_in_function_values_from_local_dof_values(local_dof_values, values);
4293 template <
int dim,
int spacedim>
4294 template <
class InputVector>
4297 const InputVector &local_dof_values,
4298 std::vector<solution_gradient_type<typename InputVector::value_type>>
4303 for (
const auto dof_index : this->fe_interface->dof_indices())
4304 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4310 local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
4316 template <
int dim,
int spacedim>
4317 template <
class InputVector>
4320 const InputVector &fe_function,
4321 std::vector<solution_gradient_type<typename InputVector::value_type>>
4324 std::vector<typename InputVector::value_type> local_dof_values(
4325 this->fe_interface->n_current_interface_dofs());
4326 this->get_local_dof_values(fe_function, local_dof_values);
4328 get_jump_in_function_gradients_from_local_dof_values(local_dof_values,
4334 template <
int dim,
int spacedim>
4335 template <
class InputVector>
4338 const InputVector &local_dof_values,
4339 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4342 AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
4344 for (
const auto dof_index : this->fe_interface->dof_indices())
4345 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4348 values[q_index] = 0.;
4351 local_dof_values[dof_index] * average_of_values(dof_index, q_index);
4357 template <
int dim,
int spacedim>
4358 template <
class InputVector>
4361 const InputVector &fe_function,
4362 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4365 std::vector<typename InputVector::value_type> local_dof_values(
4366 this->fe_interface->n_current_interface_dofs());
4367 this->get_local_dof_values(fe_function, local_dof_values);
4369 get_average_of_function_values_from_local_dof_values(local_dof_values,
4375 template <
int dim,
int spacedim>
4376 template <
class InputVector>
4380 const InputVector &local_dof_values,
4381 std::vector<solution_gradient_type<typename InputVector::value_type>>
4386 for (
const auto dof_index : this->fe_interface->dof_indices())
4387 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4392 gradients[q_index] += local_dof_values[dof_index] *
4393 average_of_gradients(dof_index, q_index);
4399 template <
int dim,
int spacedim>
4400 template <
class InputVector>
4403 const InputVector &fe_function,
4404 std::vector<solution_gradient_type<typename InputVector::value_type>>
4407 std::vector<typename InputVector::value_type> local_dof_values(
4408 this->fe_interface->n_current_interface_dofs());
4409 this->get_local_dof_values(fe_function, local_dof_values);
4411 get_average_of_function_gradients_from_local_dof_values(local_dof_values,
4417 template <
int dim,
int spacedim>
4418 template <
class InputVector>
4421 const InputVector &local_dof_values,
4422 std::vector<solution_hessian_type<typename InputVector::value_type>>
4427 for (
const auto dof_index : this->fe_interface->dof_indices())
4428 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4434 local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
4440 template <
int dim,
int spacedim>
4441 template <
class InputVector>
4444 const InputVector &fe_function,
4445 std::vector<solution_hessian_type<typename InputVector::value_type>>
4448 std::vector<typename InputVector::value_type> local_dof_values(
4449 this->fe_interface->n_current_interface_dofs());
4450 this->get_local_dof_values(fe_function, local_dof_values);
4452 get_jump_in_function_hessians_from_local_dof_values(local_dof_values,
4458 template <
int dim,
int spacedim>
4459 template <
class InputVector>
4462 const InputVector &local_dof_values,
4463 std::vector<solution_hessian_type<typename InputVector::value_type>>
4468 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
4469 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4474 hessians[q_index] += local_dof_values[dof_index] *
4475 average_of_hessians(dof_index, q_index);
4481 template <
int dim,
int spacedim>
4482 template <
class InputVector>
4485 const InputVector &fe_function,
4486 std::vector<solution_hessian_type<typename InputVector::value_type>>
4489 std::vector<typename InputVector::value_type> local_dof_values(
4490 this->fe_interface->n_current_interface_dofs());
4491 this->get_local_dof_values(fe_function, local_dof_values);
4493 get_average_of_function_hessians_from_local_dof_values(local_dof_values,
4499 template <
int dim,
int spacedim>
4500 template <
class InputVector>
4504 const InputVector &local_dof_values,
4506 solution_third_derivative_type<typename InputVector::value_type>>
4507 &third_derivatives)
const
4510 this->fe_interface->n_quadrature_points);
4512 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
4513 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4516 third_derivatives[q_index] = 0.;
4518 third_derivatives[q_index] +=
4519 local_dof_values[dof_index] *
4520 jump_in_third_derivatives(dof_index, q_index);
4526 template <
int dim,
int spacedim>
4527 template <
class InputVector>
4530 const InputVector &fe_function,
4532 solution_third_derivative_type<typename InputVector::value_type>>
4533 &third_derivatives)
const
4535 std::vector<typename InputVector::value_type> local_dof_values(
4536 this->fe_interface->n_current_interface_dofs());
4537 this->get_local_dof_values(fe_function, local_dof_values);
4539 get_jump_in_function_third_derivatives_from_local_dof_values(
4540 local_dof_values, third_derivatives);
friend class FEInterfaceViews::Scalar
std::unique_ptr< FEFaceValues< dim, spacedim > > internal_fe_face_values
UpdateFlags get_update_flags() const
const hp::MappingCollection< dim, spacedim > & get_mapping_collection() 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
void get_average_of_function_gradients(const InputVector &fe_function, std::vector< Tensor< 1, spacedim, typename InputVector::value_type > > &gradients) const
void get_jump_in_function_third_derivatives(const InputVector &fe_function, std::vector< Tensor< 3, spacedim, typename InputVector::value_type > > &third_derivatives) const
std_cxx20::ranges::iota_view< unsigned int, unsigned int > dof_indices() const
FEFaceValuesBase< dim, spacedim > * fe_face_values_neighbor
friend class FEInterfaceViews::Vector
const std::vector< double > & get_JxW_values() const
void get_average_of_function_hessians(const InputVector &fe_function, std::vector< Tensor< 2, spacedim, typename InputVector::value_type > > &hessians) 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)
const hp::FECollection< dim, spacedim > & get_fe_collection() 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
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
bool has_hp_capabilities() const
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, const unsigned int fe_index_neighbor=numbers::invalid_unsigned_int)
FEInterfaceViews::Scalar< dim, spacedim > operator[](const FEValuesExtractors::Scalar &scalar) const
unsigned n_current_interface_dofs() const
const std::vector< Tensor< 1, spacedim > > & get_normal_vectors() const
const FiniteElement< dim, spacedim > & get_fe() const
double average_of_shape_values(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
const std::vector< Point< spacedim > > & get_quadrature_points() 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 FEFaceValuesBase< dim, spacedim > & get_fe_face_values(const unsigned int cell_index) 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< 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 hp::QCollection< dim - 1 > & get_quadrature_collection() 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
Tensor< 1, spacedim > normal_vector(const unsigned int q_point_index) const
std::unique_ptr< FESubfaceValues< dim, spacedim > > internal_fe_subface_values_neighbor
std::vector< std::array< unsigned int, 2 > > dofmap
Tensor< 1, spacedim > shape_grad(const bool here_or_there, const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
Triangulation< dim, spacedim >::cell_iterator get_cell(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
double JxW(const unsigned int quadrature_point) const
Tensor< 1, spacedim > normal(const unsigned int q_point_index) const
void get_average_of_function_values(const InputVector &fe_function, std::vector< typename InputVector::value_type > &values) 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< 2, spacedim > jump_in_shape_hessians(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_neighbor
std_cxx20::ranges::iota_view< unsigned int, unsigned int > quadrature_point_indices() const
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
std::vector< types::global_dof_index > get_interface_dof_indices() const
FEInterfaceValues(const FiniteElement< dim, spacedim > &fe, const Quadrature< dim - 1 > &quadrature, const UpdateFlags update_flags)
std::array< unsigned int, 2 > interface_dof_to_dof_indices(const unsigned int interface_dof_index) const
std::unique_ptr< hp::FEFaceValues< dim, spacedim > > internal_hp_fe_face_values
std::unique_ptr< FEFaceValues< dim, spacedim > > internal_fe_face_values_neighbor
void get_jump_in_function_values(const InputVector &fe_function, std::vector< typename InputVector::value_type > &values) const
void get_jump_in_function_gradients(const InputVector &fe_function, std::vector< Tensor< 1, spacedim, typename InputVector::value_type > > &gradients) const
const Mapping< dim, spacedim > & get_mapping() const
const Point< spacedim > & quadrature_point(const unsigned int q_point) const
const Quadrature< dim - 1 > & get_quadrature() 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_jump_in_function_third_derivatives(const InputVector &fe_function, std::vector< solution_third_derivative_type< typename InputVector::value_type > > &third_derivatives) 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
typename FEValuesViews::Scalar< dim, spacedim >::third_derivative_type third_derivative_type
gradient_type jump_in_gradients(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_jump_in_function_hessians(const InputVector &fe_function, std::vector< solution_hessian_type< typename InputVector::value_type > > &hessians) const
hessian_type jump_in_hessians(const unsigned int interface_dof_index, const unsigned int q_point) const
const FEValuesExtractors::Scalar extractor
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
typename ProductType< Number, gradient_type >::type solution_gradient_type
hessian_type average_of_hessians(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
value_type value(const bool here_or_there, 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
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
typename ProductType< Number, third_derivative_type >::type solution_third_derivative_type
void get_average_of_function_values(const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type > > &values) const
typename ProductType< Number, value_type >::type solution_value_type
void get_average_of_function_gradients(const InputVector &fe_function, std::vector< solution_gradient_type< typename InputVector::value_type > > &gradients) 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_jump_in_function_values(const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type > > &values) const
Scalar(const FEInterfaceValues< dim, spacedim > &fe_interface, const unsigned int component)
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
void get_average_of_function_hessians(const InputVector &fe_function, std::vector< solution_hessian_type< typename InputVector::value_type > > &hessians) const
typename ProductType< Number, hessian_type >::type solution_hessian_type
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
value_type average_of_values(const unsigned int interface_dof_index, const unsigned int q_point) 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
value_type jump_in_values(const unsigned int interface_dof_index, const unsigned int q_point) const
typename FEValuesViews::Scalar< dim, spacedim >::hessian_type hessian_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
void get_function_values(const bool here_or_there, const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type > > &values) const
typename FEValuesViews::Scalar< dim, spacedim >::gradient_type gradient_type
const FEValuesExtractors::Vector extractor
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_hessians(const InputVector &fe_function, std::vector< solution_hessian_type< typename InputVector::value_type > > &hessians) const
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 >::value_type value_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
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
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
hessian_type average_hessian(const unsigned int interface_dof_index, const unsigned int q_point) const
typename FEValuesViews::Vector< dim, spacedim >::third_derivative_type third_derivative_type
Vector(const FEInterfaceValues< dim, spacedim > &fe_interface, const unsigned int first_vector_component)
void get_average_of_function_gradients(const InputVector &fe_function, std::vector< solution_gradient_type< typename InputVector::value_type > > &gradients) 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
hessian_type jump_hessian(const unsigned int interface_dof_index, const unsigned int q_point) const
typename ProductType< Number, value_type >::type solution_value_type
typename FEValuesViews::Vector< dim, spacedim >::hessian_type hessian_type
void get_average_of_function_values(const InputVector &fe_function, 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
typename ProductType< Number, hessian_type >::type solution_hessian_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_jump_in_function_gradients(const InputVector &fe_function, std::vector< solution_gradient_type< typename InputVector::value_type > > &gradients) const
third_derivative_type jump_in_third_derivatives(const unsigned int interface_dof_index, const unsigned int q_point) 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
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
typename ProductType< Number, third_derivative_type >::type solution_third_derivative_type
void get_jump_in_function_hessians(const InputVector &fe_function, std::vector< solution_hessian_type< typename InputVector::value_type > > &hessians) const
value_type jump_in_values(const unsigned int interface_dof_index, const unsigned int q_point) const
typename FEValuesViews::Vector< dim, spacedim >::gradient_type gradient_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
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_jump_in_function_values_from_local_dof_values(const InputVector &local_dof_values, 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
gradient_type jump_in_gradients(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 ProductType< Number, gradient_type >::type solution_gradient_type
::Tensor< 1, spacedim > gradient_type
::Tensor< 2, spacedim > hessian_type
::Tensor< 3, spacedim > third_derivative_type
::Tensor< 4, spacedim > third_derivative_type
::Tensor< 2, spacedim > gradient_type
::Tensor< 3, spacedim > hessian_type
::Tensor< 1, spacedim > value_type
Abstract base class for mapping classes.
static constexpr unsigned int n_independent_components
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
static ::ExceptionBase & ExcOnlyAvailableWithHP()
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
#define DeclExceptionMsg(Exception, defaulttext)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcNotInitialized()
static ::ExceptionBase & ExcOnlyAvailableWithoutHP()
static ::ExceptionBase & ExcMessage(std::string arg1)
TriaIterator< CellAccessor< dim, spacedim > > cell_iterator
const bool IsBlockVector< VectorType >::value
const Mapping< dim, spacedim > & get_default_linear_mapping(const Triangulation< dim, spacedim > &triangulation)
MappingQ< dim, spacedim > StaticMappingQ1< dim, spacedim >::mapping
typename ::internal::FEInterfaceViews:: ViewType< dim, spacedim, Extractor >::type View
constexpr types::global_dof_index invalid_dof_index
constexpr unsigned int invalid_unsigned_int
constexpr types::fe_index invalid_fe_index
boost::integer_range< IncrementableType > iota_view
typename internal::ProductTypeImpl< std::decay_t< T >, std::decay_t< U > >::type type