deal.II version GIT relicensing-6917-gb466a1809f 2026-10-16 06:30:01+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\}}\)
Loading...
Searching...
No Matches
vector_tools_project.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2020 - 2025 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_vector_tools_project_h
14#define dealii_vector_tools_project_h
15
16
17#include <deal.II/base/config.h>
18
22
23#include <functional>
24#include <memory>
25
27
28template <typename number>
30
31template <int dim, int spacedim>
33class DoFHandler;
34
35template <int dim, typename Number>
36class Function;
37template <int dim, int spacedim>
38class Mapping;
39template <int dim, typename number, typename VectorizedArrayType>
40class MatrixFree;
41template <typename Number, std::size_t width>
42class VectorizedArray;
43namespace hp
44{
45 template <int dim, int spacedim>
46 class MappingCollection;
47 template <int dim>
48 class QCollection;
49} // namespace hp
50
51
52namespace VectorTools
53{
142 template <int dim, typename VectorType, int spacedim>
145 const Mapping<dim, spacedim> &mapping,
146 const DoFHandler<dim, spacedim> &dof,
147 const AffineConstraints<typename VectorType::value_type> &constraints,
148 const Quadrature<dim> &quadrature,
149 const Function<spacedim, typename VectorType::value_type> &function,
150 VectorType &vec,
151 const bool enforce_zero_boundary = false,
152 const Quadrature<dim - 1> &q_boundary = (dim > 1 ? QGauss<dim - 1>(2) :
153 Quadrature<dim - 1>()),
154 const bool project_to_boundary_first = false);
155
162 template <int dim, typename VectorType, int spacedim>
163 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
165 const DoFHandler<dim, spacedim> &dof,
166 const AffineConstraints<typename VectorType::value_type> &constraints,
167 const Quadrature<dim> &quadrature,
168 const Function<spacedim, typename VectorType::value_type> &function,
169 VectorType &vec,
170 const bool enforce_zero_boundary = false,
171 const Quadrature<dim - 1> &q_boundary = (dim > 1 ? QGauss<dim - 1>(2) :
172 Quadrature<dim - 1>()),
173 const bool project_to_boundary_first = false);
174
180 template <int dim, typename VectorType, int spacedim>
181 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
183 const hp::MappingCollection<dim, spacedim> &mapping,
184 const DoFHandler<dim, spacedim> &dof,
185 const AffineConstraints<typename VectorType::value_type> &constraints,
186 const hp::QCollection<dim> &quadrature,
187 const Function<spacedim, typename VectorType::value_type> &function,
188 VectorType &vec,
189 const bool enforce_zero_boundary = false,
190 const hp::QCollection<dim - 1> &q_boundary = hp::QCollection<dim - 1>(
191 dim > 1 ? QGauss<dim - 1>(2) : Quadrature<dim - 1>()),
192 const bool project_to_boundary_first = false);
193
200 template <int dim, typename VectorType, int spacedim>
201 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
203 const DoFHandler<dim, spacedim> &dof,
204 const AffineConstraints<typename VectorType::value_type> &constraints,
205 const hp::QCollection<dim> &quadrature,
206 const Function<spacedim, typename VectorType::value_type> &function,
207 VectorType &vec,
208 const bool enforce_zero_boundary = false,
209 const hp::QCollection<dim - 1> &q_boundary = hp::QCollection<dim - 1>(
210 dim > 1 ? QGauss<dim - 1>(2) : Quadrature<dim - 1>()),
211 const bool project_to_boundary_first = false);
212
239 template <int dim, typename VectorType, int spacedim>
240 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
242 const Mapping<dim, spacedim> &mapping,
243 const DoFHandler<dim, spacedim> &dof,
244 const AffineConstraints<typename VectorType::value_type> &constraints,
245 const Quadrature<dim> &quadrature,
246 const std::function<typename VectorType::value_type(
247 const typename DoFHandler<dim, spacedim>::active_cell_iterator &,
248 const unsigned int)> &func,
249 VectorType &vec_result);
250
281 template <int dim, typename VectorType>
282 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
284 std::shared_ptr<
285 const MatrixFree<dim,
286 typename VectorType::value_type,
287 VectorizedArray<typename VectorType::value_type>>> data,
288 const AffineConstraints<typename VectorType::value_type> &constraints,
289 const unsigned int n_q_points_1d,
290 const std::function<VectorizedArray<typename VectorType::value_type>(
291 const unsigned int,
292 const unsigned int)> &func,
293 VectorType &vec_result,
294 const unsigned int fe_component = 0);
295
302 template <int dim, typename VectorType>
303 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
305 std::shared_ptr<
306 const MatrixFree<dim,
307 typename VectorType::value_type,
308 VectorizedArray<typename VectorType::value_type>>> data,
309 const AffineConstraints<typename VectorType::value_type> &constraints,
310 const std::function<VectorizedArray<typename VectorType::value_type>(
311 const unsigned int,
312 const unsigned int)> &func,
313 VectorType &vec_result,
314 const unsigned int fe_component = 0);
315
318} // namespace VectorTools
319
321
322#endif // dealii_vector_tools_project_h
Abstract base class for mapping classes.
Definition mapping.h:318
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_CXX20_REQUIRES(condition)
Definition config.h:249
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
std::vector< index_type > data
Definition mpi.cc:734
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:115
STL namespace.