Loading [MathJax]/extensions/TeX/newcommand.js
 deal.II version GIT relicensing-2848-g5241f990fb 2025-03-16 19:30: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_mean_value.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_mean_value_h
16#define dealii_vector_tools_mean_value_h
17
18
19#include <deal.II/base/config.h>
20
22
24
25#include <vector>
26
28
29#ifndef DOXYGEN
30// forward declarations
31template <int dim, int spacedim>
33class DoFHandler;
34template <int dim, int spacedim>
35class Mapping;
36template <int dim>
37class Quadrature;
38namespace hp
39{
40 template <int dim, int spacedim>
41 class MappingCollection;
42 template <int dim>
43 class QCollection;
44} // namespace hp
45#endif
46
47namespace VectorTools
48{
105 template <typename VectorType>
107 void subtract_mean_value(VectorType &v,
108 const std::vector<bool> &p_select = {});
109
138 template <typename VectorType, int dim, int spacedim = dim>
140 void add_constant(VectorType &solution,
141 const DoFHandler<dim, spacedim> &dof_handler,
142 const unsigned int component,
143 const typename VectorType::value_type constant_adjustment);
144
168 template <int dim, typename Number, int spacedim>
169 Number
171 const hp::MappingCollection<dim, spacedim> &mapping_collection,
172 const DoFHandler<dim, spacedim> &dof,
173 const hp::QCollection<dim> &q_collection,
174 const ReadVector<Number> &v,
175 const unsigned int component);
176
182 template <int dim, typename Number, int spacedim>
183 Number
184 compute_mean_value(const Mapping<dim, spacedim> &mapping,
185 const DoFHandler<dim, spacedim> &dof,
186 const Quadrature<dim> &quadrature,
187 const ReadVector<Number> &v,
188 const unsigned int component);
189
194 template <int dim, typename Number, int spacedim>
195 Number
196 compute_mean_value(const DoFHandler<dim, spacedim> &dof,
197 const Quadrature<dim> &quadrature,
198 const ReadVector<Number> &v,
199 const unsigned int component);
201} // namespace VectorTools
202
204
205#endif // dealii_vector_tools_mean_value_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
void subtract_mean_value(VectorType &v, const std::vector< bool > &p_select={})
Number compute_mean_value(const hp::MappingCollection< dim, spacedim > &mapping_collection, const DoFHandler< dim, spacedim > &dof, const hp::QCollection< dim > &q_collection, const ReadVector< Number > &v, const unsigned int component)
void add_constant(VectorType &solution, const DoFHandler< dim, spacedim > &dof_handler, const unsigned int component, const typename VectorType::value_type constant_adjustment)
Definition hp.h:117
STL namespace.