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>
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> &
1616 DEAL_II_DEPRECATED_EARLY_WITH_COMMENT(
"Use the function normal_vector().")
1618 normal(const
unsigned int q_point_index) const;
1640 const
std::vector<
Tensor<1, spacedim>> &
1650 std_cxx20::ranges::iota_view<
unsigned int,
unsigned int>
1659 const
Point<spacedim> &
1667 const
std::vector<
Point<spacedim>> &
1710 std_cxx20::ranges::iota_view<
unsigned int,
unsigned int>
1723 std::vector<
types::global_dof_index>
1738 std::array<
unsigned int, 2>
1773 const
unsigned int interface_dof_index,
1774 const
unsigned int q_point,
1775 const
unsigned int component = 0) const;
1806 const
unsigned int q_point,
1807 const
unsigned int component = 0) const;
1824 const
unsigned int q_point,
1825 const
unsigned int component = 0) const;
1843 const
unsigned int q_point,
1844 const
unsigned int component = 0) const;
1861 const
unsigned int q_point,
1862 const
unsigned int component = 0) const;
1888 const
unsigned int q_point,
1889 const
unsigned int component = 0) const;
1906 const
unsigned int q_point,
1907 const
unsigned int component = 0) const;
1925 const
unsigned int q_point,
1926 const
unsigned int component = 0) const;
1947 template <class InputVector>
1950 const InputVector &fe_function,
1951 std::vector<typename InputVector::value_type> &values) const;
1961 template <class InputVector>
1964 const InputVector &fe_function,
1965 std::vector<
Tensor<1, spacedim, typename InputVector::value_type>>
1975 template <class InputVector>
1978 const InputVector &fe_function,
1979 std::vector<
Tensor<2, spacedim, typename InputVector::value_type>>
1990 template <class InputVector>
1993 const InputVector &fe_function,
1994 std::vector<
Tensor<3, spacedim, typename InputVector::value_type>>
1995 &third_derivatives) const;
2012 template <class InputVector>
2015 const InputVector &fe_function,
2016 std::vector<typename InputVector::value_type> &values) const;
2025 template <class InputVector>
2028 const InputVector &fe_function,
2029 std::vector<
Tensor<1, spacedim, typename InputVector::value_type>>
2039 template <class InputVector>
2042 const InputVector &fe_function,
2043 std::vector<
Tensor<2, spacedim, typename InputVector::value_type>>
2172 "The current function doesn't make sense when used with a "
2182 "The current function doesn't make sense when used with a "
2203template <
int dim,
int spacedim>
2236template <
int dim,
int spacedim>
2250template <
int dim,
int spacedim>
2256 : n_quadrature_points(quadrature.max_n_quadrature_points())
2257 , fe_face_values(nullptr)
2258 , fe_face_values_neighbor(nullptr)
2259 , internal_fe_face_values(
2264 , internal_fe_subface_values(
2269 , internal_fe_face_values_neighbor(
2274 , internal_fe_subface_values_neighbor(
2283template <
int dim,
int spacedim>
2289 : n_quadrature_points(quadrature_collection.max_n_quadrature_points())
2290 , fe_face_values(nullptr)
2291 , fe_face_values_neighbor(nullptr)
2292 , internal_hp_fe_face_values(
2295 quadrature_collection,
2297 , internal_hp_fe_subface_values(
2301 quadrature_collection,
2303 , internal_hp_fe_face_values_neighbor(
2306 quadrature_collection,
2308 , internal_hp_fe_subface_values_neighbor(
2312 quadrature_collection,
2320template <
int dim,
int spacedim>
2327 quadrature_collection,
2333template <
int dim,
int spacedim>
2334template <
typename CellIteratorType,
typename CellNeighborIteratorType>
2337 const CellIteratorType &cell,
2338 const unsigned int face_no,
2339 const unsigned int sub_face_no,
2340 const CellNeighborIteratorType &cell_neighbor,
2341 const unsigned int face_no_neighbor,
2342 const unsigned int sub_face_no_neighbor,
2343 const unsigned int q_index,
2344 const unsigned int mapping_index,
2345 const unsigned int fe_index_in,
2346 const unsigned int fe_index_neighbor_in)
2348 Assert(internal_fe_face_values || internal_hp_fe_face_values,
2351 constexpr bool is_dof_cell_accessor =
2352 std::is_same_v<DoFCellAccessor<dim, spacedim, true>,
2353 typename CellIteratorType::AccessorType> ||
2354 std::is_same_v<DoFCellAccessor<dim, spacedim, false>,
2355 typename CellIteratorType::AccessorType>;
2357 constexpr bool is_dof_cell_accessor_neighbor =
2358 std::is_same_v<DoFCellAccessor<dim, spacedim, true>,
2359 typename CellNeighborIteratorType::AccessorType> ||
2360 std::is_same_v<DoFCellAccessor<dim, spacedim, false>,
2361 typename CellNeighborIteratorType::AccessorType>;
2363 unsigned int active_fe_index = 0;
2364 unsigned int active_fe_index_neighbor = 0;
2366 if (internal_fe_face_values)
2370 internal_fe_face_values->reinit(cell, face_no);
2371 fe_face_values = internal_fe_face_values.get();
2375 internal_fe_subface_values->reinit(cell, face_no, sub_face_no);
2376 fe_face_values = internal_fe_subface_values.get();
2380 internal_fe_face_values_neighbor->reinit(cell_neighbor,
2382 fe_face_values_neighbor = internal_fe_face_values_neighbor.get();
2386 internal_fe_subface_values_neighbor->reinit(cell_neighbor,
2388 sub_face_no_neighbor);
2389 fe_face_values_neighbor = internal_fe_subface_values_neighbor.get();
2393 fe_face_values_neighbor->n_quadrature_points);
2395 const_cast<unsigned int &
>(this->n_quadrature_points) =
2396 fe_face_values->n_quadrature_points;
2398 else if (internal_hp_fe_face_values)
2400 active_fe_index = fe_index_in;
2401 active_fe_index_neighbor =
2403 fe_index_neighbor_in :
2408 if constexpr (is_dof_cell_accessor)
2409 active_fe_index = cell->active_fe_index();
2411 active_fe_index = 0;
2416 if constexpr (is_dof_cell_accessor_neighbor)
2417 active_fe_index_neighbor = cell_neighbor->active_fe_index();
2419 active_fe_index_neighbor = 0;
2422 unsigned int used_q_index = q_index;
2423 unsigned int used_mapping_index = mapping_index;
2428 if (internal_hp_fe_face_values->get_quadrature_collection().size() == 1)
2432 if (internal_hp_fe_face_values->get_mapping_collection().size() == 1)
2433 used_mapping_index = 0;
2440 if (internal_hp_fe_face_values
2441 ->get_quadrature_collection()[active_fe_index] ==
2442 internal_hp_fe_face_values
2443 ->get_quadrature_collection()[active_fe_index_neighbor])
2444 used_q_index = active_fe_index;
2451 const unsigned int dominated_fe_index =
2454 internal_hp_fe_face_values->get_fe_collection()
2456 {active_fe_index, active_fe_index_neighbor}) :
2463 "You called this function with 'q_index' left at its "
2464 "default value, but this can only work if one of "
2465 "the two finite elements adjacent to this face "
2466 "dominates the other. See the documentation "
2467 "of this function for more information of how "
2468 "to deal with this situation."));
2469 used_q_index = dominated_fe_index;
2476 "You called this function with 'mapping_index' left "
2477 "at its default value, but this can only work if one "
2478 "of the two finite elements adjacent to this face "
2479 "dominates the other. See the documentation "
2480 "of this function for more information of how "
2481 "to deal with this situation."));
2482 used_mapping_index = dominated_fe_index;
2489 internal_hp_fe_face_values->reinit(
2490 cell, face_no, used_q_index, used_mapping_index, active_fe_index);
2492 internal_hp_fe_face_values->get_present_fe_values());
2496 internal_hp_fe_subface_values->
reinit(cell,
2504 internal_hp_fe_subface_values->get_present_fe_values());
2508 internal_hp_fe_face_values_neighbor->
reinit(cell_neighbor,
2512 active_fe_index_neighbor);
2515 internal_hp_fe_face_values_neighbor->get_present_fe_values());
2519 internal_hp_fe_subface_values_neighbor->
reinit(
2522 sub_face_no_neighbor,
2525 active_fe_index_neighbor);
2527 fe_face_values_neighbor =
2529 internal_hp_fe_subface_values_neighbor->get_present_fe_values());
2533 fe_face_values_neighbor->n_quadrature_points);
2535 const_cast<unsigned int &
>(this->n_quadrature_points) =
2536 fe_face_values->n_quadrature_points;
2540 if constexpr (is_dof_cell_accessor_neighbor && is_dof_cell_accessor)
2543 std::vector<types::global_dof_index> v(
2544 fe_face_values->get_fe().n_dofs_per_cell());
2545 cell->get_active_or_mg_dof_indices(v);
2546 std::vector<types::global_dof_index> v2(
2547 fe_face_values_neighbor->get_fe().n_dofs_per_cell());
2548 cell_neighbor->get_active_or_mg_dof_indices(v2);
2552 std::map<types::global_dof_index, std::pair<unsigned int, unsigned int>>
2554 std::pair<unsigned int, unsigned int> invalid_entry(
2557 for (
unsigned int i = 0; i < v.size(); ++i)
2560 auto result = tempmap.insert(std::make_pair(v[i], invalid_entry));
2561 result.first->second.first = i;
2564 for (
unsigned int i = 0; i < v2.size(); ++i)
2567 auto result = tempmap.insert(std::make_pair(v2[i], invalid_entry));
2568 result.first->second.second = i;
2572 dofmap.resize(tempmap.size());
2573 interface_dof_indices.resize(tempmap.size());
2574 unsigned int idx = 0;
2575 for (
auto &x : tempmap)
2577 interface_dof_indices[idx] = x.first;
2578 dofmap[idx] = {{x.second.first, x.second.second}};
2584 const unsigned int n_dofs_per_cell_1 = fe_face_values->dofs_per_cell;
2585 const unsigned int n_dofs_per_cell_2 =
2586 fe_face_values_neighbor->dofs_per_cell;
2588 interface_dof_indices.resize(n_dofs_per_cell_1 + n_dofs_per_cell_2);
2589 dofmap.resize(n_dofs_per_cell_1 + n_dofs_per_cell_2);
2591 for (
unsigned int i = 0; i < n_dofs_per_cell_1; ++i)
2597 for (
unsigned int i = 0; i < n_dofs_per_cell_2; ++i)
2599 interface_dof_indices[i + n_dofs_per_cell_1] =
2608template <
int dim,
int spacedim>
2609template <
typename CellIteratorType>
2612 const unsigned int face_no,
2613 const unsigned int q_index,
2614 const unsigned int mapping_index,
2615 const unsigned int fe_index)
2617 Assert(internal_fe_face_values || internal_hp_fe_face_values,
2620 if (internal_fe_face_values)
2624 Assert((mapping_index == 0 ||
2630 internal_fe_face_values->reinit(cell, face_no);
2631 fe_face_values = internal_fe_face_values.get();
2632 fe_face_values_neighbor =
nullptr;
2634 else if (internal_hp_fe_face_values)
2636 internal_hp_fe_face_values->reinit(
2637 cell, face_no, q_index, mapping_index, fe_index);
2639 internal_hp_fe_face_values->get_present_fe_values());
2640 fe_face_values_neighbor =
nullptr;
2643 interface_dof_indices.resize(fe_face_values->get_fe().n_dofs_per_cell());
2645 if constexpr (std::is_same_v<
typename CellIteratorType::AccessorType,
2647 std::is_same_v<
typename CellIteratorType::AccessorType,
2650 cell->get_active_or_mg_dof_indices(interface_dof_indices);
2654 for (
auto &i : interface_dof_indices)
2658 dofmap.resize(interface_dof_indices.size());
2659 for (
unsigned int i = 0; i < interface_dof_indices.size(); ++i)
2665template <
int dim,
int spacedim>
2669 Assert(fe_face_values !=
nullptr,
2670 ExcMessage(
"This call requires a call to reinit() first."));
2671 return fe_face_values->JxW(q);
2676template <
int dim,
int spacedim>
2677const std::vector<double> &
2680 Assert(fe_face_values !=
nullptr,
2681 ExcMessage(
"This call requires a call to reinit() first."));
2682 return fe_face_values->get_JxW_values();
2687template <
int dim,
int spacedim>
2688const std::vector<Tensor<1, spacedim>> &
2691 Assert(fe_face_values !=
nullptr,
2692 ExcMessage(
"This call requires a call to reinit() first."));
2693 return fe_face_values->get_normal_vectors();
2698template <
int dim,
int spacedim>
2702 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2703 return internal_fe_face_values->get_mapping();
2708template <
int dim,
int spacedim>
2712 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2713 return internal_fe_face_values->get_fe();
2718template <
int dim,
int spacedim>
2722 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2723 return internal_fe_face_values->get_quadrature();
2728template <
int dim,
int spacedim>
2732 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2733 return internal_hp_fe_face_values->get_mapping_collection();
2738template <
int dim,
int spacedim>
2742 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2743 return internal_hp_fe_face_values->get_fe_collection();
2748template <
int dim,
int spacedim>
2752 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2753 return internal_hp_fe_face_values->get_quadrature_collection();
2758template <
int dim,
int spacedim>
2762 if (internal_hp_fe_face_values || internal_hp_fe_subface_values ||
2763 internal_hp_fe_face_values_neighbor ||
2764 internal_hp_fe_subface_values_neighbor)
2774 Assert(internal_fe_face_values || internal_fe_subface_values ||
2775 internal_fe_face_values_neighbor ||
2776 internal_fe_subface_values_neighbor,
2788template <
int dim,
int spacedim>
2793 0U, n_quadrature_points);
2798template <
int dim,
int spacedim>
2801 const unsigned int q_point)
const
2803 Assert(fe_face_values !=
nullptr,
2804 ExcMessage(
"This call requires a call to reinit() first."));
2805 return fe_face_values->quadrature_point(q_point);
2810template <
int dim,
int spacedim>
2811const std::vector<Point<spacedim>> &
2814 Assert(fe_face_values !=
nullptr,
2815 ExcMessage(
"This call requires a call to reinit() first."));
2816 return fe_face_values->get_quadrature_points();
2821template <
int dim,
int spacedim>
2825 if (has_hp_capabilities())
2826 return internal_hp_fe_face_values->get_update_flags();
2828 return internal_fe_face_values->get_update_flags();
2833template <
int dim,
int spacedim>
2837 return get_fe_face_values(
cell_index).get_cell();
2842template <
int dim,
int spacedim>
2847 return get_fe_face_values(
cell_index).get_face_number();
2852template <
int dim,
int spacedim>
2857 interface_dof_indices.size() > 0,
2859 "n_current_interface_dofs() is only available after a call to reinit()."));
2860 return interface_dof_indices.size();
2865template <
int dim,
int spacedim>
2869 return {0
U, n_current_interface_dofs()};
2874template <
int dim,
int spacedim>
2878 return fe_face_values_neighbor ==
nullptr;
2883template <
int dim,
int spacedim>
2884std::vector<types::global_dof_index>
2887 return interface_dof_indices;
2892template <
int dim,
int spacedim>
2893std::array<unsigned int, 2>
2895 const unsigned int interface_dof_index)
const
2898 return dofmap[interface_dof_index];
2903template <
int dim,
int spacedim>
2912 "You are on a boundary, so you can only ask for the first FEFaceValues object."));
2914 return (
cell_index == 0) ? *fe_face_values : *fe_face_values_neighbor;
2919template <
int dim,
int spacedim>
2923 return normal_vector(q_point_index);
2928template <
int dim,
int spacedim>
2931 const unsigned int q_point_index)
const
2933 return fe_face_values->normal_vector(q_point_index);
2938template <
int dim,
int spacedim>
2941 const bool here_or_there,
2942 const unsigned int interface_dof_index,
2943 const unsigned int q_point,
2944 const unsigned int component)
const
2946 const auto dof_pair = dofmap[interface_dof_index];
2949 return get_fe_face_values(0).shape_value_component(dof_pair[0],
2953 return get_fe_face_values(1).shape_value_component(dof_pair[1],
2962template <
int dim,
int spacedim>
2965 const unsigned int interface_dof_index,
2966 const unsigned int q_point,
2967 const unsigned int component)
const
2969 const auto dof_pair = dofmap[interface_dof_index];
2974 value += get_fe_face_values(0).shape_value_component(dof_pair[0],
2978 value -= get_fe_face_values(1).shape_value_component(dof_pair[1],
2986template <
int dim,
int spacedim>
2989 const unsigned int interface_dof_index,
2990 const unsigned int q_point,
2991 const unsigned int component)
const
2993 const auto dof_pair = dofmap[interface_dof_index];
2996 return get_fe_face_values(0).shape_value_component(dof_pair[0],
3003 value += 0.5 * get_fe_face_values(0).shape_value_component(dof_pair[0],
3007 value += 0.5 * get_fe_face_values(1).shape_value_component(dof_pair[1],
3016template <
int dim,
int spacedim>
3019 const unsigned int interface_dof_index,
3020 const unsigned int q_point,
3021 const unsigned int component)
const
3023 const auto dof_pair = dofmap[interface_dof_index];
3026 return get_fe_face_values(0).shape_grad_component(dof_pair[0],
3033 value += 0.5 * get_fe_face_values(0).shape_grad_component(dof_pair[0],
3037 value += 0.5 * get_fe_face_values(1).shape_grad_component(dof_pair[1],
3046template <
int dim,
int spacedim>
3049 const unsigned int interface_dof_index,
3050 const unsigned int q_point,
3051 const unsigned int component)
const
3053 const auto dof_pair = dofmap[interface_dof_index];
3056 return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3063 value += 0.5 * get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3067 value += 0.5 * get_fe_face_values(1).shape_hessian_component(dof_pair[1],
3076template <
int dim,
int spacedim>
3079 const unsigned int interface_dof_index,
3080 const unsigned int q_point,
3081 const unsigned int component)
const
3083 const auto dof_pair = dofmap[interface_dof_index];
3086 return get_fe_face_values(0).shape_grad_component(dof_pair[0],
3093 value += get_fe_face_values(0).shape_grad_component(dof_pair[0],
3097 value -= get_fe_face_values(1).shape_grad_component(dof_pair[1],
3106template <
int dim,
int spacedim>
3109 const unsigned int interface_dof_index,
3110 const unsigned int q_point,
3111 const unsigned int component)
const
3113 const auto dof_pair = dofmap[interface_dof_index];
3116 return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3123 value += get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3127 value -= get_fe_face_values(1).shape_hessian_component(dof_pair[1],
3136template <
int dim,
int spacedim>
3139 const unsigned int interface_dof_index,
3140 const unsigned int q_point,
3141 const unsigned int component)
const
3143 const auto dof_pair = dofmap[interface_dof_index];
3146 return get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3153 value += get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3157 value -= get_fe_face_values(1).shape_3rd_derivative_component(dof_pair[1],
3166template <
int dim,
int spacedim>
3167template <
class InputVector>
3170 const InputVector &fe_function,
3171 std::vector<typename InputVector::value_type> &values)
const
3176 this->operator[](scalar).get_jump_in_function_values(fe_function, values);
3181template <
int dim,
int spacedim>
3182template <
class InputVector>
3185 const InputVector &fe_function,
3192 this->operator[](scalar).get_jump_in_function_gradients(fe_function,
3198template <
int dim,
int spacedim>
3199template <
class InputVector>
3202 const InputVector &fe_function,
3209 this->operator[](scalar).get_jump_in_function_hessians(fe_function, hessians);
3214template <
int dim,
int spacedim>
3215template <
class InputVector>
3218 const InputVector &fe_function,
3220 &third_derivatives)
const
3225 this->operator[](scalar).get_jump_in_function_third_derivatives(
3226 fe_function, third_derivatives);
3231template <
int dim,
int spacedim>
3232template <
class InputVector>
3235 const InputVector &fe_function,
3236 std::vector<typename InputVector::value_type> &values)
const
3241 this->operator[](scalar).get_average_of_function_values(fe_function, values);
3246template <
int dim,
int spacedim>
3247template <
class InputVector>
3250 const InputVector &fe_function,
3257 this->operator[](scalar).get_average_of_function_gradients(fe_function,
3263template <
int dim,
int spacedim>
3264template <
class InputVector>
3267 const InputVector &fe_function,
3274 this->operator[](scalar).get_average_of_function_hessians(fe_function,
3281template <
int dim,
int spacedim>
3286 const unsigned int n_components =
3287 (this->has_hp_capabilities() ? this->get_fe_collection().n_components() :
3288 this->get_fe().n_components());
3296template <
int dim,
int spacedim>
3301 const unsigned int n_components =
3302 (this->has_hp_capabilities() ? this->get_fe_collection().n_components() :
3303 this->get_fe().n_components());
3304 const unsigned int n_vectors =
3319 template <
int dim,
int spacedim>
3322 : fe_interface(&fe_interface)
3327 template <
int dim,
int spacedim>
3328 Scalar<dim, spacedim>::Scalar(
3330 const unsigned int component)
3331 : Base<dim, spacedim>(fe_interface)
3332 , extractor(component)
3337 template <
int dim,
int spacedim>
3338 template <
class InputVector,
class OutputVector>
3340 Base<dim, spacedim>::get_local_dof_values(
3341 const InputVector &dof_values,
3342 OutputVector &local_dof_values)
const
3344 const auto &interface_dof_indices =
3345 this->fe_interface->get_interface_dof_indices();
3347 AssertDimension(interface_dof_indices.size(), local_dof_values.size());
3349 for (
const unsigned int i : this->fe_interface->dof_indices())
3350 local_dof_values[i] = dof_values(interface_dof_indices[i]);
3355 template <
int dim,
int spacedim>
3356 typename Scalar<dim, spacedim>::value_type
3357 Scalar<dim, spacedim>::value(
const bool here_or_there,
3358 const unsigned int interface_dof_index,
3359 const unsigned int q_point)
const
3361 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3364 return (*(this->fe_interface->fe_face_values))[extractor].value(
3365 dof_pair[0], q_point);
3368 return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3369 dof_pair[1], q_point);
3376 template <
int dim,
int spacedim>
3377 typename Scalar<dim, spacedim>::value_type
3378 Scalar<dim, spacedim>::jump_in_values(
const unsigned int interface_dof_index,
3379 const unsigned int q_point)
const
3381 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3383 value_type
value = 0.0;
3387 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3392 (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3393 dof_pair[1], q_point);
3400 template <
int dim,
int spacedim>
3401 typename Scalar<dim, spacedim>::value_type
3402 Scalar<dim, spacedim>::average_of_values(
3403 const unsigned int interface_dof_index,
3404 const unsigned int q_point)
const
3406 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3408 if (this->fe_interface->at_boundary())
3409 return (*(this->fe_interface->fe_face_values))[extractor].value(
3410 dof_pair[0], q_point);
3412 value_type
value = 0.0;
3417 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3422 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3423 dof_pair[1], q_point);
3430 template <
int dim,
int spacedim>
3431 typename Scalar<dim, spacedim>::gradient_type
3432 Scalar<dim, spacedim>::average_of_gradients(
3433 const unsigned int interface_dof_index,
3434 const unsigned int q_point)
const
3436 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3438 if (this->fe_interface->at_boundary())
3439 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3440 dof_pair[0], q_point);
3442 gradient_type
value;
3447 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3451 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3452 .gradient(dof_pair[1], q_point);
3459 template <
int dim,
int spacedim>
3460 typename Scalar<dim, spacedim>::gradient_type
3461 Scalar<dim, spacedim>::jump_in_gradients(
3462 const unsigned int interface_dof_index,
3463 const unsigned int q_point)
const
3465 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3467 if (this->fe_interface->at_boundary())
3468 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3469 dof_pair[0], q_point);
3471 gradient_type
value;
3475 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3480 (*(this->fe_interface->fe_face_values_neighbor))[extractor].gradient(
3481 dof_pair[1], q_point);
3488 template <
int dim,
int spacedim>
3489 typename Scalar<dim, spacedim>::hessian_type
3490 Scalar<dim, spacedim>::average_of_hessians(
3491 const unsigned int interface_dof_index,
3492 const unsigned int q_point)
const
3494 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3496 if (this->fe_interface->at_boundary())
3497 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3498 dof_pair[0], q_point);
3505 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3509 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3510 .hessian(dof_pair[1], q_point);
3517 template <
int dim,
int spacedim>
3518 typename Scalar<dim, spacedim>::third_derivative_type
3519 Scalar<dim, spacedim>::jump_in_third_derivatives(
3520 const unsigned int interface_dof_index,
3521 const unsigned int q_point)
const
3523 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3525 if (this->fe_interface->at_boundary())
3526 return (*(this->fe_interface->fe_face_values))[extractor]
3527 .third_derivative(dof_pair[0], q_point);
3529 third_derivative_type
value;
3533 (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
3534 dof_pair[0], q_point);
3537 value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3538 .third_derivative(dof_pair[1], q_point);
3545 template <
int dim,
int spacedim>
3546 typename Scalar<dim, spacedim>::hessian_type
3547 Scalar<dim, spacedim>::jump_in_hessians(
3548 const unsigned int interface_dof_index,
3549 const unsigned int q_point)
const
3551 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3553 if (this->fe_interface->at_boundary())
3554 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3555 dof_pair[0], q_point);
3561 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3566 (*(this->fe_interface->fe_face_values_neighbor))[extractor].hessian(
3567 dof_pair[1], q_point);
3574 template <
int dim,
int spacedim>
3575 template <
class InputVector>
3577 Scalar<dim, spacedim>::get_function_values_from_local_dof_values(
3578 const bool here_or_there,
3579 const InputVector &local_dof_values,
3580 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3585 for (
const auto dof_index : this->fe_interface->dof_indices())
3586 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3591 values[q_index] += local_dof_values[dof_index] *
3592 value(here_or_there, dof_index, q_index);
3598 template <
int dim,
int spacedim>
3599 template <
class InputVector>
3601 Scalar<dim, spacedim>::get_function_values(
3602 const bool here_or_there,
3603 const InputVector &fe_function,
3604 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3607 std::vector<typename InputVector::value_type> local_dof_values(
3608 this->fe_interface->n_current_interface_dofs());
3609 this->get_local_dof_values(fe_function, local_dof_values);
3611 get_function_values_from_local_dof_values(here_or_there,
3618 template <
int dim,
int spacedim>
3619 template <
class InputVector>
3621 Scalar<dim, spacedim>::get_jump_in_function_values_from_local_dof_values(
3622 const InputVector &local_dof_values,
3623 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3628 for (
const auto dof_index : this->fe_interface->dof_indices())
3629 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3635 local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
3641 template <
int dim,
int spacedim>
3642 template <
class InputVector>
3644 Scalar<dim, spacedim>::get_jump_in_function_values(
3645 const InputVector &fe_function,
3646 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3649 std::vector<typename InputVector::value_type> local_dof_values(
3650 this->fe_interface->n_current_interface_dofs());
3651 this->get_local_dof_values(fe_function, local_dof_values);
3653 get_jump_in_function_values_from_local_dof_values(local_dof_values, values);
3658 template <
int dim,
int spacedim>
3659 template <
class InputVector>
3661 Scalar<dim, spacedim>::get_jump_in_function_gradients_from_local_dof_values(
3662 const InputVector &local_dof_values,
3663 std::vector<solution_gradient_type<typename InputVector::value_type>>
3668 for (
const auto dof_index : this->fe_interface->dof_indices())
3669 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3675 local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
3681 template <
int dim,
int spacedim>
3682 template <
class InputVector>
3684 Scalar<dim, spacedim>::get_jump_in_function_gradients(
3685 const InputVector &fe_function,
3686 std::vector<solution_gradient_type<typename InputVector::value_type>>
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_gradients_from_local_dof_values(local_dof_values,
3699 template <
int dim,
int spacedim>
3700 template <
class InputVector>
3702 Scalar<dim, spacedim>::get_average_of_function_values_from_local_dof_values(
3703 const InputVector &local_dof_values,
3704 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3709 for (
const auto dof_index : this->fe_interface->dof_indices())
3710 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3716 local_dof_values[dof_index] * average_of_values(dof_index, q_index);
3722 template <
int dim,
int spacedim>
3723 template <
class InputVector>
3725 Scalar<dim, spacedim>::get_average_of_function_values(
3726 const InputVector &fe_function,
3727 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3730 std::vector<typename InputVector::value_type> local_dof_values(
3731 this->fe_interface->n_current_interface_dofs());
3732 this->get_local_dof_values(fe_function, local_dof_values);
3734 get_average_of_function_values_from_local_dof_values(local_dof_values,
3740 template <
int dim,
int spacedim>
3741 template <
class InputVector>
3743 Scalar<dim, spacedim>::
3744 get_average_of_function_gradients_from_local_dof_values(
3745 const InputVector &local_dof_values,
3746 std::vector<solution_gradient_type<typename InputVector::value_type>>
3751 for (
const auto dof_index : this->fe_interface->dof_indices())
3752 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3757 gradients[q_index] += local_dof_values[dof_index] *
3758 average_of_gradients(dof_index, q_index);
3764 template <
int dim,
int spacedim>
3765 template <
class InputVector>
3767 Scalar<dim, spacedim>::get_average_of_function_gradients(
3768 const InputVector &fe_function,
3769 std::vector<solution_gradient_type<typename InputVector::value_type>>
3772 std::vector<typename InputVector::value_type> local_dof_values(
3773 this->fe_interface->n_current_interface_dofs());
3774 this->get_local_dof_values(fe_function, local_dof_values);
3776 get_average_of_function_gradients_from_local_dof_values(local_dof_values,
3782 template <
int dim,
int spacedim>
3783 template <
class InputVector>
3785 Scalar<dim, spacedim>::get_jump_in_function_hessians_from_local_dof_values(
3786 const InputVector &local_dof_values,
3787 std::vector<solution_hessian_type<typename InputVector::value_type>>
3792 for (
const auto dof_index : this->fe_interface->dof_indices())
3793 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3799 local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
3805 template <
int dim,
int spacedim>
3806 template <
class InputVector>
3808 Scalar<dim, spacedim>::get_jump_in_function_hessians(
3809 const InputVector &fe_function,
3810 std::vector<solution_hessian_type<typename InputVector::value_type>>
3813 std::vector<typename InputVector::value_type> local_dof_values(
3814 this->fe_interface->n_current_interface_dofs());
3815 this->get_local_dof_values(fe_function, local_dof_values);
3817 get_jump_in_function_hessians_from_local_dof_values(local_dof_values,
3823 template <
int dim,
int spacedim>
3824 template <
class InputVector>
3826 Scalar<dim, spacedim>::get_average_of_function_hessians_from_local_dof_values(
3827 const InputVector &local_dof_values,
3828 std::vector<solution_hessian_type<typename InputVector::value_type>>
3833 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
3834 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3839 hessians[q_index] += local_dof_values[dof_index] *
3840 average_of_hessians(dof_index, q_index);
3846 template <
int dim,
int spacedim>
3847 template <
class InputVector>
3849 Scalar<dim, spacedim>::get_average_of_function_hessians(
3850 const InputVector &fe_function,
3851 std::vector<solution_hessian_type<typename InputVector::value_type>>
3854 std::vector<typename InputVector::value_type> local_dof_values(
3855 this->fe_interface->n_current_interface_dofs());
3856 this->get_local_dof_values(fe_function, local_dof_values);
3858 get_average_of_function_hessians_from_local_dof_values(local_dof_values,
3864 template <
int dim,
int spacedim>
3865 template <
class InputVector>
3867 Scalar<dim, spacedim>::
3868 get_jump_in_function_third_derivatives_from_local_dof_values(
3869 const InputVector &local_dof_values,
3871 solution_third_derivative_type<typename InputVector::value_type>>
3872 &third_derivatives)
const
3875 this->fe_interface->n_quadrature_points);
3877 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
3878 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3881 third_derivatives[q_index] = 0.;
3883 third_derivatives[q_index] +=
3884 local_dof_values[dof_index] *
3885 jump_in_third_derivatives(dof_index, q_index);
3891 template <
int dim,
int spacedim>
3892 template <
class InputVector>
3894 Scalar<dim, spacedim>::get_jump_in_function_third_derivatives(
3895 const InputVector &fe_function,
3897 solution_third_derivative_type<typename InputVector::value_type>>
3898 &third_derivatives)
const
3900 std::vector<typename InputVector::value_type> local_dof_values(
3901 this->fe_interface->n_current_interface_dofs());
3902 this->get_local_dof_values(fe_function, local_dof_values);
3904 get_jump_in_function_third_derivatives_from_local_dof_values(
3905 local_dof_values, third_derivatives);
3910 template <
int dim,
int spacedim>
3913 const unsigned int first_vector_component)
3914 : Base<dim, spacedim>(fe_interface)
3915 , extractor(first_vector_component)
3920 template <
int dim,
int spacedim>
3923 const unsigned int interface_dof_index,
3924 const unsigned int q_point)
const
3926 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3929 return (*(this->fe_interface->fe_face_values))[extractor].value(
3930 dof_pair[0], q_point);
3933 return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3934 dof_pair[1], q_point);
3936 return value_type();
3941 template <
int dim,
int spacedim>
3944 const unsigned int q_point)
const
3946 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3952 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3957 (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3958 dof_pair[1], q_point);
3965 template <
int dim,
int spacedim>
3968 const unsigned int interface_dof_index,
3969 const unsigned int q_point)
const
3971 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3973 if (this->fe_interface->at_boundary())
3974 return (*(this->fe_interface->fe_face_values))[extractor].value(
3975 dof_pair[0], q_point);
3982 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3987 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3988 dof_pair[1], q_point);
3995 template <
int dim,
int spacedim>
3998 const unsigned int interface_dof_index,
3999 const unsigned int q_point)
const
4001 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4003 if (this->fe_interface->at_boundary())
4004 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
4005 dof_pair[0], q_point);
4007 gradient_type
value;
4012 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
4016 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4017 .gradient(dof_pair[1], q_point);
4024 template <
int dim,
int spacedim>
4027 const unsigned int interface_dof_index,
4028 const unsigned int q_point)
const
4030 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4032 if (this->fe_interface->at_boundary())
4033 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
4034 dof_pair[0], q_point);
4036 gradient_type
value;
4040 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
4045 (*(this->fe_interface->fe_face_values_neighbor))[extractor].gradient(
4046 dof_pair[1], q_point);
4053 template <
int dim,
int spacedim>
4056 const unsigned int q_point)
const
4058 return jump_in_gradients(interface_dof_index, q_point);
4063 template <
int dim,
int spacedim>
4066 const unsigned int interface_dof_index,
4067 const unsigned int q_point)
const
4069 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4071 if (this->fe_interface->at_boundary())
4072 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
4073 dof_pair[0], q_point);
4080 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
4084 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4085 .hessian(dof_pair[1], q_point);
4092 template <
int dim,
int spacedim>
4095 const unsigned int q_point)
const
4097 return average_of_hessians(interface_dof_index, q_point);
4102 template <
int dim,
int spacedim>
4105 const unsigned int interface_dof_index,
4106 const unsigned int q_point)
const
4108 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4110 if (this->fe_interface->at_boundary())
4111 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
4112 dof_pair[0], q_point);
4118 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
4123 (*(this->fe_interface->fe_face_values_neighbor))[extractor].hessian(
4124 dof_pair[1], q_point);
4131 template <
int dim,
int spacedim>
4134 const unsigned int q_point)
const
4136 return jump_in_hessians(interface_dof_index, q_point);
4141 template <
int dim,
int spacedim>
4144 const unsigned int interface_dof_index,
4145 const unsigned int q_point)
const
4147 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4149 if (this->fe_interface->at_boundary())
4150 return (*(this->fe_interface->fe_face_values))[extractor]
4151 .third_derivative(dof_pair[0], q_point);
4153 third_derivative_type
value;
4157 (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
4158 dof_pair[0], q_point);
4161 value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4162 .third_derivative(dof_pair[1], q_point);
4169 template <
int dim,
int spacedim>
4170 template <
class InputVector>
4173 const bool here_or_there,
4174 const InputVector &local_dof_values,
4175 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4180 for (
const auto dof_index : this->fe_interface->dof_indices())
4181 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4186 values[q_index] += local_dof_values[dof_index] *
4187 value(here_or_there, dof_index, q_index);
4193 template <
int dim,
int spacedim>
4194 template <
class InputVector>
4197 const bool here_or_there,
4198 const InputVector &fe_function,
4199 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4202 std::vector<typename InputVector::value_type> local_dof_values(
4203 this->fe_interface->n_current_interface_dofs());
4204 this->get_local_dof_values(fe_function, local_dof_values);
4206 get_function_values_from_local_dof_values(here_or_there,
4213 template <
int dim,
int spacedim>
4214 template <
class InputVector>
4217 const InputVector &local_dof_values,
4218 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4223 for (
const auto dof_index : this->fe_interface->dof_indices())
4224 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4230 local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
4236 template <
int dim,
int spacedim>
4237 template <
class InputVector>
4240 const InputVector &fe_function,
4241 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4244 std::vector<typename InputVector::value_type> local_dof_values(
4245 this->fe_interface->n_current_interface_dofs());
4246 this->get_local_dof_values(fe_function, local_dof_values);
4248 get_jump_in_function_values_from_local_dof_values(local_dof_values, values);
4253 template <
int dim,
int spacedim>
4254 template <
class InputVector>
4257 const InputVector &local_dof_values,
4258 std::vector<solution_gradient_type<typename InputVector::value_type>>
4263 for (
const auto dof_index : this->fe_interface->dof_indices())
4264 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4270 local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
4276 template <
int dim,
int spacedim>
4277 template <
class InputVector>
4280 const InputVector &fe_function,
4281 std::vector<solution_gradient_type<typename InputVector::value_type>>
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_gradients_from_local_dof_values(local_dof_values,
4294 template <
int dim,
int spacedim>
4295 template <
class InputVector>
4298 const InputVector &local_dof_values,
4299 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4304 for (
const auto dof_index : this->fe_interface->dof_indices())
4305 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4311 local_dof_values[dof_index] * average_of_values(dof_index, q_index);
4317 template <
int dim,
int spacedim>
4318 template <
class InputVector>
4321 const InputVector &fe_function,
4322 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4325 std::vector<typename InputVector::value_type> local_dof_values(
4326 this->fe_interface->n_current_interface_dofs());
4327 this->get_local_dof_values(fe_function, local_dof_values);
4329 get_average_of_function_values_from_local_dof_values(local_dof_values,
4335 template <
int dim,
int spacedim>
4336 template <
class InputVector>
4340 const InputVector &local_dof_values,
4341 std::vector<solution_gradient_type<typename InputVector::value_type>>
4346 for (
const auto dof_index : this->fe_interface->dof_indices())
4347 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4352 gradients[q_index] += local_dof_values[dof_index] *
4353 average_of_gradients(dof_index, q_index);
4359 template <
int dim,
int spacedim>
4360 template <
class InputVector>
4363 const InputVector &fe_function,
4364 std::vector<solution_gradient_type<typename InputVector::value_type>>
4367 std::vector<typename InputVector::value_type> local_dof_values(
4368 this->fe_interface->n_current_interface_dofs());
4369 this->get_local_dof_values(fe_function, local_dof_values);
4371 get_average_of_function_gradients_from_local_dof_values(local_dof_values,
4377 template <
int dim,
int spacedim>
4378 template <
class InputVector>
4381 const InputVector &local_dof_values,
4382 std::vector<solution_hessian_type<typename InputVector::value_type>>
4387 for (
const auto dof_index : this->fe_interface->dof_indices())
4388 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4394 local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
4400 template <
int dim,
int spacedim>
4401 template <
class InputVector>
4404 const InputVector &fe_function,
4405 std::vector<solution_hessian_type<typename InputVector::value_type>>
4408 std::vector<typename InputVector::value_type> local_dof_values(
4409 this->fe_interface->n_current_interface_dofs());
4410 this->get_local_dof_values(fe_function, local_dof_values);
4412 get_jump_in_function_hessians_from_local_dof_values(local_dof_values,
4418 template <
int dim,
int spacedim>
4419 template <
class InputVector>
4422 const InputVector &local_dof_values,
4423 std::vector<solution_hessian_type<typename InputVector::value_type>>
4428 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
4429 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4434 hessians[q_index] += local_dof_values[dof_index] *
4435 average_of_hessians(dof_index, q_index);
4441 template <
int dim,
int spacedim>
4442 template <
class InputVector>
4445 const InputVector &fe_function,
4446 std::vector<solution_hessian_type<typename InputVector::value_type>>
4449 std::vector<typename InputVector::value_type> local_dof_values(
4450 this->fe_interface->n_current_interface_dofs());
4451 this->get_local_dof_values(fe_function, local_dof_values);
4453 get_average_of_function_hessians_from_local_dof_values(local_dof_values,
4459 template <
int dim,
int spacedim>
4460 template <
class InputVector>
4464 const InputVector &local_dof_values,
4466 solution_third_derivative_type<typename InputVector::value_type>>
4467 &third_derivatives)
const
4470 this->fe_interface->n_quadrature_points);
4472 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
4473 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4476 third_derivatives[q_index] = 0.;
4478 third_derivatives[q_index] +=
4479 local_dof_values[dof_index] *
4480 jump_in_third_derivatives(dof_index, q_index);
4486 template <
int dim,
int spacedim>
4487 template <
class InputVector>
4490 const InputVector &fe_function,
4492 solution_third_derivative_type<typename InputVector::value_type>>
4493 &third_derivatives)
const
4495 std::vector<typename InputVector::value_type> local_dof_values(
4496 this->fe_interface->n_current_interface_dofs());
4497 this->get_local_dof_values(fe_function, local_dof_values);
4499 get_jump_in_function_third_derivatives_from_local_dof_values(
4500 local_dof_values, third_derivatives);
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, level_dof_access > > &cell, const unsigned int face_no)
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
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
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
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 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_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
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
typename ProductType< Number, third_derivative_type >::type solution_third_derivative_type
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)
typename FEValuesViews::Scalar< dim, spacedim >::hessian_type hessian_type
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
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
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
typename FEValuesViews::Scalar< dim, spacedim >::third_derivative_type third_derivative_type
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 ProductType< Number, hessian_type >::type solution_hessian_type
typename ProductType< Number, gradient_type >::type solution_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
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
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
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
typename ProductType< Number, value_type >::type solution_value_type
void get_average_of_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
value_type value(const bool here_or_there, 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_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
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 ProductType< Number, hessian_type >::type solution_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
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
typename ProductType< Number, third_derivative_type >::type solution_third_derivative_type
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
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)
Abstract base class for mapping classes.
#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)
const Mapping< dim, spacedim > & get_default_linear_mapping(const Triangulation< dim, spacedim > &triangulation)
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