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>
1445 template <
typename CellIteratorType,
typename CellNeighborIteratorType>
1448 const unsigned int face_no,
1449 const unsigned int sub_face_no,
1450 const CellNeighborIteratorType &cell_neighbor,
1451 const unsigned int face_no_neighbor,
1452 const unsigned int sub_face_no_neighbor,
1483 template <
typename CellIteratorType>
1486 const unsigned int face_no,
1595 JxW(
const unsigned int quadrature_point)
const;
1602 const std::vector<double> &
1614 const std::vector<Tensor<1, spacedim>> &
1632 const std::vector<Point<spacedim>> &
1688 std::vector<types::global_dof_index>
1703 std::array<unsigned int, 2>
1715 normal(
const unsigned int q_point_index)
const;
1749 const unsigned int interface_dof_index,
1750 const unsigned int q_point,
1751 const unsigned int component = 0)
const;
1782 const unsigned int q_point,
1783 const unsigned int component = 0)
const;
1800 const unsigned int q_point,
1801 const unsigned int component = 0)
const;
1819 const unsigned int q_point,
1820 const unsigned int component = 0)
const;
1837 const unsigned int q_point,
1838 const unsigned int component = 0)
const;
1864 const unsigned int q_point,
1865 const unsigned int component = 0)
const;
1882 const unsigned int q_point,
1883 const unsigned int component = 0)
const;
1901 const unsigned int q_point,
1902 const unsigned int component = 0)
const;
1923 template <
class InputVector>
1926 const InputVector &fe_function,
1927 std::vector<typename InputVector::value_type> &values)
const;
1937 template <
class InputVector>
1940 const InputVector &fe_function,
1951 template <
class InputVector>
1954 const InputVector &fe_function,
1966 template <
class InputVector>
1969 const InputVector &fe_function,
1971 &third_derivatives)
const;
1988 template <
class InputVector>
1991 const InputVector &fe_function,
1992 std::vector<typename InputVector::value_type> &values)
const;
2001 template <
class InputVector>
2004 const InputVector &fe_function,
2015 template <
class InputVector>
2018 const InputVector &fe_function,
2066 std::vector<std::array<unsigned int, 2>>
dofmap;
2104 std::unique_ptr<FESubfaceValues<dim, spacedim>>
2124 std::unique_ptr<hp::FESubfaceValues<dim, spacedim>>
2131 std::unique_ptr<hp::FEFaceValues<dim, spacedim>>
2138 std::unique_ptr<hp::FESubfaceValues<dim, spacedim>>
2148 "The current function doesn't make sense when used with a "
2149 "FEInterfaceValues object with hp-capabilities.");
2158 "The current function doesn't make sense when used with a "
2159 "FEInterfaceValues object without hp-capabilities.");
2179template <
int dim,
int spacedim>
2185 : n_quadrature_points(quadrature.size())
2186 , fe_face_values(nullptr)
2187 , fe_face_values_neighbor(nullptr)
2188 , internal_fe_face_values(
2193 , internal_fe_subface_values(
2198 , internal_fe_face_values_neighbor(
2203 , internal_fe_subface_values_neighbor(
2212template <
int dim,
int spacedim>
2226template <
int dim,
int spacedim>
2232 : n_quadrature_points(quadrature.max_n_quadrature_points())
2233 , fe_face_values(nullptr)
2234 , fe_face_values_neighbor(nullptr)
2235 , internal_fe_face_values(
2240 , internal_fe_subface_values(
2245 , internal_fe_face_values_neighbor(
2250 , internal_fe_subface_values_neighbor(
2259template <
int dim,
int spacedim>
2265 : n_quadrature_points(quadrature_collection.max_n_quadrature_points())
2266 , fe_face_values(nullptr)
2267 , fe_face_values_neighbor(nullptr)
2268 , internal_hp_fe_face_values(
2271 quadrature_collection,
2273 , internal_hp_fe_subface_values(
2277 quadrature_collection,
2279 , internal_hp_fe_face_values_neighbor(
2282 quadrature_collection,
2284 , internal_hp_fe_subface_values_neighbor(
2288 quadrature_collection,
2296template <
int dim,
int spacedim>
2303 quadrature_collection,
2309template <
int dim,
int spacedim>
2310template <
typename CellIteratorType,
typename CellNeighborIteratorType>
2313 const CellIteratorType &cell,
2314 const unsigned int face_no,
2315 const unsigned int sub_face_no,
2316 const CellNeighborIteratorType &cell_neighbor,
2317 const unsigned int face_no_neighbor,
2318 const unsigned int sub_face_no_neighbor,
2319 const unsigned int q_index,
2320 const unsigned int mapping_index,
2321 const unsigned int fe_index)
2323 Assert(internal_fe_face_values || internal_hp_fe_face_values,
2326 if (internal_fe_face_values)
2330 internal_fe_face_values->reinit(cell, face_no);
2331 fe_face_values = internal_fe_face_values.get();
2335 internal_fe_subface_values->reinit(cell, face_no, sub_face_no);
2336 fe_face_values = internal_fe_subface_values.get();
2340 internal_fe_face_values_neighbor->reinit(cell_neighbor,
2342 fe_face_values_neighbor = internal_fe_face_values_neighbor.get();
2346 internal_fe_subface_values_neighbor->reinit(cell_neighbor,
2348 sub_face_no_neighbor);
2349 fe_face_values_neighbor = internal_fe_subface_values_neighbor.get();
2353 fe_face_values_neighbor->n_quadrature_points);
2355 const_cast<unsigned int &
>(this->n_quadrature_points) =
2356 fe_face_values->n_quadrature_points;
2358 else if (internal_hp_fe_face_values)
2360 unsigned int used_q_index = q_index;
2361 unsigned int used_mapping_index = mapping_index;
2366 if (internal_hp_fe_face_values->get_quadrature_collection().size() == 1)
2370 if (internal_hp_fe_face_values->get_mapping_collection().size() == 1)
2371 used_mapping_index = 0;
2378 if (internal_hp_fe_face_values
2379 ->get_quadrature_collection()[cell->active_fe_index()] ==
2380 internal_hp_fe_face_values
2381 ->get_quadrature_collection()[cell_neighbor->active_fe_index()])
2382 used_q_index = cell->active_fe_index();
2386 const unsigned int dominated_fe_index =
2389 internal_hp_fe_face_values->get_fe_collection().find_dominated_fe(
2390 {cell->active_fe_index(), cell_neighbor->active_fe_index()}) :
2391 numbers::invalid_unsigned_int);
2397 "You called this function with 'q_index' left at its "
2398 "default value, but this can only work if one of "
2399 "the two finite elements adjacent to this face "
2400 "dominates the other. See the documentation "
2401 "of this function for more information of how "
2402 "to deal with this situation."));
2403 used_q_index = dominated_fe_index;
2410 "You called this function with 'mapping_index' left "
2411 "at its default value, but this can only work if one "
2412 "of the two finite elements adjacent to this face "
2413 "dominates the other. See the documentation "
2414 "of this function for more information of how "
2415 "to deal with this situation."));
2416 used_mapping_index = dominated_fe_index;
2422 internal_hp_fe_face_values->reinit(
2423 cell, face_no, used_q_index, used_mapping_index, fe_index);
2425 internal_hp_fe_face_values->get_present_fe_values());
2429 internal_hp_fe_subface_values->
reinit(
2430 cell, face_no, sub_face_no, used_q_index, used_mapping_index);
2433 internal_hp_fe_subface_values->get_present_fe_values());
2437 internal_hp_fe_face_values_neighbor->
reinit(cell_neighbor,
2440 used_mapping_index);
2443 internal_hp_fe_face_values_neighbor->get_present_fe_values());
2447 internal_hp_fe_subface_values_neighbor->
reinit(cell_neighbor,
2449 sub_face_no_neighbor,
2451 used_mapping_index);
2453 fe_face_values_neighbor =
2455 internal_hp_fe_subface_values_neighbor->get_present_fe_values());
2459 fe_face_values_neighbor->n_quadrature_points);
2461 const_cast<unsigned int &
>(this->n_quadrature_points) =
2462 fe_face_values->n_quadrature_points;
2468 std::vector<types::global_dof_index> v(
2469 fe_face_values->get_fe().n_dofs_per_cell());
2470 cell->get_active_or_mg_dof_indices(v);
2471 std::vector<types::global_dof_index> v2(
2472 fe_face_values_neighbor->get_fe().n_dofs_per_cell());
2473 cell_neighbor->get_active_or_mg_dof_indices(v2);
2477 std::map<types::global_dof_index, std::pair<unsigned int, unsigned int>>
2479 std::pair<unsigned int, unsigned int> invalid_entry(
2482 for (
unsigned int i = 0; i < v.size(); ++i)
2485 auto result = tempmap.insert(std::make_pair(v[i], invalid_entry));
2486 result.first->second.first = i;
2489 for (
unsigned int i = 0; i < v2.size(); ++i)
2492 auto result = tempmap.insert(std::make_pair(v2[i], invalid_entry));
2493 result.first->second.second = i;
2497 dofmap.resize(tempmap.size());
2498 interface_dof_indices.resize(tempmap.size());
2499 unsigned int idx = 0;
2500 for (
auto &x : tempmap)
2502 interface_dof_indices[idx] = x.first;
2503 dofmap[idx] = {{x.second.first, x.second.second}};
2511template <
int dim,
int spacedim>
2512template <
typename CellIteratorType>
2515 const unsigned int face_no,
2516 const unsigned int q_index,
2517 const unsigned int mapping_index,
2518 const unsigned int fe_index)
2520 Assert(internal_fe_face_values || internal_hp_fe_face_values,
2523 if (internal_fe_face_values)
2525 internal_fe_face_values->reinit(cell, face_no);
2526 fe_face_values = internal_fe_face_values.get();
2527 fe_face_values_neighbor =
nullptr;
2529 interface_dof_indices.resize(fe_face_values->get_fe().n_dofs_per_cell());
2530 cell->get_active_or_mg_dof_indices(interface_dof_indices);
2532 else if (internal_hp_fe_face_values)
2534 internal_hp_fe_face_values->reinit(
2535 cell, face_no, q_index, mapping_index, fe_index);
2537 internal_hp_fe_face_values->get_present_fe_values());
2538 fe_face_values_neighbor =
nullptr;
2540 interface_dof_indices.resize(fe_face_values->get_fe().n_dofs_per_cell());
2541 cell->get_active_or_mg_dof_indices(interface_dof_indices);
2544 dofmap.resize(interface_dof_indices.size());
2545 for (
unsigned int i = 0; i < interface_dof_indices.size(); ++i)
2553template <
int dim,
int spacedim>
2557 Assert(fe_face_values !=
nullptr,
2558 ExcMessage(
"This call requires a call to reinit() first."));
2559 return fe_face_values->JxW(q);
2564template <
int dim,
int spacedim>
2565const std::vector<double> &
2568 Assert(fe_face_values !=
nullptr,
2569 ExcMessage(
"This call requires a call to reinit() first."));
2570 return fe_face_values->get_JxW_values();
2575template <
int dim,
int spacedim>
2576const std::vector<Tensor<1, spacedim>> &
2579 Assert(fe_face_values !=
nullptr,
2580 ExcMessage(
"This call requires a call to reinit() first."));
2581 return fe_face_values->get_normal_vectors();
2586template <
int dim,
int spacedim>
2590 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2591 return internal_fe_face_values->get_mapping();
2596template <
int dim,
int spacedim>
2600 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2601 return internal_fe_face_values->get_fe();
2606template <
int dim,
int spacedim>
2610 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2611 return internal_fe_face_values->get_quadrature();
2616template <
int dim,
int spacedim>
2620 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2621 return internal_hp_fe_face_values->get_mapping_collection();
2626template <
int dim,
int spacedim>
2630 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2631 return internal_hp_fe_face_values->get_fe_collection();
2636template <
int dim,
int spacedim>
2640 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2641 return internal_hp_fe_face_values->get_quadrature_collection();
2646template <
int dim,
int spacedim>
2650 if (internal_hp_fe_face_values || internal_hp_fe_subface_values ||
2651 internal_hp_fe_face_values_neighbor ||
2652 internal_hp_fe_subface_values_neighbor)
2662 Assert(internal_fe_face_values || internal_fe_subface_values ||
2663 internal_fe_face_values_neighbor ||
2664 internal_fe_subface_values_neighbor,
2676template <
int dim,
int spacedim>
2680 return {0U, n_quadrature_points};
2685template <
int dim,
int spacedim>
2686const std::vector<Point<spacedim>> &
2689 Assert(fe_face_values !=
nullptr,
2690 ExcMessage(
"This call requires a call to reinit() first."));
2691 return fe_face_values->get_quadrature_points();
2696template <
int dim,
int spacedim>
2700 if (has_hp_capabilities())
2701 return internal_hp_fe_face_values->get_update_flags();
2703 return internal_fe_face_values->get_update_flags();
2708template <
int dim,
int spacedim>
2712 return get_fe_face_values(
cell_index).get_cell();
2717template <
int dim,
int spacedim>
2722 return get_fe_face_values(
cell_index).get_face_number();
2727template <
int dim,
int spacedim>
2732 interface_dof_indices.size() > 0,
2734 "n_current_interface_dofs() is only available after a call to reinit()."));
2735 return interface_dof_indices.size();
2740template <
int dim,
int spacedim>
2744 return {0U, n_current_interface_dofs()};
2749template <
int dim,
int spacedim>
2753 return fe_face_values_neighbor ==
nullptr;
2758template <
int dim,
int spacedim>
2759std::vector<types::global_dof_index>
2762 return interface_dof_indices;
2767template <
int dim,
int spacedim>
2768std::array<unsigned int, 2>
2770 const unsigned int interface_dof_index)
const
2773 return dofmap[interface_dof_index];
2778template <
int dim,
int spacedim>
2787 "You are on a boundary, so you can only ask for the first FEFaceValues object."));
2789 return (
cell_index == 0) ? *fe_face_values : *fe_face_values_neighbor;
2794template <
int dim,
int spacedim>
2798 return fe_face_values->normal_vector(q_point_index);
2803template <
int dim,
int spacedim>
2806 const bool here_or_there,
2807 const unsigned int interface_dof_index,
2808 const unsigned int q_point,
2809 const unsigned int component)
const
2811 const auto dof_pair = dofmap[interface_dof_index];
2814 return get_fe_face_values(0).shape_value_component(dof_pair[0],
2818 return get_fe_face_values(1).shape_value_component(dof_pair[1],
2827template <
int dim,
int spacedim>
2830 const unsigned int interface_dof_index,
2831 const unsigned int q_point,
2832 const unsigned int component)
const
2834 const auto dof_pair = dofmap[interface_dof_index];
2839 value += get_fe_face_values(0).shape_value_component(dof_pair[0],
2843 value -= get_fe_face_values(1).shape_value_component(dof_pair[1],
2851template <
int dim,
int spacedim>
2854 const unsigned int interface_dof_index,
2855 const unsigned int q_point,
2856 const unsigned int component)
const
2858 const auto dof_pair = dofmap[interface_dof_index];
2861 return get_fe_face_values(0).shape_value_component(dof_pair[0],
2868 value += 0.5 * get_fe_face_values(0).shape_value_component(dof_pair[0],
2872 value += 0.5 * get_fe_face_values(1).shape_value_component(dof_pair[1],
2881template <
int dim,
int spacedim>
2884 const unsigned int interface_dof_index,
2885 const unsigned int q_point,
2886 const unsigned int component)
const
2888 const auto dof_pair = dofmap[interface_dof_index];
2891 return get_fe_face_values(0).shape_grad_component(dof_pair[0],
2898 value += 0.5 * get_fe_face_values(0).shape_grad_component(dof_pair[0],
2902 value += 0.5 * get_fe_face_values(1).shape_grad_component(dof_pair[1],
2911template <
int dim,
int spacedim>
2914 const unsigned int interface_dof_index,
2915 const unsigned int q_point,
2916 const unsigned int component)
const
2918 const auto dof_pair = dofmap[interface_dof_index];
2921 return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
2928 value += 0.5 * get_fe_face_values(0).shape_hessian_component(dof_pair[0],
2932 value += 0.5 * get_fe_face_values(1).shape_hessian_component(dof_pair[1],
2941template <
int dim,
int spacedim>
2944 const unsigned int interface_dof_index,
2945 const unsigned int q_point,
2946 const unsigned int component)
const
2948 const auto dof_pair = dofmap[interface_dof_index];
2951 return get_fe_face_values(0).shape_grad_component(dof_pair[0],
2958 value += get_fe_face_values(0).shape_grad_component(dof_pair[0],
2962 value -= get_fe_face_values(1).shape_grad_component(dof_pair[1],
2971template <
int dim,
int spacedim>
2974 const unsigned int interface_dof_index,
2975 const unsigned int q_point,
2976 const unsigned int component)
const
2978 const auto dof_pair = dofmap[interface_dof_index];
2981 return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
2988 value += get_fe_face_values(0).shape_hessian_component(dof_pair[0],
2992 value -= get_fe_face_values(1).shape_hessian_component(dof_pair[1],
3001template <
int dim,
int spacedim>
3004 const unsigned int interface_dof_index,
3005 const unsigned int q_point,
3006 const unsigned int component)
const
3008 const auto dof_pair = dofmap[interface_dof_index];
3011 return get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3018 value += get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3022 value -= get_fe_face_values(1).shape_3rd_derivative_component(dof_pair[1],
3031template <
int dim,
int spacedim>
3032template <
class InputVector>
3035 const InputVector &fe_function,
3036 std::vector<typename InputVector::value_type> &values)
const
3041 this->operator[](scalar).get_jump_in_function_values(fe_function, values);
3046template <
int dim,
int spacedim>
3047template <
class InputVector>
3050 const InputVector &fe_function,
3057 this->operator[](scalar).get_jump_in_function_gradients(fe_function,
3063template <
int dim,
int spacedim>
3064template <
class InputVector>
3067 const InputVector &fe_function,
3074 this->operator[](scalar).get_jump_in_function_hessians(fe_function, hessians);
3079template <
int dim,
int spacedim>
3080template <
class InputVector>
3083 const InputVector &fe_function,
3085 &third_derivatives)
const
3090 this->operator[](scalar).get_jump_in_function_third_derivatives(
3091 fe_function, third_derivatives);
3096template <
int dim,
int spacedim>
3097template <
class InputVector>
3100 const InputVector &fe_function,
3101 std::vector<typename InputVector::value_type> &values)
const
3106 this->operator[](scalar).get_average_of_function_values(fe_function, values);
3111template <
int dim,
int spacedim>
3112template <
class InputVector>
3115 const InputVector &fe_function,
3122 this->operator[](scalar).get_average_of_function_gradients(fe_function,
3128template <
int dim,
int spacedim>
3129template <
class InputVector>
3132 const InputVector &fe_function,
3139 this->operator[](scalar).get_average_of_function_hessians(fe_function,
3146template <
int dim,
int spacedim>
3151 const unsigned int n_components =
3152 (this->has_hp_capabilities() ? this->get_fe_collection().n_components() :
3153 this->get_fe().n_components());
3161template <
int dim,
int spacedim>
3166 const unsigned int n_components =
3167 (this->has_hp_capabilities() ? this->get_fe_collection().n_components() :
3168 this->get_fe().n_components());
3169 const unsigned int n_vectors =
3184 template <
int dim,
int spacedim>
3187 : fe_interface(&fe_interface)
3192 template <
int dim,
int spacedim>
3193 Scalar<dim, spacedim>::Scalar(
3195 const unsigned int component)
3196 : Base<dim, spacedim>(fe_interface)
3197 , extractor(component)
3202 template <
int dim,
int spacedim>
3203 template <
class InputVector,
class OutputVector>
3205 Base<dim, spacedim>::get_local_dof_values(
3206 const InputVector &dof_values,
3207 OutputVector &local_dof_values)
const
3209 const auto &interface_dof_indices =
3210 this->fe_interface->get_interface_dof_indices();
3212 AssertDimension(interface_dof_indices.size(), local_dof_values.size());
3214 for (
const unsigned int i : this->fe_interface->dof_indices())
3215 local_dof_values[i] = dof_values(interface_dof_indices[i]);
3220 template <
int dim,
int spacedim>
3221 typename Scalar<dim, spacedim>::value_type
3222 Scalar<dim, spacedim>::value(
const bool here_or_there,
3223 const unsigned int interface_dof_index,
3224 const unsigned int q_point)
const
3226 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3229 return (*(this->fe_interface->fe_face_values))[extractor].value(
3230 dof_pair[0], q_point);
3233 return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3234 dof_pair[1], q_point);
3241 template <
int dim,
int spacedim>
3242 typename Scalar<dim, spacedim>::value_type
3243 Scalar<dim, spacedim>::jump_in_values(
const unsigned int interface_dof_index,
3244 const unsigned int q_point)
const
3246 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3248 value_type
value = 0.0;
3252 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3257 (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3258 dof_pair[1], q_point);
3265 template <
int dim,
int spacedim>
3266 typename Scalar<dim, spacedim>::value_type
3267 Scalar<dim, spacedim>::average_of_values(
3268 const unsigned int interface_dof_index,
3269 const unsigned int q_point)
const
3271 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3273 if (this->fe_interface->at_boundary())
3274 return (*(this->fe_interface->fe_face_values))[extractor].value(
3275 dof_pair[0], q_point);
3277 value_type
value = 0.0;
3282 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3287 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3288 dof_pair[1], q_point);
3295 template <
int dim,
int spacedim>
3296 typename Scalar<dim, spacedim>::gradient_type
3297 Scalar<dim, spacedim>::average_of_gradients(
3298 const unsigned int interface_dof_index,
3299 const unsigned int q_point)
const
3301 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3303 if (this->fe_interface->at_boundary())
3304 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3305 dof_pair[0], q_point);
3307 gradient_type
value;
3312 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3316 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3317 .gradient(dof_pair[1], q_point);
3324 template <
int dim,
int spacedim>
3325 typename Scalar<dim, spacedim>::gradient_type
3326 Scalar<dim, spacedim>::jump_in_gradients(
3327 const unsigned int interface_dof_index,
3328 const unsigned int q_point)
const
3330 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3332 if (this->fe_interface->at_boundary())
3333 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3334 dof_pair[0], q_point);
3336 gradient_type
value;
3340 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3345 (*(this->fe_interface->fe_face_values_neighbor))[extractor].gradient(
3346 dof_pair[1], q_point);
3353 template <
int dim,
int spacedim>
3354 typename Scalar<dim, spacedim>::hessian_type
3355 Scalar<dim, spacedim>::average_of_hessians(
3356 const unsigned int interface_dof_index,
3357 const unsigned int q_point)
const
3359 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3361 if (this->fe_interface->at_boundary())
3362 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3363 dof_pair[0], q_point);
3370 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3374 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3375 .hessian(dof_pair[1], q_point);
3382 template <
int dim,
int spacedim>
3383 typename Scalar<dim, spacedim>::third_derivative_type
3384 Scalar<dim, spacedim>::jump_in_third_derivatives(
3385 const unsigned int interface_dof_index,
3386 const unsigned int q_point)
const
3388 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3390 if (this->fe_interface->at_boundary())
3391 return (*(this->fe_interface->fe_face_values))[extractor]
3392 .third_derivative(dof_pair[0], q_point);
3394 third_derivative_type
value;
3398 (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
3399 dof_pair[0], q_point);
3402 value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3403 .third_derivative(dof_pair[1], q_point);
3410 template <
int dim,
int spacedim>
3411 typename Scalar<dim, spacedim>::hessian_type
3412 Scalar<dim, spacedim>::jump_in_hessians(
3413 const unsigned int interface_dof_index,
3414 const unsigned int q_point)
const
3416 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3418 if (this->fe_interface->at_boundary())
3419 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3420 dof_pair[0], q_point);
3426 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3431 (*(this->fe_interface->fe_face_values_neighbor))[extractor].hessian(
3432 dof_pair[1], q_point);
3439 template <
int dim,
int spacedim>
3440 template <
class InputVector>
3442 Scalar<dim, spacedim>::get_function_values_from_local_dof_values(
3443 const bool here_or_there,
3444 const InputVector &local_dof_values,
3445 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3450 for (
const auto dof_index : this->fe_interface->dof_indices())
3451 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3456 values[q_index] += local_dof_values[dof_index] *
3457 value(here_or_there, dof_index, q_index);
3463 template <
int dim,
int spacedim>
3464 template <
class InputVector>
3466 Scalar<dim, spacedim>::get_function_values(
3467 const bool here_or_there,
3468 const InputVector &fe_function,
3469 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3472 std::vector<typename InputVector::value_type> local_dof_values(
3473 this->fe_interface->n_current_interface_dofs());
3474 this->get_local_dof_values(fe_function, local_dof_values);
3476 get_function_values_from_local_dof_values(here_or_there,
3483 template <
int dim,
int spacedim>
3484 template <
class InputVector>
3486 Scalar<dim, spacedim>::get_jump_in_function_values_from_local_dof_values(
3487 const InputVector &local_dof_values,
3488 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3493 for (
const auto dof_index : this->fe_interface->dof_indices())
3494 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3500 local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
3506 template <
int dim,
int spacedim>
3507 template <
class InputVector>
3509 Scalar<dim, spacedim>::get_jump_in_function_values(
3510 const InputVector &fe_function,
3511 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3514 std::vector<typename InputVector::value_type> local_dof_values(
3515 this->fe_interface->n_current_interface_dofs());
3516 this->get_local_dof_values(fe_function, local_dof_values);
3518 get_jump_in_function_values_from_local_dof_values(local_dof_values, values);
3523 template <
int dim,
int spacedim>
3524 template <
class InputVector>
3526 Scalar<dim, spacedim>::get_jump_in_function_gradients_from_local_dof_values(
3527 const InputVector &local_dof_values,
3528 std::vector<solution_gradient_type<typename InputVector::value_type>>
3533 for (
const auto dof_index : this->fe_interface->dof_indices())
3534 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3540 local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
3546 template <
int dim,
int spacedim>
3547 template <
class InputVector>
3549 Scalar<dim, spacedim>::get_jump_in_function_gradients(
3550 const InputVector &fe_function,
3551 std::vector<solution_gradient_type<typename InputVector::value_type>>
3554 std::vector<typename InputVector::value_type> local_dof_values(
3555 this->fe_interface->n_current_interface_dofs());
3556 this->get_local_dof_values(fe_function, local_dof_values);
3558 get_jump_in_function_gradients_from_local_dof_values(local_dof_values,
3564 template <
int dim,
int spacedim>
3565 template <
class InputVector>
3567 Scalar<dim, spacedim>::get_average_of_function_values_from_local_dof_values(
3568 const InputVector &local_dof_values,
3569 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3574 for (
const auto dof_index : this->fe_interface->dof_indices())
3575 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3581 local_dof_values[dof_index] * average_of_values(dof_index, q_index);
3587 template <
int dim,
int spacedim>
3588 template <
class InputVector>
3590 Scalar<dim, spacedim>::get_average_of_function_values(
3591 const InputVector &fe_function,
3592 std::vector<solution_value_type<typename InputVector::value_type>> &values)
3595 std::vector<typename InputVector::value_type> local_dof_values(
3596 this->fe_interface->n_current_interface_dofs());
3597 this->get_local_dof_values(fe_function, local_dof_values);
3599 get_average_of_function_values_from_local_dof_values(local_dof_values,
3605 template <
int dim,
int spacedim>
3606 template <
class InputVector>
3608 Scalar<dim, spacedim>::
3609 get_average_of_function_gradients_from_local_dof_values(
3610 const InputVector &local_dof_values,
3611 std::vector<solution_gradient_type<typename InputVector::value_type>>
3616 for (
const auto dof_index : this->fe_interface->dof_indices())
3617 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3622 gradients[q_index] += local_dof_values[dof_index] *
3623 average_of_gradients(dof_index, q_index);
3629 template <
int dim,
int spacedim>
3630 template <
class InputVector>
3632 Scalar<dim, spacedim>::get_average_of_function_gradients(
3633 const InputVector &fe_function,
3634 std::vector<solution_gradient_type<typename InputVector::value_type>>
3637 std::vector<typename InputVector::value_type> local_dof_values(
3638 this->fe_interface->n_current_interface_dofs());
3639 this->get_local_dof_values(fe_function, local_dof_values);
3641 get_average_of_function_gradients_from_local_dof_values(local_dof_values,
3647 template <
int dim,
int spacedim>
3648 template <
class InputVector>
3650 Scalar<dim, spacedim>::get_jump_in_function_hessians_from_local_dof_values(
3651 const InputVector &local_dof_values,
3652 std::vector<solution_hessian_type<typename InputVector::value_type>>
3657 for (
const auto dof_index : this->fe_interface->dof_indices())
3658 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3664 local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
3670 template <
int dim,
int spacedim>
3671 template <
class InputVector>
3673 Scalar<dim, spacedim>::get_jump_in_function_hessians(
3674 const InputVector &fe_function,
3675 std::vector<solution_hessian_type<typename InputVector::value_type>>
3678 std::vector<typename InputVector::value_type> local_dof_values(
3679 this->fe_interface->n_current_interface_dofs());
3680 this->get_local_dof_values(fe_function, local_dof_values);
3682 get_jump_in_function_hessians_from_local_dof_values(local_dof_values,
3688 template <
int dim,
int spacedim>
3689 template <
class InputVector>
3691 Scalar<dim, spacedim>::get_average_of_function_hessians_from_local_dof_values(
3692 const InputVector &local_dof_values,
3693 std::vector<solution_hessian_type<typename InputVector::value_type>>
3698 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
3699 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3704 hessians[q_index] += local_dof_values[dof_index] *
3705 average_of_hessians(dof_index, q_index);
3711 template <
int dim,
int spacedim>
3712 template <
class InputVector>
3714 Scalar<dim, spacedim>::get_average_of_function_hessians(
3715 const InputVector &fe_function,
3716 std::vector<solution_hessian_type<typename InputVector::value_type>>
3719 std::vector<typename InputVector::value_type> local_dof_values(
3720 this->fe_interface->n_current_interface_dofs());
3721 this->get_local_dof_values(fe_function, local_dof_values);
3723 get_average_of_function_hessians_from_local_dof_values(local_dof_values,
3729 template <
int dim,
int spacedim>
3730 template <
class InputVector>
3732 Scalar<dim, spacedim>::
3733 get_jump_in_function_third_derivatives_from_local_dof_values(
3734 const InputVector &local_dof_values,
3736 solution_third_derivative_type<typename InputVector::value_type>>
3737 &third_derivatives)
const
3740 this->fe_interface->n_quadrature_points);
3742 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
3743 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3746 third_derivatives[q_index] = 0.;
3748 third_derivatives[q_index] +=
3749 local_dof_values[dof_index] *
3750 jump_in_third_derivatives(dof_index, q_index);
3756 template <
int dim,
int spacedim>
3757 template <
class InputVector>
3759 Scalar<dim, spacedim>::get_jump_in_function_third_derivatives(
3760 const InputVector &fe_function,
3762 solution_third_derivative_type<typename InputVector::value_type>>
3763 &third_derivatives)
const
3765 std::vector<typename InputVector::value_type> local_dof_values(
3766 this->fe_interface->n_current_interface_dofs());
3767 this->get_local_dof_values(fe_function, local_dof_values);
3769 get_jump_in_function_third_derivatives_from_local_dof_values(
3770 local_dof_values, third_derivatives);
3775 template <
int dim,
int spacedim>
3778 const unsigned int first_vector_component)
3779 : Base<dim, spacedim>(fe_interface)
3780 , extractor(first_vector_component)
3785 template <
int dim,
int spacedim>
3788 const unsigned int interface_dof_index,
3789 const unsigned int q_point)
const
3791 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3794 return (*(this->fe_interface->fe_face_values))[extractor].value(
3795 dof_pair[0], q_point);
3798 return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3799 dof_pair[1], q_point);
3801 return value_type();
3806 template <
int dim,
int spacedim>
3809 const unsigned int q_point)
const
3811 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3817 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3822 (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3823 dof_pair[1], q_point);
3830 template <
int dim,
int spacedim>
3833 const unsigned int interface_dof_index,
3834 const unsigned int q_point)
const
3836 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3838 if (this->fe_interface->at_boundary())
3839 return (*(this->fe_interface->fe_face_values))[extractor].value(
3840 dof_pair[0], q_point);
3847 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3852 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3853 dof_pair[1], q_point);
3860 template <
int dim,
int spacedim>
3863 const unsigned int interface_dof_index,
3864 const unsigned int q_point)
const
3866 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3868 if (this->fe_interface->at_boundary())
3869 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3870 dof_pair[0], q_point);
3872 gradient_type
value;
3877 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3881 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3882 .gradient(dof_pair[1], q_point);
3889 template <
int dim,
int spacedim>
3892 const unsigned int interface_dof_index,
3893 const unsigned int q_point)
const
3895 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3897 if (this->fe_interface->at_boundary())
3898 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3899 dof_pair[0], q_point);
3901 gradient_type
value;
3905 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3910 (*(this->fe_interface->fe_face_values_neighbor))[extractor].gradient(
3911 dof_pair[1], q_point);
3918 template <
int dim,
int spacedim>
3921 const unsigned int q_point)
const
3923 return jump_in_gradients(interface_dof_index, q_point);
3928 template <
int dim,
int spacedim>
3931 const unsigned int interface_dof_index,
3932 const unsigned int q_point)
const
3934 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3936 if (this->fe_interface->at_boundary())
3937 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3938 dof_pair[0], q_point);
3945 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3949 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3950 .hessian(dof_pair[1], q_point);
3957 template <
int dim,
int spacedim>
3960 const unsigned int q_point)
const
3962 return average_of_hessians(interface_dof_index, q_point);
3967 template <
int dim,
int spacedim>
3970 const unsigned int interface_dof_index,
3971 const unsigned int q_point)
const
3973 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3975 if (this->fe_interface->at_boundary())
3976 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3977 dof_pair[0], q_point);
3983 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3988 (*(this->fe_interface->fe_face_values_neighbor))[extractor].hessian(
3989 dof_pair[1], q_point);
3996 template <
int dim,
int spacedim>
3999 const unsigned int q_point)
const
4001 return jump_in_hessians(interface_dof_index, q_point);
4006 template <
int dim,
int spacedim>
4009 const unsigned int interface_dof_index,
4010 const unsigned int q_point)
const
4012 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4014 if (this->fe_interface->at_boundary())
4015 return (*(this->fe_interface->fe_face_values))[extractor]
4016 .third_derivative(dof_pair[0], q_point);
4018 third_derivative_type
value;
4022 (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
4023 dof_pair[0], q_point);
4026 value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4027 .third_derivative(dof_pair[1], q_point);
4034 template <
int dim,
int spacedim>
4035 template <
class InputVector>
4038 const bool here_or_there,
4039 const InputVector &local_dof_values,
4040 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4045 for (
const auto dof_index : this->fe_interface->dof_indices())
4046 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4051 values[q_index] += local_dof_values[dof_index] *
4052 value(here_or_there, dof_index, q_index);
4058 template <
int dim,
int spacedim>
4059 template <
class InputVector>
4062 const bool here_or_there,
4063 const InputVector &fe_function,
4064 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4067 std::vector<typename InputVector::value_type> local_dof_values(
4068 this->fe_interface->n_current_interface_dofs());
4069 this->get_local_dof_values(fe_function, local_dof_values);
4071 get_function_values_from_local_dof_values(here_or_there,
4078 template <
int dim,
int spacedim>
4079 template <
class InputVector>
4082 const InputVector &local_dof_values,
4083 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4088 for (
const auto dof_index : this->fe_interface->dof_indices())
4089 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4095 local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
4101 template <
int dim,
int spacedim>
4102 template <
class InputVector>
4105 const InputVector &fe_function,
4106 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4109 std::vector<typename InputVector::value_type> local_dof_values(
4110 this->fe_interface->n_current_interface_dofs());
4111 this->get_local_dof_values(fe_function, local_dof_values);
4113 get_jump_in_function_values_from_local_dof_values(local_dof_values, values);
4118 template <
int dim,
int spacedim>
4119 template <
class InputVector>
4122 const InputVector &local_dof_values,
4123 std::vector<solution_gradient_type<typename InputVector::value_type>>
4128 for (
const auto dof_index : this->fe_interface->dof_indices())
4129 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4135 local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
4141 template <
int dim,
int spacedim>
4142 template <
class InputVector>
4145 const InputVector &fe_function,
4146 std::vector<solution_gradient_type<typename InputVector::value_type>>
4149 std::vector<typename InputVector::value_type> local_dof_values(
4150 this->fe_interface->n_current_interface_dofs());
4151 this->get_local_dof_values(fe_function, local_dof_values);
4153 get_jump_in_function_gradients_from_local_dof_values(local_dof_values,
4159 template <
int dim,
int spacedim>
4160 template <
class InputVector>
4163 const InputVector &local_dof_values,
4164 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4169 for (
const auto dof_index : this->fe_interface->dof_indices())
4170 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4176 local_dof_values[dof_index] * average_of_values(dof_index, q_index);
4182 template <
int dim,
int spacedim>
4183 template <
class InputVector>
4186 const InputVector &fe_function,
4187 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4190 std::vector<typename InputVector::value_type> local_dof_values(
4191 this->fe_interface->n_current_interface_dofs());
4192 this->get_local_dof_values(fe_function, local_dof_values);
4194 get_average_of_function_values_from_local_dof_values(local_dof_values,
4200 template <
int dim,
int spacedim>
4201 template <
class InputVector>
4205 const InputVector &local_dof_values,
4206 std::vector<solution_gradient_type<typename InputVector::value_type>>
4211 for (
const auto dof_index : this->fe_interface->dof_indices())
4212 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4217 gradients[q_index] += local_dof_values[dof_index] *
4218 average_of_gradients(dof_index, q_index);
4224 template <
int dim,
int spacedim>
4225 template <
class InputVector>
4228 const InputVector &fe_function,
4229 std::vector<solution_gradient_type<typename InputVector::value_type>>
4232 std::vector<typename InputVector::value_type> local_dof_values(
4233 this->fe_interface->n_current_interface_dofs());
4234 this->get_local_dof_values(fe_function, local_dof_values);
4236 get_average_of_function_gradients_from_local_dof_values(local_dof_values,
4242 template <
int dim,
int spacedim>
4243 template <
class InputVector>
4246 const InputVector &local_dof_values,
4247 std::vector<solution_hessian_type<typename InputVector::value_type>>
4252 for (
const auto dof_index : this->fe_interface->dof_indices())
4253 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4259 local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
4265 template <
int dim,
int spacedim>
4266 template <
class InputVector>
4269 const InputVector &fe_function,
4270 std::vector<solution_hessian_type<typename InputVector::value_type>>
4273 std::vector<typename InputVector::value_type> local_dof_values(
4274 this->fe_interface->n_current_interface_dofs());
4275 this->get_local_dof_values(fe_function, local_dof_values);
4277 get_jump_in_function_hessians_from_local_dof_values(local_dof_values,
4283 template <
int dim,
int spacedim>
4284 template <
class InputVector>
4287 const InputVector &local_dof_values,
4288 std::vector<solution_hessian_type<typename InputVector::value_type>>
4293 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
4294 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4299 hessians[q_index] += local_dof_values[dof_index] *
4300 average_of_hessians(dof_index, q_index);
4306 template <
int dim,
int spacedim>
4307 template <
class InputVector>
4310 const InputVector &fe_function,
4311 std::vector<solution_hessian_type<typename InputVector::value_type>>
4314 std::vector<typename InputVector::value_type> local_dof_values(
4315 this->fe_interface->n_current_interface_dofs());
4316 this->get_local_dof_values(fe_function, local_dof_values);
4318 get_average_of_function_hessians_from_local_dof_values(local_dof_values,
4324 template <
int dim,
int spacedim>
4325 template <
class InputVector>
4329 const InputVector &local_dof_values,
4331 solution_third_derivative_type<typename InputVector::value_type>>
4332 &third_derivatives)
const
4335 this->fe_interface->n_quadrature_points);
4337 for (
const unsigned int dof_index : this->fe_interface->dof_indices())
4338 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4341 third_derivatives[q_index] = 0.;
4343 third_derivatives[q_index] +=
4344 local_dof_values[dof_index] *
4345 jump_in_third_derivatives(dof_index, q_index);
4351 template <
int dim,
int spacedim>
4352 template <
class InputVector>
4355 const InputVector &fe_function,
4357 solution_third_derivative_type<typename InputVector::value_type>>
4358 &third_derivatives)
const
4360 std::vector<typename InputVector::value_type> local_dof_values(
4361 this->fe_interface->n_current_interface_dofs());
4362 this->get_local_dof_values(fe_function, local_dof_values);
4364 get_jump_in_function_third_derivatives_from_local_dof_values(
4365 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
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
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
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
#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
boost::integer_range< IncrementableType > iota_view
typename internal::ProductTypeImpl< std::decay_t< T >, std::decay_t< U > >::type type