Reference documentation for deal.II version GIT relicensing-214-g6e74dec06b 2024-03-27 18:10: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: LGPL-2.1-or-later
4// Copyright (C) 2020 - 2023 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
21#include <functional>
22#include <memory>
23
25
26template <typename number>
28
29template <int dim, int spacedim>
31class DoFHandler;
32
33template <int dim, typename Number>
34class Function;
35template <int dim, int spacedim>
36class Mapping;
37template <int dim, typename number, typename VectorizedArrayType>
38class MatrixFree;
39template <int dim>
40class Quadrature;
41template <int dim>
42class QGauss;
43template <typename Number, std::size_t width>
44class VectorizedArray;
45namespace hp
46{
47 template <int dim, int spacedim>
48 class MappingCollection;
49 template <int dim>
50 class QCollection;
51} // namespace hp
52
53
54namespace VectorTools
55{
144 template <int dim, typename VectorType, int spacedim>
147 const Mapping<dim, spacedim> &mapping,
148 const DoFHandler<dim, spacedim> &dof,
149 const AffineConstraints<typename VectorType::value_type> &constraints,
150 const Quadrature<dim> &quadrature,
151 const Function<spacedim, typename VectorType::value_type> &function,
152 VectorType &vec,
153 const bool enforce_zero_boundary = false,
154 const Quadrature<dim - 1> &q_boundary = (dim > 1 ? QGauss<dim - 1>(2) :
155 Quadrature<dim - 1>(0)),
156 const bool project_to_boundary_first = false);
157
164 template <int dim, typename VectorType, int spacedim>
165 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
167 const DoFHandler<dim, spacedim> &dof,
168 const AffineConstraints<typename VectorType::value_type> &constraints,
169 const Quadrature<dim> &quadrature,
170 const Function<spacedim, typename VectorType::value_type> &function,
171 VectorType &vec,
172 const bool enforce_zero_boundary = false,
173 const Quadrature<dim - 1> &q_boundary = (dim > 1 ? QGauss<dim - 1>(2) :
174 Quadrature<dim - 1>(0)),
175 const bool project_to_boundary_first = false);
176
182 template <int dim, typename VectorType, int spacedim>
183 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
185 const hp::MappingCollection<dim, spacedim> &mapping,
186 const DoFHandler<dim, spacedim> &dof,
187 const AffineConstraints<typename VectorType::value_type> &constraints,
188 const hp::QCollection<dim> &quadrature,
189 const Function<spacedim, typename VectorType::value_type> &function,
190 VectorType &vec,
191 const bool enforce_zero_boundary = false,
192 const hp::QCollection<dim - 1> &q_boundary = hp::QCollection<dim - 1>(
193 dim > 1 ? QGauss<dim - 1>(2) : Quadrature<dim - 1>(0)),
194 const bool project_to_boundary_first = false);
195
202 template <int dim, typename VectorType, int spacedim>
203 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
205 const DoFHandler<dim, spacedim> &dof,
206 const AffineConstraints<typename VectorType::value_type> &constraints,
207 const hp::QCollection<dim> &quadrature,
208 const Function<spacedim, typename VectorType::value_type> &function,
209 VectorType &vec,
210 const bool enforce_zero_boundary = false,
211 const hp::QCollection<dim - 1> &q_boundary = hp::QCollection<dim - 1>(
212 dim > 1 ? QGauss<dim - 1>(2) : Quadrature<dim - 1>(0)),
213 const bool project_to_boundary_first = false);
214
241 template <int dim, typename VectorType, int spacedim>
242 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
244 const Mapping<dim, spacedim> &mapping,
245 const DoFHandler<dim, spacedim> &dof,
246 const AffineConstraints<typename VectorType::value_type> &constraints,
247 const Quadrature<dim> &quadrature,
248 const std::function<typename VectorType::value_type(
249 const typename DoFHandler<dim, spacedim>::active_cell_iterator &,
250 const unsigned int)> &func,
251 VectorType &vec_result);
252
283 template <int dim, typename VectorType>
284 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
286 std::shared_ptr<
287 const MatrixFree<dim,
288 typename VectorType::value_type,
289 VectorizedArray<typename VectorType::value_type>>> data,
290 const AffineConstraints<typename VectorType::value_type> &constraints,
291 const unsigned int n_q_points_1d,
292 const std::function<VectorizedArray<typename VectorType::value_type>(
293 const unsigned int,
294 const unsigned int)> &func,
295 VectorType &vec_result,
296 const unsigned int fe_component = 0);
297
304 template <int dim, typename VectorType>
305 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
307 std::shared_ptr<
308 const MatrixFree<dim,
309 typename VectorType::value_type,
310 VectorizedArray<typename VectorType::value_type>>> data,
311 const AffineConstraints<typename VectorType::value_type> &constraints,
312 const std::function<VectorizedArray<typename VectorType::value_type>(
313 const unsigned int,
314 const unsigned int)> &func,
315 VectorType &vec_result,
316 const unsigned int fe_component = 0);
317
320} // namespace VectorTools
321
323
324#endif // dealii_vector_tools_project_h
Abstract base class for mapping classes.
Definition mapping.h:316
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:502
#define DEAL_II_CXX20_REQUIRES(condition)
Definition config.h:177
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503
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 >(0)), const bool project_to_boundary_first=false)
Definition hp.h:117
STL namespace.