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/point.h> 25 #include <deal.II/base/quadrature_lib.h> 27 #include <deal.II/dofs/deprecated_function_map.h> 28 #include <deal.II/dofs/dof_handler.h> 30 #include <deal.II/hp/dof_handler.h> 31 #include <deal.II/hp/mapping_collection.h> 38 DEAL_II_NAMESPACE_OPEN
40 template <
int dim,
typename RangeNumberType>
46 template <
int dim,
typename number>
49 template <
typename number>
51 template <
typename number>
53 template <
int dim,
int spacedim>
55 template <
typename gr
idtype>
62 template <
typename number>
613 template <
int,
int>
class DoFHandlerType>
617 const DoFHandlerType<dim, spacedim> & dof,
629 template <
int,
int>
class DoFHandlerType>
632 const DoFHandlerType<dim, spacedim> & dof,
653 template <
int dim,
class InVector,
class OutVector,
int spacedim>
658 const InVector & data_1,
710 template <
int,
int>
class DoFHandlerType>
714 const DoFHandlerType<dim, spacedim> &dof_handler,
748 template <
int,
int>
class DoFHandlerType>
751 const VectorType & u1,
752 const DoFHandlerType<dim, spacedim> &dof2,
771 template <
int,
int>
class DoFHandlerType>
774 const DoFHandlerType<dim, spacedim> & dof1,
775 const VectorType & u1,
776 const DoFHandlerType<dim, spacedim> & dof2,
790 template <
int,
int>
class DoFHandlerType>
793 const InterGridMap<DoFHandlerType<dim, spacedim>> & intergridmap,
794 const VectorType & u1,
849 template <
int dim,
typename VectorType,
int spacedim>
857 const bool enforce_zero_boundary =
false,
861 const bool project_to_boundary_first =
false);
867 template <
int dim,
typename VectorType,
int spacedim>
874 const bool enforce_zero_boundary =
false,
878 const bool project_to_boundary_first =
false);
884 template <
int dim,
typename VectorType,
int spacedim>
892 const bool enforce_zero_boundary =
false,
895 const bool project_to_boundary_first =
false);
901 template <
int dim,
typename VectorType,
int spacedim>
908 const bool enforce_zero_boundary =
false,
911 const bool project_to_boundary_first =
false);
937 template <
int dim,
typename VectorType,
int spacedim>
943 const std::function<
typename VectorType::value_type(
945 const unsigned int)> & func,
946 VectorType & vec_result);
976 template <
int dim,
typename VectorType>
981 const unsigned int n_q_points_1d,
984 const unsigned int)> &func,
985 VectorType & vec_result,
986 const unsigned int fe_component = 0);
992 template <
int dim,
typename VectorType>
999 const unsigned int)> & func,
1000 VectorType & vec_result,
1001 const unsigned int fe_component = 0);
1055 template <
int,
int>
class DoFHandlerType,
1060 const DoFHandlerType<dim, spacedim> &dof,
1063 std::map<types::global_dof_index, number> &boundary_values,
1070 template <
int dim,
int spacedim,
typename number>
1077 std::map<types::global_dof_index, number> &boundary_values,
1091 template <
int,
int>
class DoFHandlerType,
1096 const DoFHandlerType<dim, spacedim> & dof,
1099 std::map<types::global_dof_index, number> &boundary_values,
1113 template <
int,
int>
class DoFHandlerType,
1117 const DoFHandlerType<dim, spacedim> & dof,
1120 std::map<types::global_dof_index, number> &boundary_values,
1132 template <
int,
int>
class DoFHandlerType,
1136 const DoFHandlerType<dim, spacedim> &dof,
1139 std::map<types::global_dof_index, number> &boundary_values,
1206 template <
int,
int>
class DoFHandlerType,
1211 const DoFHandlerType<dim, spacedim> &dof,
1230 template <
int,
int>
class DoFHandlerType,
1235 const DoFHandlerType<dim, spacedim> &dof,
1254 template <
int,
int>
class DoFHandlerType,
1258 const DoFHandlerType<dim, spacedim> &dof,
1275 template <
int,
int>
class DoFHandlerType,
1279 const DoFHandlerType<dim, spacedim> &dof,
1350 template <
int dim,
int spacedim,
typename number>
1356 & boundary_functions,
1358 std::map<types::global_dof_index, number> &boundary_values,
1359 std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1365 template <
int dim,
int spacedim,
typename number>
1370 & boundary_function,
1372 std::map<types::global_dof_index, number> &boundary_values,
1373 std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1378 template <
int dim,
int spacedim,
typename number>
1384 & boundary_functions,
1386 std::map<types::global_dof_index, number> &boundary_values,
1387 std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1393 template <
int dim,
int spacedim,
typename number>
1398 & boundary_function,
1400 std::map<types::global_dof_index, number> &boundary_values,
1401 std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1441 template <
int dim,
int spacedim,
typename number>
1447 & boundary_functions,
1450 std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1458 template <
int dim,
int spacedim,
typename number>
1463 & boundary_function,
1466 std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
1527 DEAL_II_DEPRECATED
void 1530 const unsigned int first_vector_component,
1548 DEAL_II_DEPRECATED
void 1551 const unsigned int first_vector_component,
1657 const unsigned int first_vector_component,
1674 const unsigned int first_vector_component,
1732 const unsigned int first_vector_component,
1750 const unsigned int first_vector_component,
1985 template <
int dim,
int spacedim,
template <
int,
int>
class DoFHandlerType>
1988 const DoFHandlerType<dim, spacedim> &dof_handler,
1989 const unsigned int first_vector_component,
1990 const std::set<types::boundary_id> & boundary_ids,
2008 template <
int dim,
int spacedim,
template <
int,
int>
class DoFHandlerType>
2011 const DoFHandlerType<dim, spacedim> &dof_handler,
2012 const unsigned int first_vector_component,
2013 const std::set<types::boundary_id> & boundary_ids,
2033 template <
int dim,
int spacedim,
template <
int,
int>
class DoFHandlerType>
2036 const DoFHandlerType<dim, spacedim> &dof_handler,
2037 const unsigned int first_vector_component,
2038 const std::set<types::boundary_id> & boundary_ids,
2052 template <
int dim,
int spacedim,
template <
int,
int>
class DoFHandlerType>
2055 const DoFHandlerType<dim, spacedim> &dof_handler,
2056 const unsigned int first_vector_component,
2057 const std::set<types::boundary_id> & boundary_ids,
2074 template <
int dim,
int spacedim,
typename VectorType>
2081 VectorType & rhs_vector,
2089 template <
int dim,
int spacedim,
typename VectorType>
2095 VectorType & rhs_vector,
2102 template <
int dim,
int spacedim,
typename VectorType>
2109 VectorType & rhs_vector,
2116 template <
int dim,
int spacedim,
typename VectorType>
2122 VectorType & rhs_vector,
2177 template <
int dim,
int spacedim>
2188 template <
int dim,
int spacedim>
2197 template <
int dim,
int spacedim>
2211 template <
int dim,
int spacedim>
2235 template <
int dim,
int spacedim>
2247 template <
int dim,
int spacedim>
2257 template <
int dim,
int spacedim>
2272 template <
int dim,
int spacedim>
2288 template <
int dim,
int spacedim,
typename VectorType>
2295 VectorType & rhs_vector,
2296 const std::set<types::boundary_id> & boundary_ids =
2297 std::set<types::boundary_id>());
2306 template <
int dim,
int spacedim,
typename VectorType>
2312 VectorType & rhs_vector,
2313 const std::set<types::boundary_id> & boundary_ids =
2314 std::set<types::boundary_id>());
2322 template <
int dim,
int spacedim,
typename VectorType>
2329 VectorType & rhs_vector,
2330 const std::set<types::boundary_id> & boundary_ids =
2331 std::set<types::boundary_id>());
2341 template <
int dim,
int spacedim,
typename VectorType>
2347 VectorType & rhs_vector,
2348 const std::set<types::boundary_id> & boundary_ids =
2349 std::set<types::boundary_id>());
2444 template <
int dim,
class InVector,
class OutVector,
int spacedim>
2448 const InVector & fe_function,
2450 OutVector & difference,
2454 const double exponent = 2.);
2460 template <
int dim,
class InVector,
class OutVector,
int spacedim>
2463 const InVector & fe_function,
2465 OutVector & difference,
2469 const double exponent = 2.);
2474 template <
int dim,
class InVector,
class OutVector,
int spacedim>
2478 const InVector & fe_function,
2480 OutVector & difference,
2484 const double exponent = 2.);
2490 template <
int dim,
class InVector,
class OutVector,
int spacedim>
2493 const InVector & fe_function,
2495 OutVector & difference,
2499 const double exponent = 2.);
2526 template <
int dim,
int spacedim,
class InVector>
2529 const InVector & cellwise_error,
2531 const double exponent = 2.);
2545 template <
int dim,
typename VectorType,
int spacedim>
2549 const VectorType & fe_function,
2566 template <
int dim,
typename VectorType,
int spacedim>
2571 const VectorType & fe_function,
2598 template <
int dim,
typename VectorType,
int spacedim>
2601 const VectorType & fe_function,
2622 template <
int dim,
typename VectorType,
int spacedim>
2625 const VectorType & fe_function,
2655 template <
int dim,
typename VectorType,
int spacedim>
2656 typename VectorType::value_type
2658 const VectorType & fe_function,
2678 template <
int dim,
typename VectorType,
int spacedim>
2679 typename VectorType::value_type
2681 const VectorType & fe_function,
2706 template <
int dim,
typename VectorType,
int spacedim>
2710 const VectorType & fe_function,
2731 template <
int dim,
typename VectorType,
int spacedim>
2735 const VectorType & fe_function,
2761 template <
int dim,
typename VectorType,
int spacedim>
2762 typename VectorType::value_type
2765 const VectorType & fe_function,
2785 template <
int dim,
typename VectorType,
int spacedim>
2786 typename VectorType::value_type
2789 const VectorType & fe_function,
2813 template <
int dim,
typename VectorType,
int spacedim>
2817 const VectorType & fe_function,
2837 template <
int dim,
typename VectorType,
int spacedim>
2841 const VectorType & fe_function,
2866 template <
int dim,
typename VectorType,
int spacedim>
2869 const VectorType & fe_function,
2888 template <
int dim,
typename VectorType,
int spacedim>
2891 const VectorType & fe_function,
2915 template <
int dim,
typename VectorType,
int spacedim>
2920 const VectorType & fe_function,
2940 template <
int dim,
typename VectorType,
int spacedim>
2945 const VectorType & fe_function,
2970 template <
int dim,
typename VectorType,
int spacedim>
2974 const VectorType & fe_function,
2993 template <
int dim,
typename VectorType,
int spacedim>
2997 const VectorType & fe_function,
3055 template <
typename VectorType>
3058 const std::vector<bool> &p_select = std::vector<bool>());
3084 template <
int dim,
typename VectorType,
int spacedim>
3085 typename VectorType::value_type
3089 const VectorType & v,
3090 const unsigned int component);
3096 template <
int dim,
typename VectorType,
int spacedim>
3097 typename VectorType::value_type
3100 const VectorType & v,
3101 const unsigned int component);
3135 template <
int,
int>
class DoFHandlerType,
3136 typename VectorType>
3139 VectorType & vector,
3148 "The given point is inside a cell of a " 3149 "parallel::distributed::Triangulation that is not " 3150 "locally owned by this processor.");
3154 DEAL_II_NAMESPACE_CLOSE
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 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 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)
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 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 >())
Abstract base class for mapping classes.
#define DeclExceptionMsg(Exception, defaulttext)
static::ExceptionBase & ExcPointNotAvailableHere()
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
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)