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_interpolate.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_interpolate_h
14#define dealii_vector_tools_interpolate_h
15
16#include <deal.II/base/config.h>
17
19#include <deal.II/base/types.h>
20
22
23#include <map>
24
26
27template <typename number>
29
30template <int dim, int spacedim>
32class DoFHandler;
33
34template <typename number>
35class FullMatrix;
36template <int dim, typename Number>
37class Function;
38template <typename MeshType>
40class InterGridMap;
41template <int dim, int spacedim>
42class Mapping;
43
44namespace hp
45{
46 template <int dim, int spacedim>
47 class MappingCollection;
48}
49
50namespace VectorTools
51{
72 template <int dim, int spacedim, typename VectorType>
75 const Mapping<dim, spacedim> &mapping,
76 const DoFHandler<dim, spacedim> &dof,
77 const Function<spacedim, typename VectorType::value_type> &function,
78 VectorType &vec,
79 const ComponentMask &component_mask = {},
80 const unsigned int level = numbers::invalid_unsigned_int);
81
87 template <int dim, int spacedim, typename VectorType>
90 const hp::MappingCollection<dim, spacedim> &mapping,
91 const DoFHandler<dim, spacedim> &dof,
92 const Function<spacedim, typename VectorType::value_type> &function,
93 VectorType &vec,
94 const ComponentMask &component_mask = {},
95 const unsigned int level = numbers::invalid_unsigned_int);
96
97
104 template <int dim, int spacedim, typename VectorType>
107 const DoFHandler<dim, spacedim> &dof,
108 const Function<spacedim, typename VectorType::value_type> &function,
109 VectorType &vec,
110 const ComponentMask &component_mask = {},
111 const unsigned int level = numbers::invalid_unsigned_int);
112
134 template <int dim, class InVector, class OutVector, int spacedim>
137 void interpolate(const DoFHandler<dim, spacedim> &dof_1,
138 const DoFHandler<dim, spacedim> &dof_2,
139 const FullMatrix<double> &transfer,
140 const InVector &data_1,
141 OutVector &data_2);
142
191 template <int dim, int spacedim, typename VectorType>
192 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
194 const Mapping<dim, spacedim> &mapping,
195 const DoFHandler<dim, spacedim> &dof_handler,
196 const std::map<types::material_id,
197 const Function<spacedim, typename VectorType::value_type> *>
198 &function_map,
199 VectorType &dst,
200 const ComponentMask &component_mask = {});
201
240 template <int dim, int spacedim, typename VectorType>
243 const DoFHandler<dim, spacedim> &dof_handler_1,
244 const VectorType &u1,
245 const DoFHandler<dim, spacedim> &dof_handler_2,
246 VectorType &u2);
247
260 template <int dim, int spacedim, typename VectorType>
261 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
263 const DoFHandler<dim, spacedim> &dof_handler_1,
264 const VectorType &u1,
265 const DoFHandler<dim, spacedim> &dof_handler_2,
266 const AffineConstraints<typename VectorType::value_type> &constraints,
267 VectorType &u2);
268
279 template <int dim, int spacedim, typename VectorType>
280 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
282 const InterGridMap<DoFHandler<dim, spacedim>> &intergridmap,
283 const VectorType &u1,
284 const AffineConstraints<typename VectorType::value_type> &constraints,
285 VectorType &u2);
286
310 template <int dim, int spacedim, typename VectorType>
311 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
313 const DoFHandler<dim, spacedim> &dof_handler_fine,
314 const VectorType &u_fine,
315 const DoFHandler<dim, spacedim> &dof_handler_coarse,
316 const AffineConstraints<typename VectorType::value_type>
317 &constraints_coarse,
318 VectorType &u_coarse);
319
343 template <int dim, int spacedim, typename VectorType>
344 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
346 const DoFHandler<dim, spacedim> &dof_handler_coarse,
347 const VectorType &u_coarse,
348 const DoFHandler<dim, spacedim> &dof_handler_fine,
349 const AffineConstraints<typename VectorType::value_type> &constraints_fine,
350 VectorType &u_fine);
351
385 template <int dim, int spacedim, typename VectorType>
386 DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type<VectorType>)
387 void get_position_vector(const DoFHandler<dim, spacedim> &dh,
388 VectorType &vector,
389 const ComponentMask &mask = {});
390
401 template <int dim, int spacedim, typename VectorType>
403 void get_position_vector(const Mapping<dim, spacedim> &mapping,
404 const DoFHandler<dim, spacedim> &dh,
405 VectorType &vector,
406 const ComponentMask &mask = {});
407
409} // namespace VectorTools
410
412
413#endif // dealii_vector_tools_interpolate_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
unsigned int level
Definition grid_out.cc:4642
void interpolate_to_coarser_mesh(const DoFHandler< dim, spacedim > &dof_handler_fine, const VectorType &u_fine, const DoFHandler< dim, spacedim > &dof_handler_coarse, const AffineConstraints< typename VectorType::value_type > &constraints_coarse, VectorType &u_coarse)
void interpolate(const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof, const Function< spacedim, typename VectorType::value_type > &function, VectorType &vec, const ComponentMask &component_mask={}, const unsigned int level=numbers::invalid_unsigned_int)
void interpolate_based_on_material_id(const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof_handler, const std::map< types::material_id, const Function< spacedim, typename VectorType::value_type > * > &function_map, VectorType &dst, const ComponentMask &component_mask={})
void get_position_vector(const DoFHandler< dim, spacedim > &dh, VectorType &vector, const ComponentMask &mask={})
void interpolate_to_finer_mesh(const DoFHandler< dim, spacedim > &dof_handler_coarse, const VectorType &u_coarse, const DoFHandler< dim, spacedim > &dof_handler_fine, const AffineConstraints< typename VectorType::value_type > &constraints_fine, VectorType &u_fine)
void interpolate_to_different_mesh(const DoFHandler< dim, spacedim > &dof_handler_1, const VectorType &u1, const DoFHandler< dim, spacedim > &dof_handler_2, VectorType &u2)
Definition hp.h:115
constexpr unsigned int invalid_unsigned_int
Definition types.h:228
STL namespace.
Definition types.h:30