16 #ifndef dealii_vector_tools_h 17 #define dealii_vector_tools_h 20 #include <deal.II/base/config.h> 22 #include <deal.II/base/exceptions.h> 23 #include <deal.II/base/function.h> 24 #include <deal.II/base/patterns.h> 25 #include <deal.II/base/point.h> 26 #include <deal.II/base/quadrature_lib.h> 28 #include <deal.II/dofs/deprecated_function_map.h> 29 #include <deal.II/dofs/dof_handler.h> 31 #include <deal.II/hp/dof_handler.h> 32 #include <deal.II/hp/mapping_collection.h> 39 DEAL_II_NAMESPACE_OPEN
41 template <
int dim,
typename RangeNumberType>
47 template <
int dim,
typename number>
50 template <
typename number>
52 template <
typename number>
54 template <
int dim,
int spacedim>
56 template <
typename gr
idtype>
63 template <
typename number>
614 template <
int,
int>
class DoFHandlerType>
618 const DoFHandlerType<dim, spacedim> & dof,
630 template <
int,
int>
class DoFHandlerType>
633 const DoFHandlerType<dim, spacedim> & dof,
654 template <
int dim,
class InVector,
class OutVector,
int spacedim>
659 const InVector & data_1,
713 template <
int,
int>
class DoFHandlerType>
717 const DoFHandlerType<dim, spacedim> &dof_handler,
751 template <
int,
int>
class DoFHandlerType>
754 const VectorType & u1,
755 const DoFHandlerType<dim, spacedim> &dof2,
774 template <
int,
int>
class DoFHandlerType>
777 const DoFHandlerType<dim, spacedim> & dof1,
778 const VectorType & u1,
779 const DoFHandlerType<dim, spacedim> & dof2,
793 template <
int,
int>
class DoFHandlerType>
796 const InterGridMap<DoFHandlerType<dim, spacedim>> & intergridmap,
797 const VectorType & u1,
881 template <
int dim,
typename VectorType,
int spacedim>
889 const bool enforce_zero_boundary =
false,
893 const bool project_to_boundary_first =
false);
899 template <
int dim,
typename VectorType,
int spacedim>
906 const bool enforce_zero_boundary =
false,
910 const bool project_to_boundary_first =
false);
916 template <
int dim,
typename VectorType,
int spacedim>
924 const bool enforce_zero_boundary =
false,
927 const bool project_to_boundary_first =
false);
933 template <
int dim,
typename VectorType,
int spacedim>
940 const bool enforce_zero_boundary =
false,
943 const bool project_to_boundary_first =
false);
969 template <
int dim,
typename VectorType,
int spacedim>
975 const std::function<
typename VectorType::value_type(
977 const unsigned int)> & func,
978 VectorType & vec_result);
1008 template <
int dim,
typename VectorType>
1013 const unsigned int n_q_points_1d,
1016 const unsigned int)> &func,
1017 VectorType & vec_result,
1018 const unsigned int fe_component = 0);
1024 template <
int dim,
typename VectorType>
1031 const unsigned int)> & func,
1032 VectorType & vec_result,
1033 const unsigned int fe_component = 0);
1087 template <
int,
int>
class DoFHandlerType,
1092 const DoFHandlerType<dim, spacedim> &dof,
1095 std::map<types::global_dof_index, number> &boundary_values,
1102 template <
int dim,
int spacedim,
typename number>
1109 std::map<types::global_dof_index, number> &boundary_values,
1123 template <
int,
int>
class DoFHandlerType,
1128 const DoFHandlerType<dim, spacedim> & dof,
1131 std::map<types::global_dof_index, number> &boundary_values,
1145 template <
int,
int>
class DoFHandlerType,
1149 const DoFHandlerType<dim, spacedim> & dof,
1152 std::map<types::global_dof_index, number> &boundary_values,
1164 template <
int,
int>
class DoFHandlerType,
1168 const DoFHandlerType<dim, spacedim> &dof,
1171 std::map<types::global_dof_index, number> &boundary_values,
1238 template <
int,
int>
class DoFHandlerType,
1243 const DoFHandlerType<dim, spacedim> &dof,
1262 template <
int,
int>
class DoFHandlerType,
1267 const DoFHandlerType<dim, spacedim> &dof,
1286 template <
int,
int>
class DoFHandlerType,
1290 const DoFHandlerType<dim, spacedim> &dof,
1307 template <
int,
int>
class DoFHandlerType,
1311 const DoFHandlerType<dim, spacedim> &dof,
1382 template <
int dim,
int spacedim,
typename number>
1388 & boundary_functions,
1390 std::map<types::global_dof_index, number> &boundary_values,
1391 std::vector<unsigned int> component_mapping = {});
1397 template <
int dim,
int spacedim,
typename number>
1402 & boundary_function,
1404 std::map<types::global_dof_index, number> &boundary_values,
1405 std::vector<unsigned int> component_mapping = {});
1410 template <
int dim,
int spacedim,
typename number>
1416 & boundary_functions,
1418 std::map<types::global_dof_index, number> &boundary_values,
1419 std::vector<unsigned int> component_mapping = {});
1425 template <
int dim,
int spacedim,
typename number>
1430 & boundary_function,
1432 std::map<types::global_dof_index, number> &boundary_values,
1433 std::vector<unsigned int> component_mapping = {});
1473 template <
int dim,
int spacedim,
typename number>
1479 & boundary_functions,
1482 std::vector<unsigned int> component_mapping = {});
1490 template <
int dim,
int spacedim,
typename number>
1495 & boundary_function,
1498 std::vector<unsigned int> component_mapping = {});
1559 DEAL_II_DEPRECATED
void 1562 const unsigned int first_vector_component,
1580 DEAL_II_DEPRECATED
void 1583 const unsigned int first_vector_component,
1689 const unsigned int first_vector_component,
1706 const unsigned int first_vector_component,
1764 const unsigned int first_vector_component,
1782 const unsigned int first_vector_component,
2017 template <
int dim,
int spacedim,
template <
int,
int>
class DoFHandlerType>
2020 const DoFHandlerType<dim, spacedim> &dof_handler,
2021 const unsigned int first_vector_component,
2022 const std::set<types::boundary_id> & boundary_ids,
2040 template <
int dim,
int spacedim,
template <
int,
int>
class DoFHandlerType>
2043 const DoFHandlerType<dim, spacedim> &dof_handler,
2044 const unsigned int first_vector_component,
2045 const std::set<types::boundary_id> & boundary_ids,
2065 template <
int dim,
int spacedim,
template <
int,
int>
class DoFHandlerType>
2068 const DoFHandlerType<dim, spacedim> &dof_handler,
2069 const unsigned int first_vector_component,
2070 const std::set<types::boundary_id> & boundary_ids,
2084 template <
int dim,
int spacedim,
template <
int,
int>
class DoFHandlerType>
2087 const DoFHandlerType<dim, spacedim> &dof_handler,
2088 const unsigned int first_vector_component,
2089 const std::set<types::boundary_id> & boundary_ids,
2106 template <
int dim,
int spacedim,
typename VectorType>
2113 VectorType & rhs_vector,
2121 template <
int dim,
int spacedim,
typename VectorType>
2127 VectorType & rhs_vector,
2134 template <
int dim,
int spacedim,
typename VectorType>
2141 VectorType & rhs_vector,
2148 template <
int dim,
int spacedim,
typename VectorType>
2154 VectorType & rhs_vector,
2242 template <
int dim,
int spacedim>
2253 template <
int dim,
int spacedim>
2262 template <
int dim,
int spacedim>
2276 template <
int dim,
int spacedim>
2300 template <
int dim,
int spacedim>
2312 template <
int dim,
int spacedim>
2322 template <
int dim,
int spacedim>
2337 template <
int dim,
int spacedim>
2353 template <
int dim,
int spacedim,
typename VectorType>
2360 VectorType & rhs_vector,
2361 const std::set<types::boundary_id> & boundary_ids =
2362 std::set<types::boundary_id>());
2371 template <
int dim,
int spacedim,
typename VectorType>
2377 VectorType & rhs_vector,
2378 const std::set<types::boundary_id> & boundary_ids =
2379 std::set<types::boundary_id>());
2387 template <
int dim,
int spacedim,
typename VectorType>
2394 VectorType & rhs_vector,
2395 const std::set<types::boundary_id> & boundary_ids =
2396 std::set<types::boundary_id>());
2406 template <
int dim,
int spacedim,
typename VectorType>
2412 VectorType & rhs_vector,
2413 const std::set<types::boundary_id> & boundary_ids =
2414 std::set<types::boundary_id>());
2509 template <
int dim,
class InVector,
class OutVector,
int spacedim>
2513 const InVector & fe_function,
2515 OutVector & difference,
2519 const double exponent = 2.);
2525 template <
int dim,
class InVector,
class OutVector,
int spacedim>
2528 const InVector & fe_function,
2530 OutVector & difference,
2534 const double exponent = 2.);
2539 template <
int dim,
class InVector,
class OutVector,
int spacedim>
2543 const InVector & fe_function,
2545 OutVector & difference,
2549 const double exponent = 2.);
2555 template <
int dim,
class InVector,
class OutVector,
int spacedim>
2558 const InVector & fe_function,
2560 OutVector & difference,
2564 const double exponent = 2.);
2591 template <
int dim,
int spacedim,
class InVector>
2594 const InVector & cellwise_error,
2596 const double exponent = 2.);
2610 template <
int dim,
typename VectorType,
int spacedim>
2614 const VectorType & fe_function,
2631 template <
int dim,
typename VectorType,
int spacedim>
2636 const VectorType & fe_function,
2677 template <
int dim,
typename VectorType,
int spacedim>
2680 const VectorType & fe_function,
2701 template <
int dim,
typename VectorType,
int spacedim>
2704 const VectorType & fe_function,
2747 template <
int dim,
typename VectorType,
int spacedim>
2748 typename VectorType::value_type
2750 const VectorType & fe_function,
2770 template <
int dim,
typename VectorType,
int spacedim>
2771 typename VectorType::value_type
2773 const VectorType & fe_function,
2810 template <
int dim,
typename VectorType,
int spacedim>
2814 const VectorType & fe_function,
2835 template <
int dim,
typename VectorType,
int spacedim>
2839 const VectorType & fe_function,
2876 template <
int dim,
typename VectorType,
int spacedim>
2877 typename VectorType::value_type
2880 const VectorType & fe_function,
2900 template <
int dim,
typename VectorType,
int spacedim>
2901 typename VectorType::value_type
2904 const VectorType & fe_function,
2939 template <
int dim,
typename VectorType,
int spacedim>
2943 const VectorType & fe_function,
2963 template <
int dim,
typename VectorType,
int spacedim>
2967 const VectorType & fe_function,
3003 template <
int dim,
typename VectorType,
int spacedim>
3006 const VectorType & fe_function,
3025 template <
int dim,
typename VectorType,
int spacedim>
3028 const VectorType & fe_function,
3063 template <
int dim,
typename VectorType,
int spacedim>
3068 const VectorType & fe_function,
3088 template <
int dim,
typename VectorType,
int spacedim>
3093 const VectorType & fe_function,
3129 template <
int dim,
typename VectorType,
int spacedim>
3133 const VectorType & fe_function,
3152 template <
int dim,
typename VectorType,
int spacedim>
3156 const VectorType & fe_function,
3214 template <
typename VectorType>
3242 template <
int dim,
typename VectorType,
int spacedim>
3243 typename VectorType::value_type
3247 const VectorType & v,
3248 const unsigned int component);
3254 template <
int dim,
typename VectorType,
int spacedim>
3255 typename VectorType::value_type
3258 const VectorType & v,
3259 const unsigned int component);
3293 template <
int,
int>
class DoFHandlerType,
3294 typename VectorType>
3297 VectorType & vector,
3306 "The given point is inside a cell of a " 3307 "parallel::distributed::Triangulation that is not " 3308 "locally owned by this processor.");
3323 static std::unique_ptr<Patterns::PatternBase>
3326 return std_cxx14::make_unique<Patterns::Selection>(
3327 "mean|L1_norm|L2_norm|Lp_norm|" 3328 "Linfty_norm|H1_seminorm|Hdiv_seminorm|" 3329 "H1_norm|W1p_seminorm|W1p_norm|" 3330 "W1infty_seminorm|W1infty_norm");
3340 const std::unique_ptr<Patterns::PatternBase> &p =
3353 str =
"Linfty_norm";
3355 str =
"H1_seminorm";
3357 str =
"Hdiv_seminorm";
3361 str =
"W1p_seminorm";
3363 str =
"W1infty_seminorm";
3365 str =
"W1infty_norm";
3382 const std::unique_ptr<Patterns::PatternBase> &p =
3389 " cannot be converted to VectorTools::NormType"));
3393 else if (str ==
"L1_norm")
3395 else if (str ==
"L2_norm")
3397 else if (str ==
"Lp_norm")
3399 else if (str ==
"Linfty_norm")
3401 else if (str ==
"H1_seminorm")
3403 else if (str ==
"Hdiv_seminorm")
3405 else if (str ==
"H1_norm")
3407 else if (str ==
"W1p_seminorm")
3409 else if (str ==
"W1infty_seminorm")
3411 else if (str ==
"W1infty_norm")
3413 else if (str ==
"W1p_norm")
3425 DEAL_II_NAMESPACE_CLOSE
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 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, AffineConstraints< double > &constraints, const Mapping< dim > &mapping=StaticMappingQ1< dim >::mapping)
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)
double norm(const FEValuesBase< dim > &fe, const ArrayView< const std::vector< Tensor< 1, dim >>> &Du)
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)
#define AssertThrow(cond, exc)
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, AffineConstraints< double > &constraints, const Mapping< dim > &mapping=StaticMappingQ1< dim >::mapping)
LinearAlgebra::distributed::Vector< Number > Vector
static ::ExceptionBase & ExcMessage(std::string arg1)
Abstract base class for mapping classes.
#define DeclExceptionMsg(Exception, defaulttext)
static ::ExceptionBase & ExcPointNotAvailableHere()
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)
typename ActiveSelector::active_cell_iterator active_cell_iterator
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, AffineConstraints< double > &constraints, const Mapping< dim > &mapping=StaticMappingQ1< dim >::mapping)
static ::ExceptionBase & ExcInternalError()