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_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
23#include <vector>
24
26
27#ifndef DOXYGEN
28// forward declarations
29template <int dim, int spacedim>
31class DoFHandler;
32template <int dim, int spacedim>
33class Mapping;
34template <int dim>
35class Quadrature;
36namespace hp
37{
38 template <int dim, int spacedim>
39 class MappingCollection;
40 template <int dim>
41 class QCollection;
42} // namespace hp
43#endif
44
45namespace VectorTools
46{
103 template <typename VectorType>
105 void subtract_mean_value(VectorType &v,
106 const std::vector<bool> &p_select = {});
107
136 template <typename VectorType, int dim, int spacedim = dim>
138 void add_constant(VectorType &solution,
139 const DoFHandler<dim, spacedim> &dof_handler,
140 const unsigned int component,
141 const typename VectorType::value_type constant_adjustment);
142
166 template <int dim, typename Number, int spacedim>
167 Number
169 const hp::MappingCollection<dim, spacedim> &mapping_collection,
170 const DoFHandler<dim, spacedim> &dof,
171 const hp::QCollection<dim> &q_collection,
172 const ReadVector<Number> &v,
173 const unsigned int component);
174
180 template <int dim, typename Number, int spacedim>
181 Number
182 compute_mean_value(const Mapping<dim, spacedim> &mapping,
183 const DoFHandler<dim, spacedim> &dof,
184 const Quadrature<dim> &quadrature,
185 const ReadVector<Number> &v,
186 const unsigned int component);
187
192 template <int dim, typename Number, int spacedim>
193 Number
194 compute_mean_value(const DoFHandler<dim, spacedim> &dof,
195 const Quadrature<dim> &quadrature,
196 const ReadVector<Number> &v,
197 const unsigned int component);
199} // namespace VectorTools
200
202
203#endif // dealii_vector_tools_mean_value_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 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.