Reference documentation for deal.II version 9.5.0
\(\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// Copyright (C) 1998 - 2023 by the deal.II authors
4//
5// This file is part of the deal.II library.
6//
7// The deal.II library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 2.1 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE.md at
12// the top level directory of deal.II.
13//
14// ---------------------------------------------------------------------
15
16#ifndef dealii_vector_tools_project_h
17#define dealii_vector_tools_project_h
18
19
20#include <deal.II/base/config.h>
21
22#include <functional>
23#include <memory>
24
26
27template <typename number>
29
30template <int dim, int spacedim>
32class DoFHandler;
33
34template <int dim, typename Number>
35class Function;
36template <int dim, int spacedim>
37class Mapping;
38template <int dim, typename number, typename VectorizedArrayType>
39class MatrixFree;
40template <int dim>
41class Quadrature;
42template <int dim>
43class QGauss;
44template <typename Number, std::size_t width>
45class VectorizedArray;
46namespace hp
47{
48 template <int dim, int spacedim>
49 class MappingCollection;
50 template <int dim>
51 class QCollection;
52} // namespace hp
53
54
55namespace VectorTools
56{
145 template <int dim, typename VectorType, int spacedim>
148 const Mapping<dim, spacedim> & mapping,
149 const DoFHandler<dim, spacedim> & dof,
150 const AffineConstraints<typename VectorType::value_type> & constraints,
151 const Quadrature<dim> & quadrature,
152 const Function<spacedim, typename VectorType::value_type> &function,
153 VectorType & vec,
154 const bool enforce_zero_boundary = false,
155 const Quadrature<dim - 1> &q_boundary = (dim > 1 ? QGauss<dim - 1>(2) :
156 Quadrature<dim - 1>(0)),
157 const bool project_to_boundary_first = false);
158
165 template <int dim, typename VectorType, int spacedim>
166 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
168 const DoFHandler<dim, spacedim> & dof,
169 const AffineConstraints<typename VectorType::value_type> & constraints,
170 const Quadrature<dim> & quadrature,
171 const Function<spacedim, typename VectorType::value_type> &function,
172 VectorType & vec,
173 const bool enforce_zero_boundary = false,
174 const Quadrature<dim - 1> &q_boundary = (dim > 1 ? QGauss<dim - 1>(2) :
175 Quadrature<dim - 1>(0)),
176 const bool project_to_boundary_first = false);
177
183 template <int dim, typename VectorType, int spacedim>
184 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
186 const hp::MappingCollection<dim, spacedim> & mapping,
187 const DoFHandler<dim, spacedim> & dof,
188 const AffineConstraints<typename VectorType::value_type> & constraints,
189 const hp::QCollection<dim> & quadrature,
190 const Function<spacedim, typename VectorType::value_type> &function,
191 VectorType & vec,
192 const bool enforce_zero_boundary = false,
193 const hp::QCollection<dim - 1> &q_boundary = hp::QCollection<dim - 1>(
194 dim > 1 ? QGauss<dim - 1>(2) : Quadrature<dim - 1>(0)),
195 const bool project_to_boundary_first = false);
196
203 template <int dim, typename VectorType, int spacedim>
204 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
206 const DoFHandler<dim, spacedim> & dof,
207 const AffineConstraints<typename VectorType::value_type> & constraints,
208 const hp::QCollection<dim> & quadrature,
209 const Function<spacedim, typename VectorType::value_type> &function,
210 VectorType & vec,
211 const bool enforce_zero_boundary = false,
212 const hp::QCollection<dim - 1> &q_boundary = hp::QCollection<dim - 1>(
213 dim > 1 ? QGauss<dim - 1>(2) : Quadrature<dim - 1>(0)),
214 const bool project_to_boundary_first = false);
215
242 template <int dim, typename VectorType, int spacedim>
243 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
245 const Mapping<dim, spacedim> & mapping,
246 const DoFHandler<dim, spacedim> & dof,
247 const AffineConstraints<typename VectorType::value_type> &constraints,
248 const Quadrature<dim> & quadrature,
249 const std::function<typename VectorType::value_type(
250 const typename DoFHandler<dim, spacedim>::active_cell_iterator &,
251 const unsigned int)> & func,
252 VectorType & vec_result);
253
284 template <int dim, typename VectorType>
285 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
287 std::shared_ptr<
288 const MatrixFree<dim,
289 typename VectorType::value_type,
290 VectorizedArray<typename VectorType::value_type>>> data,
291 const AffineConstraints<typename VectorType::value_type> &constraints,
292 const unsigned int n_q_points_1d,
293 const std::function<VectorizedArray<typename VectorType::value_type>(
294 const unsigned int,
295 const unsigned int)> & func,
296 VectorType & vec_result,
297 const unsigned int fe_component = 0);
298
305 template <int dim, typename VectorType>
306 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
308 std::shared_ptr<
309 const MatrixFree<dim,
310 typename VectorType::value_type,
311 VectorizedArray<typename VectorType::value_type>>> data,
312 const AffineConstraints<typename VectorType::value_type> &constraints,
313 const std::function<VectorizedArray<typename VectorType::value_type>(
314 const unsigned int,
315 const unsigned int)> & func,
316 VectorType & vec_result,
317 const unsigned int fe_component = 0);
318
321} // namespace VectorTools
322
324
325#endif // dealii_vector_tools_project_h
Abstract base class for mapping classes.
Definition mapping.h:317
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_CXX20_REQUIRES(condition)
Definition config.h:160
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473
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:118
STL namespace.