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}) :
2457 numbers::invalid_unsigned_int);
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>
2792 return {0U, n_quadrature_points};
2797template <
int dim,
int spacedim>
2800 const unsigned int q_point)
const
2802 Assert(fe_face_values !=
nullptr,
2803 ExcMessage(
"This call requires a call to reinit() first."));
2804 return fe_face_values->quadrature_point(q_point);
2809template <
int dim,
int spacedim>
2810const std::vector<Point<spacedim>> &
2813 Assert(fe_face_values !=
nullptr,
2814 ExcMessage(
"This call requires a call to reinit() first."));
2815 return fe_face_values->get_quadrature_points();
2820template <
int dim,
int spacedim>
2824 if (has_hp_capabilities())
2825 return internal_hp_fe_face_values->get_update_flags();
2827 return internal_fe_face_values->get_update_flags();
2832template <
int dim,
int spacedim>
2836 return get_fe_face_values(
cell_index).get_cell();
2841template <
int dim,
int spacedim>
2846 return get_fe_face_values(
cell_index).get_face_number();
2851template <
int dim,
int spacedim>
2856 interface_dof_indices.size() > 0,
2858 "n_current_interface_dofs() is only available after a call to reinit()."));
2859 return interface_dof_indices.size();
2864template <
int dim,
int spacedim>
2868 return {0U, n_current_interface_dofs()};
2873template <
int dim,
int spacedim>
2877 return fe_face_values_neighbor ==
nullptr;
2882template <
int dim,
int spacedim>
2883std::vector<types::global_dof_index>
2886 return interface_dof_indices;
2891template <
int dim,
int spacedim>
2892std::array<unsigned int, 2>
2894 const unsigned int interface_dof_index)
const
2897 return dofmap[interface_dof_index];
2902template <
int dim,
int spacedim>
2911 "You are on a boundary, so you can only ask for the first FEFaceValues object."));
2913 return (
cell_index == 0) ? *fe_face_values : *fe_face_values_neighbor;
2918template <
int dim,
int spacedim>
2922 return normal_vector(q_point_index);
2927template <
int dim,
int spacedim>
2930 const unsigned int q_point_index)
const
2932 return fe_face_values->normal_vector(q_point_index);
2937template <
int dim,
int spacedim>
2940 const bool here_or_there,
2941 const unsigned int interface_dof_index,
2942 const unsigned int q_point,
2943 const unsigned int component)
const
2945 const auto dof_pair = dofmap[interface_dof_index];
2948 return get_fe_face_values(0).shape_value_component(dof_pair[0],
2952 return get_fe_face_values(1).shape_value_component(dof_pair[1],
2961template <
int dim,
int spacedim>
2964 const unsigned int interface_dof_index,
2965 const unsigned int q_point,
2966 const unsigned int component)
const
2968 const auto dof_pair = dofmap[interface_dof_index];
2973 value += get_fe_face_values(0).shape_value_component(dof_pair[0],
2977 value -= get_fe_face_values(1).shape_value_component(dof_pair[1],
2985template <
int dim,
int spacedim>
2988 const unsigned int interface_dof_index,
2989 const unsigned int q_point,
2990 const unsigned int component)
const
2992 const auto dof_pair = dofmap[interface_dof_index];
2995 return get_fe_face_values(0).shape_value_component(dof_pair[0],
3002 value += 0.5 * get_fe_face_values(0).shape_value_component(dof_pair[0],
3006 value += 0.5 * get_fe_face_values(1).shape_value_component(dof_pair[1],
3015template <
int dim,
int spacedim>
3018 const unsigned int interface_dof_index,
3019 const unsigned int q_point,
3020 const unsigned int component)
const
3022 const auto dof_pair = dofmap[interface_dof_index];
3025 return get_fe_face_values(0).shape_grad_component(dof_pair[0],
3032 value += 0.5 * get_fe_face_values(0).shape_grad_component(dof_pair[0],
3036 value += 0.5 * get_fe_face_values(1).shape_grad_component(dof_pair[1],
3045template <
int dim,
int spacedim>
3048 const unsigned int interface_dof_index,
3049 const unsigned int q_point,
3050 const unsigned int component)
const
3052 const auto dof_pair = dofmap[interface_dof_index];
3055 return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3062 value += 0.5 * get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3066 value += 0.5 * get_fe_face_values(1).shape_hessian_component(dof_pair[1],
3075template <
int dim,
int spacedim>
3078 const unsigned int interface_dof_index,
3079 const unsigned int q_point,
3080 const unsigned int component)
const
3082 const auto dof_pair = dofmap[interface_dof_index];
3085 return get_fe_face_values(0).shape_grad_component(dof_pair[0],
3092 value += get_fe_face_values(0).shape_grad_component(dof_pair[0],
3096 value -= get_fe_face_values(1).shape_grad_component(dof_pair[1],
3105template <
int dim,
int spacedim>
3108 const unsigned int interface_dof_index,
3109 const unsigned int q_point,
3110 const unsigned int component)
const
3112 const auto dof_pair = dofmap[interface_dof_index];
3115 return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3122 value += get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3126 value -= get_fe_face_values(1).shape_hessian_component(dof_pair[1],
3135template <
int dim,
int spacedim>
3138 const unsigned int interface_dof_index,
3139 const unsigned int q_point,
3140 const unsigned int component)
const
3142 const auto dof_pair = dofmap[interface_dof_index];
3145 return get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3152 value += get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3156 value -= get_fe_face_values(1).shape_3rd_derivative_component(dof_pair[1],
3165template <
int dim,
int spacedim>
3166template <
class InputVector>
3169 const InputVector &fe_function,
3170 std::vector<typename InputVector::value_type> &values)
const
3175 this->operator[](scalar).get_jump_in_function_values(fe_function, values);
3180template <
int dim,
int spacedim>
3181template <
class InputVector>
3184 const InputVector &fe_function,
3191 this->operator[](scalar).get_jump_in_function_gradients(fe_function,
3197template <
int dim,
int spacedim>
3198template <
class InputVector>
3201 const InputVector &fe_function,
3208 this->operator[](scalar).get_jump_in_function_hessians(fe_function, hessians);
3213template <
int dim,
int spacedim>
3214template <
class InputVector>
3217 const InputVector &fe_function,
3219 &third_derivatives)
const
3224 this->operator[](scalar).get_jump_in_function_third_derivatives(
3225 fe_function, third_derivatives);
3230template <
int dim,
int spacedim>
3231template <
class InputVector>
3234 const InputVector &fe_function,
3235 std::vector<typename InputVector::value_type> &values)
const
3240 this->operator[](scalar).get_average_of_function_values(fe_function, values);
3245template <
int dim,
int spacedim>
3246template <
class InputVector>
3249 const InputVector &fe_function,
3256 this->operator[](scalar).get_average_of_function_gradients(fe_function,
3262template <
int dim,
int spacedim>
3263template <
class InputVector>
3266 const InputVector &fe_function,
3273 this->operator[](scalar).get_average_of_function_hessians(fe_function,
3280template <
int dim,
int spacedim>
3285 const unsigned int n_components =
3286 (this->has_hp_capabilities() ? this->get_fe_collection().n_components() :
3287 this->get_fe().n_components());
3295template <
int dim,
int spacedim>
3300 const unsigned int n_components =
3301 (this->has_hp_capabilities() ? this->get_fe_collection().n_components() :
3302 this->get_fe().n_components());
3303 const unsigned int n_vectors =
3318 template <
int dim,
int spacedim>
3321 : fe_interface(&fe_interface)
3326 template <
int dim,
int spacedim>
3327 Scalar<dim, spacedim>::Scalar(
3329 const unsigned int component)
3330 : Base<dim, spacedim>(fe_interface)
3331 , extractor(component)
3336 template <
int dim,
int spacedim>
3337 template <
class InputVector,
class OutputVector>
3339 Base<dim, spacedim>::get_local_dof_values(
3340 const InputVector &dof_values,
3341 OutputVector &local_dof_values)
const
3343 const auto &interface_dof_indices =
3344 this->fe_interface->get_interface_dof_indices();
3346 AssertDimension(interface_dof_indices.size(), local_dof_values.size());
3348 for (
const unsigned int i : this->fe_interface->dof_indices())
3349 local_dof_values[i] = dof_values(interface_dof_indices[i]);
3354 template <
int dim,
int spacedim>
3355 typename Scalar<dim, spacedim>::value_type
3356 Scalar<dim, spacedim>::value(
const bool here_or_there,
3357 const unsigned int interface_dof_index,
3358 const unsigned int q_point)
const
3360 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3363 return (*(this->fe_interface->fe_face_values))[extractor].value(
3364 dof_pair[0], q_point);
3367 return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3368 dof_pair[1], q_point);
3375 template <
int dim,
int spacedim>
3376 typename Scalar<dim, spacedim>::value_type
3377 Scalar<dim, spacedim>::jump_in_values(
const unsigned int interface_dof_index,
3378 const unsigned int q_point)
const
3380 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3382 value_type
value = 0.0;
3386 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3391 (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3392 dof_pair[1], q_point);
3399 template <
int dim,
int spacedim>
3400 typename Scalar<dim, spacedim>::value_type
3401 Scalar<dim, spacedim>::average_of_values(
3402 const unsigned int interface_dof_index,
3403 const unsigned int q_point)
const
3405 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3407 if (this->fe_interface->at_boundary())
3408 return (*(this->fe_interface->fe_face_values))[extractor].value(
3409 dof_pair[0], q_point);
3411 value_type
value = 0.0;
3416 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3421 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3422 dof_pair[1], q_point);
3429 template <
int dim,
int spacedim>
3430 typename Scalar<dim, spacedim>::gradient_type
3431 Scalar<dim, spacedim>::average_of_gradients(
3432 const unsigned int interface_dof_index,
3433 const unsigned int q_point)
const
3435 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3437 if (this->fe_interface->at_boundary())
3438 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3439 dof_pair[0], q_point);
3441 gradient_type
value;
3446 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3450 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3451 .gradient(dof_pair[1], q_point);
3458 template <
int dim,
int spacedim>
3459 typename Scalar<dim, spacedim>::gradient_type
3460 Scalar<dim, spacedim>::jump_in_gradients(
3461 const unsigned int interface_dof_index,
3462 const unsigned int q_point)
const
3464 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3466 if (this->fe_interface->at_boundary())
3467 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3468 dof_pair[0], q_point);
3470 gradient_type
value;
3474 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3479 (*(this->fe_interface->fe_face_values_neighbor))[extractor].gradient(
3480 dof_pair[1], q_point);
3487 template <
int dim,
int spacedim>
3488 typename Scalar<dim, spacedim>::hessian_type
3489 Scalar<dim, spacedim>::average_of_hessians(
3490 const unsigned int interface_dof_index,
3491 const unsigned int q_point)
const
3493 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3495 if (this->fe_interface->at_boundary())
3496 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3497 dof_pair[0], q_point);
3504 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3508 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3509 .hessian(dof_pair[1], q_point);
3516 template <
int dim,
int spacedim>
3517 typename Scalar<dim, spacedim>::third_derivative_type
3518 Scalar<dim, spacedim>::jump_in_third_derivatives(
3519 const unsigned int interface_dof_index,
3520 const unsigned int q_point)
const
3522 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3524 if (this->fe_interface->at_boundary())
3525 return (*(this->fe_interface->fe_face_values))[extractor]
3526 .third_derivative(dof_pair[0], q_point);
3528 third_derivative_type
value;
3532 (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
3533 dof_pair[0], q_point);
3536 value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3537 .third_derivative(dof_pair[1], q_point);
3544 template <
int dim,
int spacedim>
3545 typename Scalar<dim, spacedim>::hessian_type
3546 Scalar<dim, spacedim>::jump_in_hessians(
3547 const unsigned int interface_dof_index,
3548 const unsigned int q_point)
const
3550 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3552 if (this->fe_interface->at_boundary())
3553 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3554 dof_pair[0], q_point);
3560 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3565 (*(this->fe_interface->fe_face_values_neighbor))[extractor].hessian(
3566 dof_pair[1], q_point);
3573 template <
int dim,
int spacedim>
3574 template <
class InputVector>
3576 Scalar<dim, spacedim>::get_function_values_from_local_dof_values(
3577 const bool here_or_there,
3578 const InputVector &local_dof_values,
3579 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3584 for (
const auto dof_index : this->fe_interface->dof_indices())
3585 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3590 values[q_index] += local_dof_values[dof_index] *
3591 value(here_or_there, dof_index, q_index);
3597 template <
int dim,
int spacedim>
3598 template <
class InputVector>
3600 Scalar<dim, spacedim>::get_function_values(
3601 const bool here_or_there,
3602 const InputVector &fe_function,
3603 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3606 std::vector<typename InputVector::value_type> local_dof_values(
3607 this->fe_interface->n_current_interface_dofs());
3608 this->get_local_dof_values(fe_function, local_dof_values);
3610 get_function_values_from_local_dof_values(here_or_there,
3617 template <
int dim,
int spacedim>
3618 template <
class InputVector>
3620 Scalar<dim, spacedim>::get_jump_in_function_values_from_local_dof_values(
3621 const InputVector &local_dof_values,
3622 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3627 for (
const auto dof_index : this->fe_interface->dof_indices())
3628 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3634 local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
3640 template <
int dim,
int spacedim>
3641 template <
class InputVector>
3643 Scalar<dim, spacedim>::get_jump_in_function_values(
3644 const InputVector &fe_function,
3645 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3648 std::vector<typename InputVector::value_type> local_dof_values(
3649 this->fe_interface->n_current_interface_dofs());
3650 this->get_local_dof_values(fe_function, local_dof_values);
3652 get_jump_in_function_values_from_local_dof_values(local_dof_values, values);
3657 template <
int dim,
int spacedim>
3658 template <
class InputVector>
3660 Scalar<dim, spacedim>::get_jump_in_function_gradients_from_local_dof_values(
3661 const InputVector &local_dof_values,
3662 std::vector<solution_gradient_type<typename InputVector::value_type>>
3667 for (
const auto dof_index : this->fe_interface->dof_indices())
3668 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3674 local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
3680 template <
int dim,
int spacedim>
3681 template <
class InputVector>
3683 Scalar<dim, spacedim>::get_jump_in_function_gradients(
3684 const InputVector &fe_function,
3685 std::vector<solution_gradient_type<typename InputVector::value_type>>
3688 std::vector<typename InputVector::value_type> local_dof_values(
3689 this->fe_interface->n_current_interface_dofs());
3690 this->get_local_dof_values(fe_function, local_dof_values);
3692 get_jump_in_function_gradients_from_local_dof_values(local_dof_values,
3698 template <
int dim,
int spacedim>
3699 template <
class InputVector>
3701 Scalar<dim, spacedim>::get_average_of_function_values_from_local_dof_values(
3702 const InputVector &local_dof_values,
3703 std::vector<solution_value_type<typename InputVector::value_type>> &values)
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] * average_of_values(dof_index, q_index);
3721 template <
int dim,
int spacedim>
3722 template <
class InputVector>
3724 Scalar<dim, spacedim>::get_average_of_function_values(
3725 const InputVector &fe_function,
3726 std::vector<solution_value_type<typename InputVector::value_type>> &values)
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_average_of_function_values_from_local_dof_values(local_dof_values,
3739 template <
int dim,
int spacedim>
3740 template <
class InputVector>
3742 Scalar<dim, spacedim>::
3743 get_average_of_function_gradients_from_local_dof_values(
3744 const InputVector &local_dof_values,
3745 std::vector<solution_gradient_type<typename InputVector::value_type>>
3750 for (
const auto dof_index : this->fe_interface->dof_indices())
3751 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3756 gradients[q_index] += local_dof_values[dof_index] *
3757 average_of_gradients(dof_index, q_index);
3763 template <
int dim,
int spacedim>
3764 template <
class InputVector>
3766 Scalar<dim, spacedim>::get_average_of_function_gradients(
3767 const InputVector &fe_function,
3768 std::vector<solution_gradient_type<typename InputVector::value_type>>
3771 std::vector<typename InputVector::value_type> local_dof_values(
3772 this->fe_interface->n_current_interface_dofs());
3773 this->get_local_dof_values(fe_function, local_dof_values);
3775 get_average_of_function_gradients_from_local_dof_values(local_dof_values,
3781 template <
int dim,
int spacedim>
3782 template <
class InputVector>
3784 Scalar<dim, spacedim>::get_jump_in_function_hessians_from_local_dof_values(
3785 const InputVector &local_dof_values,
3786 std::vector<solution_hessian_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())
3798 local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
3804 template <
int dim,
int spacedim>
3805 template <
class InputVector>
3807 Scalar<dim, spacedim>::get_jump_in_function_hessians(
3808 const InputVector &fe_function,
3809 std::vector<solution_hessian_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_jump_in_function_hessians_from_local_dof_values(local_dof_values,
3822 template <
int dim,
int spacedim>
3823 template <
class InputVector>
3825 Scalar<dim, spacedim>::get_average_of_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 unsigned int dof_index : this->fe_interface->dof_indices())
3833 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3838 hessians[q_index] += local_dof_values[dof_index] *
3839 average_of_hessians(dof_index, q_index);
3845 template <
int dim,
int spacedim>
3846 template <
class InputVector>
3848 Scalar<dim, spacedim>::get_average_of_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_average_of_function_hessians_from_local_dof_values(local_dof_values,
3863 template <
int dim,
int spacedim>
3864 template <
class InputVector>
3866 Scalar<dim, spacedim>::
3867 get_jump_in_function_third_derivatives_from_local_dof_values(
3868 const InputVector &local_dof_values,
3870 solution_third_derivative_type<typename InputVector::value_type>>
3871 &third_derivatives)
const
3874 this->fe_interface->n_quadrature_points);
3876 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
3877 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3880 third_derivatives[q_index] = 0.;
3882 third_derivatives[q_index] +=
3883 local_dof_values[dof_index] *
3884 jump_in_third_derivatives(dof_index, q_index);
3890 template <
int dim,
int spacedim>
3891 template <
class InputVector>
3893 Scalar<dim, spacedim>::get_jump_in_function_third_derivatives(
3894 const InputVector &fe_function,
3896 solution_third_derivative_type<typename InputVector::value_type>>
3897 &third_derivatives)
const
3899 std::vector<typename InputVector::value_type> local_dof_values(
3900 this->fe_interface->n_current_interface_dofs());
3901 this->get_local_dof_values(fe_function, local_dof_values);
3903 get_jump_in_function_third_derivatives_from_local_dof_values(
3904 local_dof_values, third_derivatives);
3909 template <
int dim,
int spacedim>
3912 const unsigned int first_vector_component)
3913 : Base<dim, spacedim>(fe_interface)
3914 , extractor(first_vector_component)
3919 template <
int dim,
int spacedim>
3922 const unsigned int interface_dof_index,
3923 const unsigned int q_point)
const
3925 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3928 return (*(this->fe_interface->fe_face_values))[extractor].value(
3929 dof_pair[0], q_point);
3932 return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3933 dof_pair[1], q_point);
3935 return value_type();
3940 template <
int dim,
int spacedim>
3943 const unsigned int q_point)
const
3945 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3951 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3956 (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3957 dof_pair[1], q_point);
3964 template <
int dim,
int spacedim>
3967 const unsigned int interface_dof_index,
3968 const unsigned int q_point)
const
3970 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3972 if (this->fe_interface->at_boundary())
3973 return (*(this->fe_interface->fe_face_values))[extractor].value(
3974 dof_pair[0], q_point);
3981 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3986 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3987 dof_pair[1], q_point);
3994 template <
int dim,
int spacedim>
3997 const unsigned int interface_dof_index,
3998 const unsigned int q_point)
const
4000 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4002 if (this->fe_interface->at_boundary())
4003 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
4004 dof_pair[0], q_point);
4006 gradient_type
value;
4011 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
4015 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4016 .gradient(dof_pair[1], q_point);
4023 template <
int dim,
int spacedim>
4026 const unsigned int interface_dof_index,
4027 const unsigned int q_point)
const
4029 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4031 if (this->fe_interface->at_boundary())
4032 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
4033 dof_pair[0], q_point);
4035 gradient_type
value;
4039 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
4044 (*(this->fe_interface->fe_face_values_neighbor))[extractor].gradient(
4045 dof_pair[1], q_point);
4052 template <
int dim,
int spacedim>
4055 const unsigned int q_point)
const
4057 return jump_in_gradients(interface_dof_index, q_point);
4062 template <
int dim,
int spacedim>
4065 const unsigned int interface_dof_index,
4066 const unsigned int q_point)
const
4068 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4070 if (this->fe_interface->at_boundary())
4071 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
4072 dof_pair[0], q_point);
4079 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
4083 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4084 .hessian(dof_pair[1], q_point);
4091 template <
int dim,
int spacedim>
4094 const unsigned int q_point)
const
4096 return average_of_hessians(interface_dof_index, q_point);
4101 template <
int dim,
int spacedim>
4104 const unsigned int interface_dof_index,
4105 const unsigned int q_point)
const
4107 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4109 if (this->fe_interface->at_boundary())
4110 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
4111 dof_pair[0], q_point);
4117 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
4122 (*(this->fe_interface->fe_face_values_neighbor))[extractor].hessian(
4123 dof_pair[1], q_point);
4130 template <
int dim,
int spacedim>
4133 const unsigned int q_point)
const
4135 return jump_in_hessians(interface_dof_index, q_point);
4140 template <
int dim,
int spacedim>
4143 const unsigned int interface_dof_index,
4144 const unsigned int q_point)
const
4146 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4148 if (this->fe_interface->at_boundary())
4149 return (*(this->fe_interface->fe_face_values))[extractor]
4150 .third_derivative(dof_pair[0], q_point);
4152 third_derivative_type
value;
4156 (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
4157 dof_pair[0], q_point);
4160 value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4161 .third_derivative(dof_pair[1], q_point);
4168 template <
int dim,
int spacedim>
4169 template <
class InputVector>
4172 const bool here_or_there,
4173 const InputVector &local_dof_values,
4174 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4179 for (
const auto dof_index : this->fe_interface->dof_indices())
4180 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4185 values[q_index] += local_dof_values[dof_index] *
4186 value(here_or_there, dof_index, q_index);
4192 template <
int dim,
int spacedim>
4193 template <
class InputVector>
4196 const bool here_or_there,
4197 const InputVector &fe_function,
4198 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4201 std::vector<typename InputVector::value_type> local_dof_values(
4202 this->fe_interface->n_current_interface_dofs());
4203 this->get_local_dof_values(fe_function, local_dof_values);
4205 get_function_values_from_local_dof_values(here_or_there,
4212 template <
int dim,
int spacedim>
4213 template <
class InputVector>
4216 const InputVector &local_dof_values,
4217 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4222 for (
const auto dof_index : this->fe_interface->dof_indices())
4223 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4229 local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
4235 template <
int dim,
int spacedim>
4236 template <
class InputVector>
4239 const InputVector &fe_function,
4240 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4243 std::vector<typename InputVector::value_type> local_dof_values(
4244 this->fe_interface->n_current_interface_dofs());
4245 this->get_local_dof_values(fe_function, local_dof_values);
4247 get_jump_in_function_values_from_local_dof_values(local_dof_values, values);
4252 template <
int dim,
int spacedim>
4253 template <
class InputVector>
4256 const InputVector &local_dof_values,
4257 std::vector<solution_gradient_type<typename InputVector::value_type>>
4262 for (
const auto dof_index : this->fe_interface->dof_indices())
4263 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4269 local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
4275 template <
int dim,
int spacedim>
4276 template <
class InputVector>
4279 const InputVector &fe_function,
4280 std::vector<solution_gradient_type<typename InputVector::value_type>>
4283 std::vector<typename InputVector::value_type> local_dof_values(
4284 this->fe_interface->n_current_interface_dofs());
4285 this->get_local_dof_values(fe_function, local_dof_values);
4287 get_jump_in_function_gradients_from_local_dof_values(local_dof_values,
4293 template <
int dim,
int spacedim>
4294 template <
class InputVector>
4297 const InputVector &local_dof_values,
4298 std::vector<solution_value_type<typename InputVector::value_type>> &values)
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] * average_of_values(dof_index, q_index);
4316 template <
int dim,
int spacedim>
4317 template <
class InputVector>
4320 const InputVector &fe_function,
4321 std::vector<solution_value_type<typename InputVector::value_type>> &values)
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_average_of_function_values_from_local_dof_values(local_dof_values,
4334 template <
int dim,
int spacedim>
4335 template <
class InputVector>
4339 const InputVector &local_dof_values,
4340 std::vector<solution_gradient_type<typename InputVector::value_type>>
4345 for (
const auto dof_index : this->fe_interface->dof_indices())
4346 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4351 gradients[q_index] += local_dof_values[dof_index] *
4352 average_of_gradients(dof_index, q_index);
4358 template <
int dim,
int spacedim>
4359 template <
class InputVector>
4362 const InputVector &fe_function,
4363 std::vector<solution_gradient_type<typename InputVector::value_type>>
4366 std::vector<typename InputVector::value_type> local_dof_values(
4367 this->fe_interface->n_current_interface_dofs());
4368 this->get_local_dof_values(fe_function, local_dof_values);
4370 get_average_of_function_gradients_from_local_dof_values(local_dof_values,
4376 template <
int dim,
int spacedim>
4377 template <
class InputVector>
4380 const InputVector &local_dof_values,
4381 std::vector<solution_hessian_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())
4393 local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
4399 template <
int dim,
int spacedim>
4400 template <
class InputVector>
4403 const InputVector &fe_function,
4404 std::vector<solution_hessian_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_jump_in_function_hessians_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 unsigned int dof_index : this->fe_interface->dof_indices())
4428 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4433 hessians[q_index] += local_dof_values[dof_index] *
4434 average_of_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_average_of_function_hessians_from_local_dof_values(local_dof_values,
4458 template <
int dim,
int spacedim>
4459 template <
class InputVector>
4463 const InputVector &local_dof_values,
4465 solution_third_derivative_type<typename InputVector::value_type>>
4466 &third_derivatives)
const
4469 this->fe_interface->n_quadrature_points);
4471 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
4472 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4475 third_derivatives[q_index] = 0.;
4477 third_derivatives[q_index] +=
4478 local_dof_values[dof_index] *
4479 jump_in_third_derivatives(dof_index, q_index);
4485 template <
int dim,
int spacedim>
4486 template <
class InputVector>
4489 const InputVector &fe_function,
4491 solution_third_derivative_type<typename InputVector::value_type>>
4492 &third_derivatives)
const
4494 std::vector<typename InputVector::value_type> local_dof_values(
4495 this->fe_interface->n_current_interface_dofs());
4496 this->get_local_dof_values(fe_function, local_dof_values);
4498 get_jump_in_function_third_derivatives_from_local_dof_values(
4499 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
const types::fe_index invalid_fe_index
static const unsigned int invalid_unsigned_int
const types::global_dof_index invalid_dof_index
boost::integer_range< IncrementableType > iota_view
typename internal::ProductTypeImpl< std::decay_t< T >, std::decay_t< U > >::type type