Reference documentation for deal.II version GIT 0980a66d4b 2023-03-23 20:20:03+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\}}\)
fe_interface_values.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2018 - 2022 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_fe_interface_values_h
17 #define dealii_fe_interface_values_h
18 
19 #include <deal.II/base/config.h>
20 
22 
23 #include <deal.II/fe/fe_values.h>
24 #include <deal.II/fe/mapping.h>
25 
27 #include <deal.II/hp/fe_values.h>
29 
31 
32 #ifndef DOXYGEN
33 template <int dim, int spacedim>
34 class FEInterfaceValues;
35 #endif
36 
42 {
46  template <int dim, int spacedim = dim>
47  class Base
48  {
49  public:
54 
55  protected:
60 
65  template <class InputVector, class OutputVector>
66  void
67  get_local_dof_values(const InputVector &dof_values,
68  OutputVector & local_dof_values) const;
69  };
70 
71 
72 
76  template <int dim, int spacedim = dim>
77  class Scalar : public Base<dim, spacedim>
78  {
79  public:
83  using value_type = double;
84 
89  using gradient_type =
91 
96  using hessian_type =
98 
105 
112  template <typename Number>
114 
121  template <typename Number>
124 
131  template <typename Number>
134 
141  template <typename Number>
144 
149  const unsigned int component);
150 
175  value_type
176  value(const bool here_or_there,
177  const unsigned int interface_dof_index,
178  const unsigned int q_point) const;
179 
197  value_type
198  jump_in_values(const unsigned int interface_dof_index,
199  const unsigned int q_point) const;
200 
207  value_type
208  jump(const unsigned int interface_dof_index,
209  const unsigned int q_point) const;
210 
222  jump_in_gradients(const unsigned int interface_dof_index,
223  const unsigned int q_point) const;
224 
232  jump_gradient(const unsigned int interface_dof_index,
233  const unsigned int q_point) const;
234 
246  jump_in_hessians(const unsigned int interface_dof_index,
247  const unsigned int q_point) const;
248 
256  jump_hessian(const unsigned int interface_dof_index,
257  const unsigned int q_point) const;
258 
270  jump_in_third_derivatives(const unsigned int interface_dof_index,
271  const unsigned int q_point) const;
272 
280  jump_3rd_derivative(const unsigned int interface_dof_index,
281  const unsigned int q_point) const;
282 
300  value_type
301  average_of_values(const unsigned int interface_dof_index,
302  const unsigned int q_point) const;
303 
310  value_type
311  average_value(const unsigned int interface_dof_index,
312  const unsigned int q_point) const;
313 
320  value_type
321  average(const unsigned int interface_dof_index,
322  const unsigned int q_point) const;
323 
335  average_of_gradients(const unsigned int interface_dof_index,
336  const unsigned int q_point) const;
337 
345  average_gradient(const unsigned int interface_dof_index,
346  const unsigned int q_point) const;
347 
360  average_of_hessians(const unsigned int interface_dof_index,
361  const unsigned int q_point) const;
362 
370  average_hessian(const unsigned int interface_dof_index,
371  const unsigned int q_point) const;
372 
399  template <class InputVector>
400  void
402  const bool here_or_there,
403  const InputVector &fe_function,
405  &values) const;
406 
429  template <class InputVector>
430  void
432  const bool here_or_there,
433  const InputVector &local_dof_values,
435  &values) const;
436 
457  template <class InputVector>
458  void
460  const InputVector &fe_function,
462  &values) const;
463 
471  template <class InputVector>
472  void
474  const InputVector &local_dof_values,
476  &values) const;
477 
491  template <class InputVector>
492  void
494  const InputVector &fe_function,
496  &gradients) const;
497 
505  template <class InputVector>
506  void
508  const InputVector &local_dof_values,
510  &gradients) const;
511 
525  template <class InputVector>
526  void
528  const InputVector &fe_function,
530  &hessians) const;
531 
539  template <class InputVector>
540  void
542  const InputVector &local_dof_values,
544  &hessians) const;
545 
560  template <class InputVector>
561  void
563  const InputVector &fe_function,
564  std::vector<
566  &third_derivatives) const;
567 
575  template <class InputVector>
576  void
578  const InputVector &local_dof_values,
579  std::vector<
581  &third_derivatives) const;
582 
603  template <class InputVector>
604  void
606  const InputVector &fe_function,
608  &values) const;
609 
617  template <class InputVector>
618  void
620  const InputVector &local_dof_values,
622  &values) const;
623 
637  template <class InputVector>
638  void
640  const InputVector &fe_function,
642  &gradients) const;
643 
651  template <class InputVector>
652  void
654  const InputVector &local_dof_values,
656  &gradients) const;
657 
671  template <class InputVector>
672  void
674  const InputVector &fe_function,
676  &hessians) const;
677 
685  template <class InputVector>
686  void
688  const InputVector &local_dof_values,
690  &hessians) const;
691 
694  private:
699  };
700 
701 
702 
706  template <int dim, int spacedim = dim>
707  class Vector : public Base<dim, spacedim>
708  {
709  public:
713  using value_type =
715 
722 
728  using hessian_type =
730 
738 
745  template <typename Number>
747 
754  template <typename Number>
757 
764  template <typename Number>
767 
774  template <typename Number>
777 
782  const unsigned int first_vector_component);
783 
808  value_type
809  value(const bool here_or_there,
810  const unsigned int interface_dof_index,
811  const unsigned int q_point) const;
812 
829  value_type
830  jump_in_values(const unsigned int interface_dof_index,
831  const unsigned int q_point) const;
832 
839  value_type
840  jump(const unsigned int interface_dof_index,
841  const unsigned int q_point) const;
842 
853  jump_in_gradients(const unsigned int interface_dof_index,
854  const unsigned int q_point) const;
855 
862  jump_gradient(const unsigned int interface_dof_index,
863  const unsigned int q_point) const;
864 
876  jump_in_hessians(const unsigned int interface_dof_index,
877  const unsigned int q_point) const;
878 
885  jump_hessian(const unsigned int interface_dof_index,
886  const unsigned int q_point) const;
887 
899  jump_in_third_derivatives(const unsigned int interface_dof_index,
900  const unsigned int q_point) const;
901 
909  jump_3rd_derivative(const unsigned int interface_dof_index,
910  const unsigned int q_point) const;
911 
928  value_type
929  average_of_values(const unsigned int interface_dof_index,
930  const unsigned int q_point) const;
931 
938  value_type
939  average(const unsigned int interface_dof_index,
940  const unsigned int q_point) const;
941 
952  average_of_gradients(const unsigned int interface_dof_index,
953  const unsigned int q_point) const;
954 
962  average_gradient(const unsigned int interface_dof_index,
963  const unsigned int q_point) const;
964 
977  average_of_hessians(const unsigned int interface_dof_index,
978  const unsigned int q_point) const;
979 
986  average_hessian(const unsigned int interface_dof_index,
987  const unsigned int q_point) const;
988 
1015  template <class InputVector>
1016  void
1018  const bool here_or_there,
1019  const InputVector &fe_function,
1021  &values) const;
1022 
1045  template <class InputVector>
1046  void
1048  const bool here_or_there,
1049  const InputVector &local_dof_values,
1051  &values) const;
1052 
1073  template <class InputVector>
1074  void
1076  const InputVector &fe_function,
1078  &values) const;
1079 
1087  template <class InputVector>
1088  void
1090  const InputVector &local_dof_values,
1092  &values) const;
1093 
1107  template <class InputVector>
1108  void
1110  const InputVector &fe_function,
1112  &gradients) const;
1113 
1121  template <class InputVector>
1122  void
1124  const InputVector &local_dof_values,
1126  &gradients) const;
1127 
1141  template <class InputVector>
1142  void
1144  const InputVector &fe_function,
1146  &hessians) const;
1147 
1155  template <class InputVector>
1156  void
1158  const InputVector &local_dof_values,
1160  &hessians) const;
1161 
1176  template <class InputVector>
1177  void
1179  const InputVector &fe_function,
1180  std::vector<
1182  &third_derivatives) const;
1183 
1191  template <class InputVector>
1192  void
1194  const InputVector &local_dof_values,
1195  std::vector<
1197  &third_derivatives) const;
1198 
1219  template <class InputVector>
1220  void
1222  const InputVector &fe_function,
1224  &values) const;
1225 
1233  template <class InputVector>
1234  void
1236  const InputVector &local_dof_values,
1238  &values) const;
1239 
1253  template <class InputVector>
1254  void
1256  const InputVector &fe_function,
1258  &gradients) const;
1259 
1267  template <class InputVector>
1268  void
1270  const InputVector &local_dof_values,
1272  &gradients) const;
1273 
1287  template <class InputVector>
1288  void
1290  const InputVector &fe_function,
1292  &hessians) const;
1293 
1301  template <class InputVector>
1302  void
1304  const InputVector &local_dof_values,
1306  &hessians) const;
1307 
1310  private:
1315  };
1316 } // namespace FEInterfaceViews
1317 
1318 
1319 namespace internal
1320 {
1322  {
1327  template <int dim, int spacedim, typename Extractor>
1328  struct ViewType
1329  {};
1330 
1338  template <int dim, int spacedim>
1339  struct ViewType<dim, spacedim, FEValuesExtractors::Scalar>
1340  {
1341  using type = typename ::FEInterfaceViews::Scalar<dim, spacedim>;
1342  };
1343 
1351  template <int dim, int spacedim>
1352  struct ViewType<dim, spacedim, FEValuesExtractors::Vector>
1353  {
1354  using type = typename ::FEInterfaceViews::Vector<dim, spacedim>;
1355  };
1356  } // namespace FEInterfaceViews
1357 } // namespace internal
1358 
1359 namespace FEInterfaceViews
1360 {
1365  template <int dim, int spacedim, typename Extractor>
1366  using View = typename ::internal::FEInterfaceViews::
1367  ViewType<dim, spacedim, Extractor>::type;
1368 } // namespace FEInterfaceViews
1369 
1370 
1371 
1396 template <int dim, int spacedim = dim>
1398 {
1399 public:
1403  const unsigned int n_quadrature_points;
1404 
1411  const FiniteElement<dim, spacedim> &fe,
1412  const Quadrature<dim - 1> & quadrature,
1413  const UpdateFlags update_flags);
1414 
1421  const FiniteElement<dim, spacedim> &fe,
1422  const hp::QCollection<dim - 1> & quadrature,
1423  const UpdateFlags update_flags);
1424 
1432  const Quadrature<dim - 1> & quadrature,
1433  const UpdateFlags update_flags);
1434 
1440  const hp::MappingCollection<dim, spacedim> &mapping_collection,
1441  const hp::FECollection<dim, spacedim> & fe_collection,
1442  const hp::QCollection<dim - 1> & quadrature_collection,
1443  const UpdateFlags update_flags);
1444 
1449  const hp::QCollection<dim - 1> &quadrature_collection,
1450  const UpdateFlags update_flags);
1451 
1498  template <class CellIteratorType, class CellNeighborIteratorType>
1499  void
1500  reinit(const CellIteratorType & cell,
1501  const unsigned int face_no,
1502  const unsigned int sub_face_no,
1503  const CellNeighborIteratorType &cell_neighbor,
1504  const unsigned int face_no_neighbor,
1505  const unsigned int sub_face_no_neighbor,
1506  const unsigned int q_index = numbers::invalid_unsigned_int,
1507  const unsigned int mapping_index = numbers::invalid_unsigned_int,
1508  const unsigned int fe_index = numbers::invalid_unsigned_int);
1509 
1540  template <class CellIteratorType>
1541  void
1542  reinit(const CellIteratorType &cell,
1543  const unsigned int face_no,
1544  const unsigned int q_index = numbers::invalid_unsigned_int,
1545  const unsigned int mapping_index = numbers::invalid_unsigned_int,
1546  const unsigned int fe_index = numbers::invalid_unsigned_int);
1547 
1556  get_fe_face_values(const unsigned int cell_index) const;
1557 
1561  const Mapping<dim, spacedim> &
1562  get_mapping() const;
1563 
1568  get_fe() const;
1569 
1573  const Quadrature<dim - 1> &
1575 
1581 
1587 
1591  const hp::QCollection<dim - 1> &
1593 
1598  bool
1600 
1604  UpdateFlags
1606 
1614  get_cell(const unsigned int cell_index) const;
1615 
1623  unsigned int
1624  get_face_number(const unsigned int cell_index) const;
1625 
1637  bool
1638  at_boundary() const;
1639 
1651  double
1652  JxW(const unsigned int quadrature_point) const;
1653 
1659  const std::vector<double> &
1661 
1671  const std::vector<Tensor<1, spacedim>> &
1673 
1683 
1689  const std::vector<Point<spacedim>> &
1691 
1702  unsigned
1704 
1733  dof_indices() const;
1734 
1745  std::vector<types::global_dof_index>
1747 
1760  std::array<unsigned int, 2>
1761  interface_dof_to_dof_indices(const unsigned int interface_dof_index) const;
1762 
1772  normal(const unsigned int q_point_index) const;
1773 
1804  double
1805  shape_value(const bool here_or_there,
1806  const unsigned int interface_dof_index,
1807  const unsigned int q_point,
1808  const unsigned int component = 0) const;
1809 
1837  double
1838  jump_in_shape_values(const unsigned int interface_dof_index,
1839  const unsigned int q_point,
1840  const unsigned int component = 0) const;
1841 
1848  double
1849  jump(const unsigned int interface_dof_index,
1850  const unsigned int q_point,
1851  const unsigned int component = 0) const;
1852 
1867  jump_in_shape_gradients(const unsigned int interface_dof_index,
1868  const unsigned int q_point,
1869  const unsigned int component = 0) const;
1870 
1878  jump_gradient(const unsigned int interface_dof_index,
1879  const unsigned int q_point,
1880  const unsigned int component = 0) const;
1881 
1897  jump_in_shape_hessians(const unsigned int interface_dof_index,
1898  const unsigned int q_point,
1899  const unsigned int component = 0) const;
1900 
1908  jump_hessian(const unsigned int interface_dof_index,
1909  const unsigned int q_point,
1910  const unsigned int component = 0) const;
1911 
1926  jump_in_shape_3rd_derivatives(const unsigned int interface_dof_index,
1927  const unsigned int q_point,
1928  const unsigned int component = 0) const;
1929 
1937  jump_3rd_derivative(const unsigned int interface_dof_index,
1938  const unsigned int q_point,
1939  const unsigned int component = 0) const;
1940 
1963  double
1964  average_of_shape_values(const unsigned int interface_dof_index,
1965  const unsigned int q_point,
1966  const unsigned int component = 0) const;
1967 
1974  double
1975  average(const unsigned int interface_dof_index,
1976  const unsigned int q_point,
1977  const unsigned int component = 0) const;
1978 
1993  average_of_shape_gradients(const unsigned int interface_dof_index,
1994  const unsigned int q_point,
1995  const unsigned int component = 0) const;
1996 
2004  average_gradient(const unsigned int interface_dof_index,
2005  const unsigned int q_point,
2006  const unsigned int component = 0) const;
2007 
2023  average_of_shape_hessians(const unsigned int interface_dof_index,
2024  const unsigned int q_point,
2025  const unsigned int component = 0) const;
2026 
2034  average_hessian(const unsigned int interface_dof_index,
2035  const unsigned int q_point,
2036  const unsigned int component = 0) const;
2037 
2057  template <class InputVector>
2058  void
2060  const InputVector & fe_function,
2061  std::vector<typename InputVector::value_type> &values) const;
2062 
2071  template <class InputVector>
2072  void
2074  const InputVector &fe_function,
2076  &gradients) const;
2077 
2085  template <class InputVector>
2086  void
2088  const InputVector &fe_function,
2090  &hessians) const;
2091 
2100  template <class InputVector>
2101  void
2103  const InputVector &fe_function,
2105  &third_derivatives) const;
2106 
2122  template <class InputVector>
2123  void
2125  const InputVector & fe_function,
2126  std::vector<typename InputVector::value_type> &values) const;
2127 
2135  template <class InputVector>
2136  void
2138  const InputVector &fe_function,
2140  &gradients) const;
2141 
2149  template <class InputVector>
2150  void
2152  const InputVector &fe_function,
2154  &hessians) const;
2155 
2175 
2184 
2189 private:
2193  std::vector<types::global_dof_index> interface_dof_indices;
2194 
2200  std::vector<std::array<unsigned int, 2>> dofmap;
2201 
2207 
2214  // non-hp data
2219 
2223  std::unique_ptr<FEFaceValues<dim, spacedim>> internal_fe_face_values;
2224 
2228  std::unique_ptr<FESubfaceValues<dim, spacedim>> internal_fe_subface_values;
2229 
2233  std::unique_ptr<FEFaceValues<dim, spacedim>> internal_fe_face_values_neighbor;
2234 
2238  std::unique_ptr<FESubfaceValues<dim, spacedim>>
2240  // non-hp data
2242  // hp data
2247 
2252  std::unique_ptr<hp::FEFaceValues<dim, spacedim>> internal_hp_fe_face_values;
2253 
2258  std::unique_ptr<hp::FESubfaceValues<dim, spacedim>>
2260 
2265  std::unique_ptr<hp::FEFaceValues<dim, spacedim>>
2267 
2272  std::unique_ptr<hp::FESubfaceValues<dim, spacedim>>
2274 
2282  "The current function doesn't make sense when used with a "
2283  "FEInterfaceValues object with hp-capabilities.");
2284 
2292  "The current function doesn't make sense when used with a "
2293  "FEInterfaceValues object without hp-capabilities.");
2294  // hp data
2296 
2297  /*
2298  * Make the view classes friends of this class, since they
2299  * access internal data.
2300  */
2301  template <int, int>
2303  template <int, int>
2305 };
2306 
2307 
2308 
2309 #ifndef DOXYGEN
2310 
2311 /*---------------------- Inline functions ---------------------*/
2312 
2313 template <int dim, int spacedim>
2315  const Mapping<dim, spacedim> & mapping,
2316  const FiniteElement<dim, spacedim> &fe,
2317  const Quadrature<dim - 1> & quadrature,
2318  const UpdateFlags update_flags)
2319  : n_quadrature_points(quadrature.size())
2320  , fe_face_values(nullptr)
2321  , fe_face_values_neighbor(nullptr)
2322  , internal_fe_face_values(
2323  std::make_unique<FEFaceValues<dim, spacedim>>(mapping,
2324  fe,
2325  quadrature,
2326  update_flags))
2327  , internal_fe_subface_values(
2328  std::make_unique<FESubfaceValues<dim, spacedim>>(mapping,
2329  fe,
2330  quadrature,
2331  update_flags))
2332  , internal_fe_face_values_neighbor(
2333  std::make_unique<FEFaceValues<dim, spacedim>>(mapping,
2334  fe,
2335  quadrature,
2336  update_flags))
2337  , internal_fe_subface_values_neighbor(
2338  std::make_unique<FESubfaceValues<dim, spacedim>>(mapping,
2339  fe,
2340  quadrature,
2341  update_flags))
2342 {}
2343 
2344 
2345 
2346 template <int dim, int spacedim>
2348  const FiniteElement<dim, spacedim> &fe,
2349  const Quadrature<dim - 1> & quadrature,
2350  const UpdateFlags update_flags)
2352  fe.reference_cell().template get_default_linear_mapping<dim, spacedim>(),
2353  fe,
2354  quadrature,
2355  update_flags)
2356 {}
2357 
2358 
2359 
2360 template <int dim, int spacedim>
2362  const Mapping<dim, spacedim> & mapping,
2363  const FiniteElement<dim, spacedim> &fe,
2364  const hp::QCollection<dim - 1> & quadrature,
2365  const UpdateFlags update_flags)
2366  : n_quadrature_points(quadrature.max_n_quadrature_points())
2367  , fe_face_values(nullptr)
2368  , fe_face_values_neighbor(nullptr)
2369  , internal_fe_face_values(
2370  std::make_unique<FEFaceValues<dim, spacedim>>(mapping,
2371  fe,
2372  quadrature,
2373  update_flags))
2374  , internal_fe_subface_values(
2375  std::make_unique<FESubfaceValues<dim, spacedim>>(mapping,
2376  fe,
2377  quadrature,
2378  update_flags))
2379  , internal_fe_face_values_neighbor(
2380  std::make_unique<FEFaceValues<dim, spacedim>>(mapping,
2381  fe,
2382  quadrature[0],
2383  update_flags))
2384  , internal_fe_subface_values_neighbor(
2385  std::make_unique<FESubfaceValues<dim, spacedim>>(mapping,
2386  fe,
2387  quadrature[0],
2388  update_flags))
2389 {}
2390 
2391 
2392 
2393 template <int dim, int spacedim>
2395  const hp::MappingCollection<dim, spacedim> &mapping_collection,
2396  const hp::FECollection<dim, spacedim> & fe_collection,
2397  const hp::QCollection<dim - 1> & quadrature_collection,
2398  const UpdateFlags update_flags)
2399  : n_quadrature_points(quadrature_collection.max_n_quadrature_points())
2400  , fe_face_values(nullptr)
2401  , fe_face_values_neighbor(nullptr)
2402  , internal_hp_fe_face_values(
2403  std::make_unique<hp::FEFaceValues<dim, spacedim>>(mapping_collection,
2404  fe_collection,
2405  quadrature_collection,
2406  update_flags))
2407  , internal_hp_fe_subface_values(
2408  std::make_unique<hp::FESubfaceValues<dim, spacedim>>(
2409  mapping_collection,
2410  fe_collection,
2411  quadrature_collection,
2412  update_flags))
2413  , internal_hp_fe_face_values_neighbor(
2414  std::make_unique<hp::FEFaceValues<dim, spacedim>>(mapping_collection,
2415  fe_collection,
2416  quadrature_collection,
2417  update_flags))
2418  , internal_hp_fe_subface_values_neighbor(
2419  std::make_unique<hp::FESubfaceValues<dim, spacedim>>(
2420  mapping_collection,
2421  fe_collection,
2422  quadrature_collection,
2423  update_flags))
2424 {
2425  AssertDimension(dim, spacedim);
2426 }
2427 
2428 
2429 
2430 template <int dim, int spacedim>
2432  const hp::FECollection<dim, spacedim> &fe_collection,
2433  const hp::QCollection<dim - 1> & quadrature_collection,
2434  const UpdateFlags update_flags)
2435  : FEInterfaceValues(fe_collection.get_reference_cell_default_linear_mapping(),
2436  fe_collection,
2437  quadrature_collection,
2438  update_flags)
2439 {}
2440 
2441 
2442 
2443 template <int dim, int spacedim>
2444 template <class CellIteratorType, class CellNeighborIteratorType>
2445 void
2447  const CellIteratorType & cell,
2448  const unsigned int face_no,
2449  const unsigned int sub_face_no,
2450  const CellNeighborIteratorType &cell_neighbor,
2451  const unsigned int face_no_neighbor,
2452  const unsigned int sub_face_no_neighbor,
2453  const unsigned int q_index,
2454  const unsigned int mapping_index,
2455  const unsigned int fe_index)
2456 {
2457  Assert(internal_fe_face_values || internal_hp_fe_face_values,
2458  ExcNotInitialized());
2459 
2460  if (internal_fe_face_values)
2461  {
2462  if (sub_face_no == numbers::invalid_unsigned_int)
2463  {
2464  internal_fe_face_values->reinit(cell, face_no);
2465  fe_face_values = internal_fe_face_values.get();
2466  }
2467  else
2468  {
2469  internal_fe_subface_values->reinit(cell, face_no, sub_face_no);
2470  fe_face_values = internal_fe_subface_values.get();
2471  }
2472  if (sub_face_no_neighbor == numbers::invalid_unsigned_int)
2473  {
2474  internal_fe_face_values_neighbor->reinit(cell_neighbor,
2475  face_no_neighbor);
2476  fe_face_values_neighbor = internal_fe_face_values_neighbor.get();
2477  }
2478  else
2479  {
2480  internal_fe_subface_values_neighbor->reinit(cell_neighbor,
2481  face_no_neighbor,
2482  sub_face_no_neighbor);
2483  fe_face_values_neighbor = internal_fe_subface_values_neighbor.get();
2484  }
2485 
2486  AssertDimension(fe_face_values->n_quadrature_points,
2487  fe_face_values_neighbor->n_quadrature_points);
2488 
2489  const_cast<unsigned int &>(this->n_quadrature_points) =
2490  fe_face_values->n_quadrature_points;
2491  }
2492  else if (internal_hp_fe_face_values)
2493  {
2494  const unsigned int dominated_fe_index =
2495  internal_hp_fe_face_values->get_fe_collection().find_dominated_fe(
2496  {cell->active_fe_index(), cell_neighbor->active_fe_index()});
2497 
2498  const unsigned int used_q_index =
2499  (q_index == numbers::invalid_unsigned_int ? dominated_fe_index :
2500  q_index);
2501  const unsigned int used_mapping_index =
2502  (mapping_index == numbers::invalid_unsigned_int ? dominated_fe_index :
2503  mapping_index);
2504 
2505  // Same as if above, but when hp is enabled.
2506  if (sub_face_no == numbers::invalid_unsigned_int)
2507  {
2508  internal_hp_fe_face_values->reinit(
2509  cell, face_no, used_q_index, used_mapping_index, fe_index);
2510  fe_face_values = &const_cast<FEFaceValues<dim, spacedim> &>(
2511  internal_hp_fe_face_values->get_present_fe_values());
2512  }
2513  else
2514  {
2515  internal_hp_fe_subface_values->reinit(
2516  cell, face_no, sub_face_no, used_q_index, used_mapping_index);
2517 
2518  fe_face_values = &const_cast<FESubfaceValues<dim, spacedim> &>(
2519  internal_hp_fe_subface_values->get_present_fe_values());
2520  }
2521  if (sub_face_no_neighbor == numbers::invalid_unsigned_int)
2522  {
2523  internal_hp_fe_face_values_neighbor->reinit(cell_neighbor,
2524  face_no_neighbor,
2525  used_q_index,
2526  used_mapping_index);
2527 
2528  fe_face_values_neighbor = &const_cast<FEFaceValues<dim, spacedim> &>(
2529  internal_hp_fe_face_values_neighbor->get_present_fe_values());
2530  }
2531  else
2532  {
2533  internal_hp_fe_subface_values_neighbor->reinit(cell_neighbor,
2534  face_no_neighbor,
2535  sub_face_no_neighbor,
2536  used_q_index,
2537  used_mapping_index);
2538 
2539  fe_face_values_neighbor =
2540  &const_cast<FESubfaceValues<dim, spacedim> &>(
2541  internal_hp_fe_subface_values_neighbor->get_present_fe_values());
2542  }
2543 
2544  AssertDimension(fe_face_values->n_quadrature_points,
2545  fe_face_values_neighbor->n_quadrature_points);
2546 
2547  const_cast<unsigned int &>(this->n_quadrature_points) =
2548  fe_face_values->n_quadrature_points;
2549  }
2550 
2551  // Set up dof mapping and remove duplicates (for continuous elements).
2552  {
2553  // Get dof indices first:
2554  std::vector<types::global_dof_index> v(
2555  fe_face_values->get_fe().n_dofs_per_cell());
2556  cell->get_active_or_mg_dof_indices(v);
2557  std::vector<types::global_dof_index> v2(
2558  fe_face_values_neighbor->get_fe().n_dofs_per_cell());
2559  cell_neighbor->get_active_or_mg_dof_indices(v2);
2560 
2561  // Fill a map from the global dof index to the left and right
2562  // local index.
2563  std::map<types::global_dof_index, std::pair<unsigned int, unsigned int>>
2564  tempmap;
2565  std::pair<unsigned int, unsigned int> invalid_entry(
2567 
2568  for (unsigned int i = 0; i < v.size(); ++i)
2569  {
2570  // If not already existing, add an invalid entry:
2571  auto result = tempmap.insert(std::make_pair(v[i], invalid_entry));
2572  result.first->second.first = i;
2573  }
2574 
2575  for (unsigned int i = 0; i < v2.size(); ++i)
2576  {
2577  // If not already existing, add an invalid entry:
2578  auto result = tempmap.insert(std::make_pair(v2[i], invalid_entry));
2579  result.first->second.second = i;
2580  }
2581 
2582  // Transfer from the map to the sorted std::vectors.
2583  dofmap.resize(tempmap.size());
2584  interface_dof_indices.resize(tempmap.size());
2585  unsigned int idx = 0;
2586  for (auto &x : tempmap)
2587  {
2588  interface_dof_indices[idx] = x.first;
2589  dofmap[idx] = {{x.second.first, x.second.second}};
2590  ++idx;
2591  }
2592  }
2593 }
2594 
2595 
2596 
2597 template <int dim, int spacedim>
2598 template <class CellIteratorType>
2599 void
2600 FEInterfaceValues<dim, spacedim>::reinit(const CellIteratorType &cell,
2601  const unsigned int face_no,
2602  const unsigned int q_index,
2603  const unsigned int mapping_index,
2604  const unsigned int fe_index)
2605 {
2606  Assert(internal_fe_face_values || internal_hp_fe_face_values,
2607  ExcNotInitialized());
2608 
2609  if (internal_fe_face_values)
2610  {
2611  internal_fe_face_values->reinit(cell, face_no);
2612  fe_face_values = internal_fe_face_values.get();
2613  fe_face_values_neighbor = nullptr;
2614 
2615  interface_dof_indices.resize(fe_face_values->get_fe().n_dofs_per_cell());
2616  cell->get_active_or_mg_dof_indices(interface_dof_indices);
2617  }
2618  else if (internal_hp_fe_face_values)
2619  {
2620  internal_hp_fe_face_values->reinit(
2621  cell, face_no, q_index, mapping_index, fe_index);
2622  fe_face_values = &const_cast<FEFaceValues<dim> &>(
2623  internal_hp_fe_face_values->get_present_fe_values());
2624  fe_face_values_neighbor = nullptr;
2625 
2626  interface_dof_indices.resize(fe_face_values->get_fe().n_dofs_per_cell());
2627  cell->get_active_or_mg_dof_indices(interface_dof_indices);
2628  }
2629 
2630  dofmap.resize(interface_dof_indices.size());
2631  for (unsigned int i = 0; i < interface_dof_indices.size(); ++i)
2632  {
2633  dofmap[i] = {{i, numbers::invalid_unsigned_int}};
2634  }
2635 }
2636 
2637 
2638 
2639 template <int dim, int spacedim>
2640 inline double
2641 FEInterfaceValues<dim, spacedim>::JxW(const unsigned int q) const
2642 {
2643  Assert(fe_face_values != nullptr,
2644  ExcMessage("This call requires a call to reinit() first."));
2645  return fe_face_values->JxW(q);
2646 }
2647 
2648 
2649 
2650 template <int dim, int spacedim>
2651 const std::vector<double> &
2653 {
2654  Assert(fe_face_values != nullptr,
2655  ExcMessage("This call requires a call to reinit() first."));
2656  return fe_face_values->get_JxW_values();
2657 }
2658 
2659 
2660 
2661 template <int dim, int spacedim>
2662 const std::vector<Tensor<1, spacedim>> &
2664 {
2665  Assert(fe_face_values != nullptr,
2666  ExcMessage("This call requires a call to reinit() first."));
2667  return fe_face_values->get_normal_vectors();
2668 }
2669 
2670 
2671 
2672 template <int dim, int spacedim>
2673 const Mapping<dim, spacedim> &
2675 {
2676  Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2677  return internal_fe_face_values->get_mapping();
2678 }
2679 
2680 
2681 
2682 template <int dim, int spacedim>
2685 {
2686  Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2687  return internal_fe_face_values->get_fe();
2688 }
2689 
2690 
2691 
2692 template <int dim, int spacedim>
2693 const Quadrature<dim - 1> &
2695 {
2696  Assert(!has_hp_capabilities(), ExcOnlyAvailableWithoutHP());
2697  return internal_fe_face_values->get_quadrature();
2698 }
2699 
2700 
2701 
2702 template <int dim, int spacedim>
2705 {
2706  Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2707  return internal_hp_fe_face_values->get_mapping_collection();
2708 }
2709 
2710 
2711 
2712 template <int dim, int spacedim>
2715 {
2716  Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2717  return internal_hp_fe_face_values->get_fe_collection();
2718 }
2719 
2720 
2721 
2722 template <int dim, int spacedim>
2723 const hp::QCollection<dim - 1> &
2725 {
2726  Assert(has_hp_capabilities(), ExcOnlyAvailableWithHP());
2727  return internal_hp_fe_face_values->get_quadrature_collection();
2728 }
2729 
2730 
2731 
2732 template <int dim, int spacedim>
2733 bool
2735 {
2736  if (internal_hp_fe_face_values || internal_hp_fe_subface_values ||
2737  internal_hp_fe_face_values_neighbor ||
2738  internal_hp_fe_subface_values_neighbor)
2739  {
2740  Assert(!internal_fe_face_values, ExcInternalError());
2741  Assert(!internal_fe_subface_values, ExcInternalError());
2742  Assert(!internal_fe_face_values_neighbor, ExcInternalError());
2743  Assert(!internal_fe_subface_values_neighbor, ExcInternalError());
2744 
2745  return true;
2746  }
2747 
2748  Assert(internal_fe_face_values || internal_fe_subface_values ||
2749  internal_fe_face_values_neighbor ||
2750  internal_fe_subface_values_neighbor,
2751  ExcInternalError());
2752  Assert(!internal_hp_fe_face_values, ExcInternalError());
2753  Assert(!internal_hp_fe_subface_values, ExcInternalError());
2754  Assert(!internal_hp_fe_face_values_neighbor, ExcInternalError());
2755  Assert(!internal_hp_fe_subface_values_neighbor, ExcInternalError());
2756 
2757  return false;
2758 }
2759 
2760 
2761 
2762 template <int dim, int spacedim>
2765 {
2766  return {0U, n_quadrature_points};
2767 }
2768 
2769 
2770 
2771 template <int dim, int spacedim>
2772 const std::vector<Point<spacedim>> &
2774 {
2775  Assert(fe_face_values != nullptr,
2776  ExcMessage("This call requires a call to reinit() first."));
2777  return fe_face_values->get_quadrature_points();
2778 }
2779 
2780 
2781 
2782 template <int dim, int spacedim>
2785 {
2786  return internal_fe_face_values->get_update_flags();
2787 }
2788 
2789 
2790 
2791 template <int dim, int spacedim>
2794 {
2795  return get_fe_face_values(cell_index).get_cell();
2796 }
2797 
2798 
2799 
2800 template <int dim, int spacedim>
2801 inline unsigned int
2803  const unsigned int cell_index) const
2804 {
2805  return get_fe_face_values(cell_index).get_face_number();
2806 }
2807 
2808 
2809 
2810 template <int dim, int spacedim>
2811 unsigned
2813 {
2814  Assert(
2815  interface_dof_indices.size() > 0,
2816  ExcMessage(
2817  "n_current_interface_dofs() is only available after a call to reinit()."));
2818  return interface_dof_indices.size();
2819 }
2820 
2821 
2822 
2823 template <int dim, int spacedim>
2826 {
2827  return {0U, n_current_interface_dofs()};
2828 }
2829 
2830 
2831 
2832 template <int dim, int spacedim>
2833 bool
2835 {
2836  return fe_face_values_neighbor == nullptr;
2837 }
2838 
2839 
2840 
2841 template <int dim, int spacedim>
2842 std::vector<types::global_dof_index>
2844 {
2845  return interface_dof_indices;
2846 }
2847 
2848 
2849 
2850 template <int dim, int spacedim>
2851 std::array<unsigned int, 2>
2853  const unsigned int interface_dof_index) const
2854 {
2855  AssertIndexRange(interface_dof_index, n_current_interface_dofs());
2856  return dofmap[interface_dof_index];
2857 }
2858 
2859 
2860 
2861 template <int dim, int spacedim>
2864  const unsigned int cell_index) const
2865 {
2867  Assert(
2868  cell_index == 0 || !at_boundary(),
2869  ExcMessage(
2870  "You are on a boundary, so you can only ask for the first FEFaceValues object."));
2871 
2872  return (cell_index == 0) ? *fe_face_values : *fe_face_values_neighbor;
2873 }
2874 
2875 
2876 
2877 template <int dim, int spacedim>
2879 FEInterfaceValues<dim, spacedim>::normal(const unsigned int q_point_index) const
2880 {
2881  return fe_face_values->normal_vector(q_point_index);
2882 }
2883 
2884 
2885 
2886 template <int dim, int spacedim>
2887 double
2889  const bool here_or_there,
2890  const unsigned int interface_dof_index,
2891  const unsigned int q_point,
2892  const unsigned int component) const
2893 {
2894  const auto dof_pair = dofmap[interface_dof_index];
2895 
2896  if (here_or_there && dof_pair[0] != numbers::invalid_unsigned_int)
2897  return get_fe_face_values(0).shape_value_component(dof_pair[0],
2898  q_point,
2899  component);
2900  if (!here_or_there && dof_pair[1] != numbers::invalid_unsigned_int)
2901  return get_fe_face_values(1).shape_value_component(dof_pair[1],
2902  q_point,
2903  component);
2904 
2905  return 0.0;
2906 }
2907 
2908 
2909 
2910 template <int dim, int spacedim>
2911 double
2913  const unsigned int interface_dof_index,
2914  const unsigned int q_point,
2915  const unsigned int component) const
2916 {
2917  const auto dof_pair = dofmap[interface_dof_index];
2918 
2919  double value = 0.0;
2920 
2921  if (dof_pair[0] != numbers::invalid_unsigned_int)
2922  value += get_fe_face_values(0).shape_value_component(dof_pair[0],
2923  q_point,
2924  component);
2925  if (dof_pair[1] != numbers::invalid_unsigned_int)
2926  value -= get_fe_face_values(1).shape_value_component(dof_pair[1],
2927  q_point,
2928  component);
2929  return value;
2930 }
2931 
2932 
2933 
2934 template <int dim, int spacedim>
2935 double
2936 FEInterfaceValues<dim, spacedim>::jump(const unsigned int interface_dof_index,
2937  const unsigned int q_point,
2938  const unsigned int component) const
2939 {
2940  return jump_in_shape_values(interface_dof_index, q_point, component);
2941 }
2942 
2943 
2944 
2945 template <int dim, int spacedim>
2946 double
2948  const unsigned int interface_dof_index,
2949  const unsigned int q_point,
2950  const unsigned int component) const
2951 {
2952  const auto dof_pair = dofmap[interface_dof_index];
2953 
2954  if (at_boundary())
2955  return get_fe_face_values(0).shape_value_component(dof_pair[0],
2956  q_point,
2957  component);
2958 
2959  double value = 0.0;
2960 
2961  if (dof_pair[0] != numbers::invalid_unsigned_int)
2962  value += 0.5 * get_fe_face_values(0).shape_value_component(dof_pair[0],
2963  q_point,
2964  component);
2965  if (dof_pair[1] != numbers::invalid_unsigned_int)
2966  value += 0.5 * get_fe_face_values(1).shape_value_component(dof_pair[1],
2967  q_point,
2968  component);
2969 
2970  return value;
2971 }
2972 
2973 
2974 
2975 template <int dim, int spacedim>
2976 double
2978  const unsigned int interface_dof_index,
2979  const unsigned int q_point,
2980  const unsigned int component) const
2981 {
2982  return average_of_shape_values(interface_dof_index, q_point, component);
2983 }
2984 
2985 
2986 
2987 template <int dim, int spacedim>
2990  const unsigned int interface_dof_index,
2991  const unsigned int q_point,
2992  const unsigned int component) const
2993 {
2994  const auto dof_pair = dofmap[interface_dof_index];
2995 
2996  if (at_boundary())
2997  return get_fe_face_values(0).shape_grad_component(dof_pair[0],
2998  q_point,
2999  component);
3000 
3002 
3003  if (dof_pair[0] != numbers::invalid_unsigned_int)
3004  value += 0.5 * get_fe_face_values(0).shape_grad_component(dof_pair[0],
3005  q_point,
3006  component);
3007  if (dof_pair[1] != numbers::invalid_unsigned_int)
3008  value += 0.5 * get_fe_face_values(1).shape_grad_component(dof_pair[1],
3009  q_point,
3010  component);
3011 
3012  return value;
3013 }
3014 
3015 
3016 
3017 template <int dim, int spacedim>
3020  const unsigned int interface_dof_index,
3021  const unsigned int q_point,
3022  const unsigned int component) const
3023 {
3024  return average_of_shape_gradients(interface_dof_index, q_point, component);
3025 }
3026 
3027 
3028 
3029 template <int dim, int spacedim>
3032  const unsigned int interface_dof_index,
3033  const unsigned int q_point,
3034  const unsigned int component) const
3035 {
3036  const auto dof_pair = dofmap[interface_dof_index];
3037 
3038  if (at_boundary())
3039  return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3040  q_point,
3041  component);
3042 
3044 
3045  if (dof_pair[0] != numbers::invalid_unsigned_int)
3046  value += 0.5 * get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3047  q_point,
3048  component);
3049  if (dof_pair[1] != numbers::invalid_unsigned_int)
3050  value += 0.5 * get_fe_face_values(1).shape_hessian_component(dof_pair[1],
3051  q_point,
3052  component);
3053 
3054  return value;
3055 }
3056 
3057 
3058 
3059 template <int dim, int spacedim>
3062  const unsigned int interface_dof_index,
3063  const unsigned int q_point,
3064  const unsigned int component) const
3065 {
3066  return average_of_shape_hessians(interface_dof_index, q_point, component);
3067 }
3068 
3069 
3070 
3071 template <int dim, int spacedim>
3074  const unsigned int interface_dof_index,
3075  const unsigned int q_point,
3076  const unsigned int component) const
3077 {
3078  const auto dof_pair = dofmap[interface_dof_index];
3079 
3080  if (at_boundary())
3081  return get_fe_face_values(0).shape_grad_component(dof_pair[0],
3082  q_point,
3083  component);
3084 
3086 
3087  if (dof_pair[0] != numbers::invalid_unsigned_int)
3088  value += get_fe_face_values(0).shape_grad_component(dof_pair[0],
3089  q_point,
3090  component);
3091  if (dof_pair[1] != numbers::invalid_unsigned_int)
3092  value -= get_fe_face_values(1).shape_grad_component(dof_pair[1],
3093  q_point,
3094  component);
3095 
3096  return value;
3097 }
3098 
3099 
3100 
3101 template <int dim, int spacedim>
3104  const unsigned int interface_dof_index,
3105  const unsigned int q_point,
3106  const unsigned int component) const
3107 {
3108  return jump_in_shape_gradients(interface_dof_index, q_point, component);
3109 }
3110 
3111 
3112 
3113 template <int dim, int spacedim>
3116  const unsigned int interface_dof_index,
3117  const unsigned int q_point,
3118  const unsigned int component) const
3119 {
3120  const auto dof_pair = dofmap[interface_dof_index];
3121 
3122  if (at_boundary())
3123  return get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3124  q_point,
3125  component);
3126 
3128 
3129  if (dof_pair[0] != numbers::invalid_unsigned_int)
3130  value += get_fe_face_values(0).shape_hessian_component(dof_pair[0],
3131  q_point,
3132  component);
3133  if (dof_pair[1] != numbers::invalid_unsigned_int)
3134  value -= get_fe_face_values(1).shape_hessian_component(dof_pair[1],
3135  q_point,
3136  component);
3137 
3138  return value;
3139 }
3140 
3141 
3142 
3143 template <int dim, int spacedim>
3146  const unsigned int interface_dof_index,
3147  const unsigned int q_point,
3148  const unsigned int component) const
3149 {
3150  return jump_in_shape_hessians(interface_dof_index, q_point, component);
3151 }
3152 
3153 
3154 
3155 template <int dim, int spacedim>
3158  const unsigned int interface_dof_index,
3159  const unsigned int q_point,
3160  const unsigned int component) const
3161 {
3162  const auto dof_pair = dofmap[interface_dof_index];
3163 
3164  if (at_boundary())
3165  return get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3166  q_point,
3167  component);
3168 
3170 
3171  if (dof_pair[0] != numbers::invalid_unsigned_int)
3172  value += get_fe_face_values(0).shape_3rd_derivative_component(dof_pair[0],
3173  q_point,
3174  component);
3175  if (dof_pair[1] != numbers::invalid_unsigned_int)
3176  value -= get_fe_face_values(1).shape_3rd_derivative_component(dof_pair[1],
3177  q_point,
3178  component);
3179 
3180  return value;
3181 }
3182 
3183 
3184 
3185 template <int dim, int spacedim>
3188  const unsigned int interface_dof_index,
3189  const unsigned int q_point,
3190  const unsigned int component) const
3191 {
3192  return jump_in_shape_3rd_derivatives(interface_dof_index, q_point, component);
3193 }
3194 
3195 
3196 
3197 template <int dim, int spacedim>
3198 template <class InputVector>
3199 void
3201  const InputVector & fe_function,
3202  std::vector<typename InputVector::value_type> &values) const
3203 {
3204  AssertDimension(values.size(), n_quadrature_points);
3205 
3207  this->operator[](scalar).get_jump_in_function_values(fe_function, values);
3208 }
3209 
3210 
3211 
3212 template <int dim, int spacedim>
3213 template <class InputVector>
3214 void
3216  const InputVector &fe_function,
3218  const
3219 {
3220  AssertDimension(gradients.size(), n_quadrature_points);
3221 
3223  this->operator[](scalar).get_jump_in_function_gradients(fe_function,
3224  gradients);
3225 }
3226 
3227 
3228 
3229 template <int dim, int spacedim>
3230 template <class InputVector>
3231 void
3233  const InputVector &fe_function,
3235  const
3236 {
3237  AssertDimension(hessians.size(), n_quadrature_points);
3238 
3240  this->operator[](scalar).get_jump_in_function_hessians(fe_function, hessians);
3241 }
3242 
3243 
3244 
3245 template <int dim, int spacedim>
3246 template <class InputVector>
3247 void
3249  const InputVector &fe_function,
3251  &third_derivatives) const
3252 {
3253  AssertDimension(third_derivatives.size(), n_quadrature_points);
3254 
3256  this->operator[](scalar).get_jump_in_function_third_derivatives(
3257  fe_function, third_derivatives);
3258 }
3259 
3260 
3261 
3262 template <int dim, int spacedim>
3263 template <class InputVector>
3264 void
3266  const InputVector & fe_function,
3267  std::vector<typename InputVector::value_type> &values) const
3268 {
3269  AssertDimension(values.size(), n_quadrature_points);
3270 
3272  this->operator[](scalar).get_average_of_function_values(fe_function, values);
3273 }
3274 
3275 
3276 
3277 template <int dim, int spacedim>
3278 template <class InputVector>
3279 void
3281  const InputVector &fe_function,
3283  const
3284 {
3285  AssertDimension(gradients.size(), n_quadrature_points);
3286 
3288  this->operator[](scalar).get_average_of_function_gradients(fe_function,
3289  gradients);
3290 }
3291 
3292 
3293 
3294 template <int dim, int spacedim>
3295 template <class InputVector>
3296 void
3298  const InputVector &fe_function,
3300  const
3301 {
3302  AssertDimension(hessians.size(), n_quadrature_points);
3303 
3305  this->operator[](scalar).get_average_of_function_hessians(fe_function,
3306  hessians);
3307 }
3308 
3309 
3310 
3311 /*------------ Inline functions: FEInterfaceValues------------*/
3312 template <int dim, int spacedim>
3315  const FEValuesExtractors::Scalar &scalar) const
3316 {
3317  const unsigned int n_components =
3318  (this->has_hp_capabilities() ? this->get_fe_collection().n_components() :
3319  this->get_fe().n_components());
3320  (void)n_components;
3321  AssertIndexRange(scalar.component, n_components);
3322  return FEInterfaceViews::Scalar<dim, spacedim>(*this, scalar.component);
3323 }
3324 
3325 
3326 
3327 template <int dim, int spacedim>
3330  const FEValuesExtractors::Vector &vector) const
3331 {
3332  const unsigned int n_components =
3333  (this->has_hp_capabilities() ? this->get_fe_collection().n_components() :
3334  this->get_fe().n_components());
3335  const unsigned int n_vectors =
3338  0);
3339  (void)n_components;
3340  (void)n_vectors;
3341  AssertIndexRange(vector.first_vector_component, n_vectors);
3343  vector.first_vector_component);
3344 }
3345 
3346 
3347 
3348 namespace FEInterfaceViews
3349 {
3350  template <int dim, int spacedim>
3352  const FEInterfaceValues<dim, spacedim> &fe_interface)
3353  : fe_interface(&fe_interface)
3354  {}
3355 
3356 
3357 
3358  template <int dim, int spacedim>
3360  const FEInterfaceValues<dim, spacedim> &fe_interface,
3361  const unsigned int component)
3362  : Base<dim, spacedim>(fe_interface)
3363  , extractor(component)
3364  {}
3365 
3366 
3367 
3368  template <int dim, int spacedim>
3369  template <class InputVector, class OutputVector>
3370  void
3371  Base<dim, spacedim>::get_local_dof_values(
3372  const InputVector &dof_values,
3373  OutputVector & local_dof_values) const
3374  {
3375  const auto &interface_dof_indices =
3376  this->fe_interface->get_interface_dof_indices();
3377 
3378  AssertDimension(interface_dof_indices.size(), local_dof_values.size());
3379 
3380  for (unsigned int i : this->fe_interface->dof_indices())
3381  local_dof_values[i] = dof_values(interface_dof_indices[i]);
3382  }
3383 
3384 
3385 
3386  template <int dim, int spacedim>
3388  Scalar<dim, spacedim>::value(const bool here_or_there,
3389  const unsigned int interface_dof_index,
3390  const unsigned int q_point) const
3391  {
3392  const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3393 
3394  if (here_or_there && dof_pair[0] != numbers::invalid_unsigned_int)
3395  return (*(this->fe_interface->fe_face_values))[extractor].value(
3396  dof_pair[0], q_point);
3397 
3398  if (!here_or_there && dof_pair[1] != numbers::invalid_unsigned_int)
3399  return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3400  dof_pair[1], q_point);
3401 
3402  return 0.0;
3403  }
3404 
3405 
3406 
3407  template <int dim, int spacedim>
3409  Scalar<dim, spacedim>::jump_in_values(const unsigned int interface_dof_index,
3410  const unsigned int q_point) const
3411  {
3412  const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3413 
3414  value_type value = 0.0;
3415 
3416  if (dof_pair[0] != numbers::invalid_unsigned_int)
3417  value +=
3418  (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3419  q_point);
3420 
3421  if (dof_pair[1] != numbers::invalid_unsigned_int)
3422  value -=
3423  (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3424  dof_pair[1], q_point);
3425 
3426  return value;
3427  }
3428 
3429 
3430 
3431  template <int dim, int spacedim>
3433  Scalar<dim, spacedim>::jump(const unsigned int interface_dof_index,
3434  const unsigned int q_point) const
3435  {
3436  return jump_in_values(interface_dof_index, q_point);
3437  }
3438 
3439 
3440 
3441  template <int dim, int spacedim>
3443  Scalar<dim, spacedim>::average_of_values(
3444  const unsigned int interface_dof_index,
3445  const unsigned int q_point) const
3446  {
3447  const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3448 
3449  if (this->fe_interface->at_boundary())
3450  return (*(this->fe_interface->fe_face_values))[extractor].value(
3451  dof_pair[0], q_point);
3452 
3453  value_type value = 0.0;
3454 
3455  if (dof_pair[0] != numbers::invalid_unsigned_int)
3456  value +=
3457  0.5 *
3458  (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
3459  q_point);
3460 
3461  if (dof_pair[1] != numbers::invalid_unsigned_int)
3462  value +=
3463  0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
3464  dof_pair[1], q_point);
3465 
3466  return value;
3467  }
3468 
3469 
3470 
3471  template <int dim, int spacedim>
3473  Scalar<dim, spacedim>::average(const unsigned int interface_dof_index,
3474  const unsigned int q_point) const
3475  {
3476  return average_of_values(interface_dof_index, q_point);
3477  }
3478 
3479 
3480 
3481  template <int dim, int spacedim>
3483  Scalar<dim, spacedim>::average_of_gradients(
3484  const unsigned int interface_dof_index,
3485  const unsigned int q_point) const
3486  {
3487  const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3488 
3489  if (this->fe_interface->at_boundary())
3490  return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3491  dof_pair[0], q_point);
3492 
3493  gradient_type value;
3494 
3495  if (dof_pair[0] != numbers::invalid_unsigned_int)
3496  value +=
3497  0.5 *
3498  (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3499  q_point);
3500 
3501  if (dof_pair[1] != numbers::invalid_unsigned_int)
3502  value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3503  .gradient(dof_pair[1], q_point);
3504 
3505  return value;
3506  }
3507 
3508 
3509  template <int dim, int spacedim>
3511  Scalar<dim, spacedim>::average_gradient(
3512  const unsigned int interface_dof_index,
3513  const unsigned int q_point) const
3514  {
3515  return average_of_gradients(interface_dof_index, q_point);
3516  }
3517 
3518 
3519 
3520  template <int dim, int spacedim>
3522  Scalar<dim, spacedim>::jump_in_gradients(
3523  const unsigned int interface_dof_index,
3524  const unsigned int q_point) const
3525  {
3526  const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3527 
3528  if (this->fe_interface->at_boundary())
3529  return (*(this->fe_interface->fe_face_values))[extractor].gradient(
3530  dof_pair[0], q_point);
3531 
3532  gradient_type value;
3533 
3534  if (dof_pair[0] != numbers::invalid_unsigned_int)
3535  value +=
3536  (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
3537  q_point);
3538 
3539  if (dof_pair[1] != numbers::invalid_unsigned_int)
3540  value -=
3541  (*(this->fe_interface->fe_face_values_neighbor))[extractor].gradient(
3542  dof_pair[1], q_point);
3543 
3544  return value;
3545  }
3546 
3547 
3548 
3549  template <int dim, int spacedim>
3551  Scalar<dim, spacedim>::jump_gradient(const unsigned int interface_dof_index,
3552  const unsigned int q_point) const
3553  {
3554  return jump_in_gradients(interface_dof_index, q_point);
3555  }
3556 
3557 
3558 
3559  template <int dim, int spacedim>
3561  Scalar<dim, spacedim>::average_of_hessians(
3562  const unsigned int interface_dof_index,
3563  const unsigned int q_point) const
3564  {
3565  const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3566 
3567  if (this->fe_interface->at_boundary())
3568  return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3569  dof_pair[0], q_point);
3570 
3571  hessian_type value;
3572 
3573  if (dof_pair[0] != numbers::invalid_unsigned_int)
3574  value +=
3575  0.5 *
3576  (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3577  q_point);
3578 
3579  if (dof_pair[1] != numbers::invalid_unsigned_int)
3580  value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3581  .hessian(dof_pair[1], q_point);
3582 
3583  return value;
3584  }
3585 
3586 
3587 
3588  template <int dim, int spacedim>
3590  Scalar<dim, spacedim>::average_hessian(const unsigned int interface_dof_index,
3591  const unsigned int q_point) const
3592  {
3593  return average_of_hessians(interface_dof_index, q_point);
3594  }
3595 
3596 
3597 
3598  template <int dim, int spacedim>
3600  Scalar<dim, spacedim>::jump_in_third_derivatives(
3601  const unsigned int interface_dof_index,
3602  const unsigned int q_point) const
3603  {
3604  const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3605 
3606  if (this->fe_interface->at_boundary())
3607  return (*(this->fe_interface->fe_face_values))[extractor]
3608  .third_derivative(dof_pair[0], q_point);
3609 
3610  third_derivative_type value;
3611 
3612  if (dof_pair[0] != numbers::invalid_unsigned_int)
3613  value +=
3614  (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
3615  dof_pair[0], q_point);
3616 
3617  if (dof_pair[1] != numbers::invalid_unsigned_int)
3618  value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
3619  .third_derivative(dof_pair[1], q_point);
3620 
3621  return value;
3622  }
3623 
3624 
3625 
3626  template <int dim, int spacedim>
3628  Scalar<dim, spacedim>::jump_3rd_derivative(
3629  const unsigned int interface_dof_index,
3630  const unsigned int q_point) const
3631  {
3632  return jump_in_third_derivatives(interface_dof_index, q_point);
3633  }
3634 
3635 
3636 
3637  template <int dim, int spacedim>
3639  Scalar<dim, spacedim>::jump_in_hessians(
3640  const unsigned int interface_dof_index,
3641  const unsigned int q_point) const
3642  {
3643  const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
3644 
3645  if (this->fe_interface->at_boundary())
3646  return (*(this->fe_interface->fe_face_values))[extractor].hessian(
3647  dof_pair[0], q_point);
3648 
3649  hessian_type value;
3650 
3651  if (dof_pair[0] != numbers::invalid_unsigned_int)
3652  value +=
3653  (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
3654  q_point);
3655 
3656  if (dof_pair[1] != numbers::invalid_unsigned_int)
3657  value -=
3658  (*(this->fe_interface->fe_face_values_neighbor))[extractor].hessian(
3659  dof_pair[1], q_point);
3660 
3661  return value;
3662  }
3663 
3664 
3665 
3666  template <int dim, int spacedim>
3668  Scalar<dim, spacedim>::jump_hessian(const unsigned int interface_dof_index,
3669  const unsigned int q_point) const
3670  {
3671  return jump_in_hessians(interface_dof_index, q_point);
3672  }
3673 
3674 
3675 
3676  template <int dim, int spacedim>
3677  template <class InputVector>
3678  void
3680  const bool here_or_there,
3681  const InputVector &local_dof_values,
3682  std::vector<solution_value_type<typename InputVector::value_type>> &values)
3683  const
3684  {
3685  AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
3686 
3687  for (const auto dof_index : this->fe_interface->dof_indices())
3688  for (const auto q_index : this->fe_interface->quadrature_point_indices())
3689  {
3690  if (dof_index == 0)
3691  values[q_index] = 0.;
3692 
3693  values[q_index] += local_dof_values[dof_index] *
3694  value(here_or_there, dof_index, q_index);
3695  }
3696  }
3697 
3698 
3699 
3700  template <int dim, int spacedim>
3701  template <class InputVector>
3702  void
3704  const bool here_or_there,
3705  const InputVector &fe_function,
3706  std::vector<solution_value_type<typename InputVector::value_type>> &values)
3707  const
3708  {
3709  std::vector<typename InputVector::value_type> local_dof_values(
3710  this->fe_interface->n_current_interface_dofs());
3711  this->get_local_dof_values(fe_function, local_dof_values);
3712 
3713  get_function_values_from_local_dof_values(here_or_there,
3714  local_dof_values,
3715  values);
3716  }
3717 
3718 
3719 
3720  template <int dim, int spacedim>
3721  template <class InputVector>
3722  void
3723  Scalar<dim, spacedim>::get_jump_in_function_values_from_local_dof_values(
3724  const InputVector &local_dof_values,
3725  std::vector<solution_value_type<typename InputVector::value_type>> &values)
3726  const
3727  {
3728  AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
3729 
3730  for (const auto dof_index : this->fe_interface->dof_indices())
3731  for (const auto q_index : this->fe_interface->quadrature_point_indices())
3732  {
3733  if (dof_index == 0)
3734  values[q_index] = 0.;
3735 
3736  values[q_index] +=
3737  local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
3738  }
3739  }
3740 
3741 
3742 
3743  template <int dim, int spacedim>
3744  template <class InputVector>
3745  void
3746  Scalar<dim, spacedim>::get_jump_in_function_values(
3747  const InputVector &fe_function,
3748  std::vector<solution_value_type<typename InputVector::value_type>> &values)
3749  const
3750  {
3751  std::vector<typename InputVector::value_type> local_dof_values(
3752  this->fe_interface->n_current_interface_dofs());
3753  this->get_local_dof_values(fe_function, local_dof_values);
3754 
3755  get_jump_in_function_values_from_local_dof_values(local_dof_values, values);
3756  }
3757 
3758 
3759 
3760  template <int dim, int spacedim>
3761  template <class InputVector>
3762  void
3763  Scalar<dim, spacedim>::get_jump_in_function_gradients_from_local_dof_values(
3764  const InputVector &local_dof_values,
3765  std::vector<solution_gradient_type<typename InputVector::value_type>>
3766  &gradients) const
3767  {
3768  AssertDimension(gradients.size(), this->fe_interface->n_quadrature_points);
3769 
3770  for (const auto dof_index : this->fe_interface->dof_indices())
3771  for (const auto q_index : this->fe_interface->quadrature_point_indices())
3772  {
3773  if (dof_index == 0)
3774  gradients[q_index] = 0.;
3775 
3776  gradients[q_index] +=
3777  local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
3778  }
3779  }
3780 
3781 
3782 
3783  template <int dim, int spacedim>
3784  template <class InputVector>
3785  void
3786  Scalar<dim, spacedim>::get_jump_in_function_gradients(
3787  const InputVector &fe_function,
3788  std::vector<solution_gradient_type<typename InputVector::value_type>>
3789  &gradients) const
3790  {
3791  std::vector<typename InputVector::value_type> local_dof_values(
3792  this->fe_interface->n_current_interface_dofs());
3793  this->get_local_dof_values(fe_function, local_dof_values);
3794 
3795  get_jump_in_function_gradients_from_local_dof_values(local_dof_values,
3796  gradients);
3797  }
3798 
3799 
3800 
3801  template <int dim, int spacedim>
3802  template <class InputVector>
3803  void
3804  Scalar<dim, spacedim>::get_average_of_function_values_from_local_dof_values(
3805  const InputVector &local_dof_values,
3806  std::vector<solution_value_type<typename InputVector::value_type>> &values)
3807  const
3808  {
3809  AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
3810 
3811  for (const auto dof_index : this->fe_interface->dof_indices())
3812  for (const auto q_index : this->fe_interface->quadrature_point_indices())
3813  {
3814  if (dof_index == 0)
3815  values[q_index] = 0.;
3816 
3817  values[q_index] +=
3818  local_dof_values[dof_index] * average_of_values(dof_index, q_index);
3819  }
3820  }
3821 
3822 
3823 
3824  template <int dim, int spacedim>
3825  template <class InputVector>
3826  void
3827  Scalar<dim, spacedim>::get_average_of_function_values(
3828  const InputVector &fe_function,
3829  std::vector<solution_value_type<typename InputVector::value_type>> &values)
3830  const
3831  {
3832  std::vector<typename InputVector::value_type> local_dof_values(
3833  this->fe_interface->n_current_interface_dofs());
3834  this->get_local_dof_values(fe_function, local_dof_values);
3835 
3836  get_average_of_function_values_from_local_dof_values(local_dof_values,
3837  values);
3838  }
3839 
3840 
3841 
3842  template <int dim, int spacedim>
3843  template <class InputVector>
3844  void
3845  Scalar<dim, spacedim>::
3846  get_average_of_function_gradients_from_local_dof_values(
3847  const InputVector &local_dof_values,
3848  std::vector<solution_gradient_type<typename InputVector::value_type>>
3849  &gradients) const
3850  {
3851  AssertDimension(gradients.size(), this->fe_interface->n_quadrature_points);
3852 
3853  for (const auto dof_index : this->fe_interface->dof_indices())
3854  for (const auto q_index : this->fe_interface->quadrature_point_indices())
3855  {
3856  if (dof_index == 0)
3857  gradients[q_index] = 0.;
3858 
3859  gradients[q_index] += local_dof_values[dof_index] *
3860  average_of_gradients(dof_index, q_index);
3861  }
3862  }
3863 
3864 
3865 
3866  template <int dim, int spacedim>
3867  template <class InputVector>
3868  void
3869  Scalar<dim, spacedim>::get_average_of_function_gradients(
3870  const InputVector &fe_function,
3871  std::vector<solution_gradient_type<typename InputVector::value_type>>
3872  &gradients) const
3873  {
3874  std::vector<typename InputVector::value_type> local_dof_values(
3875  this->fe_interface->n_current_interface_dofs());
3876  this->get_local_dof_values(fe_function, local_dof_values);
3877 
3878  get_average_of_function_gradients_from_local_dof_values(local_dof_values,
3879  gradients);
3880  }
3881 
3882 
3883 
3884  template <int dim, int spacedim>
3885  template <class InputVector>
3886  void
3887  Scalar<dim, spacedim>::get_jump_in_function_hessians_from_local_dof_values(
3888  const InputVector &local_dof_values,
3889  std::vector<solution_hessian_type<typename InputVector::value_type>>
3890  &hessians) const
3891  {
3892  AssertDimension(hessians.size(), this->fe_interface->n_quadrature_points);
3893 
3894  for (const auto dof_index : this->fe_interface->dof_indices())
3895  for (const auto q_index : this->fe_interface->quadrature_point_indices())
3896  {
3897  if (dof_index == 0)
3898  hessians[q_index] = 0.;
3899 
3900  hessians[q_index] +=
3901  local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
3902  }
3903  }
3904 
3905 
3906 
3907  template <int dim, int spacedim>
3908  template <class InputVector>
3909  void
3910  Scalar<dim, spacedim>::get_jump_in_function_hessians(
3911  const InputVector &fe_function,
3912  std::vector<solution_hessian_type<typename InputVector::value_type>>
3913  &hessians) const
3914  {
3915  std::vector<typename InputVector::value_type> local_dof_values(
3916  this->fe_interface->n_current_interface_dofs());
3917  this->get_local_dof_values(fe_function, local_dof_values);
3918 
3919  get_jump_in_function_hessians_from_local_dof_values(local_dof_values,
3920  hessians);
3921  }
3922 
3923 
3924 
3925  template <int dim, int spacedim>
3926  template <class InputVector>
3927  void
3928  Scalar<dim, spacedim>::get_average_of_function_hessians_from_local_dof_values(
3929  const InputVector &local_dof_values,
3930  std::vector<solution_hessian_type<typename InputVector::value_type>>
3931  &hessians) const
3932  {
3933  AssertDimension(hessians.size(), this->fe_interface->n_quadrature_points);
3934 
3935  for (unsigned int dof_index : this->fe_interface->dof_indices())
3936  for (const auto q_index : this->fe_interface->quadrature_point_indices())
3937  {
3938  if (dof_index == 0)
3939  hessians[q_index] = 0.;
3940 
3941  hessians[q_index] += local_dof_values[dof_index] *
3942  average_of_hessians(dof_index, q_index);
3943  }
3944  }
3945 
3946 
3947 
3948  template <int dim, int spacedim>
3949  template <class InputVector>
3950  void
3951  Scalar<dim, spacedim>::get_average_of_function_hessians(
3952  const InputVector &fe_function,
3953  std::vector<solution_hessian_type<typename InputVector::value_type>>
3954  &hessians) const
3955  {
3956  std::vector<typename InputVector::value_type> local_dof_values(
3957  this->fe_interface->n_current_interface_dofs());
3958  this->get_local_dof_values(fe_function, local_dof_values);
3959 
3960  get_average_of_function_hessians_from_local_dof_values(local_dof_values,
3961  hessians);
3962  }
3963 
3964 
3965 
3966  template <int dim, int spacedim>
3967  template <class InputVector>
3968  void
3969  Scalar<dim, spacedim>::
3970  get_jump_in_function_third_derivatives_from_local_dof_values(
3971  const InputVector &local_dof_values,
3972  std::vector<
3973  solution_third_derivative_type<typename InputVector::value_type>>
3974  &third_derivatives) const
3975  {
3976  AssertDimension(third_derivatives.size(),
3977  this->fe_interface->n_quadrature_points);
3978 
3979  for (unsigned int dof_index : this->fe_interface->dof_indices())
3980  for (const auto q_index : this->fe_interface->quadrature_point_indices())
3981  {
3982  if (dof_index == 0)
3983  third_derivatives[q_index] = 0.;
3984 
3985  third_derivatives[q_index] +=
3986  local_dof_values[dof_index] *
3987  jump_in_third_derivatives(dof_index, q_index);
3988  }
3989  }
3990 
3991 
3992 
3993  template <int dim, int spacedim>
3994  template <class InputVector>
3995  void
3996  Scalar<dim, spacedim>::get_jump_in_function_third_derivatives(
3997  const InputVector &fe_function,
3998  std::vector<
3999  solution_third_derivative_type<typename InputVector::value_type>>
4000  &third_derivatives) const
4001  {
4002  std::vector<typename InputVector::value_type> local_dof_values(
4003  this->fe_interface->n_current_interface_dofs());
4004  this->get_local_dof_values(fe_function, local_dof_values);
4005 
4006  get_jump_in_function_third_derivatives_from_local_dof_values(
4007  local_dof_values, third_derivatives);
4008  }
4009 
4010 
4011 
4012  template <int dim, int spacedim>
4014  const FEInterfaceValues<dim, spacedim> &fe_interface,
4015  const unsigned int first_vector_component)
4016  : Base<dim, spacedim>(fe_interface)
4017  , extractor(first_vector_component)
4018  {}
4019 
4020 
4021 
4022  template <int dim, int spacedim>
4024  Vector<dim, spacedim>::value(const bool here_or_there,
4025  const unsigned int interface_dof_index,
4026  const unsigned int q_point) const
4027  {
4028  const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4029 
4030  if (here_or_there && dof_pair[0] != numbers::invalid_unsigned_int)
4031  return (*(this->fe_interface->fe_face_values))[extractor].value(
4032  dof_pair[0], q_point);
4033 
4034  if (!here_or_there && dof_pair[1] != numbers::invalid_unsigned_int)
4035  return (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
4036  dof_pair[1], q_point);
4037 
4038  return value_type();
4039  }
4040 
4041 
4042 
4043  template <int dim, int spacedim>
4045  Vector<dim, spacedim>::jump_in_values(const unsigned int interface_dof_index,
4046  const unsigned int q_point) const
4047  {
4048  const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4049 
4050  value_type value;
4051 
4052  if (dof_pair[0] != numbers::invalid_unsigned_int)
4053  value +=
4054  (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
4055  q_point);
4056 
4057  if (dof_pair[1] != numbers::invalid_unsigned_int)
4058  value -=
4059  (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
4060  dof_pair[1], q_point);
4061 
4062  return value;
4063  }
4064 
4065 
4066 
4067  template <int dim, int spacedim>
4069  Vector<dim, spacedim>::jump(const unsigned int interface_dof_index,
4070  const unsigned int q_point) const
4071  {
4072  return jump_in_values(interface_dof_index, q_point);
4073  }
4074 
4075 
4076 
4077  template <int dim, int spacedim>
4080  const unsigned int interface_dof_index,
4081  const unsigned int q_point) const
4082  {
4083  const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4084 
4085  if (this->fe_interface->at_boundary())
4086  return (*(this->fe_interface->fe_face_values))[extractor].value(
4087  dof_pair[0], q_point);
4088 
4089  value_type value;
4090 
4091  if (dof_pair[0] != numbers::invalid_unsigned_int)
4092  value +=
4093  0.5 *
4094  (*(this->fe_interface->fe_face_values))[extractor].value(dof_pair[0],
4095  q_point);
4096 
4097  if (dof_pair[1] != numbers::invalid_unsigned_int)
4098  value +=
4099  0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor].value(
4100  dof_pair[1], q_point);
4101 
4102  return value;
4103  }
4104 
4105 
4106 
4107  template <int dim, int spacedim>
4109  Vector<dim, spacedim>::average(const unsigned int interface_dof_index,
4110  const unsigned int q_point) const
4111  {
4112  return average_of_values(interface_dof_index, q_point);
4113  }
4114 
4115 
4116 
4117  template <int dim, int spacedim>
4120  const unsigned int interface_dof_index,
4121  const unsigned int q_point) const
4122  {
4123  const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4124 
4125  if (this->fe_interface->at_boundary())
4126  return (*(this->fe_interface->fe_face_values))[extractor].gradient(
4127  dof_pair[0], q_point);
4128 
4129  gradient_type value;
4130 
4131  if (dof_pair[0] != numbers::invalid_unsigned_int)
4132  value +=
4133  0.5 *
4134  (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
4135  q_point);
4136 
4137  if (dof_pair[1] != numbers::invalid_unsigned_int)
4138  value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4139  .gradient(dof_pair[1], q_point);
4140 
4141  return value;
4142  }
4143 
4144 
4145 
4146  template <int dim, int spacedim>
4149  const unsigned int interface_dof_index,
4150  const unsigned int q_point) const
4151  {
4152  return average_of_gradients(interface_dof_index, q_point);
4153  }
4154 
4155 
4156 
4157  template <int dim, int spacedim>
4160  const unsigned int interface_dof_index,
4161  const unsigned int q_point) const
4162  {
4163  const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4164 
4165  if (this->fe_interface->at_boundary())
4166  return (*(this->fe_interface->fe_face_values))[extractor].gradient(
4167  dof_pair[0], q_point);
4168 
4169  gradient_type value;
4170 
4171  if (dof_pair[0] != numbers::invalid_unsigned_int)
4172  value +=
4173  (*(this->fe_interface->fe_face_values))[extractor].gradient(dof_pair[0],
4174  q_point);
4175 
4176  if (dof_pair[1] != numbers::invalid_unsigned_int)
4177  value -=
4178  (*(this->fe_interface->fe_face_values_neighbor))[extractor].gradient(
4179  dof_pair[1], q_point);
4180 
4181  return value;
4182  }
4183 
4184 
4185 
4186  template <int dim, int spacedim>
4188  Vector<dim, spacedim>::jump_gradient(const unsigned int interface_dof_index,
4189  const unsigned int q_point) const
4190  {
4191  return jump_in_gradients(interface_dof_index, q_point);
4192  }
4193 
4194 
4195 
4196  template <int dim, int spacedim>
4199  const unsigned int interface_dof_index,
4200  const unsigned int q_point) const
4201  {
4202  const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4203 
4204  if (this->fe_interface->at_boundary())
4205  return (*(this->fe_interface->fe_face_values))[extractor].hessian(
4206  dof_pair[0], q_point);
4207 
4208  hessian_type value;
4209 
4210  if (dof_pair[0] != numbers::invalid_unsigned_int)
4211  value +=
4212  0.5 *
4213  (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
4214  q_point);
4215 
4216  if (dof_pair[1] != numbers::invalid_unsigned_int)
4217  value += 0.5 * (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4218  .hessian(dof_pair[1], q_point);
4219 
4220  return value;
4221  }
4222 
4223 
4224 
4225  template <int dim, int spacedim>
4227  Vector<dim, spacedim>::average_hessian(const unsigned int interface_dof_index,
4228  const unsigned int q_point) const
4229  {
4230  return average_of_hessians(interface_dof_index, q_point);
4231  }
4232 
4233 
4234 
4235  template <int dim, int spacedim>
4238  const unsigned int interface_dof_index,
4239  const unsigned int q_point) const
4240  {
4241  const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4242 
4243  if (this->fe_interface->at_boundary())
4244  return (*(this->fe_interface->fe_face_values))[extractor].hessian(
4245  dof_pair[0], q_point);
4246 
4247  hessian_type value;
4248 
4249  if (dof_pair[0] != numbers::invalid_unsigned_int)
4250  value +=
4251  (*(this->fe_interface->fe_face_values))[extractor].hessian(dof_pair[0],
4252  q_point);
4253 
4254  if (dof_pair[1] != numbers::invalid_unsigned_int)
4255  value -=
4256  (*(this->fe_interface->fe_face_values_neighbor))[extractor].hessian(
4257  dof_pair[1], q_point);
4258 
4259  return value;
4260  }
4261 
4262 
4263 
4264  template <int dim, int spacedim>
4266  Vector<dim, spacedim>::jump_hessian(const unsigned int interface_dof_index,
4267  const unsigned int q_point) const
4268  {
4269  return jump_in_hessians(interface_dof_index, q_point);
4270  }
4271 
4272 
4273 
4274  template <int dim, int spacedim>
4277  const unsigned int interface_dof_index,
4278  const unsigned int q_point) const
4279  {
4280  const auto dof_pair = this->fe_interface->dofmap[interface_dof_index];
4281 
4282  if (this->fe_interface->at_boundary())
4283  return (*(this->fe_interface->fe_face_values))[extractor]
4284  .third_derivative(dof_pair[0], q_point);
4285 
4286  third_derivative_type value;
4287 
4288  if (dof_pair[0] != numbers::invalid_unsigned_int)
4289  value +=
4290  (*(this->fe_interface->fe_face_values))[extractor].third_derivative(
4291  dof_pair[0], q_point);
4292 
4293  if (dof_pair[1] != numbers::invalid_unsigned_int)
4294  value -= (*(this->fe_interface->fe_face_values_neighbor))[extractor]
4295  .third_derivative(dof_pair[1], q_point);
4296 
4297  return value;
4298  }
4299 
4300 
4301 
4302  template <int dim, int spacedim>
4305  const unsigned int interface_dof_index,
4306  const unsigned int q_point) const
4307  {
4308  return jump_in_third_derivatives(interface_dof_index, q_point);
4309  }
4310 
4311 
4312 
4313  template <int dim, int spacedim>
4314  template <class InputVector>
4315  void
4317  const bool here_or_there,
4318  const InputVector &local_dof_values,
4319  std::vector<solution_value_type<typename InputVector::value_type>> &values)
4320  const
4321  {
4322  AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
4323 
4324  for (const auto dof_index : this->fe_interface->dof_indices())
4325  for (const auto q_index : this->fe_interface->quadrature_point_indices())
4326  {
4327  if (dof_index == 0)
4328  values[q_index] = 0.;
4329 
4330  values[q_index] += local_dof_values[dof_index] *
4331  value(here_or_there, dof_index, q_index);
4332  }
4333  }
4334 
4335 
4336 
4337  template <int dim, int spacedim>
4338  template <class InputVector>
4339  void
4341  const bool here_or_there,
4342  const InputVector &fe_function,
4343  std::vector<solution_value_type<typename InputVector::value_type>> &values)
4344  const
4345  {
4346  std::vector<typename InputVector::value_type> local_dof_values(
4347  this->fe_interface->n_current_interface_dofs());
4348  this->get_local_dof_values(fe_function, local_dof_values);
4349 
4350  get_function_values_from_local_dof_values(here_or_there,
4351  local_dof_values,
4352  values);
4353  }
4354 
4355 
4356 
4357  template <int dim, int spacedim>
4358  template <class InputVector>
4359  void
4361  const InputVector &local_dof_values,
4362  std::vector<solution_value_type<typename InputVector::value_type>> &values)
4363  const
4364  {
4365  AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
4366 
4367  for (const auto dof_index : this->fe_interface->dof_indices())
4368  for (const auto q_index : this->fe_interface->quadrature_point_indices())
4369  {
4370  if (dof_index == 0)
4371  values[q_index] = 0.;
4372 
4373  values[q_index] +=
4374  local_dof_values[dof_index] * jump_in_values(dof_index, q_index);
4375  }
4376  }
4377 
4378 
4379 
4380  template <int dim, int spacedim>
4381  template <class InputVector>
4382  void
4384  const InputVector &fe_function,
4385  std::vector<solution_value_type<typename InputVector::value_type>> &values)
4386  const
4387  {
4388  std::vector<typename InputVector::value_type> local_dof_values(
4389  this->fe_interface->n_current_interface_dofs());
4390  this->get_local_dof_values(fe_function, local_dof_values);
4391 
4392  get_jump_in_function_values_from_local_dof_values(local_dof_values, values);
4393  }
4394 
4395 
4396 
4397  template <int dim, int spacedim>
4398  template <class InputVector>
4399  void
4401  const InputVector &local_dof_values,
4402  std::vector<solution_gradient_type<typename InputVector::value_type>>
4403  &gradients) const
4404  {
4405  AssertDimension(gradients.size(), this->fe_interface->n_quadrature_points);
4406 
4407  for (const auto dof_index : this->fe_interface->dof_indices())
4408  for (const auto q_index : this->fe_interface->quadrature_point_indices())
4409  {
4410  if (dof_index == 0)
4411  gradients[q_index] = 0.;
4412 
4413  gradients[q_index] +=
4414  local_dof_values[dof_index] * jump_in_gradients(dof_index, q_index);
4415  }
4416  }
4417 
4418 
4419 
4420  template <int dim, int spacedim>
4421  template <class InputVector>
4422  void
4424  const InputVector &fe_function,
4425  std::vector<solution_gradient_type<typename InputVector::value_type>>
4426  &gradients) const
4427  {
4428  std::vector<typename InputVector::value_type> local_dof_values(
4429  this->fe_interface->n_current_interface_dofs());
4430  this->get_local_dof_values(fe_function, local_dof_values);
4431 
4432  get_jump_in_function_gradients_from_local_dof_values(local_dof_values,
4433  gradients);
4434  }
4435 
4436 
4437 
4438  template <int dim, int spacedim>
4439  template <class InputVector>
4440  void
4442  const InputVector &local_dof_values,
4443  std::vector<solution_value_type<typename InputVector::value_type>> &values)
4444  const
4445  {
4446  AssertDimension(values.size(), this->fe_interface->n_quadrature_points);
4447 
4448  for (const auto dof_index : this->fe_interface->dof_indices())
4449  for (const auto q_index : this->fe_interface->quadrature_point_indices())
4450  {
4451  if (dof_index == 0)
4452  values[q_index] = 0.;
4453 
4454  values[q_index] +=
4455  local_dof_values[dof_index] * average_of_values(dof_index, q_index);
4456  }
4457  }
4458 
4459 
4460 
4461  template <int dim, int spacedim>
4462  template <class InputVector>
4463  void
4465  const InputVector &fe_function,
4466  std::vector<solution_value_type<typename InputVector::value_type>> &values)
4467  const
4468  {
4469  std::vector<typename InputVector::value_type> local_dof_values(
4470  this->fe_interface->n_current_interface_dofs());
4471  this->get_local_dof_values(fe_function, local_dof_values);
4472 
4473  get_average_of_function_values_from_local_dof_values(local_dof_values,
4474  values);
4475  }
4476 
4477 
4478 
4479  template <int dim, int spacedim>
4480  template <class InputVector>
4481  void
4484  const InputVector &local_dof_values,
4485  std::vector<solution_gradient_type<typename InputVector::value_type>>
4486  &gradients) const
4487  {
4488  AssertDimension(gradients.size(), this->fe_interface->n_quadrature_points);
4489 
4490  for (const auto dof_index : this->fe_interface->dof_indices())
4491  for (const auto q_index : this->fe_interface->quadrature_point_indices())
4492  {
4493  if (dof_index == 0)
4494  gradients[q_index] = 0.;
4495 
4496  gradients[q_index] += local_dof_values[dof_index] *
4497  average_of_gradients(dof_index, q_index);
4498  }
4499  }
4500 
4501 
4502 
4503  template <int dim, int spacedim>
4504  template <class InputVector>
4505  void
4507  const InputVector &fe_function,
4508  std::vector<solution_gradient_type<typename InputVector::value_type>>
4509  &gradients) const
4510  {
4511  std::vector<typename InputVector::value_type> local_dof_values(
4512  this->fe_interface->n_current_interface_dofs());
4513  this->get_local_dof_values(fe_function, local_dof_values);
4514 
4515  get_average_of_function_gradients_from_local_dof_values(local_dof_values,
4516  gradients);
4517  }
4518 
4519 
4520 
4521  template <int dim, int spacedim>
4522  template <class InputVector>
4523  void
4525  const InputVector &local_dof_values,
4526  std::vector<solution_hessian_type<typename InputVector::value_type>>
4527  &hessians) const
4528  {
4529  AssertDimension(hessians.size(), this->fe_interface->n_quadrature_points);
4530 
4531  for (const auto dof_index : this->fe_interface->dof_indices())
4532  for (const auto q_index : this->fe_interface->quadrature_point_indices())
4533  {
4534  if (dof_index == 0)
4535  hessians[q_index] = 0.;
4536 
4537  hessians[q_index] +=
4538  local_dof_values[dof_index] * jump_in_hessians(dof_index, q_index);
4539  }
4540  }
4541 
4542 
4543 
4544  template <int dim, int spacedim>
4545  template <class InputVector>
4546  void
4548  const InputVector &fe_function,
4549  std::vector<solution_hessian_type<typename InputVector::value_type>>
4550  &hessians) const
4551  {
4552  std::vector<typename InputVector::value_type> local_dof_values(
4553  this->fe_interface->n_current_interface_dofs());
4554  this->get_local_dof_values(fe_function, local_dof_values);
4555 
4556  get_jump_in_function_hessians_from_local_dof_values(local_dof_values,
4557  hessians);
4558  }
4559 
4560 
4561 
4562  template <int dim, int spacedim>
4563  template <class InputVector>
4564  void
4566  const InputVector &local_dof_values,
4567  std::vector<solution_hessian_type<typename InputVector::value_type>>
4568  &hessians) const
4569  {
4570  AssertDimension(hessians.size(), this->fe_interface->n_quadrature_points);
4571 
4572  for (unsigned int dof_index : this->fe_interface->dof_indices())
4573  for (const auto q_index : this->fe_interface->quadrature_point_indices())
4574  {
4575  if (dof_index == 0)
4576  hessians[q_index] = 0.;
4577 
4578  hessians[q_index] += local_dof_values[dof_index] *
4579  average_of_hessians(dof_index, q_index);
4580  }
4581  }
4582 
4583 
4584 
4585  template <int dim, int spacedim>
4586  template <class InputVector>
4587  void
4589  const InputVector &fe_function,
4590  std::vector<solution_hessian_type<typename InputVector::value_type>>
4591  &hessians) const
4592  {
4593  std::vector<typename InputVector::value_type> local_dof_values(
4594  this->fe_interface->n_current_interface_dofs());
4595  this->get_local_dof_values(fe_function, local_dof_values);
4596 
4597  get_average_of_function_hessians_from_local_dof_values(local_dof_values,
4598  hessians);
4599  }
4600 
4601 
4602 
4603  template <int dim, int spacedim>
4604  template <class InputVector>
4605  void
4608  const InputVector &local_dof_values,
4609  std::vector<
4610  solution_third_derivative_type<typename InputVector::value_type>>
4611  &third_derivatives) const
4612  {
4613  AssertDimension(third_derivatives.size(),
4614  this->fe_interface->n_quadrature_points);
4615 
4616  for (unsigned int dof_index : this->fe_interface->dof_indices())
4617  for (const auto q_index : this->fe_interface->quadrature_point_indices())
4618  {
4619  if (dof_index == 0)
4620  third_derivatives[q_index] = 0.;
4621 
4622  third_derivatives[q_index] +=
4623  local_dof_values[dof_index] *
4624  jump_in_third_derivatives(dof_index, q_index);
4625  }
4626  }
4627 
4628 
4629 
4630  template <int dim, int spacedim>
4631  template <class InputVector>
4632  void
4634  const InputVector &fe_function,
4635  std::vector<
4636  solution_third_derivative_type<typename InputVector::value_type>>
4637  &third_derivatives) const
4638  {
4639  std::vector<typename InputVector::value_type> local_dof_values(
4640  this->fe_interface->n_current_interface_dofs());
4641  this->get_local_dof_values(fe_function, local_dof_values);
4642 
4643  get_jump_in_function_third_derivatives_from_local_dof_values(
4644  local_dof_values, third_derivatives);
4645  }
4646 } // namespace FEInterfaceViews
4647 
4648 #endif // DOXYGEN
4649 
4651 
4652 #endif
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, level_dof_access >> &cell, const unsigned int face_no)
const std::vector< Tensor< 1, spacedim > > & get_normal_vectors() const
std::unique_ptr< FEFaceValues< dim, spacedim > > internal_fe_face_values
std::vector< types::global_dof_index > get_interface_dof_indices() const
UpdateFlags get_update_flags() const
Tensor< 1, spacedim > jump_in_shape_gradients(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
Tensor< 1, spacedim > normal(const unsigned int q_point_index) const
FEFaceValuesBase< dim, spacedim > * fe_face_values_neighbor
Tensor< 2, spacedim > average_hessian(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
const hp::QCollection< dim - 1 > & get_quadrature_collection() const
void get_jump_in_function_third_derivatives(const InputVector &fe_function, std::vector< Tensor< 3, spacedim, typename InputVector::value_type >> &third_derivatives) const
const FEInterfaceViews::Scalar< dim, spacedim > operator[](const FEValuesExtractors::Scalar &scalar) const
bool at_boundary() const
Tensor< 1, spacedim > average_of_shape_gradients(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
FEInterfaceValues(const Mapping< dim, spacedim > &mapping, const FiniteElement< dim, spacedim > &fe, const Quadrature< dim - 1 > &quadrature, const UpdateFlags update_flags)
void reinit(const CellIteratorType &cell, const unsigned int face_no, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int)
FEInterfaceValues(const hp::MappingCollection< dim, spacedim > &mapping_collection, const hp::FECollection< dim, spacedim > &fe_collection, const hp::QCollection< dim - 1 > &quadrature_collection, const UpdateFlags update_flags)
std::unique_ptr< hp::FESubfaceValues< dim, spacedim > > internal_hp_fe_subface_values
const unsigned int n_quadrature_points
const Mapping< dim, spacedim > & get_mapping() const
bool has_hp_capabilities() const
Tensor< 1, spacedim > jump_gradient(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
std::array< unsigned int, 2 > interface_dof_to_dof_indices(const unsigned int interface_dof_index) const
unsigned n_current_interface_dofs() const
Tensor< 1, spacedim > average_gradient(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
double average_of_shape_values(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
double average(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
std::unique_ptr< FESubfaceValues< dim, spacedim > > internal_fe_subface_values
double shape_value(const bool here_or_there, const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
const hp::MappingCollection< dim, spacedim > & get_mapping_collection() const
const FEFaceValuesBase< dim, spacedim > & get_fe_face_values(const unsigned int cell_index) const
void get_jump_in_function_gradients(const InputVector &fe_function, std::vector< Tensor< 1, spacedim, typename InputVector::value_type >> &gradients) const
std_cxx20::ranges::iota_view< unsigned int, unsigned int > quadrature_point_indices() const
void get_average_of_function_hessians(const InputVector &fe_function, std::vector< Tensor< 2, spacedim, typename InputVector::value_type >> &hessians) const
std::unique_ptr< hp::FESubfaceValues< dim, spacedim > > internal_hp_fe_subface_values_neighbor
FEInterfaceValues(const hp::FECollection< dim, spacedim > &fe_collection, const hp::QCollection< dim - 1 > &quadrature_collection, const UpdateFlags update_flags)
const std::vector< Point< spacedim > > & get_quadrature_points() const
double jump(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
const Triangulation< dim, spacedim >::cell_iterator get_cell(const unsigned int cell_index) const
FEInterfaceValues(const Mapping< dim, spacedim > &mapping, const FiniteElement< dim, spacedim > &fe, const hp::QCollection< dim - 1 > &quadrature, const UpdateFlags update_flags)
FEFaceValuesBase< dim, spacedim > * fe_face_values
std::vector< types::global_dof_index > interface_dof_indices
std::unique_ptr< FESubfaceValues< dim, spacedim > > internal_fe_subface_values_neighbor
const std::vector< double > & get_JxW_values() const
const FEInterfaceViews::Vector< dim, spacedim > operator[](const FEValuesExtractors::Vector &vector) const
std::vector< std::array< unsigned int, 2 > > dofmap
const hp::FECollection< dim, spacedim > & get_fe_collection() const
double JxW(const unsigned int quadrature_point) const
void get_average_of_function_values(const InputVector &fe_function, std::vector< typename InputVector::value_type > &values) const
const Quadrature< dim - 1 > & get_quadrature() const
std::unique_ptr< hp::FEFaceValues< dim, spacedim > > internal_hp_fe_face_values_neighbor
double jump_in_shape_values(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
unsigned int get_face_number(const unsigned int cell_index) const
void get_jump_in_function_hessians(const InputVector &fe_function, std::vector< Tensor< 2, spacedim, typename InputVector::value_type >> &hessians) const
FEInterfaceValues(const FiniteElement< dim, spacedim > &fe, const Quadrature< dim - 1 > &quadrature, const UpdateFlags update_flags)
void reinit(const CellIteratorType &cell, const unsigned int face_no, const unsigned int sub_face_no, const CellNeighborIteratorType &cell_neighbor, const unsigned int face_no_neighbor, const unsigned int sub_face_no_neighbor, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int)
Tensor< 3, spacedim > jump_3rd_derivative(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
Tensor< 2, spacedim > jump_hessian(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
const FiniteElement< dim, spacedim > & get_fe() const
Tensor< 2, spacedim > average_of_shape_hessians(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
std::unique_ptr< FEFaceValues< dim, spacedim > > internal_fe_face_values_neighbor
std_cxx20::ranges::iota_view< unsigned int, unsigned int > dof_indices() const
void get_jump_in_function_values(const InputVector &fe_function, std::vector< typename InputVector::value_type > &values) const
Tensor< 3, spacedim > jump_in_shape_3rd_derivatives(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const
void get_average_of_function_gradients(const InputVector &fe_function, std::vector< Tensor< 1, spacedim, typename InputVector::value_type >> &gradients) const
void get_local_dof_values(const InputVector &dof_values, OutputVector &local_dof_values) const
Base(const FEInterfaceValues< dim, spacedim > &fe_interface)
const FEInterfaceValues< dim, spacedim > * fe_interface
void get_average_of_function_hessians(const InputVector &fe_function, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
gradient_type average_gradient(const unsigned int interface_dof_index, const unsigned int q_point) const
gradient_type jump_in_gradients(const unsigned int interface_dof_index, const unsigned int q_point) const
hessian_type jump_hessian(const unsigned int interface_dof_index, const unsigned int q_point) const
gradient_type jump_gradient(const unsigned int interface_dof_index, const unsigned int q_point) const
hessian_type jump_in_hessians(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_jump_in_function_values(const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
void get_average_of_function_values(const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
void get_average_of_function_values_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
void get_function_values(const bool here_or_there, const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
const FEValuesExtractors::Scalar extractor
void get_jump_in_function_values_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
value_type jump(const unsigned int interface_dof_index, const unsigned int q_point) const
typename FEValuesViews::Scalar< dim, spacedim >::gradient_type gradient_type
hessian_type average_of_hessians(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_function_values_from_local_dof_values(const bool here_or_there, const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
value_type value(const bool here_or_there, const unsigned int interface_dof_index, const unsigned int q_point) const
value_type average(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_jump_in_function_gradients(const InputVector &fe_function, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
void get_jump_in_function_gradients_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
value_type average_value(const unsigned int interface_dof_index, const unsigned int q_point) const
hessian_type average_hessian(const unsigned int interface_dof_index, const unsigned int q_point) const
typename ProductType< Number, value_type >::type solution_value_type
typename ProductType< Number, third_derivative_type >::type solution_third_derivative_type
void get_jump_in_function_hessians_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
void get_average_of_function_gradients_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
void get_average_of_function_gradients(const InputVector &fe_function, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
Scalar(const FEInterfaceValues< dim, spacedim > &fe_interface, const unsigned int component)
void get_jump_in_function_hessians(const InputVector &fe_function, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
typename FEValuesViews::Scalar< dim, spacedim >::hessian_type hessian_type
void get_jump_in_function_third_derivatives(const InputVector &fe_function, std::vector< solution_third_derivative_type< typename InputVector::value_type >> &third_derivatives) const
third_derivative_type jump_in_third_derivatives(const unsigned int interface_dof_index, const unsigned int q_point) const
gradient_type average_of_gradients(const unsigned int interface_dof_index, const unsigned int q_point) const
third_derivative_type jump_3rd_derivative(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_jump_in_function_third_derivatives_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_third_derivative_type< typename InputVector::value_type >> &third_derivatives) const
void get_average_of_function_hessians_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
value_type average_of_values(const unsigned int interface_dof_index, const unsigned int q_point) const
value_type jump_in_values(const unsigned int interface_dof_index, const unsigned int q_point) const
typename FEValuesViews::Scalar< dim, spacedim >::third_derivative_type third_derivative_type
typename ProductType< Number, hessian_type >::type solution_hessian_type
typename ProductType< Number, gradient_type >::type solution_gradient_type
void get_function_values_from_local_dof_values(const bool here_or_there, const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
const FEValuesExtractors::Vector extractor
void get_jump_in_function_hessians(const InputVector &fe_function, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
void get_average_of_function_hessians(const InputVector &fe_function, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
void get_jump_in_function_gradients(const InputVector &fe_function, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
void get_jump_in_function_hessians_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
hessian_type average_hessian(const unsigned int interface_dof_index, const unsigned int q_point) const
value_type average(const unsigned int interface_dof_index, const unsigned int q_point) const
Vector(const FEInterfaceValues< dim, spacedim > &fe_interface, const unsigned int first_vector_component)
void get_jump_in_function_gradients_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
void get_jump_in_function_third_derivatives(const InputVector &fe_function, std::vector< solution_third_derivative_type< typename InputVector::value_type >> &third_derivatives) const
void get_average_of_function_values(const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
typename ProductType< Number, gradient_type >::type solution_gradient_type
hessian_type jump_hessian(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_average_of_function_hessians_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_hessian_type< typename InputVector::value_type >> &hessians) const
typename ProductType< Number, value_type >::type solution_value_type
typename FEValuesViews::Vector< dim, spacedim >::value_type value_type
value_type value(const bool here_or_there, const unsigned int interface_dof_index, const unsigned int q_point) const
third_derivative_type jump_in_third_derivatives(const unsigned int interface_dof_index, const unsigned int q_point) const
third_derivative_type jump_3rd_derivative(const unsigned int interface_dof_index, const unsigned int q_point) const
value_type jump_in_values(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_jump_in_function_values_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
void get_average_of_function_gradients(const InputVector &fe_function, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
value_type jump(const unsigned int interface_dof_index, const unsigned int q_point) const
typename ProductType< Number, hessian_type >::type solution_hessian_type
void get_average_of_function_values_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
gradient_type jump_gradient(const unsigned int interface_dof_index, const unsigned int q_point) const
value_type average_of_values(const unsigned int interface_dof_index, const unsigned int q_point) const
hessian_type jump_in_hessians(const unsigned int interface_dof_index, const unsigned int q_point) const
void get_function_values(const bool here_or_there, const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
gradient_type average_of_gradients(const unsigned int interface_dof_index, const unsigned int q_point) const
typename ProductType< Number, third_derivative_type >::type solution_third_derivative_type
void get_jump_in_function_values(const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
typename FEValuesViews::Vector< dim, spacedim >::gradient_type gradient_type
gradient_type jump_in_gradients(const unsigned int interface_dof_index, const unsigned int q_point) const
typename FEValuesViews::Vector< dim, spacedim >::third_derivative_type third_derivative_type
void get_jump_in_function_third_derivatives_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_third_derivative_type< typename InputVector::value_type >> &third_derivatives) const
void get_average_of_function_gradients_from_local_dof_values(const InputVector &local_dof_values, std::vector< solution_gradient_type< typename InputVector::value_type >> &gradients) const
gradient_type average_gradient(const unsigned int interface_dof_index, const unsigned int q_point) const
hessian_type average_of_hessians(const unsigned int interface_dof_index, const unsigned int q_point) const
typename FEValuesViews::Vector< dim, spacedim >::hessian_type hessian_type
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, level_dof_access >> &cell, const unsigned int face_no, const unsigned int subface_no)
value_type value(const unsigned int shape_function, const unsigned int q_point) const
void get_function_values_from_local_dof_values(const InputVector &dof_values, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
Definition: fe_values.cc:1576
void get_function_values(const InputVector &fe_function, std::vector< solution_value_type< typename InputVector::value_type >> &values) const
Definition: fe_values.cc:1545
::Tensor< 1, spacedim > gradient_type
Definition: fe_values.h:162
::Tensor< 2, spacedim > hessian_type
Definition: fe_values.h:169
::Tensor< 3, spacedim > third_derivative_type
Definition: fe_values.h:176
Definition: vector.h:109
friend class Vector
Definition: vector.h:1050
#define DEAL_II_DEPRECATED
Definition: config.h:174
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:474
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:475
unsigned int cell_index
Definition: grid_tools.cc:1191
static ::ExceptionBase & ExcOnlyAvailableWithHP()
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcNotInitialized()
static ::ExceptionBase & ExcOnlyAvailableWithoutHP()
#define Assert(cond, exc)
Definition: exceptions.h:1586
#define AssertDimension(dim1, dim2)
Definition: exceptions.h:1759
#define AssertIndexRange(index, range)
Definition: exceptions.h:1827
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:488
static ::ExceptionBase & ExcMessage(std::string arg1)
UpdateFlags
const Mapping< dim, spacedim > & get_default_linear_mapping(const Triangulation< dim, spacedim > &triangulation)
Definition: mapping.cc:285
typename ::internal::FEInterfaceViews::ViewType< dim, spacedim, Extractor >::type View
void reference_cell(Triangulation< dim, spacedim > &tria, const ReferenceCell &reference_cell)
static const char U
Definition: hp.h:118
static const unsigned int invalid_unsigned_int
Definition: types.h:213
boost::integer_range< IncrementableType > iota_view
Definition: iota_view.h:46
unsigned short int fe_index
Definition: types.h:60
typename internal::ProductTypeImpl< typename std::decay< T >::type, typename std::decay< U >::type >::type type