DefiniteIntegral.hpp
Go to the documentation of this file.
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 /// \file
5 /// Defines function definite_integral.
6 
7 #pragma once
8 
9 #include <cstddef>
10 
11 /// \cond
12 class DataVector;
13 template <size_t>
14 class Mesh;
15 /// \endcond
16 
17 /*!
18  * \ingroup NumericalAlgorithmsGroup
19  * \brief Compute the definite integral of a grid-function over a manifold.
20  *
21  * The integral is computed on the reference element by multiplying the
22  * DataVector with the Spectral::quadrature_weights() in that
23  * dimension.
24  * \requires number of points in `integrand` and `mesh` are equal.
25  * \param integrand the grid function to integrate.
26  * \param mesh the Mesh of the manifold on which `integrand` is located.
27  * \returns the definite integral of `integrand` on the manifold.
28  */
29 template <size_t Dim>
30 double definite_integral(const DataVector& integrand,
31  const Mesh<Dim>& mesh) noexcept;
Holds the number of grid points, basis, and quadrature in each direction of the computational grid...
Definition: Mesh.hpp:49
Stores a collection of function values.
Definition: DataVector.hpp:46
double definite_integral(const DataVector &integrand, const Mesh< Dim > &mesh) noexcept
Compute the definite integral of a grid-function over a manifold.