Reference documentation for deal.II version GIT relicensing-756-gc37f912904 2024-05-25 08:20:01+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
fe_interface_values.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2019 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_fe_interface_values_h
16#define dealii_fe_interface_values_h
17
18#include <deal.II/base/config.h>
19
21
23#include <deal.II/fe/mapping.h>
24
28
30
31#ifndef DOXYGEN
32template <int dim, int spacedim>
34#endif
35
41{
45 template <int dim, int spacedim = dim>
46 class Base
47 {
48 public:
53
54 protected:
59
64 template <class InputVector, class OutputVector>
65 void
66 get_local_dof_values(const InputVector &dof_values,
67 OutputVector &local_dof_values) const;
68 };
69
70
71
75 template <int dim, int spacedim = dim>
76 class Scalar : public Base<dim, spacedim>
77 {
78 public:
82 using value_type = double;
83
90
97
104
111 template <typename Number>
113
120 template <typename Number>
123
130 template <typename Number>
133
140 template <typename Number>
143
148 const unsigned int component);
149
175 value(const bool here_or_there,
176 const unsigned int interface_dof_index,
177 const unsigned int q_point) const;
178
197 jump_in_values(const unsigned int interface_dof_index,
198 const unsigned int q_point) const;
199
211 jump_in_gradients(const unsigned int interface_dof_index,
212 const unsigned int q_point) const;
213
225 jump_in_hessians(const unsigned int interface_dof_index,
226 const unsigned int q_point) const;
227
239 jump_in_third_derivatives(const unsigned int interface_dof_index,
240 const unsigned int q_point) const;
241
260 average_of_values(const unsigned int interface_dof_index,
261 const unsigned int q_point) const;
262
274 average_of_gradients(const unsigned int interface_dof_index,
275 const unsigned int q_point) const;
276
289 average_of_hessians(const unsigned int interface_dof_index,
290 const unsigned int q_point) const;
291
318 template <class InputVector>
319 void
321 const bool here_or_there,
322 const InputVector &fe_function,
324 &values) const;
325
348 template <class InputVector>
349 void
351 const bool here_or_there,
352 const InputVector &local_dof_values,
354 &values) const;
355
376 template <class InputVector>
377 void
379 const InputVector &fe_function,
381 &values) const;
382
390 template <class InputVector>
391 void
393 const InputVector &local_dof_values,
395 &values) const;
396
410 template <class InputVector>
411 void
413 const InputVector &fe_function,
415 &gradients) const;
416
424 template <class InputVector>
425 void
427 const InputVector &local_dof_values,
429 &gradients) const;
430
444 template <class InputVector>
445 void
447 const InputVector &fe_function,
449 &hessians) const;
450
458 template <class InputVector>
459 void
461 const InputVector &local_dof_values,
463 &hessians) const;
464
479 template <class InputVector>
480 void
482 const InputVector &fe_function,
483 std::vector<
485 &third_derivatives) const;
486
494 template <class InputVector>
495 void
497 const InputVector &local_dof_values,
498 std::vector<
500 &third_derivatives) const;
501
522 template <class InputVector>
523 void
525 const InputVector &fe_function,
527 &values) const;
528
536 template <class InputVector>
537 void
539 const InputVector &local_dof_values,
541 &values) const;
542
556 template <class InputVector>
557 void
559 const InputVector &fe_function,
561 &gradients) const;
562
570 template <class InputVector>
571 void
573 const InputVector &local_dof_values,
575 &gradients) const;
576
590 template <class InputVector>
591 void
593 const InputVector &fe_function,
595 &hessians) const;
596
604 template <class InputVector>
605 void
607 const InputVector &local_dof_values,
609 &hessians) const;
610
613 private:
618 };
619
620
621
625 template <int dim, int spacedim = dim>
626 class Vector : public Base<dim, spacedim>
627 {
628 public:
634
641
649
657
664 template <typename Number>
666
673 template <typename Number>
676
683 template <typename Number>
686
693 template <typename Number>
696
701 const unsigned int first_vector_component);
702
728 value(const bool here_or_there,
729 const unsigned int interface_dof_index,
730 const unsigned int q_point) const;
731
749 jump_in_values(const unsigned int interface_dof_index,
750 const unsigned int q_point) const;
751
762 jump_in_gradients(const unsigned int interface_dof_index,
763 const unsigned int q_point) const;
764
771 jump_gradient(const unsigned int interface_dof_index,
772 const unsigned int q_point) const;
773
785 jump_in_hessians(const unsigned int interface_dof_index,
786 const unsigned int q_point) const;
787
794 jump_hessian(const unsigned int interface_dof_index,
795 const unsigned int q_point) const;
796
808 jump_in_third_derivatives(const unsigned int interface_dof_index,
809 const unsigned int q_point) const;
810
828 average_of_values(const unsigned int interface_dof_index,
829 const unsigned int q_point) const;
830
841 average_of_gradients(const unsigned int interface_dof_index,
842 const unsigned int q_point) const;
843
856 average_of_hessians(const unsigned int interface_dof_index,
857 const unsigned int q_point) const;
858
865 average_hessian(const unsigned int interface_dof_index,
866 const unsigned int q_point) const;
867
894 template <class InputVector>
895 void
897 const bool here_or_there,
898 const InputVector &fe_function,
900 &values) const;
901
924 template <class InputVector>
925 void
927 const bool here_or_there,
928 const InputVector &local_dof_values,
930 &values) const;
931
952 template <class InputVector>
953 void
955 const InputVector &fe_function,
957 &values) const;
958
966 template <class InputVector>
967 void
969 const InputVector &local_dof_values,
971 &values) const;
972
986 template <class InputVector>
987 void
989 const InputVector &fe_function,
991 &gradients) const;
992
1000 template <class InputVector>
1001 void
1003 const InputVector &local_dof_values,
1005 &gradients) const;
1006
1020 template <class InputVector>
1021 void
1023 const InputVector &fe_function,
1025 &hessians) const;
1026
1034 template <class InputVector>
1035 void
1037 const InputVector &local_dof_values,
1039 &hessians) const;
1040
1055 template <class InputVector>
1056 void
1058 const InputVector &fe_function,
1059 std::vector<
1061 &third_derivatives) const;
1062
1070 template <class InputVector>
1071 void
1073 const InputVector &local_dof_values,
1074 std::vector<
1076 &third_derivatives) const;
1077
1098 template <class InputVector>
1099 void
1101 const InputVector &fe_function,
1103 &values) const;
1104
1112 template <class InputVector>
1113 void
1115 const InputVector &local_dof_values,
1117 &values) const;
1118
1132 template <class InputVector>
1133 void
1135 const InputVector &fe_function,
1137 &gradients) const;
1138
1146 template <class InputVector>
1147 void
1149 const InputVector &local_dof_values,
1151 &gradients) const;
1152
1166 template <class InputVector>
1167 void
1169 const InputVector &fe_function,
1171 &hessians) const;
1172
1180 template <class InputVector>
1181 void
1183 const InputVector &local_dof_values,
1185 &hessians) const;
1186
1189 private:
1194 };
1195} // namespace FEInterfaceViews
1196
1197
1198namespace internal
1199{
1201 {
1206 template <int dim, int spacedim, typename Extractor>
1208 {};
1209
1217 template <int dim, int spacedim>
1218 struct ViewType<dim, spacedim, FEValuesExtractors::Scalar>
1219 {
1220 using type = typename ::FEInterfaceViews::Scalar<dim, spacedim>;
1221 };
1222
1230 template <int dim, int spacedim>
1231 struct ViewType<dim, spacedim, FEValuesExtractors::Vector>
1232 {
1233 using type = typename ::FEInterfaceViews::Vector<dim, spacedim>;
1234 };
1235 } // namespace FEInterfaceViews
1236} // namespace internal
1237
1238namespace FEInterfaceViews
1239{
1244 template <int dim, int spacedim, typename Extractor>
1245 using View = typename ::internal::FEInterfaceViews::
1246 ViewType<dim, spacedim, Extractor>::type;
1247} // namespace FEInterfaceViews
1248
1249
1250
1275template <int dim, int spacedim = dim>
1277{
1278public:
1282 const unsigned int n_quadrature_points;
1283
1291 const Quadrature<dim - 1> &quadrature,
1292 const UpdateFlags update_flags);
1293
1301 const hp::QCollection<dim - 1> &quadrature,
1302 const UpdateFlags update_flags);
1303
1311 const Quadrature<dim - 1> &quadrature,
1312 const UpdateFlags update_flags);
1313
1319 const hp::MappingCollection<dim, spacedim> &mapping_collection,
1320 const hp::FECollection<dim, spacedim> &fe_collection,
1321 const hp::QCollection<dim - 1> &quadrature_collection,
1322 const UpdateFlags update_flags);
1323
1328 const hp::QCollection<dim - 1> &quadrature_collection,
1329 const UpdateFlags update_flags);
1330
1445 template <typename CellIteratorType, typename CellNeighborIteratorType>
1446 void
1447 reinit(const CellIteratorType &cell,
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,
1453 const unsigned int q_index = numbers::invalid_unsigned_int,
1454 const unsigned int mapping_index = numbers::invalid_unsigned_int,
1455 const unsigned int fe_index = numbers::invalid_unsigned_int);
1456
1483 template <typename CellIteratorType>
1484 void
1485 reinit(const CellIteratorType &cell,
1486 const unsigned int face_no,
1487 const unsigned int q_index = numbers::invalid_unsigned_int,
1488 const unsigned int mapping_index = numbers::invalid_unsigned_int,
1489 const unsigned int fe_index = numbers::invalid_unsigned_int);
1490
1499 get_fe_face_values(const unsigned int cell_index) const;
1500
1506
1511 get_fe() const;
1512
1516 const Quadrature<dim - 1> &
1518
1524
1530
1534 const hp::QCollection<dim - 1> &
1536
1541 bool
1543
1549
1557 get_cell(const unsigned int cell_index) const;
1558
1566 unsigned int
1567 get_face_number(const unsigned int cell_index) const;
1568
1580 bool
1582
1594 double
1595 JxW(const unsigned int quadrature_point) const;
1596
1602 const std::vector<double> &
1604
1614 const std::vector<Tensor<1, spacedim>> &
1616
1626
1632 const std::vector<Point<spacedim>> &
1634
1645 unsigned
1647
1677
1688 std::vector<types::global_dof_index>
1690
1703 std::array<unsigned int, 2>
1704 interface_dof_to_dof_indices(const unsigned int interface_dof_index) const;
1705
1715 normal(const unsigned int q_point_index) const;
1716
1747 double
1748 shape_value(const bool here_or_there,
1749 const unsigned int interface_dof_index,
1750 const unsigned int q_point,
1751 const unsigned int component = 0) const;
1752
1780 double
1781 jump_in_shape_values(const unsigned int interface_dof_index,
1782 const unsigned int q_point,
1783 const unsigned int component = 0) const;
1784
1799 jump_in_shape_gradients(const unsigned int interface_dof_index,
1800 const unsigned int q_point,
1801 const unsigned int component = 0) const;
1802
1818 jump_in_shape_hessians(const unsigned int interface_dof_index,
1819 const unsigned int q_point,
1820 const unsigned int component = 0) const;
1821
1836 jump_in_shape_3rd_derivatives(const unsigned int interface_dof_index,
1837 const unsigned int q_point,
1838 const unsigned int component = 0) const;
1839
1862 double
1863 average_of_shape_values(const unsigned int interface_dof_index,
1864 const unsigned int q_point,
1865 const unsigned int component = 0) const;
1866
1881 average_of_shape_gradients(const unsigned int interface_dof_index,
1882 const unsigned int q_point,
1883 const unsigned int component = 0) const;
1884
1900 average_of_shape_hessians(const unsigned int interface_dof_index,
1901 const unsigned int q_point,
1902 const unsigned int component = 0) const;
1903
1923 template <class InputVector>
1924 void
1926 const InputVector &fe_function,
1927 std::vector<typename InputVector::value_type> &values) const;
1928
1937 template <class InputVector>
1938 void
1940 const InputVector &fe_function,
1942 &gradients) const;
1943
1951 template <class InputVector>
1952 void
1954 const InputVector &fe_function,
1956 &hessians) const;
1957
1966 template <class InputVector>
1967 void
1969 const InputVector &fe_function,
1971 &third_derivatives) const;
1972
1988 template <class InputVector>
1989 void
1991 const InputVector &fe_function,
1992 std::vector<typename InputVector::value_type> &values) const;
1993
2001 template <class InputVector>
2002 void
2004 const InputVector &fe_function,
2006 &gradients) const;
2007
2015 template <class InputVector>
2016 void
2018 const InputVector &fe_function,
2020 &hessians) const;
2021
2041
2050
2055private:
2059 std::vector<types::global_dof_index> interface_dof_indices;
2060
2066 std::vector<std::array<unsigned int, 2>> dofmap;
2067
2073
2080
// non-hp data
2085
2089 std::unique_ptr<FEFaceValues<dim, spacedim>> internal_fe_face_values;
2090
2094 std::unique_ptr<FESubfaceValues<dim, spacedim>> internal_fe_subface_values;
2095
2099 std::unique_ptr<FEFaceValues<dim, spacedim>> internal_fe_face_values_neighbor;
2100
2104 std::unique_ptr<FESubfaceValues<dim, spacedim>>
2106
// non-hp data
2108
// hp data
2113
2118 std::unique_ptr<hp::FEFaceValues<dim, spacedim>> internal_hp_fe_face_values;
2119
2124 std::unique_ptr<hp::FESubfaceValues<dim, spacedim>>
2126
2131 std::unique_ptr<hp::FEFaceValues<dim, spacedim>>
2133
2138 std::unique_ptr<hp::FESubfaceValues<dim, spacedim>>
2140
2148 "The current function doesn't make sense when used with a "
2149 "FEInterfaceValues object with hp-capabilities.");
2150
2158 "The current function doesn't make sense when used with a "
2159 "FEInterfaceValues object without hp-capabilities.");
2160
// hp data
2162
2163 /*
2164 * Make the view classes friends of this class, since they
2165 * access internal data.
2166 */
2167 template <int, int>
2169 template <int, int>
2171};
2172
2173
2174
2175#ifndef DOXYGEN
2176
2177/*---------------------- Inline functions ---------------------*/
2178
2179template <int dim, int spacedim>
2181 const Mapping<dim, spacedim> &mapping,
2183 const Quadrature<dim - 1> &quadrature,
2184 const UpdateFlags update_flags)
2185 : n_quadrature_points(quadrature.size())
2186 , fe_face_values(nullptr)
2187 , fe_face_values_neighbor(nullptr)
2188 , internal_fe_face_values(
2189 std::make_unique<FEFaceValues<dim, spacedim>>(mapping,
2190 fe,
2191 quadrature,
2192 update_flags))
2193 , internal_fe_subface_values(
2194 std::make_unique<FESubfaceValues<dim, spacedim>>(mapping,
2195 fe,
2196 quadrature,
2197 update_flags))
2198 , internal_fe_face_values_neighbor(
2199 std::make_unique<FEFaceValues<dim, spacedim>>(mapping,
2200 fe,
2201 quadrature,
2202 update_flags))
2203 , internal_fe_subface_values_neighbor(
2204 std::make_unique<FESubfaceValues<dim, spacedim>>(mapping,
2205 fe,
2206 quadrature,
2207 update_flags))
2208{}
2209
2210
2211
2212template <int dim, int spacedim>
2215 const Quadrature<dim - 1> &quadrature,
2216 const UpdateFlags update_flags)
2218 fe.reference_cell().template get_default_linear_mapping<dim, spacedim>(),
2219 fe,
2220 quadrature,
2221 update_flags)
2222{}
2223
2224
2225
2226template <int dim, int spacedim>
2228 const Mapping<dim, spacedim> &mapping,
2230 const hp::QCollection<dim - 1> &quadrature,
2231 const UpdateFlags update_flags)
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(
2236 std::make_unique<FEFaceValues<dim, spacedim>>(mapping,
2237 fe,
2238 quadrature,
2239 update_flags))
2240 , internal_fe_subface_values(
2241 std::make_unique<FESubfaceValues<dim, spacedim>>(mapping,
2242 fe,
2243 quadrature,
2244 update_flags))
2245 , internal_fe_face_values_neighbor(
2246 std::make_unique<FEFaceValues<dim, spacedim>>(mapping,
2247 fe,
2248 quadrature[0],
2249 update_flags))
2250 , internal_fe_subface_values_neighbor(
2251 std::make_unique<FESubfaceValues<dim, spacedim>>(mapping,
2252 fe,
2253 quadrature[0],
2254 update_flags))
2255{}
2256
2257
2258
2259template <int dim, int spacedim>
2261 const hp::MappingCollection<dim, spacedim> &mapping_collection,
2262 const hp::FECollection<dim, spacedim> &fe_collection,
2263 const hp::QCollection<dim - 1> &quadrature_collection,
2264 const UpdateFlags update_flags)
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(
2269 std::make_unique<hp::FEFaceValues<dim, spacedim>>(mapping_collection,
2270 fe_collection,
2271 quadrature_collection,
2272 update_flags))
2273 , internal_hp_fe_subface_values(
2274 std::make_unique<hp::FESubfaceValues<dim, spacedim>>(
2275 mapping_collection,
2276 fe_collection,
2277 quadrature_collection,
2278 update_flags))
2279 , internal_hp_fe_face_values_neighbor(
2280 std::make_unique<hp::FEFaceValues<dim, spacedim>>(mapping_collection,
2281 fe_collection,
2282 quadrature_collection,
2283 update_flags))
2284 , internal_hp_fe_subface_values_neighbor(
2285 std::make_unique<hp::FESubfaceValues<dim, spacedim>>(
2286 mapping_collection,
2287 fe_collection,
2288 quadrature_collection,
2289 update_flags))
2290{
2291 AssertDimension(dim, spacedim);
2292}
2293
2294
2295
2296template <int dim, int spacedim>
2298 const hp::FECollection<dim, spacedim> &fe_collection,
2299 const hp::QCollection<dim - 1> &quadrature_collection,
2300 const UpdateFlags update_flags)
2301 : FEInterfaceValues(fe_collection.get_reference_cell_default_linear_mapping(),
2302 fe_collection,
2303 quadrature_collection,
2304 update_flags)
2305{}
2306
2307
2308
2309template <int dim, int spacedim>
2310template <typename CellIteratorType, typename CellNeighborIteratorType>
2311void
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)
2322{
2323 Assert(internal_fe_face_values || internal_hp_fe_face_values,
2325
2326 if (internal_fe_face_values)
2327 {
2328 if (sub_face_no == numbers::invalid_unsigned_int)
2329 {
2330 internal_fe_face_values->reinit(cell, face_no);
2331 fe_face_values = internal_fe_face_values.get();
2332 }
2333 else
2334 {
2335 internal_fe_subface_values->reinit(cell, face_no, sub_face_no);
2336 fe_face_values = internal_fe_subface_values.get();
2337 }
2338 if (sub_face_no_neighbor == numbers::invalid_unsigned_int)
2339 {
2340 internal_fe_face_values_neighbor->reinit(cell_neighbor,
2341 face_no_neighbor);
2342 fe_face_values_neighbor = internal_fe_face_values_neighbor.get();
2343 }
2344 else
2345 {
2346 internal_fe_subface_values_neighbor->reinit(cell_neighbor,
2347 face_no_neighbor,
2348 sub_face_no_neighbor);
2349 fe_face_values_neighbor = internal_fe_subface_values_neighbor.get();
2350 }
2351
2352 AssertDimension(fe_face_values->n_quadrature_points,
2353 fe_face_values_neighbor->n_quadrature_points);
2354
2355 const_cast<unsigned int &>(this->n_quadrature_points) =
2356 fe_face_values->n_quadrature_points;
2357 }
2358 else if (internal_hp_fe_face_values)
2359 {
2360 unsigned int used_q_index = q_index;
2361 unsigned int used_mapping_index = mapping_index;
2362
2363 // First check. If there is only one element in a collection, and if none
2364 // had been specified explicitly, then that's clearly the one to take:
2365 if (used_q_index == numbers::invalid_unsigned_int)
2366 if (internal_hp_fe_face_values->get_quadrature_collection().size() == 1)
2367 used_q_index = 0;
2368
2369 if (used_mapping_index == numbers::invalid_unsigned_int)
2370 if (internal_hp_fe_face_values->get_mapping_collection().size() == 1)
2371 used_mapping_index = 0;
2372
2373 // Second check: See if the two quadrature objects are the same, because
2374 // in that case it does not matter which one we use. Unfortunately, we
2375 // currently have no way of testing that two mapping objects are the
2376 // same :-(
2377 if (used_q_index == numbers::invalid_unsigned_int)
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();
2383
2384 // Third check, if the above did not already suffice. We see if we
2385 // can get somewhere via the dominated's finite element index.
2386 const unsigned int dominated_fe_index =
2387 ((used_q_index == numbers::invalid_unsigned_int) ||
2388 (used_mapping_index == numbers::invalid_unsigned_int) ?
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);
2392
2393 if (used_q_index == numbers::invalid_unsigned_int)
2394 {
2395 Assert(dominated_fe_index != numbers::invalid_fe_index,
2396 ExcMessage(
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;
2404 }
2405
2406 if (used_mapping_index == numbers::invalid_unsigned_int)
2407 {
2408 Assert(dominated_fe_index != numbers::invalid_fe_index,
2409 ExcMessage(
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;
2417 }
2418
2419 // Same as if above, but when hp is enabled.
2420 if (sub_face_no == numbers::invalid_unsigned_int)
2421 {
2422 internal_hp_fe_face_values->reinit(
2423 cell, face_no, used_q_index, used_mapping_index, fe_index);
2424 fe_face_values = &const_cast<FEFaceValues<dim, spacedim> &>(
2425 internal_hp_fe_face_values->get_present_fe_values());
2426 }
2427 else
2428 {
2429 internal_hp_fe_subface_values->reinit(
2430 cell, face_no, sub_face_no, used_q_index, used_mapping_index);
2431
2432 fe_face_values = &const_cast<FESubfaceValues<dim, spacedim> &>(
2433 internal_hp_fe_subface_values->get_present_fe_values());
2434 }
2435 if (sub_face_no_neighbor == numbers::invalid_unsigned_int)
2436 {
2437 internal_hp_fe_face_values_neighbor->reinit(cell_neighbor,
2438 face_no_neighbor,
2439 used_q_index,
2440 used_mapping_index);
2441
2442 fe_face_values_neighbor = &const_cast<FEFaceValues<dim, spacedim> &>(
2443 internal_hp_fe_face_values_neighbor->get_present_fe_values());
2444 }
2445 else
2446 {
2447 internal_hp_fe_subface_values_neighbor->reinit(cell_neighbor,
2448 face_no_neighbor,
2449 sub_face_no_neighbor,
2450 used_q_index,
2451 used_mapping_index);
2452
2453 fe_face_values_neighbor =
2454 &const_cast<FESubfaceValues<dim, spacedim> &>(
2455 internal_hp_fe_subface_values_neighbor->get_present_fe_values());
2456 }
2457
2458 AssertDimension(fe_face_values->n_quadrature_points,
2459 fe_face_values_neighbor->n_quadrature_points);
2460
2461 const_cast<unsigned int &>(this->n_quadrature_points) =
2462 fe_face_values->n_quadrature_points;
2463 }
2464
2465 // Set up dof mapping and remove duplicates (for continuous elements).
2466 {
2467 // Get dof indices first:
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);
2474
2475 // Fill a map from the global dof index to the left and right
2476 // local index.
2477 std::map<types::global_dof_index, std::pair<unsigned int, unsigned int>>
2478 tempmap;
2479 std::pair<unsigned int, unsigned int> invalid_entry(
2481
2482 for (unsigned int i = 0; i < v.size(); ++i)
2483 {
2484 // If not already existing, add an invalid entry:
2485 auto result = tempmap.insert(std::make_pair(v[i], invalid_entry));
2486 result.first->second.first = i;
2487 }
2488
2489 for (unsigned int i = 0; i < v2.size(); ++i)
2490 {
2491 // If not already existing, add an invalid entry:
2492 auto result = tempmap.insert(std::make_pair(v2[i], invalid_entry));
2493 result.first->second.second = i;
2494 }
2495
2496 // Transfer from the map to the sorted std::vectors.
2497 dofmap.resize(tempmap.size());
2498 interface_dof_indices.resize(tempmap.size());
2499 unsigned int idx = 0;
2500 for (auto &x : tempmap)
2501 {
2502 interface_dof_indices[idx] = x.first;
2503 dofmap[idx] = {{x.second.first, x.second.second}};
2504 ++idx;
2505 }
2506 }
2507}
2508
2509
2510
2511template <int dim, int spacedim>
2512template <typename CellIteratorType>
2513void
2514FEInterfaceValues<dim, spacedim>::reinit(const CellIteratorType &cell,
2515 const unsigned int face_no,
2516 const unsigned int q_index,
2517 const unsigned int mapping_index,
2518 const unsigned int fe_index)
2519{
2520 Assert(internal_fe_face_values || internal_hp_fe_face_values,
2522
2523 if (internal_fe_face_values)
2524 {
2525 internal_fe_face_values->reinit(cell, face_no);
2526 fe_face_values = internal_fe_face_values.get();
2527 fe_face_values_neighbor = nullptr;
2528
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);
2531 }
2532 else if (internal_hp_fe_face_values)
2533 {
2534 internal_hp_fe_face_values->reinit(
2535 cell, face_no, q_index, mapping_index, fe_index);
2536 fe_face_values = &const_cast<FEFaceValues<dim> &>(
2537 internal_hp_fe_face_values->get_present_fe_values());
2538 fe_face_values_neighbor = nullptr;
2539
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);
2542 }
2543
2544 dofmap.resize(interface_dof_indices.size());
2545 for (unsigned int i = 0; i < interface_dof_indices.size(); ++i)
2546 {
2547 dofmap[i] = {{i, numbers::invalid_unsigned_int}};
2548 }
2549}
2550
2551
2552
2553template <int dim, int spacedim>
2554inline double
2555FEInterfaceValues<dim, spacedim>::JxW(const unsigned int q) const
2556{
2557 Assert(fe_face_values != nullptr,
2558 ExcMessage("This call requires a call to reinit() first."));
2559 return fe_face_values->JxW(q);
2560}
2561
2562
2563
2564template <int dim, int spacedim>
2565const std::vector<double> &
2567{
2568 Assert(fe_face_values != nullptr,
2569 ExcMessage("This call requires a call to reinit() first."));
2570 return fe_face_values->get_JxW_values();
2571}
2572
2573
2574
2575template <int dim, int spacedim>
2576const std::vector<Tensor<1, spacedim>> &
2578{
2579 Assert(fe_face_values != nullptr,
2580 ExcMessage("This call requires a call to reinit() first."));
2581 return fe_face_values->get_normal_vectors();
2582}
2583
2584
2585
2586template <int dim, int spacedim>
2589{
2590 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2591 return internal_fe_face_values->get_mapping();
2592}
2593
2594
2595
2596template <int dim, int spacedim>
2599{
2600 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2601 return internal_fe_face_values->get_fe();
2602}
2603
2604
2605
2606template <int dim, int spacedim>
2607const Quadrature<dim - 1> &
2609{
2610 Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2611 return internal_fe_face_values->get_quadrature();
2612}
2613
2614
2615
2616template <int dim, int spacedim>
2619{
2620 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2621 return internal_hp_fe_face_values->get_mapping_collection();
2622}
2623
2624
2625
2626template <int dim, int spacedim>
2629{
2630 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2631 return internal_hp_fe_face_values->get_fe_collection();
2632}
2633
2634
2635
2636template <int dim, int spacedim>
2637const hp::QCollection<dim - 1> &
2639{
2640 Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2641 return internal_hp_fe_face_values->get_quadrature_collection();
2642}
2643
2644
2645
2646template <int dim, int spacedim>
2647bool
2649{
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)
2653 {
2654 Assert(!internal_fe_face_values, ExcInternalError());
2655 Assert(!internal_fe_subface_values, ExcInternalError());
2656 Assert(!internal_fe_face_values_neighbor, ExcInternalError());
2657 Assert(!internal_fe_subface_values_neighbor, ExcInternalError());
2658
2659 return true;
2660 }
2661
2662 Assert(internal_fe_face_values || internal_fe_subface_values ||
2663 internal_fe_face_values_neighbor ||
2664 internal_fe_subface_values_neighbor,
2666 Assert(!internal_hp_fe_face_values, ExcInternalError());
2667 Assert(!internal_hp_fe_subface_values, ExcInternalError());
2668 Assert(!internal_hp_fe_face_values_neighbor, ExcInternalError());
2669 Assert(!internal_hp_fe_subface_values_neighbor, ExcInternalError());
2670
2671 return false;
2672}
2673
2674
2675
2676template <int dim, int spacedim>
2679{
2680 return {0U, n_quadrature_points};
2681}
2682
2683
2684
2685template <int dim, int spacedim>
2686const std::vector<Point<spacedim>> &
2688{
2689 Assert(fe_face_values != nullptr,
2690 ExcMessage("This call requires a call to reinit() first."));
2691 return fe_face_values->get_quadrature_points();
2692}
2693
2694
2695
2696template <int dim, int spacedim>
2699{
2700 if (has_hp_capabilities())
2701 return internal_hp_fe_face_values->get_update_flags();
2702 else
2703 return internal_fe_face_values->get_update_flags();
2704}
2705
2706
2707
2708template <int dim, int spacedim>
2711{
2712 return get_fe_face_values(cell_index).get_cell();
2713}
2714
2715
2716
2717template <int dim, int spacedim>
2718inline unsigned int
2720 const unsigned int cell_index) const
2721{
2722 return get_fe_face_values(cell_index).get_face_number();
2723}
2724
2725
2726
2727template <int dim, int spacedim>
2728unsigned
2730{
2731 Assert(
2732 interface_dof_indices.size() > 0,
2733 ExcMessage(
2734 "n_current_interface_dofs() is only available after a call to reinit()."));
2735 return interface_dof_indices.size();
2736}
2737
2738
2739
2740template <int dim, int spacedim>
2743{
2744 return {0U, n_current_interface_dofs()};
2745}
2746
2747
2748
2749template <int dim, int spacedim>
2750bool
2752{
2753 return fe_face_values_neighbor == nullptr;
2754}
2755
2756
2757
2758template <int dim, int spacedim>
2759std::vector<types::global_dof_index>
2761{
2762 return interface_dof_indices;
2763}
2764
2765
2766
2767template <int dim, int spacedim>
2768std::array<unsigned int, 2>
2770 const unsigned int interface_dof_index) const
2771{
2772 AssertIndexRange(interface_dof_index, n_current_interface_dofs());
2773 return dofmap[interface_dof_index];
2774}
2775
2776
2777
2778template <int dim, int spacedim>
2781 const unsigned int cell_index) const
2782{
2784 Assert(
2785 cell_index == 0 || !at_boundary(),
2786 ExcMessage(
2787 "You are on a boundary, so you can only ask for the first FEFaceValues object."));
2788
2789 return (cell_index == 0) ? *fe_face_values : *fe_face_values_neighbor;
2790}
2791
2792
2793
2794template <int dim, int spacedim>
2796FEInterfaceValues<dim, spacedim>::normal(const unsigned int q_point_index) const
2797{
2798 return fe_face_values->normal_vector(q_point_index);
2799}
2800
2801
2802
2803template <int dim, int spacedim>
2804double
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
2810{
2811 const auto dof_pair = dofmap[interface_dof_index];
2812
2813 if (here_or_there && dof_pair[0] != numbers::invalid_unsigned_int)
2814 return get_fe_face_values(0).shape_value_component(dof_pair[0],
2815 q_point,
2816 component);
2817 if (!here_or_there && dof_pair[1] != numbers::invalid_unsigned_int)
2818 return get_fe_face_values(1).shape_value_component(dof_pair[1],
2819 q_point,
2820 component);
2821
2822 return 0.0;
2823}
2824
2825
2826
2827template <int dim, int spacedim>
2828double
2830 const unsigned int interface_dof_index,
2831 const unsigned int q_point,
2832 const unsigned int component) const
2833{
2834 const auto dof_pair = dofmap[interface_dof_index];
2835
2836 double value = 0.0;
2837
2838 if (dof_pair[0] != numbers::invalid_unsigned_int)
2839 value += get_fe_face_values(0).shape_value_component(dof_pair[0],
2840 q_point,
2841 component);
2842 if (dof_pair[1] != numbers::invalid_unsigned_int)
2843 value -= get_fe_face_values(1).shape_value_component(dof_pair[1],
2844 q_point,
2845 component);
2846 return value;
2847}
2848
2849
2850
2851template <int dim, int spacedim>
2852double
2854 const unsigned int interface_dof_index,
2855 const unsigned int q_point,
2856 const unsigned int component) const
2857{
2858 const auto dof_pair = dofmap[interface_dof_index];
2859
2860 if (at_boundary())
2861 return get_fe_face_values(0).shape_value_component(dof_pair[0],
2862 q_point,
2863 component);
2864
2865 double value = 0.0;
2866
2867 if (dof_pair[0] != numbers::invalid_unsigned_int)
2868 value += 0.5 * get_fe_face_values(0).shape_value_component(dof_pair[0],
2869 q_point,
2870 component);
2871 if (dof_pair[1] != numbers::invalid_unsigned_int)
2872 value += 0.5 * get_fe_face_values(1).shape_value_component(dof_pair[1],
2873 q_point,
2874 component);
2875
2876 return value;
2877}
2878
2879
2880
2881template <int dim, int spacedim>
2884 const unsigned int interface_dof_index,
2885 const unsigned int q_point,
2886 const unsigned int component) const
2887{
2888 const auto dof_pair = dofmap[interface_dof_index];
2889
2890 if (at_boundary())
2891 return get_fe_face_values(0).shape_grad_component(dof_pair[0],
2892 q_point,
2893 component);
2894
2896
2897 if (dof_pair[0] != numbers::invalid_unsigned_int)
2898 value += 0.5 * get_fe_face_values(0).shape_grad_component(dof_pair[0],
2899 q_point,
2900 component);
2901 if (dof_pair[1] != numbers::invalid_unsigned_int)
2902 value += 0.5 * get_fe_face_values(1).shape_grad_component(dof_pair[1],
2903 q_point,
2904 component);
2905
2906 return value;
2907}
2908
2909
2910
2911template <int dim, int spacedim>
2914 const unsigned int interface_dof_index,
2915 const unsigned int q_point,
2916 const unsigned int component) const
2917{
2918 const auto dof_pair = dofmap[interface_dof_index];
2919
2920 if (at_boundary())
2921 return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
2922 q_point,
2923 component);
2924
2926
2927 if (dof_pair[0] != numbers::invalid_unsigned_int)
2928 value += 0.5 * get_fe_face_values(0).shape_hessian_component(dof_pair[0],
2929 q_point,
2930 component);
2931 if (dof_pair[1] != numbers::invalid_unsigned_int)
2932 value += 0.5 * get_fe_face_values(1).shape_hessian_component(dof_pair[1],
2933 q_point,
2934 component);
2935
2936 return value;
2937}
2938
2939
2940
2941template <int dim, int spacedim>
2944 const unsigned int interface_dof_index,
2945 const unsigned int q_point,
2946 const unsigned int component) const
2947{
2948 const auto dof_pair = dofmap[interface_dof_index];
2949
2950 if (at_boundary())
2951 return get_fe_face_values(0).shape_grad_component(dof_pair[0],
2952 q_point,
2953 component);
2954
2956
2957 if (dof_pair[0] != numbers::invalid_unsigned_int)
2958 value += get_fe_face_values(0).shape_grad_component(dof_pair[0],
2959 q_point,
2960 component);
2961 if (dof_pair[1] != numbers::invalid_unsigned_int)
2962 value -= get_fe_face_values(1).shape_grad_component(dof_pair[1],
2963 q_point,
2964 component);
2965
2966 return value;
2967}
2968
2969
2970
2971template <int dim, int spacedim>
2974 const unsigned int interface_dof_index,
2975 const unsigned int q_point,
2976 const unsigned int component) const
2977{
2978 const auto dof_pair = dofmap[interface_dof_index];
2979
2980 if (at_boundary())
2981 return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
2982 q_point,
2983 component);
2984
2986
2987 if (dof_pair[0] != numbers::invalid_unsigned_int)
2988 value += get_fe_face_values(0).shape_hessian_component(dof_pair[0],
2989 q_point,
2990 component);
2991 if (dof_pair[1] != numbers::invalid_unsigned_int)
2992 value -= get_fe_face_values(1).shape_hessian_component(dof_pair[1],
2993 q_point,
2994 component);
2995
2996 return value;
2997}
2998
2999
3000
3001template <int dim, int spacedim>
3004 const unsigned int interface_dof_index,
3005 const unsigned int q_point,
3006 const unsigned int component) const
3007{
3008 const auto dof_pair = dofmap[interface_dof_index];
3009
3010 if (at_boundary())
3011 return get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3012 q_point,
3013 component);
3014
3016
3017 if (dof_pair[0] != numbers::invalid_unsigned_int)
3018 value += get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3019 q_point,
3020 component);
3021 if (dof_pair[1] != numbers::invalid_unsigned_int)
3022 value -= get_fe_face_values(1).shape_3rd_derivative_component(dof_pair[1],
3023 q_point,
3024 component);
3025
3026 return value;
3027}
3028
3029
3030
3031template <int dim, int spacedim>
3032template <class InputVector>
3033void
3035 const InputVector &fe_function,
3036 std::vector<typename InputVector::value_type> &values) const
3037{
3038 AssertDimension(values.size(), n_quadrature_points);
3039
3041 this->operator[](scalar).get_jump_in_function_values(fe_function, values);
3042}
3043
3044
3045
3046template <int dim, int spacedim>
3047template <class InputVector>
3048void
3050 const InputVector &fe_function,
3052 const
3053{
3054 AssertDimension(gradients.size(), n_quadrature_points);
3055
3057 this->operator[](scalar).get_jump_in_function_gradients(fe_function,
3058 gradients);
3059}
3060
3061
3062
3063template <int dim, int spacedim>
3064template <class InputVector>
3065void
3067 const InputVector &fe_function,
3069 const
3070{
3071 AssertDimension(hessians.size(), n_quadrature_points);
3072
3074 this->operator[](scalar).get_jump_in_function_hessians(fe_function, hessians);
3075}
3076
3077
3078
3079template <int dim, int spacedim>
3080template <class InputVector>
3081void
3083 const InputVector &fe_function,
3085 &third_derivatives) const
3086{
3087 AssertDimension(third_derivatives.size(), n_quadrature_points);
3088
3090 this->operator[](scalar).get_jump_in_function_third_derivatives(
3091 fe_function, third_derivatives);
3092}
3093
3094
3095
3096template <int dim, int spacedim>
3097template <class InputVector>
3098void
3100 const InputVector &fe_function,
3101 std::vector<typename InputVector::value_type> &values) const
3102{
3103 AssertDimension(values.size(), n_quadrature_points);
3104
3106 this->operator[](scalar).get_average_of_function_values(fe_function, values);
3107}
3108
3109
3110
3111template <int dim, int spacedim>
3112template <class InputVector>
3113void
3115 const InputVector &fe_function,
3117 const
3118{
3119 AssertDimension(gradients.size(), n_quadrature_points);
3120
3122 this->operator[](scalar).get_average_of_function_gradients(fe_function,
3123 gradients);
3124}
3125
3126
3127
3128template <int dim, int spacedim>
3129template <class InputVector>
3130void
3132 const InputVector &fe_function,
3134 const
3135{
3136 AssertDimension(hessians.size(), n_quadrature_points);
3137
3139 this->operator[](scalar).get_average_of_function_hessians(fe_function,
3140 hessians);
3141}
3142
3143
3144
3145/*------------ Inline functions: FEInterfaceValues------------*/
3146template <int dim, int spacedim>
3149 const FEValuesExtractors::Scalar &scalar) const
3150{
3151 const unsigned int n_components =
3152 (this->has_hp_capabilities() ? this->get_fe_collection().n_components() :
3153 this->get_fe().n_components());
3154 (void)n_components;
3155 AssertIndexRange(scalar.component, n_components);
3156 return FEInterfaceViews::Scalar<dim, spacedim>(*this, scalar.component);
3157}
3158
3159
3160
3161template <int dim, int spacedim>
3164 const FEValuesExtractors::Vector &vector) const
3165{
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 =
3172 0);
3173 (void)n_components;
3174 (void)n_vectors;
3175 AssertIndexRange(vector.first_vector_component, n_vectors);
3177 vector.first_vector_component);
3178}
3179
3180
3181
3182namespace FEInterfaceViews
3183{
3184 template <int dim, int spacedim>
3186 const FEInterfaceValues<dim, spacedim> &fe_interface)
3187 : fe_interface(&fe_interface)
3188 {}
3189
3190
3191
3192 template <int dim, int spacedim>
3193 Scalar<dim, spacedim>::Scalar(
3194 const FEInterfaceValues<dim, spacedim> &fe_interface,
3195 const unsigned int component)
3196 : Base<dim, spacedim>(fe_interface)
3197 , extractor(component)
3198 {}
3199
3200
3201
3202 template <int dim, int spacedim>
3203 template <class InputVector, class OutputVector>
3204 void
3205 Base<dim, spacedim>::get_local_dof_values(
3206 const InputVector &dof_values,
3207 OutputVector &local_dof_values) const
3208 {
3209 const auto &interface_dof_indices =
3210 this->fe_interface->get_interface_dof_indices();
3211
3212 AssertDimension(interface_dof_indices.size(), local_dof_values.size());
3213
3214 for (const unsigned int i : this->fe_interface->dof_indices())
3215 local_dof_values[i] = dof_values(interface_dof_indices[i]);
3216 }
3217
3218
3219
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
3225 {
3226 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3227
3228 if (here_or_there && dof_pair[0] != numbers::invalid_unsigned_int)
3229 return (*(this->fe_interface->fe_face_values))[extractor].value(
3230 dof_pair[0], q_point);
3231
3232 if (!here_or_there && dof_pair[1] != numbers::invalid_unsigned_int)
3233 return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3234 dof_pair[1], q_point);
3235
3236 return 0.0;
3237 }
3238
3239
3240
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
3245 {
3246 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3247
3248 value_type value = 0.0;
3249
3250 if (dof_pair[0] != numbers::invalid_unsigned_int)
3251 value +=
3252 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3253 q_point);
3254
3255 if (dof_pair[1] != numbers::invalid_unsigned_int)
3256 value -=
3257 (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3258 dof_pair[1], q_point);
3259
3260 return value;
3261 }
3262
3263
3264
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
3270 {
3271 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3272
3273 if (this->fe_interface->at_boundary())
3274 return (*(this->fe_interface->fe_face_values))[extractor].value(
3275 dof_pair[0], q_point);
3276
3277 value_type value = 0.0;
3278
3279 if (dof_pair[0] != numbers::invalid_unsigned_int)
3280 value +=
3281 0.5 *
3282 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3283 q_point);
3284
3285 if (dof_pair[1] != numbers::invalid_unsigned_int)
3286 value +=
3287 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3288 dof_pair[1], q_point);
3289
3290 return value;
3291 }
3292
3293
3294
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
3300 {
3301 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3302
3303 if (this->fe_interface->at_boundary())
3304 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3305 dof_pair[0], q_point);
3306
3307 gradient_type value;
3308
3309 if (dof_pair[0] != numbers::invalid_unsigned_int)
3310 value +=
3311 0.5 *
3312 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3313 q_point);
3314
3315 if (dof_pair[1] != numbers::invalid_unsigned_int)
3316 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3317 .gradient(dof_pair[1], q_point);
3318
3319 return value;
3320 }
3321
3322
3323
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
3329 {
3330 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3331
3332 if (this->fe_interface->at_boundary())
3333 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3334 dof_pair[0], q_point);
3335
3336 gradient_type value;
3337
3338 if (dof_pair[0] != numbers::invalid_unsigned_int)
3339 value +=
3340 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3341 q_point);
3342
3343 if (dof_pair[1] != numbers::invalid_unsigned_int)
3344 value -=
3345 (*(this->fe_interface->fe_face_values_neighbor))[extractor].gradient(
3346 dof_pair[1], q_point);
3347
3348 return value;
3349 }
3350
3351
3352
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
3358 {
3359 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3360
3361 if (this->fe_interface->at_boundary())
3362 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3363 dof_pair[0], q_point);
3364
3365 hessian_type value;
3366
3367 if (dof_pair[0] != numbers::invalid_unsigned_int)
3368 value +=
3369 0.5 *
3370 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3371 q_point);
3372
3373 if (dof_pair[1] != numbers::invalid_unsigned_int)
3374 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3375 .hessian(dof_pair[1], q_point);
3376
3377 return value;
3378 }
3379
3380
3381
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
3387 {
3388 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3389
3390 if (this->fe_interface->at_boundary())
3391 return (*(this->fe_interface->fe_face_values))[extractor]
3392 .third_derivative(dof_pair[0], q_point);
3393
3394 third_derivative_type value;
3395
3396 if (dof_pair[0] != numbers::invalid_unsigned_int)
3397 value +=
3398 (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
3399 dof_pair[0], q_point);
3400
3401 if (dof_pair[1] != numbers::invalid_unsigned_int)
3402 value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3403 .third_derivative(dof_pair[1], q_point);
3404
3405 return value;
3406 }
3407
3408
3409
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
3415 {
3416 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3417
3418 if (this->fe_interface->at_boundary())
3419 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3420 dof_pair[0], q_point);
3421
3422 hessian_type value;
3423
3424 if (dof_pair[0] != numbers::invalid_unsigned_int)
3425 value +=
3426 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3427 q_point);
3428
3429 if (dof_pair[1] != numbers::invalid_unsigned_int)
3430 value -=
3431 (*(this->fe_interface->fe_face_values_neighbor))[extractor].hessian(
3432 dof_pair[1], q_point);
3433
3434 return value;
3435 }
3436
3437
3438
3439 template <int dim, int spacedim>
3440 template <class InputVector>
3441 void
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)
3446 const
3447 {
3448 AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
3449
3450 for (const auto dof_index : this->fe_interface->dof_indices())
3451 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3452 {
3453 if (dof_index == 0)
3454 values[q_index] = 0.;
3455
3456 values[q_index] += local_dof_values[dof_index] *
3457 value(here_or_there, dof_index, q_index);
3458 }
3459 }
3460
3461
3462
3463 template <int dim, int spacedim>
3464 template <class InputVector>
3465 void
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)
3470 const
3471 {
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);
3475
3476 get_function_values_from_local_dof_values(here_or_there,
3477 local_dof_values,
3478 values);
3479 }
3480
3481
3482
3483 template <int dim, int spacedim>
3484 template <class InputVector>
3485 void
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)
3489 const
3490 {
3491 AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
3492
3493 for (const auto dof_index : this->fe_interface->dof_indices())
3494 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3495 {
3496 if (dof_index == 0)
3497 values[q_index] = 0.;
3498
3499 values[q_index] +=
3500 local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
3501 }
3502 }
3503
3504
3505
3506 template <int dim, int spacedim>
3507 template <class InputVector>
3508 void
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)
3512 const
3513 {
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);
3517
3518 get_jump_in_function_values_from_local_dof_values(local_dof_values, values);
3519 }
3520
3521
3522
3523 template <int dim, int spacedim>
3524 template <class InputVector>
3525 void
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>>
3529 &gradients) const
3530 {
3531 AssertDimension(gradients.size(), this->fe_interface->n_quadrature_points);
3532
3533 for (const auto dof_index : this->fe_interface->dof_indices())
3534 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3535 {
3536 if (dof_index == 0)
3537 gradients[q_index] = 0.;
3538
3539 gradients[q_index] +=
3540 local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
3541 }
3542 }
3543
3544
3545
3546 template <int dim, int spacedim>
3547 template <class InputVector>
3548 void
3549 Scalar<dim, spacedim>::get_jump_in_function_gradients(
3550 const InputVector &fe_function,
3551 std::vector<solution_gradient_type<typename InputVector::value_type>>
3552 &gradients) const
3553 {
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);
3557
3558 get_jump_in_function_gradients_from_local_dof_values(local_dof_values,
3559 gradients);
3560 }
3561
3562
3563
3564 template <int dim, int spacedim>
3565 template <class InputVector>
3566 void
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)
3570 const
3571 {
3572 AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
3573
3574 for (const auto dof_index : this->fe_interface->dof_indices())
3575 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3576 {
3577 if (dof_index == 0)
3578 values[q_index] = 0.;
3579
3580 values[q_index] +=
3581 local_dof_values[dof_index] * average_of_values(dof_index, q_index);
3582 }
3583 }
3584
3585
3586
3587 template <int dim, int spacedim>
3588 template <class InputVector>
3589 void
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)
3593 const
3594 {
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);
3598
3599 get_average_of_function_values_from_local_dof_values(local_dof_values,
3600 values);
3601 }
3602
3603
3604
3605 template <int dim, int spacedim>
3606 template <class InputVector>
3607 void
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>>
3612 &gradients) const
3613 {
3614 AssertDimension(gradients.size(), this->fe_interface->n_quadrature_points);
3615
3616 for (const auto dof_index : this->fe_interface->dof_indices())
3617 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3618 {
3619 if (dof_index == 0)
3620 gradients[q_index] = 0.;
3621
3622 gradients[q_index] += local_dof_values[dof_index] *
3623 average_of_gradients(dof_index, q_index);
3624 }
3625 }
3626
3627
3628
3629 template <int dim, int spacedim>
3630 template <class InputVector>
3631 void
3632 Scalar<dim, spacedim>::get_average_of_function_gradients(
3633 const InputVector &fe_function,
3634 std::vector<solution_gradient_type<typename InputVector::value_type>>
3635 &gradients) const
3636 {
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);
3640
3641 get_average_of_function_gradients_from_local_dof_values(local_dof_values,
3642 gradients);
3643 }
3644
3645
3646
3647 template <int dim, int spacedim>
3648 template <class InputVector>
3649 void
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>>
3653 &hessians) const
3654 {
3655 AssertDimension(hessians.size(), this->fe_interface->n_quadrature_points);
3656
3657 for (const auto dof_index : this->fe_interface->dof_indices())
3658 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3659 {
3660 if (dof_index == 0)
3661 hessians[q_index] = 0.;
3662
3663 hessians[q_index] +=
3664 local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
3665 }
3666 }
3667
3668
3669
3670 template <int dim, int spacedim>
3671 template <class InputVector>
3672 void
3673 Scalar<dim, spacedim>::get_jump_in_function_hessians(
3674 const InputVector &fe_function,
3675 std::vector<solution_hessian_type<typename InputVector::value_type>>
3676 &hessians) const
3677 {
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);
3681
3682 get_jump_in_function_hessians_from_local_dof_values(local_dof_values,
3683 hessians);
3684 }
3685
3686
3687
3688 template <int dim, int spacedim>
3689 template <class InputVector>
3690 void
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>>
3694 &hessians) const
3695 {
3696 AssertDimension(hessians.size(), this->fe_interface->n_quadrature_points);
3697
3698 for (const unsigned int dof_index : this->fe_interface->dof_indices())
3699 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3700 {
3701 if (dof_index == 0)
3702 hessians[q_index] = 0.;
3703
3704 hessians[q_index] += local_dof_values[dof_index] *
3705 average_of_hessians(dof_index, q_index);
3706 }
3707 }
3708
3709
3710
3711 template <int dim, int spacedim>
3712 template <class InputVector>
3713 void
3714 Scalar<dim, spacedim>::get_average_of_function_hessians(
3715 const InputVector &fe_function,
3716 std::vector<solution_hessian_type<typename InputVector::value_type>>
3717 &hessians) const
3718 {
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);
3722
3723 get_average_of_function_hessians_from_local_dof_values(local_dof_values,
3724 hessians);
3725 }
3726
3727
3728
3729 template <int dim, int spacedim>
3730 template <class InputVector>
3731 void
3732 Scalar<dim, spacedim>::
3733 get_jump_in_function_third_derivatives_from_local_dof_values(
3734 const InputVector &local_dof_values,
3735 std::vector<
3736 solution_third_derivative_type<typename InputVector::value_type>>
3737 &third_derivatives) const
3738 {
3739 AssertDimension(third_derivatives.size(),
3740 this->fe_interface->n_quadrature_points);
3741
3742 for (const unsigned int dof_index : this->fe_interface->dof_indices())
3743 for (const auto q_index : this->fe_interface->quadrature_point_indices())
3744 {
3745 if (dof_index == 0)
3746 third_derivatives[q_index] = 0.;
3747
3748 third_derivatives[q_index] +=
3749 local_dof_values[dof_index] *
3750 jump_in_third_derivatives(dof_index, q_index);
3751 }
3752 }
3753
3754
3755
3756 template <int dim, int spacedim>
3757 template <class InputVector>
3758 void
3759 Scalar<dim, spacedim>::get_jump_in_function_third_derivatives(
3760 const InputVector &fe_function,
3761 std::vector<
3762 solution_third_derivative_type<typename InputVector::value_type>>
3763 &third_derivatives) const
3764 {
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);
3768
3769 get_jump_in_function_third_derivatives_from_local_dof_values(
3770 local_dof_values, third_derivatives);
3771 }
3772
3773
3774
3775 template <int dim, int spacedim>
3777 const FEInterfaceValues<dim, spacedim> &fe_interface,
3778 const unsigned int first_vector_component)
3779 : Base<dim, spacedim>(fe_interface)
3780 , extractor(first_vector_component)
3781 {}
3782
3783
3784
3785 template <int dim, int spacedim>
3787 Vector<dim, spacedim>::value(const bool here_or_there,
3788 const unsigned int interface_dof_index,
3789 const unsigned int q_point) const
3790 {
3791 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3792
3793 if (here_or_there && dof_pair[0] != numbers::invalid_unsigned_int)
3794 return (*(this->fe_interface->fe_face_values))[extractor].value(
3795 dof_pair[0], q_point);
3796
3797 if (!here_or_there && dof_pair[1] != numbers::invalid_unsigned_int)
3798 return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3799 dof_pair[1], q_point);
3800
3801 return value_type();
3802 }
3803
3804
3805
3806 template <int dim, int spacedim>
3808 Vector<dim, spacedim>::jump_in_values(const unsigned int interface_dof_index,
3809 const unsigned int q_point) const
3810 {
3811 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3812
3813 value_type value;
3814
3815 if (dof_pair[0] != numbers::invalid_unsigned_int)
3816 value +=
3817 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3818 q_point);
3819
3820 if (dof_pair[1] != numbers::invalid_unsigned_int)
3821 value -=
3822 (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3823 dof_pair[1], q_point);
3824
3825 return value;
3826 }
3827
3828
3829
3830 template <int dim, int spacedim>
3833 const unsigned int interface_dof_index,
3834 const unsigned int q_point) const
3835 {
3836 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3837
3838 if (this->fe_interface->at_boundary())
3839 return (*(this->fe_interface->fe_face_values))[extractor].value(
3840 dof_pair[0], q_point);
3841
3842 value_type value;
3843
3844 if (dof_pair[0] != numbers::invalid_unsigned_int)
3845 value +=
3846 0.5 *
3847 (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3848 q_point);
3849
3850 if (dof_pair[1] != numbers::invalid_unsigned_int)
3851 value +=
3852 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3853 dof_pair[1], q_point);
3854
3855 return value;
3856 }
3857
3858
3859
3860 template <int dim, int spacedim>
3863 const unsigned int interface_dof_index,
3864 const unsigned int q_point) const
3865 {
3866 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3867
3868 if (this->fe_interface->at_boundary())
3869 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3870 dof_pair[0], q_point);
3871
3872 gradient_type value;
3873
3874 if (dof_pair[0] != numbers::invalid_unsigned_int)
3875 value +=
3876 0.5 *
3877 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3878 q_point);
3879
3880 if (dof_pair[1] != numbers::invalid_unsigned_int)
3881 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3882 .gradient(dof_pair[1], q_point);
3883
3884 return value;
3885 }
3886
3887
3888
3889 template <int dim, int spacedim>
3892 const unsigned int interface_dof_index,
3893 const unsigned int q_point) const
3894 {
3895 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3896
3897 if (this->fe_interface->at_boundary())
3898 return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3899 dof_pair[0], q_point);
3900
3901 gradient_type value;
3902
3903 if (dof_pair[0] != numbers::invalid_unsigned_int)
3904 value +=
3905 (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3906 q_point);
3907
3908 if (dof_pair[1] != numbers::invalid_unsigned_int)
3909 value -=
3910 (*(this->fe_interface->fe_face_values_neighbor))[extractor].gradient(
3911 dof_pair[1], q_point);
3912
3913 return value;
3914 }
3915
3916
3917
3918 template <int dim, int spacedim>
3920 Vector<dim, spacedim>::jump_gradient(const unsigned int interface_dof_index,
3921 const unsigned int q_point) const
3922 {
3923 return jump_in_gradients(interface_dof_index, q_point);
3924 }
3925
3926
3927
3928 template <int dim, int spacedim>
3931 const unsigned int interface_dof_index,
3932 const unsigned int q_point) const
3933 {
3934 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3935
3936 if (this->fe_interface->at_boundary())
3937 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3938 dof_pair[0], q_point);
3939
3940 hessian_type value;
3941
3942 if (dof_pair[0] != numbers::invalid_unsigned_int)
3943 value +=
3944 0.5 *
3945 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3946 q_point);
3947
3948 if (dof_pair[1] != numbers::invalid_unsigned_int)
3949 value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3950 .hessian(dof_pair[1], q_point);
3951
3952 return value;
3953 }
3954
3955
3956
3957 template <int dim, int spacedim>
3959 Vector<dim, spacedim>::average_hessian(const unsigned int interface_dof_index,
3960 const unsigned int q_point) const
3961 {
3962 return average_of_hessians(interface_dof_index, q_point);
3963 }
3964
3965
3966
3967 template <int dim, int spacedim>
3970 const unsigned int interface_dof_index,
3971 const unsigned int q_point) const
3972 {
3973 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3974
3975 if (this->fe_interface->at_boundary())
3976 return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3977 dof_pair[0], q_point);
3978
3979 hessian_type value;
3980
3981 if (dof_pair[0] != numbers::invalid_unsigned_int)
3982 value +=
3983 (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3984 q_point);
3985
3986 if (dof_pair[1] != numbers::invalid_unsigned_int)
3987 value -=
3988 (*(this->fe_interface->fe_face_values_neighbor))[extractor].hessian(
3989 dof_pair[1], q_point);
3990
3991 return value;
3992 }
3993
3994
3995
3996 template <int dim, int spacedim>
3998 Vector<dim, spacedim>::jump_hessian(const unsigned int interface_dof_index,
3999 const unsigned int q_point) const
4000 {
4001 return jump_in_hessians(interface_dof_index, q_point);
4002 }
4003
4004
4005
4006 template <int dim, int spacedim>
4009 const unsigned int interface_dof_index,
4010 const unsigned int q_point) const
4011 {
4012 const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4013
4014 if (this->fe_interface->at_boundary())
4015 return (*(this->fe_interface->fe_face_values))[extractor]
4016 .third_derivative(dof_pair[0], q_point);
4017
4018 third_derivative_type value;
4019
4020 if (dof_pair[0] != numbers::invalid_unsigned_int)
4021 value +=
4022 (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
4023 dof_pair[0], q_point);
4024
4025 if (dof_pair[1] != numbers::invalid_unsigned_int)
4026 value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4027 .third_derivative(dof_pair[1], q_point);
4028
4029 return value;
4030 }
4031
4032
4033
4034 template <int dim, int spacedim>
4035 template <class InputVector>
4036 void
4038 const bool here_or_there,
4039 const InputVector &local_dof_values,
4040 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4041 const
4042 {
4043 AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
4044
4045 for (const auto dof_index : this->fe_interface->dof_indices())
4046 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4047 {
4048 if (dof_index == 0)
4049 values[q_index] = 0.;
4050
4051 values[q_index] += local_dof_values[dof_index] *
4052 value(here_or_there, dof_index, q_index);
4053 }
4054 }
4055
4056
4057
4058 template <int dim, int spacedim>
4059 template <class InputVector>
4060 void
4062 const bool here_or_there,
4063 const InputVector &fe_function,
4064 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4065 const
4066 {
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);
4070
4071 get_function_values_from_local_dof_values(here_or_there,
4072 local_dof_values,
4073 values);
4074 }
4075
4076
4077
4078 template <int dim, int spacedim>
4079 template <class InputVector>
4080 void
4082 const InputVector &local_dof_values,
4083 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4084 const
4085 {
4086 AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
4087
4088 for (const auto dof_index : this->fe_interface->dof_indices())
4089 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4090 {
4091 if (dof_index == 0)
4092 values[q_index] = 0.;
4093
4094 values[q_index] +=
4095 local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
4096 }
4097 }
4098
4099
4100
4101 template <int dim, int spacedim>
4102 template <class InputVector>
4103 void
4105 const InputVector &fe_function,
4106 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4107 const
4108 {
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);
4112
4113 get_jump_in_function_values_from_local_dof_values(local_dof_values, values);
4114 }
4115
4116
4117
4118 template <int dim, int spacedim>
4119 template <class InputVector>
4120 void
4122 const InputVector &local_dof_values,
4123 std::vector<solution_gradient_type<typename InputVector::value_type>>
4124 &gradients) const
4125 {
4126 AssertDimension(gradients.size(), this->fe_interface->n_quadrature_points);
4127
4128 for (const auto dof_index : this->fe_interface->dof_indices())
4129 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4130 {
4131 if (dof_index == 0)
4132 gradients[q_index] = 0.;
4133
4134 gradients[q_index] +=
4135 local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
4136 }
4137 }
4138
4139
4140
4141 template <int dim, int spacedim>
4142 template <class InputVector>
4143 void
4145 const InputVector &fe_function,
4146 std::vector<solution_gradient_type<typename InputVector::value_type>>
4147 &gradients) const
4148 {
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);
4152
4153 get_jump_in_function_gradients_from_local_dof_values(local_dof_values,
4154 gradients);
4155 }
4156
4157
4158
4159 template <int dim, int spacedim>
4160 template <class InputVector>
4161 void
4163 const InputVector &local_dof_values,
4164 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4165 const
4166 {
4167 AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
4168
4169 for (const auto dof_index : this->fe_interface->dof_indices())
4170 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4171 {
4172 if (dof_index == 0)
4173 values[q_index] = 0.;
4174
4175 values[q_index] +=
4176 local_dof_values[dof_index] * average_of_values(dof_index, q_index);
4177 }
4178 }
4179
4180
4181
4182 template <int dim, int spacedim>
4183 template <class InputVector>
4184 void
4186 const InputVector &fe_function,
4187 std::vector<solution_value_type<typename InputVector::value_type>> &values)
4188 const
4189 {
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);
4193
4194 get_average_of_function_values_from_local_dof_values(local_dof_values,
4195 values);
4196 }
4197
4198
4199
4200 template <int dim, int spacedim>
4201 template <class InputVector>
4202 void
4205 const InputVector &local_dof_values,
4206 std::vector<solution_gradient_type<typename InputVector::value_type>>
4207 &gradients) const
4208 {
4209 AssertDimension(gradients.size(), this->fe_interface->n_quadrature_points);
4210
4211 for (const auto dof_index : this->fe_interface->dof_indices())
4212 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4213 {
4214 if (dof_index == 0)
4215 gradients[q_index] = 0.;
4216
4217 gradients[q_index] += local_dof_values[dof_index] *
4218 average_of_gradients(dof_index, q_index);
4219 }
4220 }
4221
4222
4223
4224 template <int dim, int spacedim>
4225 template <class InputVector>
4226 void
4228 const InputVector &fe_function,
4229 std::vector<solution_gradient_type<typename InputVector::value_type>>
4230 &gradients) const
4231 {
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);
4235
4236 get_average_of_function_gradients_from_local_dof_values(local_dof_values,
4237 gradients);
4238 }
4239
4240
4241
4242 template <int dim, int spacedim>
4243 template <class InputVector>
4244 void
4246 const InputVector &local_dof_values,
4247 std::vector<solution_hessian_type<typename InputVector::value_type>>
4248 &hessians) const
4249 {
4250 AssertDimension(hessians.size(), this->fe_interface->n_quadrature_points);
4251
4252 for (const auto dof_index : this->fe_interface->dof_indices())
4253 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4254 {
4255 if (dof_index == 0)
4256 hessians[q_index] = 0.;
4257
4258 hessians[q_index] +=
4259 local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
4260 }
4261 }
4262
4263
4264
4265 template <int dim, int spacedim>
4266 template <class InputVector>
4267 void
4269 const InputVector &fe_function,
4270 std::vector<solution_hessian_type<typename InputVector::value_type>>
4271 &hessians) const
4272 {
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);
4276
4277 get_jump_in_function_hessians_from_local_dof_values(local_dof_values,
4278 hessians);
4279 }
4280
4281
4282
4283 template <int dim, int spacedim>
4284 template <class InputVector>
4285 void
4287 const InputVector &local_dof_values,
4288 std::vector<solution_hessian_type<typename InputVector::value_type>>
4289 &hessians) const
4290 {
4291 AssertDimension(hessians.size(), this->fe_interface->n_quadrature_points);
4292
4293 for (const unsigned int dof_index : this->fe_interface->dof_indices())
4294 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4295 {
4296 if (dof_index == 0)
4297 hessians[q_index] = 0.;
4298
4299 hessians[q_index] += local_dof_values[dof_index] *
4300 average_of_hessians(dof_index, q_index);
4301 }
4302 }
4303
4304
4305
4306 template <int dim, int spacedim>
4307 template <class InputVector>
4308 void
4310 const InputVector &fe_function,
4311 std::vector<solution_hessian_type<typename InputVector::value_type>>
4312 &hessians) const
4313 {
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);
4317
4318 get_average_of_function_hessians_from_local_dof_values(local_dof_values,
4319 hessians);
4320 }
4321
4322
4323
4324 template <int dim, int spacedim>
4325 template <class InputVector>
4326 void
4329 const InputVector &local_dof_values,
4330 std::vector<
4331 solution_third_derivative_type<typename InputVector::value_type>>
4332 &third_derivatives) const
4333 {
4334 AssertDimension(third_derivatives.size(),
4335 this->fe_interface->n_quadrature_points);
4336
4337 for (const unsigned int dof_index : this->fe_interface->dof_indices())
4338 for (const auto q_index : this->fe_interface->quadrature_point_indices())
4339 {
4340 if (dof_index == 0)
4341 third_derivatives[q_index] = 0.;
4342
4343 third_derivatives[q_index] +=
4344 local_dof_values[dof_index] *
4345 jump_in_third_derivatives(dof_index, q_index);
4346 }
4347 }
4348
4349
4350
4351 template <int dim, int spacedim>
4352 template <class InputVector>
4353 void
4355 const InputVector &fe_function,
4356 std::vector<
4357 solution_third_derivative_type<typename InputVector::value_type>>
4358 &third_derivatives) const
4359 {
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);
4363
4364 get_jump_in_function_third_derivatives_from_local_dof_values(
4365 local_dof_values, third_derivatives);
4366 }
4367} // namespace FEInterfaceViews
4368
4369#endif // DOXYGEN
4370
4372
4373#endif
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
bool at_boundary() const
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.
Definition mapping.h:318
friend class Vector
Definition vector.h:1109
Number value_type
Definition vector.h:139
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:502
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503
unsigned int cell_index
#define Assert(cond, exc)
static ::ExceptionBase & ExcOnlyAvailableWithHP()
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
#define DeclExceptionMsg(Exception, defaulttext)
Definition exceptions.h:494
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcNotInitialized()
static ::ExceptionBase & ExcOnlyAvailableWithoutHP()
static ::ExceptionBase & ExcMessage(std::string arg1)
UpdateFlags
const Mapping< dim, spacedim > & get_default_linear_mapping(const Triangulation< dim, spacedim > &triangulation)
Definition mapping.cc:294
typename ::internal::FEInterfaceViews::ViewType< dim, spacedim, Extractor >::type View
void reference_cell(Triangulation< dim, spacedim > &tria, const ReferenceCell &reference_cell)
spacedim & mapping
for(unsigned int j=best_vertex+1;j< vertices.size();++j) if(vertices_to_use[j])
Definition hp.h:117
const types::fe_index invalid_fe_index
Definition types.h:243
static const unsigned int invalid_unsigned_int
Definition types.h:220
boost::integer_range< IncrementableType > iota_view
Definition iota_view.h:45
STL namespace.
typename internal::ProductTypeImpl< std::decay_t< T >, std::decay_t< U > >::type type