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,
1598 JxW(
const unsigned int quadrature_point)
const;
1605 const std::vector<double> &
1617 const std::vector<Tensor<1, spacedim>> &
1635 const std::vector<Point<spacedim>> &
1691 std::vector<types::global_dof_index>
1706 std::array<unsigned int, 2>
1718 normal(
const unsigned int q_point_index)
const;
1752 const unsigned int interface_dof_index,
1753 const unsigned int q_point,
1754 const unsigned int component = 0)
const;
1785 const unsigned int q_point,
1786 const unsigned int component = 0)
const;
1803 const unsigned int q_point,
1804 const unsigned int component = 0)
const;
1822 const unsigned int q_point,
1823 const unsigned int component = 0)
const;
1840 const unsigned int q_point,
1841 const unsigned int component = 0)
const;
1867 const unsigned int q_point,
1868 const unsigned int component = 0)
const;
1885 const unsigned int q_point,
1886 const unsigned int component = 0)
const;
1904 const unsigned int q_point,
1905 const unsigned int component = 0)
const;
1926 template <
class InputVector>
1929 const InputVector &fe_function,
1930 std::vector<typename InputVector::value_type> &values)
const;
1940 template <
class InputVector>
1943 const InputVector &fe_function,
1954 template <
class InputVector>
1957 const InputVector &fe_function,
1969 template <
class InputVector>
1972 const InputVector &fe_function,
1974 &third_derivatives)
const;
1991 template <
class InputVector>
1994 const InputVector &fe_function,
1995 std::vector<typename InputVector::value_type> &values)
const;
2004 template <
class InputVector>
2007 const InputVector &fe_function,
2018 template <
class InputVector>
2021 const InputVector &fe_function,
2069 std::vector<std::array<unsigned int, 2>>
dofmap;
2107 std::unique_ptr<FESubfaceValues<dim, spacedim>>
2127 std::unique_ptr<hp::FESubfaceValues<dim, spacedim>>
2134 std::unique_ptr<hp::FEFaceValues<dim, spacedim>>
2141 std::unique_ptr<hp::FESubfaceValues<dim, spacedim>>
2151 "The current function doesn't make sense when used with a "
2152 "FEInterfaceValues object with hp-capabilities.");
2161 "The current function doesn't make sense when used with a "
2162 "FEInterfaceValues object without hp-capabilities.");
2182template <
int dim,
int spacedim>
2188 : n_quadrature_points(quadrature.
size())
2189 , fe_face_values(nullptr)
2190 , fe_face_values_neighbor(nullptr)
2191 , internal_fe_face_values(
2196 , internal_fe_subface_values(
2201 , internal_fe_face_values_neighbor(
2206 , internal_fe_subface_values_neighbor(
2215template <
int dim,
int spacedim>
2229template <
int dim,
int spacedim>
2235 : n_quadrature_points(quadrature.max_n_quadrature_points())
2236 , fe_face_values(nullptr)
2237 , fe_face_values_neighbor(nullptr)
2238 , internal_fe_face_values(
2243 , internal_fe_subface_values(
2248 , internal_fe_face_values_neighbor(
2253 , internal_fe_subface_values_neighbor(
2262template <
int dim,
int spacedim>
2268 : n_quadrature_points(quadrature_collection.max_n_quadrature_points())
2269 , fe_face_values(nullptr)
2270 , fe_face_values_neighbor(nullptr)
2271 , internal_hp_fe_face_values(
2274 quadrature_collection,
2276 , internal_hp_fe_subface_values(
2280 quadrature_collection,
2282 , internal_hp_fe_face_values_neighbor(
2285 quadrature_collection,
2287 , internal_hp_fe_subface_values_neighbor(
2291 quadrature_collection,
2299template <
int dim,
int spacedim>
2306 quadrature_collection,
2312template <
int dim,
int spacedim>
2313template <
typename CellIteratorType,
typename CellNeighborIteratorType>
2316 const CellIteratorType &cell,
2317 const unsigned int face_no,
2318 const unsigned int sub_face_no,
2319 const CellNeighborIteratorType &cell_neighbor,
2320 const unsigned int face_no_neighbor,
2321 const unsigned int sub_face_no_neighbor,
2322 const unsigned int q_index,
2323 const unsigned int mapping_index,
2324 const unsigned int fe_index_in,
2325 const unsigned int fe_index_neighbor_in)
2327 Assert(internal_fe_face_values || internal_hp_fe_face_values,
2330 constexpr bool is_dof_cell_accessor =
2331 std::is_same_v<DoFCellAccessor<dim, spacedim, true>,
2332 typename CellIteratorType::AccessorType> ||
2333 std::is_same_v<DoFCellAccessor<dim, spacedim, false>,
2334 typename CellIteratorType::AccessorType>;
2336 constexpr bool is_dof_cell_accessor_neighbor =
2337 std::is_same_v<DoFCellAccessor<dim, spacedim, true>,
2338 typename CellNeighborIteratorType::AccessorType> ||
2339 std::is_same_v<DoFCellAccessor<dim, spacedim, false>,
2340 typename CellNeighborIteratorType::AccessorType>;
2342 unsigned int active_fe_index = 0;
2343 unsigned int active_fe_index_neighbor = 0;
2345 if (internal_fe_face_values)
2349 internal_fe_face_values->reinit(cell, face_no);
2350 fe_face_values = internal_fe_face_values.get();
2354 internal_fe_subface_values->reinit(cell, face_no, sub_face_no);
2355 fe_face_values = internal_fe_subface_values.get();
2359 internal_fe_face_values_neighbor->reinit(cell_neighbor,
2361 fe_face_values_neighbor = internal_fe_face_values_neighbor.get();
2365 internal_fe_subface_values_neighbor->reinit(cell_neighbor,
2367 sub_face_no_neighbor);
2368 fe_face_values_neighbor = internal_fe_subface_values_neighbor.get();
2372 fe_face_values_neighbor->n_quadrature_points);
2374 const_cast<unsigned int &
>(this->n_quadrature_points) =
2375 fe_face_values->n_quadrature_points;
2377 else if (internal_hp_fe_face_values)
2379 active_fe_index = fe_index_in;
2380 active_fe_index_neighbor =
2382 fe_index_neighbor_in :
2387 if constexpr (is_dof_cell_accessor)
2388 active_fe_index = cell->active_fe_index();
2390 active_fe_index = 0;
2395 if constexpr (is_dof_cell_accessor_neighbor)
2396 active_fe_index_neighbor = cell_neighbor->active_fe_index();
2398 active_fe_index_neighbor = 0;
2401 unsigned int used_q_index = q_index;
2402 unsigned int used_mapping_index = mapping_index;
2407 if (internal_hp_fe_face_values->get_quadrature_collection().size() == 1)
2411 if (internal_hp_fe_face_values->get_mapping_collection().size() == 1)
2412 used_mapping_index = 0;
2419 if (internal_hp_fe_face_values
2420 ->get_quadrature_collection()[active_fe_index] ==
2421 internal_hp_fe_face_values
2422 ->get_quadrature_collection()[active_fe_index_neighbor])
2423 used_q_index = active_fe_index;
2430 const unsigned int dominated_fe_index =
2433 internal_hp_fe_face_values->get_fe_collection()
2435 {active_fe_index, active_fe_index_neighbor}) :
2436 numbers::invalid_unsigned_int);
2442 "You called this function with 'q_index' left at its "
2443 "default value, but this can only work if one of "
2444 "the two finite elements adjacent to this face "
2445 "dominates the other. See the documentation "
2446 "of this function for more information of how "
2447 "to deal with this situation."));
2448 used_q_index = dominated_fe_index;
2455 "You called this function with 'mapping_index' left "
2456 "at its default value, but this can only work if one "
2457 "of the two finite elements adjacent to this face "
2458 "dominates the other. See the documentation "
2459 "of this function for more information of how "
2460 "to deal with this situation."));
2461 used_mapping_index = dominated_fe_index;
2468 internal_hp_fe_face_values->reinit(
2469 cell, face_no, used_q_index, used_mapping_index, active_fe_index);
2471 internal_hp_fe_face_values->get_present_fe_values());
2475 internal_hp_fe_subface_values->
reinit(cell,
2483 internal_hp_fe_subface_values->get_present_fe_values());
2487 internal_hp_fe_face_values_neighbor->
reinit(cell_neighbor,
2491 active_fe_index_neighbor);
2494 internal_hp_fe_face_values_neighbor->get_present_fe_values());
2498 internal_hp_fe_subface_values_neighbor->
reinit(
2501 sub_face_no_neighbor,
2504 active_fe_index_neighbor);
2506 fe_face_values_neighbor =
2508 internal_hp_fe_subface_values_neighbor->get_present_fe_values());
2512 fe_face_values_neighbor->n_quadrature_points);
2514 const_cast<unsigned int &
>(this->n_quadrature_points) =
2515 fe_face_values->n_quadrature_points;
2519 if constexpr (is_dof_cell_accessor_neighbor && is_dof_cell_accessor)
2522 std::vector<types::global_dof_index> v(
2523 fe_face_values->get_fe().n_dofs_per_cell());
2524 cell->get_active_or_mg_dof_indices(v);
2525 std::vector<types::global_dof_index> v2(
2526 fe_face_values_neighbor->get_fe().n_dofs_per_cell());
2527 cell_neighbor->get_active_or_mg_dof_indices(v2);
2531 std::map<types::global_dof_index, std::pair<unsigned int, unsigned int>>
2533 std::pair<unsigned int, unsigned int> invalid_entry(
2536 for (
unsigned int i = 0; i < v.size(); ++i)
2539 auto result = tempmap.insert(std::make_pair(v[i], invalid_entry));
2540 result.first->second.first = i;
2543 for (
unsigned int i = 0; i < v2.size(); ++i)
2546 auto result = tempmap.insert(std::make_pair(v2[i], invalid_entry));
2547 result.first->second.second = i;
2551 dofmap.resize(tempmap.size());
2552 interface_dof_indices.resize(tempmap.size());
2553 unsigned int idx = 0;
2554 for (
auto &x : tempmap)
2556 interface_dof_indices[idx] = x.first;
2557 dofmap[idx] = {{x.second.first, x.second.second}};
2563 const unsigned int n_dofs_per_cell_1 = fe_face_values->dofs_per_cell;
2564 const unsigned int n_dofs_per_cell_2 =
2565 fe_face_values_neighbor->dofs_per_cell;
2567 interface_dof_indices.resize(n_dofs_per_cell_1 + n_dofs_per_cell_2);
2568 dofmap.resize(n_dofs_per_cell_1 + n_dofs_per_cell_2);
2570 for (
unsigned int i = 0; i < n_dofs_per_cell_1; ++i)
2576 for (
unsigned int i = 0; i < n_dofs_per_cell_2; ++i)
2578 interface_dof_indices[i + n_dofs_per_cell_1] =
2587template <
int dim,
int spacedim>
2588template <
typename CellIteratorType>
2591 const unsigned int face_no,
2592 const unsigned int q_index,
2593 const unsigned int mapping_index,
2594 const unsigned int fe_index)
2596 Assert(internal_fe_face_values || internal_hp_fe_face_values,
2599 if (internal_fe_face_values)
2603 Assert((mapping_index == 0 ||
2609 internal_fe_face_values->reinit(cell, face_no);
2610 fe_face_values = internal_fe_face_values.get();
2611 fe_face_values_neighbor =
nullptr;
2613 else if (internal_hp_fe_face_values)
2615 internal_hp_fe_face_values->reinit(
2616 cell, face_no, q_index, mapping_index, fe_index);
2618 internal_hp_fe_face_values->get_present_fe_values());
2619 fe_face_values_neighbor =
nullptr;
2622 interface_dof_indices.resize(fe_face_values->get_fe().n_dofs_per_cell());
2624 if constexpr (std::is_same_v<
typename CellIteratorType::AccessorType,
2626 std::is_same_v<
typename CellIteratorType::AccessorType,
2629 cell->get_active_or_mg_dof_indices(interface_dof_indices);
2633 for (
auto &i : interface_dof_indices)
2637 dofmap.resize(interface_dof_indices.size());
2638 for (
unsigned int i = 0; i < interface_dof_indices.size(); ++i)
2644template <
int dim,
int spacedim>
2648 Assert(fe_face_values !=
nullptr,
2649 ExcMessage(
"This call requires a call to reinit() first."));
2650 return fe_face_values->JxW(q);
2655template <
int dim,
int spacedim>
2656const std::vector<double> &
2659 Assert(fe_face_values !=
nullptr,
2660 ExcMessage(
"This call requires a call to reinit() first."));
2661 return fe_face_values->get_JxW_values();
2666template <
int dim,
int spacedim>
2667const std::vector<Tensor<1, spacedim>> &
2670 Assert(fe_face_values !=
nullptr,
2671 ExcMessage(
"This call requires a call to reinit() first."));
2672 return fe_face_values->get_normal_vectors();
2677template <
int dim,
int spacedim>
2681 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2682 return internal_fe_face_values->get_mapping();
2687template <
int dim,
int spacedim>
2691 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2692 return internal_fe_face_values->get_fe();
2697template <
int dim,
int spacedim>
2701 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2702 return internal_fe_face_values->get_quadrature();
2707template <
int dim,
int spacedim>
2711 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2712 return internal_hp_fe_face_values->get_mapping_collection();
2717template <
int dim,
int spacedim>
2721 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2722 return internal_hp_fe_face_values->get_fe_collection();
2727template <
int dim,
int spacedim>
2731 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2732 return internal_hp_fe_face_values->get_quadrature_collection();
2737template <
int dim,
int spacedim>
2741 if (internal_hp_fe_face_values || internal_hp_fe_subface_values ||
2742 internal_hp_fe_face_values_neighbor ||
2743 internal_hp_fe_subface_values_neighbor)
2753 Assert(internal_fe_face_values || internal_fe_subface_values ||
2754 internal_fe_face_values_neighbor ||
2755 internal_fe_subface_values_neighbor,
2767template <
int dim,
int spacedim>
2771 return {0U, n_quadrature_points};
2776template <
int dim,
int spacedim>
2777const std::vector<Point<spacedim>> &
2780 Assert(fe_face_values !=
nullptr,
2781 ExcMessage(
"This call requires a call to reinit() first."));
2782 return fe_face_values->get_quadrature_points();
2787template <
int dim,
int spacedim>
2791 if (has_hp_capabilities())
2792 return internal_hp_fe_face_values->get_update_flags();
2794 return internal_fe_face_values->get_update_flags();
2799template <
int dim,
int spacedim>
2803 return get_fe_face_values(
cell_index).get_cell();
2808template <
int dim,
int spacedim>
2813 return get_fe_face_values(
cell_index).get_face_number();
2818template <
int dim,
int spacedim>
2823 interface_dof_indices.size() > 0,
2825 "n_current_interface_dofs() is only available after a call to reinit()."));
2826 return interface_dof_indices.size();
2831template <
int dim,
int spacedim>
2835 return {0U, n_current_interface_dofs()};
2840template <
int dim,
int spacedim>
2844 return fe_face_values_neighbor ==
nullptr;
2849template <
int dim,
int spacedim>
2850std::vector<types::global_dof_index>
2853 return interface_dof_indices;
2858template <
int dim,
int spacedim>
2859std::array<unsigned int, 2>
2861 const unsigned int interface_dof_index)
const
2864 return dofmap[interface_dof_index];
2869template <
int dim,
int spacedim>
2878 "You are on a boundary, so you can only ask for the first FEFaceValues object."));
2880 return (
cell_index == 0) ? *fe_face_values : *fe_face_values_neighbor;
2885template <
int dim,
int spacedim>
2889 return fe_face_values->normal_vector(q_point_index);
2894template <
int dim,
int spacedim>
2897 const bool here_or_there,
2898 const unsigned int interface_dof_index,
2899 const unsigned int q_point,
2900 const unsigned int component)
const
2902 const auto dof_pair = dofmap[interface_dof_index];
2905 return get_fe_face_values(0).shape_value_component(dof_pair[0],
2909 return get_fe_face_values(1).shape_value_component(dof_pair[1],
2918template <
int dim,
int spacedim>
2921 const unsigned int interface_dof_index,
2922 const unsigned int q_point,
2923 const unsigned int component)
const
2925 const auto dof_pair = dofmap[interface_dof_index];
2930 value += get_fe_face_values(0).shape_value_component(dof_pair[0],
2934 value -= get_fe_face_values(1).shape_value_component(dof_pair[1],
2942template <
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_value_component(dof_pair[0],
2959 value += 0.5 * get_fe_face_values(0).shape_value_component(dof_pair[0],
2963 value += 0.5 * get_fe_face_values(1).shape_value_component(dof_pair[1],
2972template <
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_grad_component(dof_pair[0],
2989 value += 0.5 * get_fe_face_values(0).shape_grad_component(dof_pair[0],
2993 value += 0.5 * get_fe_face_values(1).shape_grad_component(dof_pair[1],
3002template <
int dim,
int spacedim>
3005 const unsigned int interface_dof_index,
3006 const unsigned int q_point,
3007 const unsigned int component)
const
3009 const auto dof_pair = dofmap[interface_dof_index];
3012 return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3019 value += 0.5 * get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3023 value += 0.5 * get_fe_face_values(1).shape_hessian_component(dof_pair[1],
3032template <
int dim,
int spacedim>
3035 const unsigned int interface_dof_index,
3036 const unsigned int q_point,
3037 const unsigned int component)
const
3039 const auto dof_pair = dofmap[interface_dof_index];
3042 return get_fe_face_values(0).shape_grad_component(dof_pair[0],
3049 value += get_fe_face_values(0).shape_grad_component(dof_pair[0],
3053 value -= get_fe_face_values(1).shape_grad_component(dof_pair[1],
3062template <
int dim,
int spacedim>
3065 const unsigned int interface_dof_index,
3066 const unsigned int q_point,
3067 const unsigned int component)
const
3069 const auto dof_pair = dofmap[interface_dof_index];
3072 return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3079 value += get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3083 value -= get_fe_face_values(1).shape_hessian_component(dof_pair[1],
3092template <
int dim,
int spacedim>
3095 const unsigned int interface_dof_index,
3096 const unsigned int q_point,
3097 const unsigned int component)
const
3099 const auto dof_pair = dofmap[interface_dof_index];
3102 return get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3109 value += get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3113 value -= get_fe_face_values(1).shape_3rd_derivative_component(dof_pair[1],
3122template <
int dim,
int spacedim>
3123template <
class InputVector>
3126 const InputVector &fe_function,
3127 std::vector<typename InputVector::value_type> &values)
const
3132 this->operator[](scalar).get_jump_in_function_values(fe_function, values);
3137template <
int dim,
int spacedim>
3138template <
class InputVector>
3141 const InputVector &fe_function,
3148 this->operator[](scalar).get_jump_in_function_gradients(fe_function,
3154template <
int dim,
int spacedim>
3155template <
class InputVector>
3158 const InputVector &fe_function,
3165 this->operator[](scalar).get_jump_in_function_hessians(fe_function, hessians);
3170template <
int dim,
int spacedim>
3171template <
class InputVector>
3174 const InputVector &fe_function,
3176 &third_derivatives)
const
3181 this->operator[](scalar).get_jump_in_function_third_derivatives(
3182 fe_function, third_derivatives);
3187template <
int dim,
int spacedim>
3188template <
class InputVector>
3191 const InputVector &fe_function,
3192 std::vector<typename InputVector::value_type> &values)
const
3197 this->operator[](scalar).get_average_of_function_values(fe_function, values);
3202template <
int dim,
int spacedim>
3203template <
class InputVector>
3206 const InputVector &fe_function,
3213 this->operator[](scalar).get_average_of_function_gradients(fe_function,
3219template <
int dim,
int spacedim>
3220template <
class InputVector>
3223 const InputVector &fe_function,
3230 this->operator[](scalar).get_average_of_function_hessians(fe_function,
3237template <
int dim,
int spacedim>
3242 const unsigned int n_components =
3243 (this->has_hp_capabilities() ? this->get_fe_collection().n_components() :
3244 this->get_fe().n_components());
3252template <
int dim,
int spacedim>
3257 const unsigned int n_components =
3258 (this->has_hp_capabilities() ? this->get_fe_collection().n_components() :
3259 this->get_fe().n_components());
3260 const unsigned int n_vectors =
3275 template <
int dim,
int spacedim>
3278 : fe_interface(&fe_interface)
3283 template <
int dim,
int spacedim>
3284 Scalar<dim, spacedim>::Scalar(
3286 const unsigned int component)
3287 : Base<dim, spacedim>(fe_interface)
3288 , extractor(component)
3293 template <
int dim,
int spacedim>
3294 template <
class InputVector,
class OutputVector>
3296 Base<dim, spacedim>::get_local_dof_values(
3297 const InputVector &dof_values,
3298 OutputVector &local_dof_values)
const
3300 const auto &interface_dof_indices =
3301 this->fe_interface->get_interface_dof_indices();
3303 AssertDimension(interface_dof_indices.size(), local_dof_values.size());
3305 for (
const unsigned int i : this->fe_interface->dof_indices())
3306 local_dof_values[i] = dof_values(interface_dof_indices[i]);
3311 template <
int dim,
int spacedim>
3312 typename Scalar<dim, spacedim>::value_type
3313 Scalar<dim, spacedim>::value(
const bool here_or_there,
3314 const unsigned int interface_dof_index,
3315 const unsigned int q_point)
const
3317 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3320 return (*(this->fe_interface->fe_face_values))[extractor].value(
3321 dof_pair[0], q_point);
3324 return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3325 dof_pair[1], q_point);
3332 template <
int dim,
int spacedim>
3333 typename Scalar<dim, spacedim>::value_type
3334 Scalar<dim, spacedim>::jump_in_values(
const unsigned int interface_dof_index,
3335 const unsigned int q_point)
const
3337 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3339 value_type
value = 0.0;
3343 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3348 (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3349 dof_pair[1], q_point);
3356 template <
int dim,
int spacedim>
3357 typename Scalar<dim, spacedim>::value_type
3358 Scalar<dim, spacedim>::average_of_values(
3359 const unsigned int interface_dof_index,
3360 const unsigned int q_point)
const
3362 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3364 if (this->fe_interface->at_boundary())
3365 return (*(this->fe_interface->fe_face_values))[extractor].value(
3366 dof_pair[0], q_point);
3368 value_type
value = 0.0;
3373 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3378 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3379 dof_pair[1], q_point);
3386 template <
int dim,
int spacedim>
3387 typename Scalar<dim, spacedim>::gradient_type
3388 Scalar<dim, spacedim>::average_of_gradients(
3389 const unsigned int interface_dof_index,
3390 const unsigned int q_point)
const
3392 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3394 if (this->fe_interface->at_boundary())
3395 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3396 dof_pair[0], q_point);
3398 gradient_type
value;
3403 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3407 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3408 .gradient(dof_pair[1], q_point);
3415 template <
int dim,
int spacedim>
3416 typename Scalar<dim, spacedim>::gradient_type
3417 Scalar<dim, spacedim>::jump_in_gradients(
3418 const unsigned int interface_dof_index,
3419 const unsigned int q_point)
const
3421 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3423 if (this->fe_interface->at_boundary())
3424 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3425 dof_pair[0], q_point);
3427 gradient_type
value;
3431 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3436 (*(this->fe_interface->fe_face_values_neighbor))[extractor].gradient(
3437 dof_pair[1], q_point);
3444 template <
int dim,
int spacedim>
3445 typename Scalar<dim, spacedim>::hessian_type
3446 Scalar<dim, spacedim>::average_of_hessians(
3447 const unsigned int interface_dof_index,
3448 const unsigned int q_point)
const
3450 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3452 if (this->fe_interface->at_boundary())
3453 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3454 dof_pair[0], q_point);
3461 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3465 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3466 .hessian(dof_pair[1], q_point);
3473 template <
int dim,
int spacedim>
3474 typename Scalar<dim, spacedim>::third_derivative_type
3475 Scalar<dim, spacedim>::jump_in_third_derivatives(
3476 const unsigned int interface_dof_index,
3477 const unsigned int q_point)
const
3479 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3481 if (this->fe_interface->at_boundary())
3482 return (*(this->fe_interface->fe_face_values))[extractor]
3483 .third_derivative(dof_pair[0], q_point);
3485 third_derivative_type
value;
3489 (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
3490 dof_pair[0], q_point);
3493 value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3494 .third_derivative(dof_pair[1], q_point);
3501 template <
int dim,
int spacedim>
3502 typename Scalar<dim, spacedim>::hessian_type
3503 Scalar<dim, spacedim>::jump_in_hessians(
3504 const unsigned int interface_dof_index,
3505 const unsigned int q_point)
const
3507 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3509 if (this->fe_interface->at_boundary())
3510 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3511 dof_pair[0], q_point);
3517 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3522 (*(this->fe_interface->fe_face_values_neighbor))[extractor].hessian(
3523 dof_pair[1], q_point);
3530 template <
int dim,
int spacedim>
3531 template <
class InputVector>
3533 Scalar<dim, spacedim>::get_function_values_from_local_dof_values(
3534 const bool here_or_there,
3535 const InputVector &local_dof_values,
3536 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3541 for (
const auto dof_index : this->fe_interface->dof_indices())
3542 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3547 values[q_index] += local_dof_values[dof_index] *
3548 value(here_or_there, dof_index, q_index);
3554 template <
int dim,
int spacedim>
3555 template <
class InputVector>
3557 Scalar<dim, spacedim>::get_function_values(
3558 const bool here_or_there,
3559 const InputVector &fe_function,
3560 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3563 std::vector<typename InputVector::value_type> local_dof_values(
3564 this->fe_interface->n_current_interface_dofs());
3565 this->get_local_dof_values(fe_function, local_dof_values);
3567 get_function_values_from_local_dof_values(here_or_there,
3574 template <
int dim,
int spacedim>
3575 template <
class InputVector>
3577 Scalar<dim, spacedim>::get_jump_in_function_values_from_local_dof_values(
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())
3591 local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
3597 template <
int dim,
int spacedim>
3598 template <
class InputVector>
3600 Scalar<dim, spacedim>::get_jump_in_function_values(
3601 const InputVector &fe_function,
3602 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3605 std::vector<typename InputVector::value_type> local_dof_values(
3606 this->fe_interface->n_current_interface_dofs());
3607 this->get_local_dof_values(fe_function, local_dof_values);
3609 get_jump_in_function_values_from_local_dof_values(local_dof_values, values);
3614 template <
int dim,
int spacedim>
3615 template <
class InputVector>
3617 Scalar<dim, spacedim>::get_jump_in_function_gradients_from_local_dof_values(
3618 const InputVector &local_dof_values,
3619 std::vector<solution_gradient_type<typename InputVector::value_type>>
3624 for (
const auto dof_index : this->fe_interface->dof_indices())
3625 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3631 local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
3637 template <
int dim,
int spacedim>
3638 template <
class InputVector>
3640 Scalar<dim, spacedim>::get_jump_in_function_gradients(
3641 const InputVector &fe_function,
3642 std::vector<solution_gradient_type<typename InputVector::value_type>>
3645 std::vector<typename InputVector::value_type> local_dof_values(
3646 this->fe_interface->n_current_interface_dofs());
3647 this->get_local_dof_values(fe_function, local_dof_values);
3649 get_jump_in_function_gradients_from_local_dof_values(local_dof_values,
3655 template <
int dim,
int spacedim>
3656 template <
class InputVector>
3658 Scalar<dim, spacedim>::get_average_of_function_values_from_local_dof_values(
3659 const InputVector &local_dof_values,
3660 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3665 for (
const auto dof_index : this->fe_interface->dof_indices())
3666 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3672 local_dof_values[dof_index] * average_of_values(dof_index, q_index);
3678 template <
int dim,
int spacedim>
3679 template <
class InputVector>
3681 Scalar<dim, spacedim>::get_average_of_function_values(
3682 const InputVector &fe_function,
3683 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3686 std::vector<typename InputVector::value_type> local_dof_values(
3687 this->fe_interface->n_current_interface_dofs());
3688 this->get_local_dof_values(fe_function, local_dof_values);
3690 get_average_of_function_values_from_local_dof_values(local_dof_values,
3696 template <
int dim,
int spacedim>
3697 template <
class InputVector>
3699 Scalar<dim, spacedim>::
3700 get_average_of_function_gradients_from_local_dof_values(
3701 const InputVector &local_dof_values,
3702 std::vector<solution_gradient_type<typename InputVector::value_type>>
3707 for (
const auto dof_index : this->fe_interface->dof_indices())
3708 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3713 gradients[q_index] += local_dof_values[dof_index] *
3714 average_of_gradients(dof_index, q_index);
3720 template <
int dim,
int spacedim>
3721 template <
class InputVector>
3723 Scalar<dim, spacedim>::get_average_of_function_gradients(
3724 const InputVector &fe_function,
3725 std::vector<solution_gradient_type<typename InputVector::value_type>>
3728 std::vector<typename InputVector::value_type> local_dof_values(
3729 this->fe_interface->n_current_interface_dofs());
3730 this->get_local_dof_values(fe_function, local_dof_values);
3732 get_average_of_function_gradients_from_local_dof_values(local_dof_values,
3738 template <
int dim,
int spacedim>
3739 template <
class InputVector>
3741 Scalar<dim, spacedim>::get_jump_in_function_hessians_from_local_dof_values(
3742 const InputVector &local_dof_values,
3743 std::vector<solution_hessian_type<typename InputVector::value_type>>
3748 for (
const auto dof_index : this->fe_interface->dof_indices())
3749 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3755 local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
3761 template <
int dim,
int spacedim>
3762 template <
class InputVector>
3764 Scalar<dim, spacedim>::get_jump_in_function_hessians(
3765 const InputVector &fe_function,
3766 std::vector<solution_hessian_type<typename InputVector::value_type>>
3769 std::vector<typename InputVector::value_type> local_dof_values(
3770 this->fe_interface->n_current_interface_dofs());
3771 this->get_local_dof_values(fe_function, local_dof_values);
3773 get_jump_in_function_hessians_from_local_dof_values(local_dof_values,
3779 template <
int dim,
int spacedim>
3780 template <
class InputVector>
3782 Scalar<dim, spacedim>::get_average_of_function_hessians_from_local_dof_values(
3783 const InputVector &local_dof_values,
3784 std::vector<solution_hessian_type<typename InputVector::value_type>>
3789 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
3790 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3795 hessians[q_index] += local_dof_values[dof_index] *
3796 average_of_hessians(dof_index, q_index);
3802 template <
int dim,
int spacedim>
3803 template <
class InputVector>
3805 Scalar<dim, spacedim>::get_average_of_function_hessians(
3806 const InputVector &fe_function,
3807 std::vector<solution_hessian_type<typename InputVector::value_type>>
3810 std::vector<typename InputVector::value_type> local_dof_values(
3811 this->fe_interface->n_current_interface_dofs());
3812 this->get_local_dof_values(fe_function, local_dof_values);
3814 get_average_of_function_hessians_from_local_dof_values(local_dof_values,
3820 template <
int dim,
int spacedim>
3821 template <
class InputVector>
3823 Scalar<dim, spacedim>::
3824 get_jump_in_function_third_derivatives_from_local_dof_values(
3825 const InputVector &local_dof_values,
3827 solution_third_derivative_type<typename InputVector::value_type>>
3828 &third_derivatives)
const
3831 this->fe_interface->n_quadrature_points);
3833 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
3834 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3837 third_derivatives[q_index] = 0.;
3839 third_derivatives[q_index] +=
3840 local_dof_values[dof_index] *
3841 jump_in_third_derivatives(dof_index, q_index);
3847 template <
int dim,
int spacedim>
3848 template <
class InputVector>
3850 Scalar<dim, spacedim>::get_jump_in_function_third_derivatives(
3851 const InputVector &fe_function,
3853 solution_third_derivative_type<typename InputVector::value_type>>
3854 &third_derivatives)
const
3856 std::vector<typename InputVector::value_type> local_dof_values(
3857 this->fe_interface->n_current_interface_dofs());
3858 this->get_local_dof_values(fe_function, local_dof_values);
3860 get_jump_in_function_third_derivatives_from_local_dof_values(
3861 local_dof_values, third_derivatives);
3866 template <
int dim,
int spacedim>
3869 const unsigned int first_vector_component)
3870 : Base<dim, spacedim>(fe_interface)
3871 , extractor(first_vector_component)
3876 template <
int dim,
int spacedim>
3879 const unsigned int interface_dof_index,
3880 const unsigned int q_point)
const
3882 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3885 return (*(this->fe_interface->fe_face_values))[extractor].value(
3886 dof_pair[0], q_point);
3889 return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3890 dof_pair[1], q_point);
3892 return value_type();
3897 template <
int dim,
int spacedim>
3900 const unsigned int q_point)
const
3902 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3908 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3913 (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3914 dof_pair[1], q_point);
3921 template <
int dim,
int spacedim>
3924 const unsigned int interface_dof_index,
3925 const unsigned int q_point)
const
3927 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3929 if (this->fe_interface->at_boundary())
3930 return (*(this->fe_interface->fe_face_values))[extractor].value(
3931 dof_pair[0], q_point);
3938 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3943 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3944 dof_pair[1], q_point);
3951 template <
int dim,
int spacedim>
3954 const unsigned int interface_dof_index,
3955 const unsigned int q_point)
const
3957 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3959 if (this->fe_interface->at_boundary())
3960 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3961 dof_pair[0], q_point);
3963 gradient_type
value;
3968 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3972 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3973 .gradient(dof_pair[1], q_point);
3980 template <
int dim,
int spacedim>
3983 const unsigned int interface_dof_index,
3984 const unsigned int q_point)
const
3986 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3988 if (this->fe_interface->at_boundary())
3989 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3990 dof_pair[0], q_point);
3992 gradient_type
value;
3996 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
4001 (*(this->fe_interface->fe_face_values_neighbor))[extractor].gradient(
4002 dof_pair[1], q_point);
4009 template <
int dim,
int spacedim>
4012 const unsigned int q_point)
const
4014 return jump_in_gradients(interface_dof_index, q_point);
4019 template <
int dim,
int spacedim>
4022 const unsigned int interface_dof_index,
4023 const unsigned int q_point)
const
4025 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4027 if (this->fe_interface->at_boundary())
4028 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
4029 dof_pair[0], q_point);
4036 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
4040 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4041 .hessian(dof_pair[1], q_point);
4048 template <
int dim,
int spacedim>
4051 const unsigned int q_point)
const
4053 return average_of_hessians(interface_dof_index, q_point);
4058 template <
int dim,
int spacedim>
4061 const unsigned int interface_dof_index,
4062 const unsigned int q_point)
const
4064 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4066 if (this->fe_interface->at_boundary())
4067 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
4068 dof_pair[0], q_point);
4074 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
4079 (*(this->fe_interface->fe_face_values_neighbor))[extractor].hessian(
4080 dof_pair[1], q_point);
4087 template <
int dim,
int spacedim>
4090 const unsigned int q_point)
const
4092 return jump_in_hessians(interface_dof_index, q_point);
4097 template <
int dim,
int spacedim>
4100 const unsigned int interface_dof_index,
4101 const unsigned int q_point)
const
4103 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4105 if (this->fe_interface->at_boundary())
4106 return (*(this->fe_interface->fe_face_values))[extractor]
4107 .third_derivative(dof_pair[0], q_point);
4109 third_derivative_type
value;
4113 (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
4114 dof_pair[0], q_point);
4117 value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4118 .third_derivative(dof_pair[1], q_point);
4125 template <
int dim,
int spacedim>
4126 template <
class InputVector>
4129 const bool here_or_there,
4130 const InputVector &local_dof_values,
4131 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4136 for (
const auto dof_index : this->fe_interface->dof_indices())
4137 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4142 values[q_index] += local_dof_values[dof_index] *
4143 value(here_or_there, dof_index, q_index);
4149 template <
int dim,
int spacedim>
4150 template <
class InputVector>
4153 const bool here_or_there,
4154 const InputVector &fe_function,
4155 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4158 std::vector<typename InputVector::value_type> local_dof_values(
4159 this->fe_interface->n_current_interface_dofs());
4160 this->get_local_dof_values(fe_function, local_dof_values);
4162 get_function_values_from_local_dof_values(here_or_there,
4169 template <
int dim,
int spacedim>
4170 template <
class InputVector>
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())
4186 local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
4192 template <
int dim,
int spacedim>
4193 template <
class InputVector>
4196 const InputVector &fe_function,
4197 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4200 std::vector<typename InputVector::value_type> local_dof_values(
4201 this->fe_interface->n_current_interface_dofs());
4202 this->get_local_dof_values(fe_function, local_dof_values);
4204 get_jump_in_function_values_from_local_dof_values(local_dof_values, values);
4209 template <
int dim,
int spacedim>
4210 template <
class InputVector>
4213 const InputVector &local_dof_values,
4214 std::vector<solution_gradient_type<typename InputVector::value_type>>
4219 for (
const auto dof_index : this->fe_interface->dof_indices())
4220 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4226 local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
4232 template <
int dim,
int spacedim>
4233 template <
class InputVector>
4236 const InputVector &fe_function,
4237 std::vector<solution_gradient_type<typename InputVector::value_type>>
4240 std::vector<typename InputVector::value_type> local_dof_values(
4241 this->fe_interface->n_current_interface_dofs());
4242 this->get_local_dof_values(fe_function, local_dof_values);
4244 get_jump_in_function_gradients_from_local_dof_values(local_dof_values,
4250 template <
int dim,
int spacedim>
4251 template <
class InputVector>
4254 const InputVector &local_dof_values,
4255 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4260 for (
const auto dof_index : this->fe_interface->dof_indices())
4261 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4267 local_dof_values[dof_index] * average_of_values(dof_index, q_index);
4273 template <
int dim,
int spacedim>
4274 template <
class InputVector>
4277 const InputVector &fe_function,
4278 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4281 std::vector<typename InputVector::value_type> local_dof_values(
4282 this->fe_interface->n_current_interface_dofs());
4283 this->get_local_dof_values(fe_function, local_dof_values);
4285 get_average_of_function_values_from_local_dof_values(local_dof_values,
4291 template <
int dim,
int spacedim>
4292 template <
class InputVector>
4296 const InputVector &local_dof_values,
4297 std::vector<solution_gradient_type<typename InputVector::value_type>>
4302 for (
const auto dof_index : this->fe_interface->dof_indices())
4303 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4308 gradients[q_index] += local_dof_values[dof_index] *
4309 average_of_gradients(dof_index, q_index);
4315 template <
int dim,
int spacedim>
4316 template <
class InputVector>
4319 const InputVector &fe_function,
4320 std::vector<solution_gradient_type<typename InputVector::value_type>>
4323 std::vector<typename InputVector::value_type> local_dof_values(
4324 this->fe_interface->n_current_interface_dofs());
4325 this->get_local_dof_values(fe_function, local_dof_values);
4327 get_average_of_function_gradients_from_local_dof_values(local_dof_values,
4333 template <
int dim,
int spacedim>
4334 template <
class InputVector>
4337 const InputVector &local_dof_values,
4338 std::vector<solution_hessian_type<typename InputVector::value_type>>
4343 for (
const auto dof_index : this->fe_interface->dof_indices())
4344 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4350 local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
4356 template <
int dim,
int spacedim>
4357 template <
class InputVector>
4360 const InputVector &fe_function,
4361 std::vector<solution_hessian_type<typename InputVector::value_type>>
4364 std::vector<typename InputVector::value_type> local_dof_values(
4365 this->fe_interface->n_current_interface_dofs());
4366 this->get_local_dof_values(fe_function, local_dof_values);
4368 get_jump_in_function_hessians_from_local_dof_values(local_dof_values,
4374 template <
int dim,
int spacedim>
4375 template <
class InputVector>
4378 const InputVector &local_dof_values,
4379 std::vector<solution_hessian_type<typename InputVector::value_type>>
4384 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
4385 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4390 hessians[q_index] += local_dof_values[dof_index] *
4391 average_of_hessians(dof_index, q_index);
4397 template <
int dim,
int spacedim>
4398 template <
class InputVector>
4401 const InputVector &fe_function,
4402 std::vector<solution_hessian_type<typename InputVector::value_type>>
4405 std::vector<typename InputVector::value_type> local_dof_values(
4406 this->fe_interface->n_current_interface_dofs());
4407 this->get_local_dof_values(fe_function, local_dof_values);
4409 get_average_of_function_hessians_from_local_dof_values(local_dof_values,
4415 template <
int dim,
int spacedim>
4416 template <
class InputVector>
4420 const InputVector &local_dof_values,
4422 solution_third_derivative_type<typename InputVector::value_type>>
4423 &third_derivatives)
const
4426 this->fe_interface->n_quadrature_points);
4428 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
4429 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4432 third_derivatives[q_index] = 0.;
4434 third_derivatives[q_index] +=
4435 local_dof_values[dof_index] *
4436 jump_in_third_derivatives(dof_index, q_index);
4442 template <
int dim,
int spacedim>
4443 template <
class InputVector>
4446 const InputVector &fe_function,
4448 solution_third_derivative_type<typename InputVector::value_type>>
4449 &third_derivatives)
const
4451 std::vector<typename InputVector::value_type> local_dof_values(
4452 this->fe_interface->n_current_interface_dofs());
4453 this->get_local_dof_values(fe_function, local_dof_values);
4455 get_jump_in_function_third_derivatives_from_local_dof_values(
4456 local_dof_values, third_derivatives);
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, level_dof_access > > &cell, const unsigned int face_no)
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
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
FEInterfaceViews::Vector< dim, spacedim > operator[](const FEValuesExtractors::Vector &vector) 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 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
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
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