16 #ifndef dealii_fe_interface_values_h
17 #define dealii_fe_interface_values_h
33 template <
int dim,
int spacedim>
46 template <
int dim,
int spacedim = dim>
65 template <
class InputVector,
class OutputVector>
68 OutputVector &local_dof_values)
const;
76 template <
int dim,
int spacedim = dim>
112 template <
typename Number>
121 template <
typename Number>
131 template <
typename Number>
141 template <
typename Number>
149 const unsigned int component);
177 const unsigned int interface_dof_index,
178 const unsigned int q_point)
const;
199 const unsigned int q_point)
const;
213 const unsigned int q_point)
const;
227 const unsigned int q_point)
const;
241 const unsigned int q_point)
const;
262 const unsigned int q_point)
const;
276 const unsigned int q_point)
const;
291 const unsigned int q_point)
const;
319 template <
class InputVector>
322 const bool here_or_there,
323 const InputVector &fe_function,
349 template <
class InputVector>
352 const bool here_or_there,
353 const InputVector &local_dof_values,
377 template <
class InputVector>
380 const InputVector &fe_function,
391 template <
class InputVector>
394 const InputVector &local_dof_values,
411 template <
class InputVector>
414 const InputVector &fe_function,
425 template <
class InputVector>
428 const InputVector &local_dof_values,
445 template <
class InputVector>
448 const InputVector &fe_function,
459 template <
class InputVector>
462 const InputVector &local_dof_values,
480 template <
class InputVector>
483 const InputVector &fe_function,
486 &third_derivatives)
const;
495 template <
class InputVector>
498 const InputVector &local_dof_values,
501 &third_derivatives)
const;
523 template <
class InputVector>
526 const InputVector &fe_function,
537 template <
class InputVector>
540 const InputVector &local_dof_values,
557 template <
class InputVector>
560 const InputVector &fe_function,
571 template <
class InputVector>
574 const InputVector &local_dof_values,
591 template <
class InputVector>
594 const InputVector &fe_function,
605 template <
class InputVector>
608 const InputVector &local_dof_values,
626 template <
int dim,
int spacedim = dim>
665 template <
typename Number>
674 template <
typename Number>
684 template <
typename Number>
694 template <
typename Number>
702 const unsigned int first_vector_component);
730 const unsigned int interface_dof_index,
731 const unsigned int q_point)
const;
751 const unsigned int q_point)
const;
764 const unsigned int q_point)
const;
773 const unsigned int q_point)
const;
787 const unsigned int q_point)
const;
796 const unsigned int q_point)
const;
810 const unsigned int q_point)
const;
830 const unsigned int q_point)
const;
843 const unsigned int q_point)
const;
858 const unsigned int q_point)
const;
867 const unsigned int q_point)
const;
895 template <
class InputVector>
898 const bool here_or_there,
899 const InputVector &fe_function,
925 template <
class InputVector>
928 const bool here_or_there,
929 const InputVector &local_dof_values,
953 template <
class InputVector>
956 const InputVector &fe_function,
967 template <
class InputVector>
970 const InputVector &local_dof_values,
987 template <
class InputVector>
990 const InputVector &fe_function,
1001 template <
class InputVector>
1004 const InputVector &local_dof_values,
1021 template <
class InputVector>
1024 const InputVector &fe_function,
1035 template <
class InputVector>
1038 const InputVector &local_dof_values,
1056 template <
class InputVector>
1059 const InputVector &fe_function,
1062 &third_derivatives)
const;
1071 template <
class InputVector>
1074 const InputVector &local_dof_values,
1077 &third_derivatives)
const;
1099 template <
class InputVector>
1102 const InputVector &fe_function,
1113 template <
class InputVector>
1116 const InputVector &local_dof_values,
1133 template <
class InputVector>
1136 const InputVector &fe_function,
1147 template <
class InputVector>
1150 const InputVector &local_dof_values,
1167 template <
class InputVector>
1170 const InputVector &fe_function,
1181 template <
class InputVector>
1184 const InputVector &local_dof_values,
1207 template <
int dim,
int spacedim,
typename Extractor>
1218 template <
int dim,
int spacedim>
1221 using type = typename ::FEInterfaceViews::Scalar<dim, spacedim>;
1231 template <
int dim,
int spacedim>
1234 using type = typename ::FEInterfaceViews::Vector<dim, spacedim>;
1245 template <
int dim,
int spacedim,
typename Extractor>
1246 using View = typename ::internal::FEInterfaceViews::
1247 ViewType<dim, spacedim, Extractor>::type;
1276 template <
int dim,
int spacedim = dim>
1446 template <
typename CellIteratorType,
typename CellNeighborIteratorType>
1449 const unsigned int face_no,
1450 const unsigned int sub_face_no,
1451 const CellNeighborIteratorType &cell_neighbor,
1452 const unsigned int face_no_neighbor,
1453 const unsigned int sub_face_no_neighbor,
1484 template <
typename CellIteratorType>
1487 const unsigned int face_no,
1596 JxW(
const unsigned int quadrature_point)
const;
1603 const std::vector<double> &
1615 const std::vector<Tensor<1, spacedim>> &
1633 const std::vector<Point<spacedim>> &
1689 std::vector<types::global_dof_index>
1704 std::array<unsigned int, 2>
1716 normal(
const unsigned int q_point_index)
const;
1750 const unsigned int interface_dof_index,
1751 const unsigned int q_point,
1752 const unsigned int component = 0)
const;
1783 const unsigned int q_point,
1784 const unsigned int component = 0)
const;
1801 const unsigned int q_point,
1802 const unsigned int component = 0)
const;
1820 const unsigned int q_point,
1821 const unsigned int component = 0)
const;
1838 const unsigned int q_point,
1839 const unsigned int component = 0)
const;
1865 const unsigned int q_point,
1866 const unsigned int component = 0)
const;
1883 const unsigned int q_point,
1884 const unsigned int component = 0)
const;
1902 const unsigned int q_point,
1903 const unsigned int component = 0)
const;
1924 template <
class InputVector>
1927 const InputVector &fe_function,
1928 std::vector<typename InputVector::value_type> &
values)
const;
1938 template <
class InputVector>
1941 const InputVector &fe_function,
1952 template <
class InputVector>
1955 const InputVector &fe_function,
1967 template <
class InputVector>
1970 const InputVector &fe_function,
1972 &third_derivatives)
const;
1989 template <
class InputVector>
1992 const InputVector &fe_function,
1993 std::vector<typename InputVector::value_type> &
values)
const;
2002 template <
class InputVector>
2005 const InputVector &fe_function,
2016 template <
class InputVector>
2019 const InputVector &fe_function,
2067 std::vector<std::array<unsigned int, 2>>
dofmap;
2105 std::unique_ptr<FESubfaceValues<dim, spacedim>>
2125 std::unique_ptr<hp::FESubfaceValues<dim, spacedim>>
2132 std::unique_ptr<hp::FEFaceValues<dim, spacedim>>
2139 std::unique_ptr<hp::FESubfaceValues<dim, spacedim>>
2149 "The current function doesn't make sense when used with a "
2150 "FEInterfaceValues object with hp-capabilities.");
2159 "The current function doesn't make sense when used with a "
2160 "FEInterfaceValues object without hp-capabilities.");
2180 template <
int dim,
int spacedim>
2186 : n_quadrature_points(quadrature.size())
2187 , fe_face_values(nullptr)
2188 , fe_face_values_neighbor(nullptr)
2189 , internal_fe_face_values(
2194 , internal_fe_subface_values(
2199 , internal_fe_face_values_neighbor(
2204 , internal_fe_subface_values_neighbor(
2213 template <
int dim,
int spacedim>
2227 template <
int dim,
int spacedim>
2233 : n_quadrature_points(quadrature.max_n_quadrature_points())
2234 , fe_face_values(nullptr)
2235 , fe_face_values_neighbor(nullptr)
2236 , internal_fe_face_values(
2241 , internal_fe_subface_values(
2246 , internal_fe_face_values_neighbor(
2251 , internal_fe_subface_values_neighbor(
2260 template <
int dim,
int spacedim>
2266 : n_quadrature_points(quadrature_collection.max_n_quadrature_points())
2267 , fe_face_values(nullptr)
2268 , fe_face_values_neighbor(nullptr)
2269 , internal_hp_fe_face_values(
2270 std::make_unique<
hp::
FEFaceValues<dim, spacedim>>(mapping_collection,
2272 quadrature_collection,
2274 , internal_hp_fe_subface_values(
2278 quadrature_collection,
2280 , internal_hp_fe_face_values_neighbor(
2281 std::make_unique<
hp::
FEFaceValues<dim, spacedim>>(mapping_collection,
2283 quadrature_collection,
2285 , internal_hp_fe_subface_values_neighbor(
2289 quadrature_collection,
2297 template <
int dim,
int spacedim>
2304 quadrature_collection,
2310 template <
int dim,
int spacedim>
2311 template <
typename CellIteratorType,
typename CellNeighborIteratorType>
2314 const CellIteratorType &cell,
2315 const unsigned int face_no,
2316 const unsigned int sub_face_no,
2317 const CellNeighborIteratorType &cell_neighbor,
2318 const unsigned int face_no_neighbor,
2319 const unsigned int sub_face_no_neighbor,
2320 const unsigned int q_index,
2321 const unsigned int mapping_index,
2324 Assert(internal_fe_face_values || internal_hp_fe_face_values,
2327 if (internal_fe_face_values)
2331 internal_fe_face_values->reinit(cell, face_no);
2332 fe_face_values = internal_fe_face_values.get();
2336 internal_fe_subface_values->reinit(cell, face_no, sub_face_no);
2337 fe_face_values = internal_fe_subface_values.get();
2341 internal_fe_face_values_neighbor->reinit(cell_neighbor,
2343 fe_face_values_neighbor = internal_fe_face_values_neighbor.get();
2347 internal_fe_subface_values_neighbor->reinit(cell_neighbor,
2349 sub_face_no_neighbor);
2350 fe_face_values_neighbor = internal_fe_subface_values_neighbor.get();
2354 fe_face_values_neighbor->n_quadrature_points);
2356 const_cast<unsigned int &
>(this->n_quadrature_points) =
2357 fe_face_values->n_quadrature_points;
2359 else if (internal_hp_fe_face_values)
2361 unsigned int used_q_index = q_index;
2362 unsigned int used_mapping_index = mapping_index;
2367 if (internal_hp_fe_face_values->get_quadrature_collection().size() == 1)
2371 if (internal_hp_fe_face_values->get_mapping_collection().size() == 1)
2372 used_mapping_index = 0;
2379 if (internal_hp_fe_face_values
2380 ->get_quadrature_collection()[cell->active_fe_index()] ==
2381 internal_hp_fe_face_values
2382 ->get_quadrature_collection()[cell_neighbor->active_fe_index()])
2383 used_q_index = cell->active_fe_index();
2387 const unsigned int dominated_fe_index =
2390 internal_hp_fe_face_values->get_fe_collection().find_dominated_fe(
2391 {cell->active_fe_index(), cell_neighbor->active_fe_index()}) :
2398 "You called this function with 'q_index' left at its "
2399 "default value, but this can only work if one of "
2400 "the two finite elements adjacent to this face "
2401 "dominates the other. See the documentation "
2402 "of this function for more information of how "
2403 "to deal with this situation."));
2404 used_q_index = dominated_fe_index;
2411 "You called this function with 'mapping_index' left "
2412 "at its default value, but this can only work if one "
2413 "of the two finite elements adjacent to this face "
2414 "dominates the other. See the documentation "
2415 "of this function for more information of how "
2416 "to deal with this situation."));
2417 used_mapping_index = dominated_fe_index;
2423 internal_hp_fe_face_values->reinit(
2424 cell, face_no, used_q_index, used_mapping_index,
fe_index);
2426 internal_hp_fe_face_values->get_present_fe_values());
2430 internal_hp_fe_subface_values->
reinit(
2431 cell, face_no, sub_face_no, used_q_index, used_mapping_index);
2434 internal_hp_fe_subface_values->get_present_fe_values());
2438 internal_hp_fe_face_values_neighbor->
reinit(cell_neighbor,
2441 used_mapping_index);
2444 internal_hp_fe_face_values_neighbor->get_present_fe_values());
2448 internal_hp_fe_subface_values_neighbor->
reinit(cell_neighbor,
2450 sub_face_no_neighbor,
2452 used_mapping_index);
2454 fe_face_values_neighbor =
2456 internal_hp_fe_subface_values_neighbor->get_present_fe_values());
2460 fe_face_values_neighbor->n_quadrature_points);
2462 const_cast<unsigned int &
>(this->n_quadrature_points) =
2463 fe_face_values->n_quadrature_points;
2469 std::vector<types::global_dof_index> v(
2470 fe_face_values->get_fe().n_dofs_per_cell());
2471 cell->get_active_or_mg_dof_indices(v);
2472 std::vector<types::global_dof_index> v2(
2473 fe_face_values_neighbor->get_fe().n_dofs_per_cell());
2474 cell_neighbor->get_active_or_mg_dof_indices(v2);
2478 std::map<types::global_dof_index, std::pair<unsigned int, unsigned int>>
2480 std::pair<unsigned int, unsigned int> invalid_entry(
2483 for (
unsigned int i = 0; i < v.size(); ++i)
2486 auto result = tempmap.insert(std::make_pair(v[i], invalid_entry));
2487 result.first->second.first = i;
2490 for (
unsigned int i = 0; i < v2.size(); ++i)
2493 auto result = tempmap.insert(std::make_pair(v2[i], invalid_entry));
2494 result.first->second.second = i;
2498 dofmap.resize(tempmap.size());
2499 interface_dof_indices.resize(tempmap.size());
2500 unsigned int idx = 0;
2501 for (
auto &x : tempmap)
2503 interface_dof_indices[idx] = x.first;
2504 dofmap[idx] = {{x.second.first, x.second.second}};
2512 template <
int dim,
int spacedim>
2513 template <
typename CellIteratorType>
2516 const unsigned int face_no,
2517 const unsigned int q_index,
2518 const unsigned int mapping_index,
2521 Assert(internal_fe_face_values || internal_hp_fe_face_values,
2524 if (internal_fe_face_values)
2526 internal_fe_face_values->reinit(cell, face_no);
2527 fe_face_values = internal_fe_face_values.get();
2528 fe_face_values_neighbor =
nullptr;
2530 interface_dof_indices.resize(fe_face_values->get_fe().n_dofs_per_cell());
2531 cell->get_active_or_mg_dof_indices(interface_dof_indices);
2533 else if (internal_hp_fe_face_values)
2535 internal_hp_fe_face_values->reinit(
2536 cell, face_no, q_index, mapping_index,
fe_index);
2538 internal_hp_fe_face_values->get_present_fe_values());
2539 fe_face_values_neighbor =
nullptr;
2541 interface_dof_indices.resize(fe_face_values->get_fe().n_dofs_per_cell());
2542 cell->get_active_or_mg_dof_indices(interface_dof_indices);
2545 dofmap.resize(interface_dof_indices.size());
2546 for (
unsigned int i = 0; i < interface_dof_indices.size(); ++i)
2554 template <
int dim,
int spacedim>
2558 Assert(fe_face_values !=
nullptr,
2559 ExcMessage(
"This call requires a call to reinit() first."));
2560 return fe_face_values->JxW(q);
2565 template <
int dim,
int spacedim>
2566 const std::vector<double> &
2569 Assert(fe_face_values !=
nullptr,
2570 ExcMessage(
"This call requires a call to reinit() first."));
2571 return fe_face_values->get_JxW_values();
2576 template <
int dim,
int spacedim>
2577 const std::vector<Tensor<1, spacedim>> &
2580 Assert(fe_face_values !=
nullptr,
2581 ExcMessage(
"This call requires a call to reinit() first."));
2582 return fe_face_values->get_normal_vectors();
2587 template <
int dim,
int spacedim>
2591 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2592 return internal_fe_face_values->get_mapping();
2597 template <
int dim,
int spacedim>
2601 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2602 return internal_fe_face_values->get_fe();
2607 template <
int dim,
int spacedim>
2611 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2612 return internal_fe_face_values->get_quadrature();
2617 template <
int dim,
int spacedim>
2621 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2622 return internal_hp_fe_face_values->get_mapping_collection();
2627 template <
int dim,
int spacedim>
2631 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2632 return internal_hp_fe_face_values->get_fe_collection();
2637 template <
int dim,
int spacedim>
2641 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2642 return internal_hp_fe_face_values->get_quadrature_collection();
2647 template <
int dim,
int spacedim>
2651 if (internal_hp_fe_face_values || internal_hp_fe_subface_values ||
2652 internal_hp_fe_face_values_neighbor ||
2653 internal_hp_fe_subface_values_neighbor)
2663 Assert(internal_fe_face_values || internal_fe_subface_values ||
2664 internal_fe_face_values_neighbor ||
2665 internal_fe_subface_values_neighbor,
2677 template <
int dim,
int spacedim>
2681 return {0
U, n_quadrature_points};
2686 template <
int dim,
int spacedim>
2687 const std::vector<Point<spacedim>> &
2690 Assert(fe_face_values !=
nullptr,
2691 ExcMessage(
"This call requires a call to reinit() first."));
2692 return fe_face_values->get_quadrature_points();
2697 template <
int dim,
int spacedim>
2701 if (has_hp_capabilities())
2702 return internal_hp_fe_face_values->get_update_flags();
2704 return internal_fe_face_values->get_update_flags();
2709 template <
int dim,
int spacedim>
2713 return get_fe_face_values(
cell_index).get_cell();
2718 template <
int dim,
int spacedim>
2723 return get_fe_face_values(
cell_index).get_face_number();
2728 template <
int dim,
int spacedim>
2733 interface_dof_indices.size() > 0,
2735 "n_current_interface_dofs() is only available after a call to reinit()."));
2736 return interface_dof_indices.size();
2741 template <
int dim,
int spacedim>
2745 return {0
U, n_current_interface_dofs()};
2750 template <
int dim,
int spacedim>
2754 return fe_face_values_neighbor ==
nullptr;
2759 template <
int dim,
int spacedim>
2760 std::vector<types::global_dof_index>
2763 return interface_dof_indices;
2768 template <
int dim,
int spacedim>
2769 std::array<unsigned int, 2>
2771 const unsigned int interface_dof_index)
const
2774 return dofmap[interface_dof_index];
2779 template <
int dim,
int spacedim>
2788 "You are on a boundary, so you can only ask for the first FEFaceValues object."));
2790 return (
cell_index == 0) ? *fe_face_values : *fe_face_values_neighbor;
2795 template <
int dim,
int spacedim>
2799 return fe_face_values->normal_vector(q_point_index);
2804 template <
int dim,
int spacedim>
2807 const bool here_or_there,
2808 const unsigned int interface_dof_index,
2809 const unsigned int q_point,
2810 const unsigned int component)
const
2812 const auto dof_pair = dofmap[interface_dof_index];
2815 return get_fe_face_values(0).shape_value_component(dof_pair[0],
2819 return get_fe_face_values(1).shape_value_component(dof_pair[1],
2828 template <
int dim,
int spacedim>
2831 const unsigned int interface_dof_index,
2832 const unsigned int q_point,
2833 const unsigned int component)
const
2835 const auto dof_pair = dofmap[interface_dof_index];
2840 value += get_fe_face_values(0).shape_value_component(dof_pair[0],
2844 value -= get_fe_face_values(1).shape_value_component(dof_pair[1],
2852 template <
int dim,
int spacedim>
2855 const unsigned int interface_dof_index,
2856 const unsigned int q_point,
2857 const unsigned int component)
const
2859 const auto dof_pair = dofmap[interface_dof_index];
2862 return get_fe_face_values(0).shape_value_component(dof_pair[0],
2869 value += 0.5 * get_fe_face_values(0).shape_value_component(dof_pair[0],
2873 value += 0.5 * get_fe_face_values(1).shape_value_component(dof_pair[1],
2882 template <
int dim,
int spacedim>
2885 const unsigned int interface_dof_index,
2886 const unsigned int q_point,
2887 const unsigned int component)
const
2889 const auto dof_pair = dofmap[interface_dof_index];
2892 return get_fe_face_values(0).shape_grad_component(dof_pair[0],
2899 value += 0.5 * get_fe_face_values(0).shape_grad_component(dof_pair[0],
2903 value += 0.5 * get_fe_face_values(1).shape_grad_component(dof_pair[1],
2912 template <
int dim,
int spacedim>
2915 const unsigned int interface_dof_index,
2916 const unsigned int q_point,
2917 const unsigned int component)
const
2919 const auto dof_pair = dofmap[interface_dof_index];
2922 return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
2929 value += 0.5 * get_fe_face_values(0).shape_hessian_component(dof_pair[0],
2933 value += 0.5 * get_fe_face_values(1).shape_hessian_component(dof_pair[1],
2942 template <
int dim,
int spacedim>
2945 const unsigned int interface_dof_index,
2946 const unsigned int q_point,
2947 const unsigned int component)
const
2949 const auto dof_pair = dofmap[interface_dof_index];
2952 return get_fe_face_values(0).shape_grad_component(dof_pair[0],
2959 value += get_fe_face_values(0).shape_grad_component(dof_pair[0],
2963 value -= get_fe_face_values(1).shape_grad_component(dof_pair[1],
2972 template <
int dim,
int spacedim>
2975 const unsigned int interface_dof_index,
2976 const unsigned int q_point,
2977 const unsigned int component)
const
2979 const auto dof_pair = dofmap[interface_dof_index];
2982 return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
2989 value += get_fe_face_values(0).shape_hessian_component(dof_pair[0],
2993 value -= get_fe_face_values(1).shape_hessian_component(dof_pair[1],
3002 template <
int dim,
int spacedim>
3005 const unsigned int interface_dof_index,
3006 const unsigned int q_point,
3007 const unsigned int component)
const
3009 const auto dof_pair = dofmap[interface_dof_index];
3012 return get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3019 value += get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3023 value -= get_fe_face_values(1).shape_3rd_derivative_component(dof_pair[1],
3032 template <
int dim,
int spacedim>
3033 template <
class InputVector>
3036 const InputVector &fe_function,
3037 std::vector<typename InputVector::value_type> &
values)
const
3042 this->operator[](scalar).get_jump_in_function_values(fe_function,
values);
3047 template <
int dim,
int spacedim>
3048 template <
class InputVector>
3051 const InputVector &fe_function,
3058 this->operator[](scalar).get_jump_in_function_gradients(fe_function,
3064 template <
int dim,
int spacedim>
3065 template <
class InputVector>
3068 const InputVector &fe_function,
3075 this->operator[](scalar).get_jump_in_function_hessians(fe_function,
hessians);
3080 template <
int dim,
int spacedim>
3081 template <
class InputVector>
3084 const InputVector &fe_function,
3086 &third_derivatives)
const
3091 this->operator[](scalar).get_jump_in_function_third_derivatives(
3092 fe_function, third_derivatives);
3097 template <
int dim,
int spacedim>
3098 template <
class InputVector>
3101 const InputVector &fe_function,
3102 std::vector<typename InputVector::value_type> &
values)
const
3107 this->operator[](scalar).get_average_of_function_values(fe_function,
values);
3112 template <
int dim,
int spacedim>
3113 template <
class InputVector>
3116 const InputVector &fe_function,
3123 this->operator[](scalar).get_average_of_function_gradients(fe_function,
3129 template <
int dim,
int spacedim>
3130 template <
class InputVector>
3133 const InputVector &fe_function,
3140 this->operator[](scalar).get_average_of_function_hessians(fe_function,
3147 template <
int dim,
int spacedim>
3152 const unsigned int n_components =
3153 (this->has_hp_capabilities() ? this->get_fe_collection().n_components() :
3154 this->get_fe().n_components());
3162 template <
int dim,
int spacedim>
3167 const unsigned int n_components =
3168 (this->has_hp_capabilities() ? this->get_fe_collection().n_components() :
3169 this->get_fe().n_components());
3170 const unsigned int n_vectors =
3185 template <
int dim,
int spacedim>
3188 : fe_interface(&fe_interface)
3193 template <
int dim,
int spacedim>
3196 const unsigned int component)
3197 : Base<dim, spacedim>(fe_interface)
3198 , extractor(component)
3203 template <
int dim,
int spacedim>
3204 template <
class InputVector,
class OutputVector>
3206 Base<dim, spacedim>::get_local_dof_values(
3207 const InputVector &dof_values,
3208 OutputVector &local_dof_values)
const
3210 const auto &interface_dof_indices =
3211 this->fe_interface->get_interface_dof_indices();
3213 AssertDimension(interface_dof_indices.size(), local_dof_values.size());
3215 for (
const unsigned int i : this->fe_interface->dof_indices())
3216 local_dof_values[i] = dof_values(interface_dof_indices[i]);
3221 template <
int dim,
int spacedim>
3224 const unsigned int interface_dof_index,
3225 const unsigned int q_point)
const
3227 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3230 return (*(this->fe_interface->fe_face_values))[extractor].value(
3231 dof_pair[0], q_point);
3234 return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3235 dof_pair[1], q_point);
3242 template <
int dim,
int spacedim>
3244 Scalar<dim, spacedim>::jump_in_values(
const unsigned int interface_dof_index,
3245 const unsigned int q_point)
const
3247 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3249 value_type
value = 0.0;
3253 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3258 (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3259 dof_pair[1], q_point);
3266 template <
int dim,
int spacedim>
3268 Scalar<dim, spacedim>::average_of_values(
3269 const unsigned int interface_dof_index,
3270 const unsigned int q_point)
const
3272 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3274 if (this->fe_interface->at_boundary())
3275 return (*(this->fe_interface->fe_face_values))[extractor].value(
3276 dof_pair[0], q_point);
3278 value_type
value = 0.0;
3283 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3288 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3289 dof_pair[1], q_point);
3296 template <
int dim,
int spacedim>
3298 Scalar<dim, spacedim>::average_of_gradients(
3299 const unsigned int interface_dof_index,
3300 const unsigned int q_point)
const
3302 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3304 if (this->fe_interface->at_boundary())
3305 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3306 dof_pair[0], q_point);
3308 gradient_type
value;
3313 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3317 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3318 .gradient(dof_pair[1], q_point);
3325 template <
int dim,
int spacedim>
3327 Scalar<dim, spacedim>::jump_in_gradients(
3328 const unsigned int interface_dof_index,
3329 const unsigned int q_point)
const
3331 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3333 if (this->fe_interface->at_boundary())
3334 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3335 dof_pair[0], q_point);
3337 gradient_type
value;
3341 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3346 (*(this->fe_interface->fe_face_values_neighbor))[extractor].gradient(
3347 dof_pair[1], q_point);
3354 template <
int dim,
int spacedim>
3356 Scalar<dim, spacedim>::average_of_hessians(
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];
3362 if (this->fe_interface->at_boundary())
3363 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3364 dof_pair[0], q_point);
3371 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3375 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3376 .hessian(dof_pair[1], q_point);
3383 template <
int dim,
int spacedim>
3385 Scalar<dim, spacedim>::jump_in_third_derivatives(
3386 const unsigned int interface_dof_index,
3387 const unsigned int q_point)
const
3389 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3391 if (this->fe_interface->at_boundary())
3392 return (*(this->fe_interface->fe_face_values))[extractor]
3393 .third_derivative(dof_pair[0], q_point);
3395 third_derivative_type
value;
3399 (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
3400 dof_pair[0], q_point);
3403 value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3404 .third_derivative(dof_pair[1], q_point);
3411 template <
int dim,
int spacedim>
3413 Scalar<dim, spacedim>::jump_in_hessians(
3414 const unsigned int interface_dof_index,
3415 const unsigned int q_point)
const
3417 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3419 if (this->fe_interface->at_boundary())
3420 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3421 dof_pair[0], q_point);
3427 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3432 (*(this->fe_interface->fe_face_values_neighbor))[extractor].hessian(
3433 dof_pair[1], q_point);
3440 template <
int dim,
int spacedim>
3441 template <
class InputVector>
3444 const bool here_or_there,
3445 const InputVector &local_dof_values,
3446 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
3451 for (
const auto dof_index : this->fe_interface->dof_indices())
3452 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3457 values[q_index] += local_dof_values[dof_index] *
3458 value(here_or_there, dof_index, q_index);
3464 template <
int dim,
int spacedim>
3465 template <
class InputVector>
3468 const bool here_or_there,
3469 const InputVector &fe_function,
3470 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
3473 std::vector<typename InputVector::value_type> local_dof_values(
3474 this->fe_interface->n_current_interface_dofs());
3475 this->get_local_dof_values(fe_function, local_dof_values);
3477 get_function_values_from_local_dof_values(here_or_there,
3484 template <
int dim,
int spacedim>
3485 template <
class InputVector>
3487 Scalar<dim, spacedim>::get_jump_in_function_values_from_local_dof_values(
3488 const InputVector &local_dof_values,
3489 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
3494 for (
const auto dof_index : this->fe_interface->dof_indices())
3495 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3501 local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
3507 template <
int dim,
int spacedim>
3508 template <
class InputVector>
3510 Scalar<dim, spacedim>::get_jump_in_function_values(
3511 const InputVector &fe_function,
3512 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
3515 std::vector<typename InputVector::value_type> local_dof_values(
3516 this->fe_interface->n_current_interface_dofs());
3517 this->get_local_dof_values(fe_function, local_dof_values);
3519 get_jump_in_function_values_from_local_dof_values(local_dof_values,
values);
3524 template <
int dim,
int spacedim>
3525 template <
class InputVector>
3527 Scalar<dim, spacedim>::get_jump_in_function_gradients_from_local_dof_values(
3528 const InputVector &local_dof_values,
3529 std::vector<solution_gradient_type<typename InputVector::value_type>>
3534 for (
const auto dof_index : this->fe_interface->dof_indices())
3535 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3541 local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
3547 template <
int dim,
int spacedim>
3548 template <
class InputVector>
3550 Scalar<dim, spacedim>::get_jump_in_function_gradients(
3551 const InputVector &fe_function,
3552 std::vector<solution_gradient_type<typename InputVector::value_type>>
3555 std::vector<typename InputVector::value_type> local_dof_values(
3556 this->fe_interface->n_current_interface_dofs());
3557 this->get_local_dof_values(fe_function, local_dof_values);
3559 get_jump_in_function_gradients_from_local_dof_values(local_dof_values,
3565 template <
int dim,
int spacedim>
3566 template <
class InputVector>
3568 Scalar<dim, spacedim>::get_average_of_function_values_from_local_dof_values(
3569 const InputVector &local_dof_values,
3570 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
3575 for (
const auto dof_index : this->fe_interface->dof_indices())
3576 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3582 local_dof_values[dof_index] * average_of_values(dof_index, q_index);
3588 template <
int dim,
int spacedim>
3589 template <
class InputVector>
3591 Scalar<dim, spacedim>::get_average_of_function_values(
3592 const InputVector &fe_function,
3593 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
3596 std::vector<typename InputVector::value_type> local_dof_values(
3597 this->fe_interface->n_current_interface_dofs());
3598 this->get_local_dof_values(fe_function, local_dof_values);
3600 get_average_of_function_values_from_local_dof_values(local_dof_values,
3606 template <
int dim,
int spacedim>
3607 template <
class InputVector>
3609 Scalar<dim, spacedim>::
3610 get_average_of_function_gradients_from_local_dof_values(
3611 const InputVector &local_dof_values,
3612 std::vector<solution_gradient_type<typename InputVector::value_type>>
3617 for (
const auto dof_index : this->fe_interface->dof_indices())
3618 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3623 gradients[q_index] += local_dof_values[dof_index] *
3624 average_of_gradients(dof_index, q_index);
3630 template <
int dim,
int spacedim>
3631 template <
class InputVector>
3633 Scalar<dim, spacedim>::get_average_of_function_gradients(
3634 const InputVector &fe_function,
3635 std::vector<solution_gradient_type<typename InputVector::value_type>>
3638 std::vector<typename InputVector::value_type> local_dof_values(
3639 this->fe_interface->n_current_interface_dofs());
3640 this->get_local_dof_values(fe_function, local_dof_values);
3642 get_average_of_function_gradients_from_local_dof_values(local_dof_values,
3648 template <
int dim,
int spacedim>
3649 template <
class InputVector>
3651 Scalar<dim, spacedim>::get_jump_in_function_hessians_from_local_dof_values(
3652 const InputVector &local_dof_values,
3653 std::vector<solution_hessian_type<typename InputVector::value_type>>
3658 for (
const auto dof_index : this->fe_interface->dof_indices())
3659 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3665 local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
3671 template <
int dim,
int spacedim>
3672 template <
class InputVector>
3674 Scalar<dim, spacedim>::get_jump_in_function_hessians(
3675 const InputVector &fe_function,
3676 std::vector<solution_hessian_type<typename InputVector::value_type>>
3679 std::vector<typename InputVector::value_type> local_dof_values(
3680 this->fe_interface->n_current_interface_dofs());
3681 this->get_local_dof_values(fe_function, local_dof_values);
3683 get_jump_in_function_hessians_from_local_dof_values(local_dof_values,
3689 template <
int dim,
int spacedim>
3690 template <
class InputVector>
3692 Scalar<dim, spacedim>::get_average_of_function_hessians_from_local_dof_values(
3693 const InputVector &local_dof_values,
3694 std::vector<solution_hessian_type<typename InputVector::value_type>>
3699 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
3700 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3705 hessians[q_index] += local_dof_values[dof_index] *
3706 average_of_hessians(dof_index, q_index);
3712 template <
int dim,
int spacedim>
3713 template <
class InputVector>
3715 Scalar<dim, spacedim>::get_average_of_function_hessians(
3716 const InputVector &fe_function,
3717 std::vector<solution_hessian_type<typename InputVector::value_type>>
3720 std::vector<typename InputVector::value_type> local_dof_values(
3721 this->fe_interface->n_current_interface_dofs());
3722 this->get_local_dof_values(fe_function, local_dof_values);
3724 get_average_of_function_hessians_from_local_dof_values(local_dof_values,
3730 template <
int dim,
int spacedim>
3731 template <
class InputVector>
3733 Scalar<dim, spacedim>::
3734 get_jump_in_function_third_derivatives_from_local_dof_values(
3735 const InputVector &local_dof_values,
3737 solution_third_derivative_type<typename InputVector::value_type>>
3738 &third_derivatives)
const
3741 this->fe_interface->n_quadrature_points);
3743 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
3744 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
3747 third_derivatives[q_index] = 0.;
3749 third_derivatives[q_index] +=
3750 local_dof_values[dof_index] *
3751 jump_in_third_derivatives(dof_index, q_index);
3757 template <
int dim,
int spacedim>
3758 template <
class InputVector>
3760 Scalar<dim, spacedim>::get_jump_in_function_third_derivatives(
3761 const InputVector &fe_function,
3763 solution_third_derivative_type<typename InputVector::value_type>>
3764 &third_derivatives)
const
3766 std::vector<typename InputVector::value_type> local_dof_values(
3767 this->fe_interface->n_current_interface_dofs());
3768 this->get_local_dof_values(fe_function, local_dof_values);
3770 get_jump_in_function_third_derivatives_from_local_dof_values(
3771 local_dof_values, third_derivatives);
3776 template <
int dim,
int spacedim>
3779 const unsigned int first_vector_component)
3780 : Base<dim, spacedim>(fe_interface)
3781 , extractor(first_vector_component)
3786 template <
int dim,
int spacedim>
3789 const unsigned int interface_dof_index,
3790 const unsigned int q_point)
const
3792 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3795 return (*(this->fe_interface->fe_face_values))[extractor].value(
3796 dof_pair[0], q_point);
3799 return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3800 dof_pair[1], q_point);
3802 return value_type();
3807 template <
int dim,
int spacedim>
3810 const unsigned int q_point)
const
3812 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3818 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3823 (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3824 dof_pair[1], q_point);
3831 template <
int dim,
int spacedim>
3834 const unsigned int interface_dof_index,
3835 const unsigned int q_point)
const
3837 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3839 if (this->fe_interface->at_boundary())
3840 return (*(this->fe_interface->fe_face_values))[extractor].value(
3841 dof_pair[0], q_point);
3848 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3853 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3854 dof_pair[1], q_point);
3861 template <
int dim,
int spacedim>
3864 const unsigned int interface_dof_index,
3865 const unsigned int q_point)
const
3867 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3869 if (this->fe_interface->at_boundary())
3870 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3871 dof_pair[0], q_point);
3873 gradient_type
value;
3878 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3882 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3883 .gradient(dof_pair[1], q_point);
3890 template <
int dim,
int spacedim>
3893 const unsigned int interface_dof_index,
3894 const unsigned int q_point)
const
3896 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3898 if (this->fe_interface->at_boundary())
3899 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3900 dof_pair[0], q_point);
3902 gradient_type
value;
3906 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3911 (*(this->fe_interface->fe_face_values_neighbor))[extractor].gradient(
3912 dof_pair[1], q_point);
3919 template <
int dim,
int spacedim>
3922 const unsigned int q_point)
const
3924 return jump_in_gradients(interface_dof_index, q_point);
3929 template <
int dim,
int spacedim>
3932 const unsigned int interface_dof_index,
3933 const unsigned int q_point)
const
3935 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3937 if (this->fe_interface->at_boundary())
3938 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3939 dof_pair[0], q_point);
3946 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3950 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3951 .hessian(dof_pair[1], q_point);
3958 template <
int dim,
int spacedim>
3961 const unsigned int q_point)
const
3963 return average_of_hessians(interface_dof_index, q_point);
3968 template <
int dim,
int spacedim>
3971 const unsigned int interface_dof_index,
3972 const unsigned int q_point)
const
3974 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3976 if (this->fe_interface->at_boundary())
3977 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3978 dof_pair[0], q_point);
3984 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3989 (*(this->fe_interface->fe_face_values_neighbor))[extractor].hessian(
3990 dof_pair[1], q_point);
3997 template <
int dim,
int spacedim>
4000 const unsigned int q_point)
const
4002 return jump_in_hessians(interface_dof_index, q_point);
4007 template <
int dim,
int spacedim>
4010 const unsigned int interface_dof_index,
4011 const unsigned int q_point)
const
4013 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4015 if (this->fe_interface->at_boundary())
4016 return (*(this->fe_interface->fe_face_values))[extractor]
4017 .third_derivative(dof_pair[0], q_point);
4019 third_derivative_type
value;
4023 (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
4024 dof_pair[0], q_point);
4027 value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4028 .third_derivative(dof_pair[1], q_point);
4035 template <
int dim,
int spacedim>
4036 template <
class InputVector>
4039 const bool here_or_there,
4040 const InputVector &local_dof_values,
4041 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
4046 for (
const auto dof_index : this->fe_interface->dof_indices())
4047 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4052 values[q_index] += local_dof_values[dof_index] *
4053 value(here_or_there, dof_index, q_index);
4059 template <
int dim,
int spacedim>
4060 template <
class InputVector>
4063 const bool here_or_there,
4064 const InputVector &fe_function,
4065 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
4068 std::vector<typename InputVector::value_type> local_dof_values(
4069 this->fe_interface->n_current_interface_dofs());
4070 this->get_local_dof_values(fe_function, local_dof_values);
4072 get_function_values_from_local_dof_values(here_or_there,
4079 template <
int dim,
int spacedim>
4080 template <
class InputVector>
4083 const InputVector &local_dof_values,
4084 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
4089 for (
const auto dof_index : this->fe_interface->dof_indices())
4090 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4096 local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
4102 template <
int dim,
int spacedim>
4103 template <
class InputVector>
4106 const InputVector &fe_function,
4107 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
4110 std::vector<typename InputVector::value_type> local_dof_values(
4111 this->fe_interface->n_current_interface_dofs());
4112 this->get_local_dof_values(fe_function, local_dof_values);
4114 get_jump_in_function_values_from_local_dof_values(local_dof_values,
values);
4119 template <
int dim,
int spacedim>
4120 template <
class InputVector>
4123 const InputVector &local_dof_values,
4124 std::vector<solution_gradient_type<typename InputVector::value_type>>
4129 for (
const auto dof_index : this->fe_interface->dof_indices())
4130 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4136 local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
4142 template <
int dim,
int spacedim>
4143 template <
class InputVector>
4146 const InputVector &fe_function,
4147 std::vector<solution_gradient_type<typename InputVector::value_type>>
4150 std::vector<typename InputVector::value_type> local_dof_values(
4151 this->fe_interface->n_current_interface_dofs());
4152 this->get_local_dof_values(fe_function, local_dof_values);
4154 get_jump_in_function_gradients_from_local_dof_values(local_dof_values,
4160 template <
int dim,
int spacedim>
4161 template <
class InputVector>
4164 const InputVector &local_dof_values,
4165 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
4170 for (
const auto dof_index : this->fe_interface->dof_indices())
4171 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4177 local_dof_values[dof_index] * average_of_values(dof_index, q_index);
4183 template <
int dim,
int spacedim>
4184 template <
class InputVector>
4187 const InputVector &fe_function,
4188 std::vector<solution_value_type<typename InputVector::value_type>> &
values)
4191 std::vector<typename InputVector::value_type> local_dof_values(
4192 this->fe_interface->n_current_interface_dofs());
4193 this->get_local_dof_values(fe_function, local_dof_values);
4195 get_average_of_function_values_from_local_dof_values(local_dof_values,
4201 template <
int dim,
int spacedim>
4202 template <
class InputVector>
4206 const InputVector &local_dof_values,
4207 std::vector<solution_gradient_type<typename InputVector::value_type>>
4212 for (
const auto dof_index : this->fe_interface->dof_indices())
4213 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4218 gradients[q_index] += local_dof_values[dof_index] *
4219 average_of_gradients(dof_index, q_index);
4225 template <
int dim,
int spacedim>
4226 template <
class InputVector>
4229 const InputVector &fe_function,
4230 std::vector<solution_gradient_type<typename InputVector::value_type>>
4233 std::vector<typename InputVector::value_type> local_dof_values(
4234 this->fe_interface->n_current_interface_dofs());
4235 this->get_local_dof_values(fe_function, local_dof_values);
4237 get_average_of_function_gradients_from_local_dof_values(local_dof_values,
4243 template <
int dim,
int spacedim>
4244 template <
class InputVector>
4247 const InputVector &local_dof_values,
4248 std::vector<solution_hessian_type<typename InputVector::value_type>>
4253 for (
const auto dof_index : this->fe_interface->dof_indices())
4254 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4260 local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
4266 template <
int dim,
int spacedim>
4267 template <
class InputVector>
4270 const InputVector &fe_function,
4271 std::vector<solution_hessian_type<typename InputVector::value_type>>
4274 std::vector<typename InputVector::value_type> local_dof_values(
4275 this->fe_interface->n_current_interface_dofs());
4276 this->get_local_dof_values(fe_function, local_dof_values);
4278 get_jump_in_function_hessians_from_local_dof_values(local_dof_values,
4284 template <
int dim,
int spacedim>
4285 template <
class InputVector>
4288 const InputVector &local_dof_values,
4289 std::vector<solution_hessian_type<typename InputVector::value_type>>
4294 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
4295 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4300 hessians[q_index] += local_dof_values[dof_index] *
4301 average_of_hessians(dof_index, q_index);
4307 template <
int dim,
int spacedim>
4308 template <
class InputVector>
4311 const InputVector &fe_function,
4312 std::vector<solution_hessian_type<typename InputVector::value_type>>
4315 std::vector<typename InputVector::value_type> local_dof_values(
4316 this->fe_interface->n_current_interface_dofs());
4317 this->get_local_dof_values(fe_function, local_dof_values);
4319 get_average_of_function_hessians_from_local_dof_values(local_dof_values,
4325 template <
int dim,
int spacedim>
4326 template <
class InputVector>
4330 const InputVector &local_dof_values,
4332 solution_third_derivative_type<typename InputVector::value_type>>
4333 &third_derivatives)
const
4336 this->fe_interface->n_quadrature_points);
4338 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
4339 for (
const auto q_index : this->fe_interface->quadrature_point_indices())
4342 third_derivatives[q_index] = 0.;
4344 third_derivatives[q_index] +=
4345 local_dof_values[dof_index] *
4346 jump_in_third_derivatives(dof_index, q_index);
4352 template <
int dim,
int spacedim>
4353 template <
class InputVector>
4356 const InputVector &fe_function,
4358 solution_third_derivative_type<typename InputVector::value_type>>
4359 &third_derivatives)
const
4361 std::vector<typename InputVector::value_type> local_dof_values(
4362 this->fe_interface->n_current_interface_dofs());
4363 this->get_local_dof_values(fe_function, local_dof_values);
4365 get_jump_in_function_third_derivatives_from_local_dof_values(
4366 local_dof_values, third_derivatives);
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, level_dof_access >> &cell, const unsigned int face_no)
const std::vector< Tensor< 1, spacedim > > & get_normal_vectors() const
std::unique_ptr< FEFaceValues< dim, spacedim > > internal_fe_face_values
std::vector< types::global_dof_index > get_interface_dof_indices() const
UpdateFlags get_update_flags() const
Tensor< 1, spacedim > jump_in_shape_gradients(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
Tensor< 1, spacedim > normal(const unsigned int q_point_index) const
FEFaceValuesBase< dim, spacedim > * fe_face_values_neighbor
const hp::QCollection< dim - 1 > & get_quadrature_collection() const
void get_jump_in_function_third_derivatives(const InputVector &fe_function, std::vector< Tensor< 3, spacedim, typename InputVector::value_type >> &third_derivatives) const
Tensor< 1, spacedim > average_of_shape_gradients(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
FEInterfaceValues(const Mapping< dim, spacedim > &mapping, const FiniteElement< dim, spacedim > &fe, const Quadrature< dim - 1 > &quadrature, const UpdateFlags update_flags)
void reinit(const CellIteratorType &cell, const unsigned int face_no, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int)
FEInterfaceValues(const hp::MappingCollection< dim, spacedim > &mapping_collection, const hp::FECollection< dim, spacedim > &fe_collection, const hp::QCollection< dim - 1 > &quadrature_collection, const UpdateFlags update_flags)
std::unique_ptr< hp::FESubfaceValues< dim, spacedim > > internal_hp_fe_subface_values
const unsigned int n_quadrature_points
const Mapping< dim, spacedim > & get_mapping() const
bool has_hp_capabilities() const
std::array< unsigned int, 2 > interface_dof_to_dof_indices(const unsigned int interface_dof_index) const
FEInterfaceViews::Scalar< dim, spacedim > operator[](const FEValuesExtractors::Scalar &scalar) const
unsigned n_current_interface_dofs() const
double average_of_shape_values(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
std::unique_ptr< FESubfaceValues< dim, spacedim > > internal_fe_subface_values
double shape_value(const bool here_or_there, const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
const hp::MappingCollection< dim, spacedim > & get_mapping_collection() const
const FEFaceValuesBase< dim, spacedim > & get_fe_face_values(const unsigned int cell_index) const
void get_jump_in_function_gradients(const InputVector &fe_function, std::vector< Tensor< 1, spacedim, typename InputVector::value_type >> &gradients) const
std_cxx20::ranges::iota_view< unsigned int, unsigned int > quadrature_point_indices() const
void get_average_of_function_hessians(const InputVector &fe_function, std::vector< Tensor< 2, spacedim, typename InputVector::value_type >> &hessians) const
std::unique_ptr< hp::FESubfaceValues< dim, spacedim > > internal_hp_fe_subface_values_neighbor
FEInterfaceValues(const hp::FECollection< dim, spacedim > &fe_collection, const hp::QCollection< dim - 1 > &quadrature_collection, const UpdateFlags update_flags)
const std::vector< Point< spacedim > > & get_quadrature_points() const
Tensor< 2, spacedim > jump_in_shape_hessians(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
FEInterfaceValues(const Mapping< dim, spacedim > &mapping, const FiniteElement< dim, spacedim > &fe, const hp::QCollection< dim - 1 > &quadrature, const UpdateFlags update_flags)
FEFaceValuesBase< dim, spacedim > * fe_face_values
std::vector< types::global_dof_index > interface_dof_indices
std::unique_ptr< FESubfaceValues< dim, spacedim > > internal_fe_subface_values_neighbor
const std::vector< double > & get_JxW_values() const
std::vector< std::array< unsigned int, 2 > > dofmap
const hp::FECollection< dim, spacedim > & get_fe_collection() const
double JxW(const unsigned int quadrature_point) const
void get_average_of_function_values(const InputVector &fe_function, std::vector< typename InputVector::value_type > &values) const
const Quadrature< dim - 1 > & get_quadrature() const
Triangulation< dim, spacedim >::cell_iterator get_cell(const unsigned int cell_index) const
std::unique_ptr< hp::FEFaceValues< dim, spacedim > > internal_hp_fe_face_values_neighbor
double jump_in_shape_values(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
unsigned int get_face_number(const unsigned int cell_index) const
void get_jump_in_function_hessians(const InputVector &fe_function, std::vector< Tensor< 2, spacedim, typename InputVector::value_type >> &hessians) const
FEInterfaceValues(const FiniteElement< dim, spacedim > &fe, const Quadrature< dim - 1 > &quadrature, const UpdateFlags update_flags)
void reinit(const CellIteratorType &cell, const unsigned int face_no, const unsigned int sub_face_no, const CellNeighborIteratorType &cell_neighbor, const unsigned int face_no_neighbor, const unsigned int sub_face_no_neighbor, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int)
std::unique_ptr< hp::FEFaceValues< dim, spacedim > > internal_hp_fe_face_values
const FiniteElement< dim, spacedim > & get_fe() const
Tensor< 2, spacedim > average_of_shape_hessians(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
std::unique_ptr< FEFaceValues< dim, spacedim > > internal_fe_face_values_neighbor
std_cxx20::ranges::iota_view< unsigned int, unsigned int > dof_indices() const
void get_jump_in_function_values(const InputVector &fe_function, std::vector< typename InputVector::value_type > &values) const
FEInterfaceViews::Vector< dim, spacedim > operator[](const FEValuesExtractors::Vector &vector) const
Tensor< 3, spacedim > jump_in_shape_3rd_derivatives(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
void get_average_of_function_gradients(const InputVector &fe_function, std::vector< Tensor< 1, spacedim, typename InputVector::value_type >> &gradients) const
void get_local_dof_values(const InputVector &dof_values, OutputVector &local_dof_values) const
Base(const FEInterfaceValues< dim, spacedim > &fe_interface)
const FEInterfaceValues< dim, spacedim > * fe_interface
void get_average_of_function_hessians(const InputVector &fe_function, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
gradient_type jump_in_gradients(const unsigned int interface_dof_index, const unsigned int q_point) const
hessian_type jump_in_hessians(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_jump_in_function_values(const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
void get_average_of_function_values(const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
void get_average_of_function_values_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
void get_function_values(const bool here_or_there, const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
const FEValuesExtractors::Scalar extractor
void get_jump_in_function_values_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
typename FEValuesViews::Scalar< dim, spacedim >::gradient_type gradient_type
hessian_type average_of_hessians(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_function_values_from_local_dof_values(const bool here_or_there, const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
value_type value(const bool here_or_there, const unsigned int interface_dof_index, const unsigned int q_point) const
void get_jump_in_function_gradients(const InputVector &fe_function, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
void get_jump_in_function_gradients_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
typename ProductType< Number, value_type >::type solution_value_type
typename ProductType< Number, third_derivative_type >::type solution_third_derivative_type
void get_jump_in_function_hessians_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
void get_average_of_function_gradients_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
void get_average_of_function_gradients(const InputVector &fe_function, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
Scalar(const FEInterfaceValues< dim, spacedim > &fe_interface, const unsigned int component)
void get_jump_in_function_hessians(const InputVector &fe_function, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
typename FEValuesViews::Scalar< dim, spacedim >::hessian_type hessian_type
void get_jump_in_function_third_derivatives(const InputVector &fe_function, std::vector< solution_third_derivative_type< typename InputVector::value_type >> &third_derivatives) const
third_derivative_type jump_in_third_derivatives(const unsigned int interface_dof_index, const unsigned int q_point) const
gradient_type average_of_gradients(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_jump_in_function_third_derivatives_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_third_derivative_type< typename InputVector::value_type >> &third_derivatives) const
void get_average_of_function_hessians_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
value_type average_of_values(const unsigned int interface_dof_index, const unsigned int q_point) const
value_type jump_in_values(const unsigned int interface_dof_index, const unsigned int q_point) const
typename FEValuesViews::Scalar< dim, spacedim >::third_derivative_type third_derivative_type
typename ProductType< Number, hessian_type >::type solution_hessian_type
typename ProductType< Number, gradient_type >::type solution_gradient_type
void get_function_values_from_local_dof_values(const bool here_or_there, const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
const FEValuesExtractors::Vector extractor
void get_jump_in_function_hessians(const InputVector &fe_function, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
void get_average_of_function_hessians(const InputVector &fe_function, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
void get_jump_in_function_gradients(const InputVector &fe_function, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
void get_jump_in_function_hessians_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
hessian_type average_hessian(const unsigned int interface_dof_index, const unsigned int q_point) const
Vector(const FEInterfaceValues< dim, spacedim > &fe_interface, const unsigned int first_vector_component)
void get_jump_in_function_gradients_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
void get_jump_in_function_third_derivatives(const InputVector &fe_function, std::vector< solution_third_derivative_type< typename InputVector::value_type >> &third_derivatives) const
void get_average_of_function_values(const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
typename ProductType< Number, gradient_type >::type solution_gradient_type
hessian_type jump_hessian(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_average_of_function_hessians_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
typename ProductType< Number, value_type >::type solution_value_type
typename FEValuesViews::Vector< dim, spacedim >::value_type value_type
value_type value(const bool here_or_there, const unsigned int interface_dof_index, const unsigned int q_point) const
third_derivative_type jump_in_third_derivatives(const unsigned int interface_dof_index, const unsigned int q_point) const
value_type jump_in_values(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_jump_in_function_values_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
void get_average_of_function_gradients(const InputVector &fe_function, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
typename ProductType< Number, hessian_type >::type solution_hessian_type
void get_average_of_function_values_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
gradient_type jump_gradient(const unsigned int interface_dof_index, const unsigned int q_point) const
value_type average_of_values(const unsigned int interface_dof_index, const unsigned int q_point) const
hessian_type jump_in_hessians(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_function_values(const bool here_or_there, const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
gradient_type average_of_gradients(const unsigned int interface_dof_index, const unsigned int q_point) const
typename ProductType< Number, third_derivative_type >::type solution_third_derivative_type
void get_jump_in_function_values(const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
typename FEValuesViews::Vector< dim, spacedim >::gradient_type gradient_type
gradient_type jump_in_gradients(const unsigned int interface_dof_index, const unsigned int q_point) const
typename FEValuesViews::Vector< dim, spacedim >::third_derivative_type third_derivative_type
void get_jump_in_function_third_derivatives_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_third_derivative_type< typename InputVector::value_type >> &third_derivatives) const
void get_average_of_function_gradients_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
hessian_type average_of_hessians(const unsigned int interface_dof_index, const unsigned int q_point) const
typename FEValuesViews::Vector< dim, spacedim >::hessian_type hessian_type
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, level_dof_access >> &cell, const unsigned int face_no, const unsigned int subface_no)
value_type value(const unsigned int shape_function, const unsigned int q_point) const
void get_function_values_from_local_dof_values(const InputVector &dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
::Tensor< 1, spacedim > gradient_type
::Tensor< 2, spacedim > hessian_type
void get_function_values(const ReadVector< Number > &fe_function, std::vector< solution_value_type< Number >> &values) const
::Tensor< 3, spacedim > third_derivative_type
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcOnlyAvailableWithHP()
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcNotInitialized()
static ::ExceptionBase & ExcOnlyAvailableWithoutHP()
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
#define DeclExceptionMsg(Exception, defaulttext)
static ::ExceptionBase & ExcMessage(std::string arg1)
const Mapping< dim, spacedim > & get_default_linear_mapping(const Triangulation< dim, spacedim > &triangulation)
typename ::internal::FEInterfaceViews::ViewType< dim, spacedim, Extractor >::type View
void reference_cell(Triangulation< dim, spacedim > &tria, const ReferenceCell &reference_cell)
const types::fe_index invalid_fe_index
static const unsigned int invalid_unsigned_int
boost::integer_range< IncrementableType > iota_view
unsigned short int fe_index
typename internal::ProductTypeImpl< std::decay_t< T >, std::decay_t< U > >::type type