Loading [MathJax]/extensions/TeX/newcommand.js
 deal.II version GIT relicensing-2846-g6fb608615f 2025-03-15 04:10:00+00:00
\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}} \newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=} \newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]} \newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
vector_tools_project.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2020 - 2024 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_vector_tools_project_h
16#define dealii_vector_tools_project_h
17
18
19#include <deal.II/base/config.h>
20
23
24#include <functional>
25#include <memory>
26
28
29template <typename number>
31
32template <int dim, int spacedim>
34class DoFHandler;
35
36template <int dim, typename Number>
37class Function;
38template <int dim, int spacedim>
39class Mapping;
40template <int dim, typename number, typename VectorizedArrayType>
41class MatrixFree;
42template <int dim>
43class Quadrature;
44template <int dim>
45class QGauss;
46template <typename Number, std::size_t width>
47class VectorizedArray;
48namespace hp
49{
50 template <int dim, int spacedim>
51 class MappingCollection;
52 template <int dim>
53 class QCollection;
54} // namespace hp
55
56
57namespace VectorTools
58{
147 template <int dim, typename VectorType, int spacedim>
150 const Mapping<dim, spacedim> &mapping,
151 const DoFHandler<dim, spacedim> &dof,
152 const AffineConstraints<typename VectorType::value_type> &constraints,
153 const Quadrature<dim> &quadrature,
154 const Function<spacedim, typename VectorType::value_type> &function,
155 VectorType &vec,
156 const bool enforce_zero_boundary = false,
157 const Quadrature<dim - 1> &q_boundary = (dim > 1 ? QGauss<dim - 1>(2) :
158 Quadrature<dim - 1>()),
159 const bool project_to_boundary_first = false);
160
167 template <int dim, typename VectorType, int spacedim>
168 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
170 const DoFHandler<dim, spacedim> &dof,
171 const AffineConstraints<typename VectorType::value_type> &constraints,
172 const Quadrature<dim> &quadrature,
173 const Function<spacedim, typename VectorType::value_type> &function,
174 VectorType &vec,
175 const bool enforce_zero_boundary = false,
176 const Quadrature<dim - 1> &q_boundary = (dim > 1 ? QGauss<dim - 1>(2) :
177 Quadrature<dim - 1>()),
178 const bool project_to_boundary_first = false);
179
185 template <int dim, typename VectorType, int spacedim>
186 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
188 const hp::MappingCollection<dim, spacedim> &mapping,
189 const DoFHandler<dim, spacedim> &dof,
190 const AffineConstraints<typename VectorType::value_type> &constraints,
191 const hp::QCollection<dim> &quadrature,
192 const Function<spacedim, typename VectorType::value_type> &function,
193 VectorType &vec,
194 const bool enforce_zero_boundary = false,
195 const hp::QCollection<dim - 1> &q_boundary = hp::QCollection<dim - 1>(
196 dim > 1 ? QGauss<dim - 1>(2) : Quadrature<dim - 1>()),
197 const bool project_to_boundary_first = false);
198
205 template <int dim, typename VectorType, int spacedim>
206 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
208 const DoFHandler<dim, spacedim> &dof,
209 const AffineConstraints<typename VectorType::value_type> &constraints,
210 const hp::QCollection<dim> &quadrature,
211 const Function<spacedim, typename VectorType::value_type> &function,
212 VectorType &vec,
213 const bool enforce_zero_boundary = false,
214 const hp::QCollection<dim - 1> &q_boundary = hp::QCollection<dim - 1>(
215 dim > 1 ? QGauss<dim - 1>(2) : Quadrature<dim - 1>()),
216 const bool project_to_boundary_first = false);
217
244 template <int dim, typename VectorType, int spacedim>
245 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
247 const Mapping<dim, spacedim> &mapping,
248 const DoFHandler<dim, spacedim> &dof,
249 const AffineConstraints<typename VectorType::value_type> &constraints,
250 const Quadrature<dim> &quadrature,
251 const std::function<typename VectorType::value_type(
252 const typename DoFHandler<dim, spacedim>::active_cell_iterator &,
253 const unsigned int)> &func,
254 VectorType &vec_result);
255
286 template <int dim, typename VectorType>
287 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
289 std::shared_ptr<
290 const MatrixFree<dim,
291 typename VectorType::value_type,
292 VectorizedArray<typename VectorType::value_type>>> data,
293 const AffineConstraints<typename VectorType::value_type> &constraints,
294 const unsigned int n_q_points_1d,
295 const std::function<VectorizedArray<typename VectorType::value_type>(
296 const unsigned int,
297 const unsigned int)> &func,
298 VectorType &vec_result,
299 const unsigned int fe_component = 0);
300
307 template <int dim, typename VectorType>
308 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
310 std::shared_ptr<
311 const MatrixFree<dim,
312 typename VectorType::value_type,
313 VectorizedArray<typename VectorType::value_type>>> data,
314 const AffineConstraints<typename VectorType::value_type> &constraints,
315 const std::function<VectorizedArray<typename VectorType::value_type>(
316 const unsigned int,
317 const unsigned int)> &func,
318 VectorType &vec_result,
319 const unsigned int fe_component = 0);
320
323} // namespace VectorTools
324
326
327#endif // dealii_vector_tools_project_h
Abstract base class for mapping classes.
Definition mapping.h:320
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:40
#define DEAL_II_CXX20_REQUIRES(condition)
Definition config.h:245
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:41
std::vector< index_type > data
Definition mpi.cc:746
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 >()), const bool project_to_boundary_first=false)
Definition hp.h:117
STL namespace.