Reference documentation for deal.II version 9.1.0-pre
vector_tools.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 2018 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_vector_tools_h
17 #define dealii_vector_tools_h
18 
19 
20 #include <deal.II/base/config.h>
21 
22 #include <deal.II/base/exceptions.h>
23 #include <deal.II/base/function.h>
24 #include <deal.II/base/point.h>
25 #include <deal.II/base/quadrature_lib.h>
26 
27 #include <deal.II/dofs/deprecated_function_map.h>
28 #include <deal.II/dofs/dof_handler.h>
29 
30 #include <deal.II/hp/dof_handler.h>
31 #include <deal.II/hp/mapping_collection.h>
32 
33 #include <functional>
34 #include <map>
35 #include <set>
36 #include <vector>
37 
38 DEAL_II_NAMESPACE_OPEN
39 
40 template <int dim, typename RangeNumberType>
41 class Function;
42 template <int dim>
43 class Quadrature;
44 template <int dim>
45 class QGauss;
46 template <int dim, typename number>
47 class MatrixFree;
48 
49 template <typename number>
50 class Vector;
51 template <typename number>
52 class FullMatrix;
53 template <int dim, int spacedim>
54 class Mapping;
55 template <typename gridtype>
56 class InterGridMap;
57 namespace hp
58 {
59  template <int dim>
60  class QCollection;
61 }
62 template <typename number>
63 class AffineConstraints;
64 
65 
66 // TODO: Move documentation of functions to the functions!
67 
333 namespace VectorTools
334 {
360  enum NormType
361  {
387 
403 
421 
439 
456 
473 
494 
512 
529 
548 
566 
582 
583  };
588 
589 
590 
610  template <int dim,
611  int spacedim,
612  typename VectorType,
613  template <int, int> class DoFHandlerType>
614  void
615  interpolate(
616  const Mapping<dim, spacedim> & mapping,
617  const DoFHandlerType<dim, spacedim> & dof,
619  VectorType & vec,
620  const ComponentMask &component_mask = ComponentMask());
621 
626  template <int dim,
627  int spacedim,
628  typename VectorType,
629  template <int, int> class DoFHandlerType>
630  void
631  interpolate(
632  const DoFHandlerType<dim, spacedim> & dof,
634  VectorType & vec,
635  const ComponentMask &component_mask = ComponentMask());
636 
653  template <int dim, class InVector, class OutVector, int spacedim>
654  void
655  interpolate(const DoFHandler<dim, spacedim> &dof_1,
656  const DoFHandler<dim, spacedim> &dof_2,
657  const FullMatrix<double> & transfer,
658  const InVector & data_1,
659  OutVector & data_2);
660 
707  template <int dim,
708  int spacedim,
709  typename VectorType,
710  template <int, int> class DoFHandlerType>
711  void
713  const Mapping<dim, spacedim> & mapping,
714  const DoFHandlerType<dim, spacedim> &dof_handler,
715  const std::map<types::material_id,
717  & function_map,
718  VectorType & dst,
719  const ComponentMask &component_mask = ComponentMask());
720 
745  template <int dim,
746  int spacedim,
747  typename VectorType,
748  template <int, int> class DoFHandlerType>
749  void
750  interpolate_to_different_mesh(const DoFHandlerType<dim, spacedim> &dof1,
751  const VectorType & u1,
752  const DoFHandlerType<dim, spacedim> &dof2,
753  VectorType & u2);
754 
768  template <int dim,
769  int spacedim,
770  typename VectorType,
771  template <int, int> class DoFHandlerType>
772  void
774  const DoFHandlerType<dim, spacedim> & dof1,
775  const VectorType & u1,
776  const DoFHandlerType<dim, spacedim> & dof2,
778  VectorType & u2);
779 
787  template <int dim,
788  int spacedim,
789  typename VectorType,
790  template <int, int> class DoFHandlerType>
791  void
793  const InterGridMap<DoFHandlerType<dim, spacedim>> & intergridmap,
794  const VectorType & u1,
796  VectorType & u2);
797 
849  template <int dim, typename VectorType, int spacedim>
850  void
851  project(const Mapping<dim, spacedim> & mapping,
852  const DoFHandler<dim, spacedim> & dof,
854  const Quadrature<dim> & quadrature,
856  VectorType & vec,
857  const bool enforce_zero_boundary = false,
858  const Quadrature<dim - 1> &q_boundary = (dim > 1 ?
859  QGauss<dim - 1>(2) :
861  const bool project_to_boundary_first = false);
862 
867  template <int dim, typename VectorType, int spacedim>
868  void
871  const Quadrature<dim> & quadrature,
873  VectorType & vec,
874  const bool enforce_zero_boundary = false,
875  const Quadrature<dim - 1> &q_boundary = (dim > 1 ?
876  QGauss<dim - 1>(2) :
878  const bool project_to_boundary_first = false);
879 
884  template <int dim, typename VectorType, int spacedim>
885  void
887  const hp::DoFHandler<dim, spacedim> & dof,
889  const hp::QCollection<dim> & quadrature,
891  VectorType & vec,
892  const bool enforce_zero_boundary = false,
894  dim > 1 ? QGauss<dim - 1>(2) : Quadrature<dim - 1>(0)),
895  const bool project_to_boundary_first = false);
896 
901  template <int dim, typename VectorType, int spacedim>
902  void
905  const hp::QCollection<dim> & quadrature,
907  VectorType & vec,
908  const bool enforce_zero_boundary = false,
910  dim > 1 ? QGauss<dim - 1>(2) : Quadrature<dim - 1>(0)),
911  const bool project_to_boundary_first = false);
912 
937  template <int dim, typename VectorType, int spacedim>
938  void
939  project(const Mapping<dim, spacedim> & mapping,
940  const DoFHandler<dim, spacedim> & dof,
942  const Quadrature<dim> & quadrature,
943  const std::function<typename VectorType::value_type(
945  const unsigned int)> & func,
946  VectorType & vec_result);
947 
976  template <int dim, typename VectorType>
977  void
978  project(std::shared_ptr<
981  const unsigned int n_q_points_1d,
983  const unsigned int,
984  const unsigned int)> &func,
985  VectorType & vec_result,
986  const unsigned int fe_component = 0);
987 
992  template <int dim, typename VectorType>
993  void
994  project(std::shared_ptr<
998  const unsigned int,
999  const unsigned int)> & func,
1000  VectorType & vec_result,
1001  const unsigned int fe_component = 0);
1002 
1053  template <int dim,
1054  int spacedim,
1055  template <int, int> class DoFHandlerType,
1056  typename number>
1057  void
1059  const Mapping<dim, spacedim> & mapping,
1060  const DoFHandlerType<dim, spacedim> &dof,
1061  const std::map<types::boundary_id, const Function<spacedim, number> *>
1062  & function_map,
1063  std::map<types::global_dof_index, number> &boundary_values,
1064  const ComponentMask &component_mask = ComponentMask());
1065 
1070  template <int dim, int spacedim, typename number>
1071  void
1073  const hp::MappingCollection<dim, spacedim> &mapping,
1074  const hp::DoFHandler<dim, spacedim> & dof,
1075  const std::map<types::boundary_id, const Function<spacedim, number> *>
1076  & function_map,
1077  std::map<types::global_dof_index, number> &boundary_values,
1078  const ComponentMask &component_mask = ComponentMask());
1079 
1089  template <int dim,
1090  int spacedim,
1091  template <int, int> class DoFHandlerType,
1092  typename number>
1093  void
1095  const Mapping<dim, spacedim> & mapping,
1096  const DoFHandlerType<dim, spacedim> & dof,
1097  const types::boundary_id boundary_component,
1098  const Function<spacedim, number> & boundary_function,
1099  std::map<types::global_dof_index, number> &boundary_values,
1100  const ComponentMask &component_mask = ComponentMask());
1101 
1111  template <int dim,
1112  int spacedim,
1113  template <int, int> class DoFHandlerType,
1114  typename number>
1115  void
1117  const DoFHandlerType<dim, spacedim> & dof,
1118  const types::boundary_id boundary_component,
1119  const Function<spacedim, number> & boundary_function,
1120  std::map<types::global_dof_index, number> &boundary_values,
1121  const ComponentMask &component_mask = ComponentMask());
1122 
1123 
1130  template <int dim,
1131  int spacedim,
1132  template <int, int> class DoFHandlerType,
1133  typename number>
1134  void
1136  const DoFHandlerType<dim, spacedim> &dof,
1137  const std::map<types::boundary_id, const Function<spacedim, number> *>
1138  & function_map,
1139  std::map<types::global_dof_index, number> &boundary_values,
1140  const ComponentMask &component_mask = ComponentMask());
1141 
1142 
1204  template <int dim,
1205  int spacedim,
1206  template <int, int> class DoFHandlerType,
1207  typename number>
1208  void
1210  const Mapping<dim, spacedim> & mapping,
1211  const DoFHandlerType<dim, spacedim> &dof,
1212  const std::map<types::boundary_id, const Function<spacedim, number> *>
1213  & function_map,
1214  AffineConstraints<number> &constraints,
1215  const ComponentMask & component_mask = ComponentMask());
1216 
1228  template <int dim,
1229  int spacedim,
1230  template <int, int> class DoFHandlerType,
1231  typename number>
1232  void
1234  const Mapping<dim, spacedim> & mapping,
1235  const DoFHandlerType<dim, spacedim> &dof,
1236  const types::boundary_id boundary_component,
1237  const Function<spacedim, number> & boundary_function,
1238  AffineConstraints<number> & constraints,
1239  const ComponentMask & component_mask = ComponentMask());
1240 
1252  template <int dim,
1253  int spacedim,
1254  template <int, int> class DoFHandlerType,
1255  typename number>
1256  void
1258  const DoFHandlerType<dim, spacedim> &dof,
1259  const types::boundary_id boundary_component,
1260  const Function<spacedim, number> & boundary_function,
1261  AffineConstraints<number> & constraints,
1262  const ComponentMask & component_mask = ComponentMask());
1263 
1264 
1273  template <int dim,
1274  int spacedim,
1275  template <int, int> class DoFHandlerType,
1276  typename number>
1277  void
1279  const DoFHandlerType<dim, spacedim> &dof,
1280  const std::map<types::boundary_id, const Function<spacedim, number> *>
1281  & function_map,
1282  AffineConstraints<number> &constraints,
1283  const ComponentMask & component_mask = ComponentMask());
1284 
1285 
1350  template <int dim, int spacedim, typename number>
1351  void
1353  const Mapping<dim, spacedim> & mapping,
1354  const DoFHandler<dim, spacedim> &dof,
1355  const std::map<types::boundary_id, const Function<spacedim, number> *>
1356  & boundary_functions,
1357  const Quadrature<dim - 1> & q,
1358  std::map<types::global_dof_index, number> &boundary_values,
1359  std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1360 
1365  template <int dim, int spacedim, typename number>
1366  void
1368  const DoFHandler<dim, spacedim> &dof,
1369  const std::map<types::boundary_id, const Function<spacedim, number> *>
1370  & boundary_function,
1371  const Quadrature<dim - 1> & q,
1372  std::map<types::global_dof_index, number> &boundary_values,
1373  std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1374 
1378  template <int dim, int spacedim, typename number>
1379  void
1381  const hp::MappingCollection<dim, spacedim> &mapping,
1382  const hp::DoFHandler<dim, spacedim> & dof,
1383  const std::map<types::boundary_id, const Function<spacedim, number> *>
1384  & boundary_functions,
1385  const hp::QCollection<dim - 1> & q,
1386  std::map<types::global_dof_index, number> &boundary_values,
1387  std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1388 
1393  template <int dim, int spacedim, typename number>
1394  void
1396  const hp::DoFHandler<dim, spacedim> &dof,
1397  const std::map<types::boundary_id, const Function<spacedim, number> *>
1398  & boundary_function,
1399  const hp::QCollection<dim - 1> & q,
1400  std::map<types::global_dof_index, number> &boundary_values,
1401  std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1402 
1441  template <int dim, int spacedim, typename number>
1442  void
1444  const Mapping<dim, spacedim> & mapping,
1445  const DoFHandler<dim, spacedim> &dof,
1446  const std::map<types::boundary_id, const Function<spacedim, number> *>
1447  & boundary_functions,
1448  const Quadrature<dim - 1> &q,
1449  AffineConstraints<number> &constraints,
1450  std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1451 
1458  template <int dim, int spacedim, typename number>
1459  void
1461  const DoFHandler<dim, spacedim> &dof,
1462  const std::map<types::boundary_id, const Function<spacedim, number> *>
1463  & boundary_function,
1464  const Quadrature<dim - 1> &q,
1465  AffineConstraints<number> &constraints,
1466  std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1467 
1468 
1526  template <int dim>
1527  DEAL_II_DEPRECATED void
1529  const DoFHandler<dim> & dof_handler,
1530  const unsigned int first_vector_component,
1531  const Function<dim, double> &boundary_function,
1532  const types::boundary_id boundary_component,
1533  AffineConstraints<double> & constraints,
1534  const Mapping<dim> & mapping = StaticMappingQ1<dim>::mapping);
1535 
1547  template <int dim>
1548  DEAL_II_DEPRECATED void
1550  const hp::DoFHandler<dim> & dof_handler,
1551  const unsigned int first_vector_component,
1552  const Function<dim, double> & boundary_function,
1553  const types::boundary_id boundary_component,
1554  AffineConstraints<double> & constraints,
1555  const hp::MappingCollection<dim, dim> &mapping_collection =
1557 
1653  template <int dim>
1654  void
1656  const DoFHandler<dim> & dof_handler,
1657  const unsigned int first_vector_component,
1658  const Function<dim, double> &boundary_function,
1659  const types::boundary_id boundary_component,
1660  AffineConstraints<double> & constraints,
1661  const Mapping<dim> & mapping = StaticMappingQ1<dim>::mapping);
1662 
1663 
1670  template <int dim>
1671  void
1673  const hp::DoFHandler<dim> & dof_handler,
1674  const unsigned int first_vector_component,
1675  const Function<dim, double> & boundary_function,
1676  const types::boundary_id boundary_component,
1677  AffineConstraints<double> & constraints,
1678  const hp::MappingCollection<dim, dim> &mapping_collection =
1680 
1681 
1728  template <int dim>
1729  void
1731  const DoFHandler<dim> & dof_handler,
1732  const unsigned int first_vector_component,
1733  const Function<dim, double> &boundary_function,
1734  const types::boundary_id boundary_component,
1735  AffineConstraints<double> & constraints,
1736  const Mapping<dim> & mapping = StaticMappingQ1<dim>::mapping);
1737 
1746  template <int dim>
1747  void
1749  const hp::DoFHandler<dim> & dof_handler,
1750  const unsigned int first_vector_component,
1751  const Function<dim, double> & boundary_function,
1752  const types::boundary_id boundary_component,
1753  AffineConstraints<double> & constraints,
1754  const hp::MappingCollection<dim, dim> &mapping_collection =
1756 
1757 
1985  template <int dim, int spacedim, template <int, int> class DoFHandlerType>
1986  void
1988  const DoFHandlerType<dim, spacedim> &dof_handler,
1989  const unsigned int first_vector_component,
1990  const std::set<types::boundary_id> & boundary_ids,
1991  const std::map<types::boundary_id, const Function<spacedim> *>
1992  & function_map,
1993  AffineConstraints<double> & constraints,
1995 
2008  template <int dim, int spacedim, template <int, int> class DoFHandlerType>
2009  void
2011  const DoFHandlerType<dim, spacedim> &dof_handler,
2012  const unsigned int first_vector_component,
2013  const std::set<types::boundary_id> & boundary_ids,
2014  AffineConstraints<double> & constraints,
2016 
2033  template <int dim, int spacedim, template <int, int> class DoFHandlerType>
2034  void
2036  const DoFHandlerType<dim, spacedim> &dof_handler,
2037  const unsigned int first_vector_component,
2038  const std::set<types::boundary_id> & boundary_ids,
2039  const std::map<types::boundary_id, const Function<spacedim> *>
2040  & function_map,
2041  AffineConstraints<double> & constraints,
2043 
2052  template <int dim, int spacedim, template <int, int> class DoFHandlerType>
2053  void
2055  const DoFHandlerType<dim, spacedim> &dof_handler,
2056  const unsigned int first_vector_component,
2057  const std::set<types::boundary_id> & boundary_ids,
2058  AffineConstraints<double> & constraints,
2060 
2061 
2063 
2067 
2074  template <int dim, int spacedim, typename VectorType>
2075  void
2077  const Mapping<dim, spacedim> & mapping,
2078  const DoFHandler<dim, spacedim> & dof,
2079  const Quadrature<dim> & q,
2081  VectorType & rhs_vector,
2084 
2089  template <int dim, int spacedim, typename VectorType>
2090  void
2092  const DoFHandler<dim, spacedim> & dof,
2093  const Quadrature<dim> & q,
2095  VectorType & rhs_vector,
2098 
2102  template <int dim, int spacedim, typename VectorType>
2103  void
2105  const hp::MappingCollection<dim, spacedim> & mapping,
2106  const hp::DoFHandler<dim, spacedim> & dof,
2107  const hp::QCollection<dim> & q,
2109  VectorType & rhs_vector,
2112 
2116  template <int dim, int spacedim, typename VectorType>
2117  void
2119  const hp::DoFHandler<dim, spacedim> & dof,
2120  const hp::QCollection<dim> & q,
2122  VectorType & rhs_vector,
2125 
2177  template <int dim, int spacedim>
2178  void
2180  const DoFHandler<dim, spacedim> &dof_handler,
2181  const Point<spacedim> & p,
2182  Vector<double> & rhs_vector);
2183 
2188  template <int dim, int spacedim>
2189  void
2191  const Point<spacedim> & p,
2192  Vector<double> & rhs_vector);
2193 
2197  template <int dim, int spacedim>
2198  void
2200  const hp::MappingCollection<dim, spacedim> &mapping,
2201  const hp::DoFHandler<dim, spacedim> & dof_handler,
2202  const Point<spacedim> & p,
2203  Vector<double> & rhs_vector);
2204 
2211  template <int dim, int spacedim>
2212  void
2214  const Point<spacedim> & p,
2215  Vector<double> & rhs_vector);
2216 
2235  template <int dim, int spacedim>
2236  void
2238  const DoFHandler<dim, spacedim> &dof_handler,
2239  const Point<spacedim> & p,
2240  const Point<dim> & direction,
2241  Vector<double> & rhs_vector);
2242 
2247  template <int dim, int spacedim>
2248  void
2250  const Point<spacedim> & p,
2251  const Point<dim> & direction,
2252  Vector<double> & rhs_vector);
2253 
2257  template <int dim, int spacedim>
2258  void
2260  const hp::MappingCollection<dim, spacedim> &mapping,
2261  const hp::DoFHandler<dim, spacedim> & dof_handler,
2262  const Point<spacedim> & p,
2263  const Point<dim> & direction,
2264  Vector<double> & rhs_vector);
2265 
2272  template <int dim, int spacedim>
2273  void
2275  const Point<spacedim> & p,
2276  const Point<dim> & direction,
2277  Vector<double> & rhs_vector);
2278 
2288  template <int dim, int spacedim, typename VectorType>
2289  void
2291  const Mapping<dim, spacedim> & mapping,
2292  const DoFHandler<dim, spacedim> & dof,
2293  const Quadrature<dim - 1> & q,
2295  VectorType & rhs_vector,
2296  const std::set<types::boundary_id> & boundary_ids =
2297  std::set<types::boundary_id>());
2298 
2306  template <int dim, int spacedim, typename VectorType>
2307  void
2309  const DoFHandler<dim, spacedim> & dof,
2310  const Quadrature<dim - 1> & q,
2312  VectorType & rhs_vector,
2313  const std::set<types::boundary_id> & boundary_ids =
2314  std::set<types::boundary_id>());
2315 
2322  template <int dim, int spacedim, typename VectorType>
2323  void
2325  const hp::MappingCollection<dim, spacedim> & mapping,
2326  const hp::DoFHandler<dim, spacedim> & dof,
2327  const hp::QCollection<dim - 1> & q,
2329  VectorType & rhs_vector,
2330  const std::set<types::boundary_id> & boundary_ids =
2331  std::set<types::boundary_id>());
2332 
2341  template <int dim, int spacedim, typename VectorType>
2342  void
2344  const hp::DoFHandler<dim, spacedim> & dof,
2345  const hp::QCollection<dim - 1> & q,
2347  VectorType & rhs_vector,
2348  const std::set<types::boundary_id> & boundary_ids =
2349  std::set<types::boundary_id>());
2350 
2352 
2356 
2444  template <int dim, class InVector, class OutVector, int spacedim>
2445  void
2447  const DoFHandler<dim, spacedim> & dof,
2448  const InVector & fe_function,
2449  const Function<spacedim, double> &exact_solution,
2450  OutVector & difference,
2451  const Quadrature<dim> & q,
2452  const NormType & norm,
2453  const Function<spacedim, double> *weight = nullptr,
2454  const double exponent = 2.);
2455 
2460  template <int dim, class InVector, class OutVector, int spacedim>
2461  void
2463  const InVector & fe_function,
2464  const Function<spacedim, double> &exact_solution,
2465  OutVector & difference,
2466  const Quadrature<dim> & q,
2467  const NormType & norm,
2468  const Function<spacedim, double> *weight = nullptr,
2469  const double exponent = 2.);
2470 
2474  template <int dim, class InVector, class OutVector, int spacedim>
2475  void
2477  const hp::DoFHandler<dim, spacedim> & dof,
2478  const InVector & fe_function,
2479  const Function<spacedim, double> &exact_solution,
2480  OutVector & difference,
2481  const hp::QCollection<dim> & q,
2482  const NormType & norm,
2483  const Function<spacedim, double> *weight = nullptr,
2484  const double exponent = 2.);
2485 
2490  template <int dim, class InVector, class OutVector, int spacedim>
2491  void
2493  const InVector & fe_function,
2494  const Function<spacedim, double> & exact_solution,
2495  OutVector & difference,
2496  const hp::QCollection<dim> & q,
2497  const NormType & norm,
2498  const Function<spacedim, double> * weight = nullptr,
2499  const double exponent = 2.);
2500 
2526  template <int dim, int spacedim, class InVector>
2527  double
2529  const InVector & cellwise_error,
2530  const NormType & norm,
2531  const double exponent = 2.);
2532 
2545  template <int dim, typename VectorType, int spacedim>
2546  void
2548  const DoFHandler<dim, spacedim> & dof,
2549  const VectorType & fe_function,
2552  const Point<spacedim> & point);
2553 
2566  template <int dim, typename VectorType, int spacedim>
2567  void
2569  const Mapping<dim, spacedim> & mapping,
2570  const DoFHandler<dim, spacedim> & dof,
2571  const VectorType & fe_function,
2574  const Point<spacedim> & point);
2575 
2598  template <int dim, typename VectorType, int spacedim>
2599  void
2601  const VectorType & fe_function,
2602  const Point<spacedim> & point,
2604 
2622  template <int dim, typename VectorType, int spacedim>
2623  void
2625  const VectorType & fe_function,
2626  const Point<spacedim> & point,
2628 
2655  template <int dim, typename VectorType, int spacedim>
2656  typename VectorType::value_type
2658  const VectorType & fe_function,
2659  const Point<spacedim> & point);
2660 
2678  template <int dim, typename VectorType, int spacedim>
2679  typename VectorType::value_type
2681  const VectorType & fe_function,
2682  const Point<spacedim> & point);
2683 
2706  template <int dim, typename VectorType, int spacedim>
2707  void
2708  point_value(const Mapping<dim, spacedim> & mapping,
2709  const DoFHandler<dim, spacedim> & dof,
2710  const VectorType & fe_function,
2711  const Point<spacedim> & point,
2713 
2731  template <int dim, typename VectorType, int spacedim>
2732  void
2734  const hp::DoFHandler<dim, spacedim> & dof,
2735  const VectorType & fe_function,
2736  const Point<spacedim> & point,
2738 
2761  template <int dim, typename VectorType, int spacedim>
2762  typename VectorType::value_type
2763  point_value(const Mapping<dim, spacedim> & mapping,
2764  const DoFHandler<dim, spacedim> &dof,
2765  const VectorType & fe_function,
2766  const Point<spacedim> & point);
2767 
2785  template <int dim, typename VectorType, int spacedim>
2786  typename VectorType::value_type
2788  const hp::DoFHandler<dim, spacedim> & dof,
2789  const VectorType & fe_function,
2790  const Point<spacedim> & point);
2791 
2813  template <int dim, typename VectorType, int spacedim>
2814  void
2816  const DoFHandler<dim, spacedim> &dof,
2817  const VectorType & fe_function,
2818  const Point<spacedim> & point,
2820 
2837  template <int dim, typename VectorType, int spacedim>
2838  void
2840  const hp::DoFHandler<dim, spacedim> &dof,
2841  const VectorType & fe_function,
2842  const Point<spacedim> & point,
2844 
2866  template <int dim, typename VectorType, int spacedim>
2869  const VectorType & fe_function,
2870  const Point<spacedim> & point);
2871 
2888  template <int dim, typename VectorType, int spacedim>
2891  const VectorType & fe_function,
2892  const Point<spacedim> & point);
2893 
2915  template <int dim, typename VectorType, int spacedim>
2916  void
2918  const Mapping<dim, spacedim> & mapping,
2919  const DoFHandler<dim, spacedim> &dof,
2920  const VectorType & fe_function,
2921  const Point<spacedim> & point,
2923 
2940  template <int dim, typename VectorType, int spacedim>
2941  void
2943  const hp::MappingCollection<dim, spacedim> &mapping,
2944  const hp::DoFHandler<dim, spacedim> & dof,
2945  const VectorType & fe_function,
2946  const Point<spacedim> & point,
2948 
2970  template <int dim, typename VectorType, int spacedim>
2972  point_gradient(const Mapping<dim, spacedim> & mapping,
2973  const DoFHandler<dim, spacedim> &dof,
2974  const VectorType & fe_function,
2975  const Point<spacedim> & point);
2976 
2993  template <int dim, typename VectorType, int spacedim>
2996  const hp::DoFHandler<dim, spacedim> & dof,
2997  const VectorType & fe_function,
2998  const Point<spacedim> & point);
2999 
3001 
3005 
3055  template <typename VectorType>
3056  void
3057  subtract_mean_value(VectorType & v,
3058  const std::vector<bool> &p_select = std::vector<bool>());
3059 
3060 
3084  template <int dim, typename VectorType, int spacedim>
3085  typename VectorType::value_type
3087  const DoFHandler<dim, spacedim> &dof,
3088  const Quadrature<dim> & quadrature,
3089  const VectorType & v,
3090  const unsigned int component);
3091 
3096  template <int dim, typename VectorType, int spacedim>
3097  typename VectorType::value_type
3099  const Quadrature<dim> & quadrature,
3100  const VectorType & v,
3101  const unsigned int component);
3103 
3133  template <int dim,
3134  int spacedim,
3135  template <int, int> class DoFHandlerType,
3136  typename VectorType>
3137  void
3138  get_position_vector(const DoFHandlerType<dim, spacedim> &dh,
3139  VectorType & vector,
3140  const ComponentMask &mask = ComponentMask());
3141 
3143 
3148  "The given point is inside a cell of a "
3149  "parallel::distributed::Triangulation that is not "
3150  "locally owned by this processor.");
3151 } // namespace VectorTools
3152 
3153 
3154 DEAL_II_NAMESPACE_CLOSE
3155 
3156 #endif
void interpolate_boundary_values(const DoFHandlerType< dim, spacedim > &dof, const std::map< types::boundary_id, const Function< spacedim, number > * > &function_map, AffineConstraints< number > &constraints, const ComponentMask &component_mask=ComponentMask())
void integrate_difference(const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof, const InVector &fe_function, const Function< spacedim, double > &exact_solution, OutVector &difference, const Quadrature< dim > &q, const NormType &norm, const Function< spacedim, double > *weight=nullptr, const double exponent=2.)
void point_value(const DoFHandler< dim, spacedim > &dof, const VectorType &fe_function, const Point< spacedim > &point, Vector< typename VectorType::value_type > &value)
void point_gradient(const DoFHandler< dim, spacedim > &dof, const VectorType &fe_function, const Point< spacedim > &point, std::vector< Tensor< 1, spacedim, typename VectorType::value_type >> &value)
void compute_normal_flux_constraints(const DoFHandlerType< dim, spacedim > &dof_handler, const unsigned int first_vector_component, const std::set< types::boundary_id > &boundary_ids, AffineConstraints< double > &constraints, const Mapping< dim, spacedim > &mapping=StaticMappingQ1< dim >::mapping)
void point_difference(const DoFHandler< dim, spacedim > &dof, const VectorType &fe_function, const Function< spacedim, typename VectorType::value_type > &exact_solution, Vector< typename VectorType::value_type > &difference, const Point< spacedim > &point)
void compute_nonzero_normal_flux_constraints(const DoFHandlerType< dim, spacedim > &dof_handler, const unsigned int first_vector_component, const std::set< types::boundary_id > &boundary_ids, const std::map< types::boundary_id, const Function< spacedim > * > &function_map, AffineConstraints< double > &constraints, const Mapping< dim, spacedim > &mapping=StaticMappingQ1< dim >::mapping)
unsigned int material_id
Definition: types.h:134
void compute_nonzero_tangential_flux_constraints(const DoFHandlerType< dim, spacedim > &dof_handler, const unsigned int first_vector_component, const std::set< types::boundary_id > &boundary_ids, const std::map< types::boundary_id, const Function< spacedim > * > &function_map, AffineConstraints< double > &constraints, const Mapping< dim, spacedim > &mapping=StaticMappingQ1< dim >::mapping)
void create_right_hand_side(const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof, const Quadrature< dim > &q, const Function< spacedim, typename VectorType::value_type > &rhs, VectorType &rhs_vector, const AffineConstraints< typename VectorType::value_type > &constraints=AffineConstraints< typename VectorType::value_type >())
void project(const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof, const AffineConstraints< typename VectorType::value_type > &constraints, const Quadrature< dim > &quadrature, const Function< spacedim, typename VectorType::value_type > &function, VectorType &vec, const bool enforce_zero_boundary=false, const Quadrature< dim-1 > &q_boundary=(dim > 1?QGauss< dim-1 >(2):Quadrature< dim-1 >(0)), const bool project_to_boundary_first=false)
void project_boundary_values(const DoFHandler< dim, spacedim > &dof, const std::map< types::boundary_id, const Function< spacedim, number > * > &boundary_function, const Quadrature< dim-1 > &q, AffineConstraints< number > &constraints, std::vector< unsigned int > component_mapping=std::vector< unsigned int >())
void create_boundary_right_hand_side(const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof, const Quadrature< dim-1 > &q, const Function< spacedim, typename VectorType::value_type > &rhs, VectorType &rhs_vector, const std::set< types::boundary_id > &boundary_ids=std::set< types::boundary_id >())
void get_position_vector(const DoFHandlerType< dim, spacedim > &dh, VectorType &vector, const ComponentMask &mask=ComponentMask())
Abstract base class for mapping classes.
Definition: dof_tools.h:57
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:397
static::ExceptionBase & ExcPointNotAvailableHere()
void interpolate_based_on_material_id(const Mapping< dim, spacedim > &mapping, const DoFHandlerType< dim, spacedim > &dof_handler, const std::map< types::material_id, const Function< spacedim, typename VectorType::value_type > * > &function_map, VectorType &dst, const ComponentMask &component_mask=ComponentMask())
void subtract_mean_value(VectorType &v, const std::vector< bool > &p_select=std::vector< bool >())
void create_point_source_vector(const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof_handler, const Point< spacedim > &p, Vector< double > &rhs_vector)
VectorType::value_type compute_mean_value(const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof, const Quadrature< dim > &quadrature, const VectorType &v, const unsigned int component)
Definition: hp.h:102
Definition: mpi.h:55
void project_boundary_values_curl_conforming(const hp::DoFHandler< dim > &dof_handler, const unsigned int first_vector_component, const Function< dim, double > &boundary_function, const types::boundary_id boundary_component, AffineConstraints< double > &constraints, const hp::MappingCollection< dim, dim > &mapping_collection=hp::StaticMappingQ1< dim >::mapping_collection)
void compute_no_normal_flux_constraints(const DoFHandlerType< dim, spacedim > &dof_handler, const unsigned int first_vector_component, const std::set< types::boundary_id > &boundary_ids, AffineConstraints< double > &constraints, const Mapping< dim, spacedim > &mapping=StaticMappingQ1< dim >::mapping)
void project_boundary_values_div_conforming(const hp::DoFHandler< dim > &dof_handler, const unsigned int first_vector_component, const Function< dim, double > &boundary_function, const types::boundary_id boundary_component, AffineConstraints< double > &constraints, const hp::MappingCollection< dim, dim > &mapping_collection=hp::StaticMappingQ1< dim >::mapping_collection)
typename ActiveSelector::active_cell_iterator active_cell_iterator
Definition: dof_handler.h:240
double compute_global_error(const Triangulation< dim, spacedim > &tria, const InVector &cellwise_error, const NormType &norm, const double exponent=2.)
unsigned int boundary_id
Definition: types.h:111
void interpolate_to_different_mesh(const DoFHandlerType< dim, spacedim > &dof1, const VectorType &u1, const DoFHandlerType< dim, spacedim > &dof2, VectorType &u2)
void project_boundary_values_curl_conforming_l2(const hp::DoFHandler< dim > &dof_handler, const unsigned int first_vector_component, const Function< dim, double > &boundary_function, const types::boundary_id boundary_component, AffineConstraints< double > &constraints, const hp::MappingCollection< dim, dim > &mapping_collection=hp::StaticMappingQ1< dim >::mapping_collection)