Reference documentation for deal.II version 8.5.1
vector_tools.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 2017 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 at
12 // the top level of the deal.II distribution.
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 #include <deal.II/base/exceptions.h>
22 #include <deal.II/base/quadrature_lib.h>
23 #include <deal.II/base/point.h>
24 #include <deal.II/base/std_cxx11/function.h>
25 #include <deal.II/dofs/function_map.h>
26 #include <deal.II/dofs/dof_handler.h>
27 #include <deal.II/hp/dof_handler.h>
28 #include <deal.II/hp/mapping_collection.h>
29 
30 #include <map>
31 #include <vector>
32 #include <set>
33 
34 DEAL_II_NAMESPACE_OPEN
35 
36 template <int dim, typename Number> class Function;
37 template <int dim> class Quadrature;
38 template <int dim> class QGauss;
39 template <int dim, typename number> class MatrixFree;
40 
41 template <typename number> class Vector;
42 template <typename number> class FullMatrix;
43 template <int dim, int spacedim> class Mapping;
44 template <typename gridtype> class InterGridMap;
45 namespace hp
46 {
47  template <int dim> class QCollection;
48 }
49 class ConstraintMatrix;
50 
51 
52 //TODO: Move documentation of functions to the functions!
53 
320 namespace VectorTools
321 {
347  enum NormType
348  {
374 
390 
408 
426 
443 
459 
478 
495 
512 
529 
547 
563 
564  };
588  template <int dim, int spacedim, typename VectorType,
589  template <int, int> class DoFHandlerType>
590  void interpolate (const Mapping<dim,spacedim> &mapping,
591  const DoFHandlerType<dim,spacedim> &dof,
593  VectorType &vec,
594  const ComponentMask &component_mask = ComponentMask());
595 
600  template <int dim, int spacedim, typename VectorType,
601  template <int, int> class DoFHandlerType>
602  void interpolate
603  (const DoFHandlerType<dim,spacedim> &dof,
605  VectorType &vec,
606  const ComponentMask &component_mask = ComponentMask());
607 
624  template <int dim, class InVector, class OutVector, int spacedim>
625  void interpolate (const DoFHandler<dim,spacedim> &dof_1,
626  const DoFHandler<dim,spacedim> &dof_2,
627  const FullMatrix<double> &transfer,
628  const InVector &data_1,
629  OutVector &data_2);
630 
677  template <int dim, int spacedim, typename VectorType,
678  template <int,int> class DoFHandlerType>
679  void
681  (const Mapping<dim,spacedim> &mapping,
682  const DoFHandlerType<dim,spacedim> &dof_handler,
683  const std::map<types::material_id,
685  VectorType &dst,
686  const ComponentMask &component_mask = ComponentMask());
687 
712  template <int dim, int spacedim, typename VectorType,
713  template <int, int> class DoFHandlerType>
714  void
715  interpolate_to_different_mesh (const DoFHandlerType<dim, spacedim> &dof1,
716  const VectorType &u1,
717  const DoFHandlerType<dim, spacedim> &dof2,
718  VectorType &u2);
719 
733  template <int dim, int spacedim, typename VectorType,
734  template <int, int> class DoFHandlerType>
735  void
736  interpolate_to_different_mesh (const DoFHandlerType<dim, spacedim> &dof1,
737  const VectorType &u1,
738  const DoFHandlerType<dim, spacedim> &dof2,
739  const ConstraintMatrix &constraints,
740  VectorType &u2);
741 
749  template <int dim, int spacedim, typename VectorType,
750  template <int, int> class DoFHandlerType>
751  void
753  (const InterGridMap<DoFHandlerType<dim, spacedim> > &intergridmap,
754  const VectorType &u1,
755  const ConstraintMatrix &constraints,
756  VectorType &u2);
757 
809  template <int dim, typename VectorType, int spacedim>
810  void project (const Mapping<dim, spacedim> &mapping,
811  const DoFHandler<dim,spacedim> &dof,
812  const ConstraintMatrix &constraints,
813  const Quadrature<dim> &quadrature,
815  VectorType &vec,
816  const bool enforce_zero_boundary = false,
817  const Quadrature<dim-1> &q_boundary = (dim > 1 ?
818  QGauss<dim-1>(2) :
819  Quadrature<dim-1>(0)),
820  const bool project_to_boundary_first = false);
821 
826  template <int dim, typename VectorType, int spacedim>
827  void project (const DoFHandler<dim,spacedim> &dof,
828  const ConstraintMatrix &constraints,
829  const Quadrature<dim> &quadrature,
831  VectorType &vec,
832  const bool enforce_zero_boundary = false,
833  const Quadrature<dim-1> &q_boundary = (dim > 1 ?
834  QGauss<dim-1>(2) :
835  Quadrature<dim-1>(0)),
836  const bool project_to_boundary_first = false);
837 
842  template <int dim, typename VectorType, int spacedim>
843  void project (const hp::MappingCollection<dim, spacedim> &mapping,
844  const hp::DoFHandler<dim,spacedim> &dof,
845  const ConstraintMatrix &constraints,
846  const hp::QCollection<dim> &quadrature,
848  VectorType &vec,
849  const bool enforce_zero_boundary = false,
850  const hp::QCollection<dim-1> &q_boundary = hp::QCollection<dim-1>(dim > 1 ?
851  QGauss<dim-1>(2) :
852  Quadrature<dim-1>(0)),
853  const bool project_to_boundary_first = false);
854 
859  template <int dim, typename VectorType, int spacedim>
860  void project (const hp::DoFHandler<dim,spacedim> &dof,
861  const ConstraintMatrix &constraints,
862  const hp::QCollection<dim> &quadrature,
864  VectorType &vec,
865  const bool enforce_zero_boundary = false,
866  const hp::QCollection<dim-1> &q_boundary = hp::QCollection<dim-1>(dim > 1 ?
867  QGauss<dim-1>(2) :
868  Quadrature<dim-1>(0)),
869  const bool project_to_boundary_first = false);
870 
892  template <int dim, typename VectorType, int spacedim>
893  void project (const Mapping<dim, spacedim> &mapping,
894  const DoFHandler<dim,spacedim> &dof,
895  const ConstraintMatrix &constraints,
896  const Quadrature<dim> &quadrature,
897  const std_cxx11::function< typename VectorType::value_type (const typename DoFHandler<dim, spacedim>::active_cell_iterator &, const unsigned int)> func,
898  VectorType &vec_result);
899 
920  template <int dim, typename VectorType>
921  void project (std_cxx11::shared_ptr<const MatrixFree<dim,typename VectorType::value_type> > data,
922  const ConstraintMatrix &constraints,
923  const unsigned int n_q_points_1d,
924  const std_cxx11::function< VectorizedArray<typename VectorType::value_type> (const unsigned int, const unsigned int)> func,
925  VectorType &vec_result);
926 
930  template <int dim, typename VectorType>
931  void project (std_cxx11::shared_ptr<const MatrixFree<dim,typename VectorType::value_type> > data,
932  const ConstraintMatrix &constraints,
933  const std_cxx11::function< VectorizedArray<typename VectorType::value_type> (const unsigned int, const unsigned int)> func,
934  VectorType &vec_result);
935 
985  template <int dim, int spacedim, template <int,int> class DoFHandlerType,
986  typename number>
987  void
989  (const Mapping<dim,spacedim> &mapping,
990  const DoFHandlerType<dim,spacedim> &dof,
991  const std::map<types::boundary_id, const Function<spacedim,number>*> &function_map,
992  std::map<types::global_dof_index,number> &boundary_values,
993  const ComponentMask &component_mask = ComponentMask());
994 
999  template <int dim, int spacedim, typename number>
1000  void
1002  (const hp::MappingCollection<dim,spacedim> &mapping,
1003  const hp::DoFHandler<dim,spacedim> &dof,
1004  const std::map<types::boundary_id, const Function<spacedim,number>*> &function_map,
1005  std::map<types::global_dof_index,number> &boundary_values,
1006  const ComponentMask &component_mask = ComponentMask());
1007 
1017  template <int dim, int spacedim, template <int,int> class DoFHandlerType,
1018  typename number>
1019  void
1021  (const Mapping<dim,spacedim> &mapping,
1022  const DoFHandlerType<dim,spacedim> &dof,
1023  const types::boundary_id boundary_component,
1024  const Function<spacedim,number> &boundary_function,
1025  std::map<types::global_dof_index,number> &boundary_values,
1026  const ComponentMask &component_mask = ComponentMask());
1027 
1037  template <int dim, int spacedim, template <int,int> class DoFHandlerType,
1038  typename number>
1039  void
1041  (const DoFHandlerType<dim,spacedim> &dof,
1042  const types::boundary_id boundary_component,
1043  const Function<spacedim,number> &boundary_function,
1044  std::map<types::global_dof_index,number> &boundary_values,
1045  const ComponentMask &component_mask = ComponentMask());
1046 
1047 
1054  template <int dim, int spacedim, template <int,int> class DoFHandlerType,
1055  typename number>
1056  void
1058  (const DoFHandlerType<dim,spacedim> &dof,
1059  const std::map<types::boundary_id, const Function<spacedim,number>*> &function_map,
1060  std::map<types::global_dof_index,number> &boundary_values,
1061  const ComponentMask &component_mask = ComponentMask());
1062 
1063 
1125  template <int dim, int spacedim, template <int,int> class DoFHandlerType,
1126  typename number>
1127  void
1129  (const Mapping<dim,spacedim> &mapping,
1130  const DoFHandlerType<dim,spacedim> &dof,
1131  const std::map<types::boundary_id, const Function<spacedim,number>*> &function_map,
1132  ConstraintMatrix &constraints,
1133  const ComponentMask &component_mask = ComponentMask());
1134 
1146  template <int dim, int spacedim, template <int,int> class DoFHandlerType,
1147  typename number>
1148  void
1150  (const Mapping<dim,spacedim> &mapping,
1151  const DoFHandlerType<dim,spacedim> &dof,
1152  const types::boundary_id boundary_component,
1153  const Function<spacedim,number> &boundary_function,
1154  ConstraintMatrix &constraints,
1155  const ComponentMask &component_mask = ComponentMask());
1156 
1168  template <int dim, int spacedim, template <int,int> class DoFHandlerType,
1169  typename number>
1170  void
1172  (const DoFHandlerType<dim,spacedim> &dof,
1173  const types::boundary_id boundary_component,
1174  const Function<spacedim,number> &boundary_function,
1175  ConstraintMatrix &constraints,
1176  const ComponentMask &component_mask = ComponentMask());
1177 
1178 
1187  template <int dim, int spacedim, template <int,int> class DoFHandlerType,
1188  typename number>
1189  void
1191  (const DoFHandlerType<dim,spacedim> &dof,
1192  const std::map<types::boundary_id, const Function<spacedim,number>*> &function_map,
1193  ConstraintMatrix &constraints,
1194  const ComponentMask &component_mask = ComponentMask());
1195 
1196 
1247  template <int dim, int spacedim, typename number>
1249  (const Mapping<dim, spacedim> &mapping,
1250  const DoFHandler<dim,spacedim> &dof,
1251  const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
1252  const Quadrature<dim-1> &q,
1253  std::map<types::global_dof_index,number> &boundary_values,
1254  std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1255 
1260  template <int dim, int spacedim, typename number>
1262  (const DoFHandler<dim,spacedim> &dof,
1263  const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_function,
1264  const Quadrature<dim-1> &q,
1265  std::map<types::global_dof_index,number> &boundary_values,
1266  std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1267 
1271  template <int dim, int spacedim, typename number>
1273  (const hp::MappingCollection<dim, spacedim> &mapping,
1274  const hp::DoFHandler<dim,spacedim> &dof,
1275  const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
1276  const hp::QCollection<dim-1> &q,
1277  std::map<types::global_dof_index,number> &boundary_values,
1278  std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1279 
1284  template <int dim, int spacedim, typename number>
1286  (const hp::DoFHandler<dim,spacedim> &dof,
1287  const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_function,
1288  const hp::QCollection<dim-1> &q,
1289  std::map<types::global_dof_index,number> &boundary_values,
1290  std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1291 
1330  template <int dim, int spacedim, typename number>
1332  (const Mapping<dim, spacedim> &mapping,
1333  const DoFHandler<dim,spacedim> &dof,
1334  const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
1335  const Quadrature<dim-1> &q,
1336  ConstraintMatrix &constraints,
1337  std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1338 
1345  template <int dim, int spacedim, typename number>
1347  (const DoFHandler<dim,spacedim> &dof,
1348  const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_function,
1349  const Quadrature<dim-1> &q,
1350  ConstraintMatrix &constraints,
1351  std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1352 
1353 
1408  template <int dim>
1410  (const DoFHandler<dim> &dof_handler,
1411  const unsigned int first_vector_component,
1412  const Function<dim,double> &boundary_function,
1413  const types::boundary_id boundary_component,
1414  ConstraintMatrix &constraints,
1415  const Mapping<dim> &mapping = StaticMappingQ1<dim>::mapping);
1416 
1425  template <int dim>
1427  (const hp::DoFHandler<dim> &dof_handler,
1428  const unsigned int first_vector_component,
1429  const Function<dim,double> &boundary_function,
1430  const types::boundary_id boundary_component,
1431  ConstraintMatrix &constraints,
1433 
1529  template <int dim>
1531  (const DoFHandler<dim> &dof_handler,
1532  const unsigned int first_vector_component,
1533  const Function<dim,double> &boundary_function,
1534  const types::boundary_id boundary_component,
1535  ConstraintMatrix &constraints,
1536  const Mapping<dim> &mapping = StaticMappingQ1<dim>::mapping);
1537 
1538 
1545  template <int dim>
1547  (const hp::DoFHandler<dim> &dof_handler,
1548  const unsigned int first_vector_component,
1549  const Function<dim,double> &boundary_function,
1550  const types::boundary_id boundary_component,
1551  ConstraintMatrix &constraints,
1553 
1554 
1601  template<int dim>
1603  (const DoFHandler<dim> &dof_handler,
1604  const unsigned int first_vector_component,
1605  const Function<dim,double> &boundary_function,
1606  const types::boundary_id boundary_component,
1607  ConstraintMatrix &constraints,
1608  const Mapping<dim> &mapping = StaticMappingQ1<dim>::mapping);
1609 
1618  template<int dim>
1620  (const hp::DoFHandler<dim> &dof_handler,
1621  const unsigned int first_vector_component,
1622  const Function<dim,double> &boundary_function,
1623  const types::boundary_id boundary_component,
1624  ConstraintMatrix &constraints,
1625  const hp::MappingCollection<dim, dim> &mapping_collection
1627 
1628 
1855  template <int dim, int spacedim, template <int, int> class DoFHandlerType>
1856  void
1858  (const DoFHandlerType<dim,spacedim> &dof_handler,
1859  const unsigned int first_vector_component,
1860  const std::set<types::boundary_id> &boundary_ids,
1861  typename FunctionMap<spacedim>::type &function_map,
1862  ConstraintMatrix &constraints,
1864 
1876  template <int dim, int spacedim, template <int, int> class DoFHandlerType>
1877  void
1879  (const DoFHandlerType<dim,spacedim> &dof_handler,
1880  const unsigned int first_vector_component,
1881  const std::set<types::boundary_id> &boundary_ids,
1882  ConstraintMatrix &constraints,
1884 
1901  template <int dim, int spacedim, template <int, int> class DoFHandlerType>
1902  void
1904  (const DoFHandlerType<dim,spacedim> &dof_handler,
1905  const unsigned int first_vector_component,
1906  const std::set<types::boundary_id> &boundary_ids,
1907  typename FunctionMap<spacedim>::type &function_map,
1908  ConstraintMatrix &constraints,
1910 
1919  template <int dim, int spacedim, template <int, int> class DoFHandlerType>
1920  void
1922  (const DoFHandlerType<dim,spacedim> &dof_handler,
1923  const unsigned int first_vector_component,
1924  const std::set<types::boundary_id> &boundary_ids,
1925  ConstraintMatrix &constraints,
1927 
1928 
1930 
1934 
1941  template <int dim, int spacedim, typename VectorType>
1942  void create_right_hand_side (const Mapping<dim, spacedim> &mapping,
1943  const DoFHandler<dim,spacedim> &dof,
1944  const Quadrature<dim> &q,
1946  VectorType &rhs_vector,
1947  const ConstraintMatrix &constraints=ConstraintMatrix());
1948 
1953  template <int dim, int spacedim, typename VectorType>
1955  const Quadrature<dim> &q,
1957  VectorType &rhs_vector,
1958  const ConstraintMatrix &constraints=ConstraintMatrix());
1959 
1963  template <int dim, int spacedim, typename VectorType>
1965  const hp::DoFHandler<dim,spacedim> &dof,
1966  const hp::QCollection<dim> &q,
1968  VectorType &rhs_vector,
1969  const ConstraintMatrix &constraints=ConstraintMatrix());
1970 
1974  template <int dim, int spacedim, typename VectorType>
1976  const hp::QCollection<dim> &q,
1978  VectorType &rhs_vector,
1979  const ConstraintMatrix &constraints=ConstraintMatrix());
1980 
1989  template <int dim, int spacedim>
1991  const DoFHandler<dim,spacedim> &dof,
1992  const Point<spacedim> &p,
1993  Vector<double> &rhs_vector);
1994 
1999  template <int dim, int spacedim>
2001  const Point<spacedim> &p,
2002  Vector<double> &rhs_vector);
2003 
2007  template <int dim, int spacedim>
2009  const hp::DoFHandler<dim,spacedim> &dof,
2010  const Point<spacedim> &p,
2011  Vector<double> &rhs_vector);
2012 
2019  template <int dim, int spacedim>
2021  const Point<spacedim> &p,
2022  Vector<double> &rhs_vector);
2023 
2041  template <int dim, int spacedim>
2043  const DoFHandler<dim,spacedim> &dof,
2044  const Point<spacedim> &p,
2045  const Point<dim> &direction,
2046  Vector<double> &rhs_vector);
2047 
2052  template <int dim, int spacedim>
2054  const Point<spacedim> &p,
2055  const Point<dim> &direction,
2056  Vector<double> &rhs_vector);
2057 
2061  template <int dim, int spacedim>
2063  const hp::DoFHandler<dim,spacedim> &dof,
2064  const Point<spacedim> &p,
2065  const Point<dim> &direction,
2066  Vector<double> &rhs_vector);
2067 
2074  template <int dim, int spacedim>
2076  const Point<spacedim> &p,
2077  const Point<dim> &direction,
2078  Vector<double> &rhs_vector);
2079 
2089  template <int dim, int spacedim, typename VectorType>
2091  const DoFHandler<dim,spacedim> &dof,
2092  const Quadrature<dim-1> &q,
2094  VectorType &rhs_vector,
2095  const std::set<types::boundary_id> &boundary_ids = std::set<types::boundary_id>());
2096 
2104  template <int dim, int spacedim, typename VectorType>
2106  (const DoFHandler<dim,spacedim> &dof,
2107  const Quadrature<dim-1> &q,
2109  VectorType &rhs_vector,
2110  const std::set<types::boundary_id> &boundary_ids = std::set<types::boundary_id>());
2111 
2118  template <int dim, int spacedim, typename VectorType>
2120  (const hp::MappingCollection<dim,spacedim> &mapping,
2121  const hp::DoFHandler<dim,spacedim> &dof,
2122  const hp::QCollection<dim-1> &q,
2124  VectorType &rhs_vector,
2125  const std::set<types::boundary_id> &boundary_ids = std::set<types::boundary_id>());
2126 
2135  template <int dim, int spacedim, typename VectorType>
2137  (const hp::DoFHandler<dim,spacedim> &dof,
2138  const hp::QCollection<dim-1> &q,
2140  VectorType &rhs_vector,
2141  const std::set<types::boundary_id> &boundary_ids = std::set<types::boundary_id>());
2142 
2144 
2148 
2236  template <int dim, class InVector, class OutVector, int spacedim>
2237  void integrate_difference (const Mapping<dim,spacedim> &mapping,
2238  const DoFHandler<dim,spacedim> &dof,
2239  const InVector &fe_function,
2240  const Function<spacedim,double> &exact_solution,
2241  OutVector &difference,
2242  const Quadrature<dim> &q,
2243  const NormType &norm,
2244  const Function<spacedim,double> *weight = 0,
2245  const double exponent = 2.);
2246 
2251  template <int dim, class InVector, class OutVector, int spacedim>
2253  const InVector &fe_function,
2254  const Function<spacedim,double> &exact_solution,
2255  OutVector &difference,
2256  const Quadrature<dim> &q,
2257  const NormType &norm,
2258  const Function<spacedim,double> *weight = 0,
2259  const double exponent = 2.);
2260 
2264  template <int dim, class InVector, class OutVector, int spacedim>
2266  const hp::DoFHandler<dim,spacedim> &dof,
2267  const InVector &fe_function,
2268  const Function<spacedim,double> &exact_solution,
2269  OutVector &difference,
2270  const hp::QCollection<dim> &q,
2271  const NormType &norm,
2272  const Function<spacedim,double> *weight = 0,
2273  const double exponent = 2.);
2274 
2279  template <int dim, class InVector, class OutVector, int spacedim>
2281  const InVector &fe_function,
2282  const Function<spacedim,double> &exact_solution,
2283  OutVector &difference,
2284  const hp::QCollection<dim> &q,
2285  const NormType &norm,
2286  const Function<spacedim,double> *weight = 0,
2287  const double exponent = 2.);
2288 
2314  template <int dim, int spacedim, class InVector>
2316  const InVector &cellwise_error,
2317  const NormType &norm,
2318  const double exponent = 2.);
2319 
2332  template <int dim, typename VectorType, int spacedim>
2333  void point_difference
2334  (const DoFHandler<dim,spacedim> &dof,
2335  const VectorType &fe_function,
2338  const Point<spacedim> &point);
2339 
2352  template <int dim, typename VectorType, int spacedim>
2353  void point_difference
2354  (const Mapping<dim, spacedim> &mapping,
2355  const DoFHandler<dim,spacedim> &dof,
2356  const VectorType &fe_function,
2359  const Point<spacedim> &point);
2360 
2383  template <int dim, typename VectorType, int spacedim>
2384  void
2386  const VectorType &fe_function,
2387  const Point<spacedim> &point,
2389 
2407  template <int dim, typename VectorType, int spacedim>
2408  void
2410  const VectorType &fe_function,
2411  const Point<spacedim> &point,
2413 
2440  template <int dim, typename VectorType, int spacedim>
2441  typename VectorType::value_type
2443  const VectorType &fe_function,
2444  const Point<spacedim> &point);
2445 
2463  template <int dim, typename VectorType, int spacedim>
2464  typename VectorType::value_type
2466  const VectorType &fe_function,
2467  const Point<spacedim> &point);
2468 
2491  template <int dim, typename VectorType, int spacedim>
2492  void
2493  point_value (const Mapping<dim, spacedim> &mapping,
2494  const DoFHandler<dim,spacedim> &dof,
2495  const VectorType &fe_function,
2496  const Point<spacedim> &point,
2498 
2516  template <int dim, typename VectorType, int spacedim>
2517  void
2519  const hp::DoFHandler<dim,spacedim> &dof,
2520  const VectorType &fe_function,
2521  const Point<spacedim> &point,
2523 
2546  template <int dim, typename VectorType, int spacedim>
2547  typename VectorType::value_type
2548  point_value (const Mapping<dim,spacedim> &mapping,
2549  const DoFHandler<dim,spacedim> &dof,
2550  const VectorType &fe_function,
2551  const Point<spacedim> &point);
2552 
2570  template <int dim, typename VectorType, int spacedim>
2571  typename VectorType::value_type
2573  const hp::DoFHandler<dim,spacedim> &dof,
2574  const VectorType &fe_function,
2575  const Point<spacedim> &point);
2576 
2598  template <int dim, typename VectorType, int spacedim>
2599  void
2601  const VectorType &fe_function,
2602  const Point<spacedim> &point,
2604 
2621  template <int dim, typename VectorType, int spacedim>
2622  void
2624  const VectorType &fe_function,
2625  const Point<spacedim> &point,
2627 
2649  template <int dim, typename VectorType, int spacedim>
2652  const VectorType &fe_function,
2653  const Point<spacedim> &point);
2654 
2671  template <int dim, typename VectorType, int spacedim>
2674  const VectorType &fe_function,
2675  const Point<spacedim> &point);
2676 
2698  template <int dim, typename VectorType, int spacedim>
2699  void
2700  point_gradient (const Mapping<dim, spacedim> &mapping,
2701  const DoFHandler<dim,spacedim> &dof,
2702  const VectorType &fe_function,
2703  const Point<spacedim> &point,
2705 
2722  template <int dim, typename VectorType, int spacedim>
2723  void
2725  const hp::DoFHandler<dim,spacedim> &dof,
2726  const VectorType &fe_function,
2727  const Point<spacedim> &point,
2729 
2751  template <int dim, typename VectorType, int spacedim>
2753  point_gradient (const Mapping<dim,spacedim> &mapping,
2754  const DoFHandler<dim,spacedim> &dof,
2755  const VectorType &fe_function,
2756  const Point<spacedim> &point);
2757 
2774  template <int dim, typename VectorType, int spacedim>
2777  const hp::DoFHandler<dim,spacedim> &dof,
2778  const VectorType &fe_function,
2779  const Point<spacedim> &point);
2780 
2782 
2786 
2836  template <typename VectorType>
2837  void subtract_mean_value(VectorType &v,
2838  const std::vector<bool> &p_select = std::vector<bool>());
2839 
2840 
2864  template <int dim, typename VectorType, int spacedim>
2865  typename VectorType::value_type
2867  const DoFHandler<dim,spacedim> &dof,
2868  const Quadrature<dim> &quadrature,
2869  const VectorType &v,
2870  const unsigned int component);
2871 
2876  template <int dim, typename VectorType, int spacedim>
2877  typename VectorType::value_type
2879  const Quadrature<dim> &quadrature,
2880  const VectorType &v,
2881  const unsigned int component);
2883 
2913  template <int dim, int spacedim, template <int,int> class DoFHandlerType,
2914  typename VectorType>
2915  void get_position_vector(const DoFHandlerType<dim,spacedim> &dh,
2916  VectorType &vector,
2917  const ComponentMask &mask = ComponentMask());
2918 
2920 
2925  "You are attempting an operation that requires the "
2926  "finite element involved to be 'interpolating', i.e., "
2927  "it needs to have support points. The finite element "
2928  "you are using here does not appear to have those for "
2929  "the required components.");
2930 
2935  "The given point is inside a cell of a "
2936  "parallel::distributed::Triangulation that is not "
2937  "locally owned by this processor.");
2938 }
2939 
2940 
2941 DEAL_II_NAMESPACE_CLOSE
2942 
2943 #endif
static ::ExceptionBase & ExcNonInterpolatingFE()
void point_value(const DoFHandler< dim, spacedim > &dof, const VectorType &fe_function, const Point< spacedim > &point, Vector< typename VectorType::value_type > &value)
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, typename FunctionMap< spacedim >::type &function_map, ConstraintMatrix &constraints, const Mapping< dim, spacedim > &mapping=StaticMappingQ1< dim >::mapping)
unsigned char material_id
Definition: types.h:130
void project_boundary_values_curl_conforming(const DoFHandler< dim > &dof_handler, const unsigned int first_vector_component, const Function< dim, double > &boundary_function, const types::boundary_id boundary_component, ConstraintMatrix &constraints, const Mapping< dim > &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 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 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, ConstraintMatrix &constraints, const Mapping< dim, spacedim > &mapping=StaticMappingQ1< dim >::mapping)
ActiveSelector::active_cell_iterator active_cell_iterator
Definition: dof_handler.h:228
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, typename FunctionMap< spacedim >::type &function_map, ConstraintMatrix &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 ConstraintMatrix &constraints=ConstraintMatrix())
void project(const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof, const ConstraintMatrix &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 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 compute_normal_flux_constraints(const DoFHandlerType< dim, spacedim > &dof_handler, const unsigned int first_vector_component, const std::set< types::boundary_id > &boundary_ids, ConstraintMatrix &constraints, const Mapping< dim, spacedim > &mapping=StaticMappingQ1< dim >::mapping)
void get_position_vector(const DoFHandlerType< dim, spacedim > &dh, VectorType &vector, const ComponentMask &mask=ComponentMask())
void create_point_source_vector(const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof, const Point< spacedim > &p, Vector< double > &rhs_vector)
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)
Abstract base class for mapping classes.
Definition: dof_tools.h:46
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:553
static ::ExceptionBase & ExcPointNotAvailableHere()
void subtract_mean_value(VectorType &v, const std::vector< bool > &p_select=std::vector< bool >())
void interpolate(const Mapping< dim, spacedim > &mapping, const DoFHandlerType< dim, spacedim > &dof, const Function< spacedim, typename VectorType::value_type > &function, VectorType &vec, const ComponentMask &component_mask=ComponentMask())
std::map< types::boundary_id, const Function< dim, Number > * > type
Definition: function_map.h:81
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
void project_boundary_values(const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof, const std::map< types::boundary_id, const Function< spacedim, number > *> &boundary_functions, const Quadrature< dim-1 > &q, std::map< types::global_dof_index, number > &boundary_values, std::vector< unsigned int > component_mapping=std::vector< unsigned int >())
void interpolate_boundary_values(const Mapping< dim, spacedim > &mapping, const DoFHandlerType< dim, spacedim > &dof, const std::map< types::boundary_id, const Function< spacedim, number > *> &function_map, std::map< types::global_dof_index, number > &boundary_values, const ComponentMask &component_mask=ComponentMask())
Definition: mpi.h:41
void project_boundary_values_curl_conforming_l2(const DoFHandler< dim > &dof_handler, const unsigned int first_vector_component, const Function< dim, double > &boundary_function, const types::boundary_id boundary_component, ConstraintMatrix &constraints, const Mapping< dim > &mapping=StaticMappingQ1< dim >::mapping)
unsigned char boundary_id
Definition: types.h:110
double compute_global_error(const Triangulation< dim, spacedim > &tria, const InVector &cellwise_error, const NormType &norm, const double exponent=2.)
void project_boundary_values_div_conforming(const DoFHandler< dim > &dof_handler, const unsigned int first_vector_component, const Function< dim, double > &boundary_function, const types::boundary_id boundary_component, ConstraintMatrix &constraints, const Mapping< dim > &mapping=StaticMappingQ1< dim >::mapping)
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=0, const double exponent=2.)
void interpolate_to_different_mesh(const DoFHandlerType< dim, spacedim > &dof1, const VectorType &u1, const DoFHandlerType< dim, spacedim > &dof2, VectorType &u2)