File Describing useful mathematical functions. More...
#include <ddc/ddc.hpp>
#include "quadrature.hpp"
Go to the source code of this file.
Functions | |
template<class... Tags> | |
KOKKOS_FUNCTION double | norm_inf (ddc::Coordinate< Tags... > coord) |
Compute the infinity norm. More... | |
KOKKOS_INLINE_FUNCTION double | norm_inf (double const coord) |
Compute the infinity norm. More... | |
template<class ExecSpace , class ElementType , class IdxRange > | |
double | norm_inf (ExecSpace exec_space, ConstField< ElementType, IdxRange, typename ExecSpace::memory_space > function) |
Compute the infinity norm for a Field. More... | |
template<class ExecSpace , class ElementType , class IdxRange , class NDTag > | |
double | norm_inf (ExecSpace exec_space, VectorConstField< ElementType, IdxRange, NDTag, typename ExecSpace::memory_space > function) |
Compute the infinity norm for a VectorField. More... | |
template<class ExecSpace , class ElementType , class IdxRange > | |
double | error_norm_inf (ExecSpace exec_space, ConstField< ElementType, IdxRange, typename ExecSpace::memory_space > function, ConstField< ElementType, IdxRange, typename ExecSpace::memory_space > exact_function) |
Compute the infinity norm of the error between 2 Fields. More... | |
template<class ExecSpace , class ElementType , class IdxRange , class NDTag > | |
double | error_norm_inf (ExecSpace exec_space, VectorConstField< ElementType, IdxRange, NDTag, typename ExecSpace::memory_space > function, VectorConstField< ElementType, IdxRange, NDTag, typename ExecSpace::memory_space > exact_function) |
Compute the infinity norm of the error between 2 VectorFields. More... | |
template<class IdxRangeQuad , class ExecSpace > | |
double | norm_L1 (ExecSpace exec_space, Quadrature< IdxRangeQuad, IdxRangeQuad, typename ExecSpace::memory_space > quadrature, DField< IdxRangeQuad, typename ExecSpace::memory_space > function) |
Compute L1 norm of a function with a given quadrature. More... | |
template<class IdxRangeQuad , class ExecSpace > | |
double | error_norm_L1 (ExecSpace exec_space, Quadrature< IdxRangeQuad, IdxRangeQuad, typename ExecSpace::memory_space > quadrature, DField< IdxRangeQuad, typename ExecSpace::memory_space > function, DField< IdxRangeQuad, typename ExecSpace::memory_space > exact_function) |
Compute the L1 norm of the error between 2 Fields. More... | |
template<class IdxRangeQuad , class ExecSpace > | |
double | norm_L2 (ExecSpace exec_space, Quadrature< IdxRangeQuad, IdxRangeQuad, typename ExecSpace::memory_space > quadrature, DField< IdxRangeQuad, typename ExecSpace::memory_space > function) |
Compute L2 norm of a function with a given quadrature. More... | |
template<class IdxRangeQuad , class ExecSpace > | |
double | error_norm_L2 (ExecSpace exec_space, Quadrature< IdxRangeQuad, IdxRangeQuad, typename ExecSpace::memory_space > quadrature, DField< IdxRangeQuad, typename ExecSpace::memory_space > function, DField< IdxRangeQuad, typename ExecSpace::memory_space > exact_function) |
Compute the L2 norm of the error between 2 Fields. More... | |
File Describing useful mathematical functions.
KOKKOS_FUNCTION double norm_inf | ( | ddc::Coordinate< Tags... > | coord | ) |
Compute the infinity norm.
For a given vector \( x \) , compute \(|Vert x |Vert_{\infty} = \sup_n |x_n| \).
[in] | coord | The given vector. |
KOKKOS_INLINE_FUNCTION double norm_inf | ( | double const | coord | ) |
Compute the infinity norm.
In case of scalar, the infinity norm returns the scalar.
[in] | coord | The given double. |
|
inline |
Compute the infinity norm for a Field.
[in] | exec_space | The space on which the function is executed (CPU/GPU). |
[in] | function | The function whose norm is calcuated. |
|
inline |
Compute the infinity norm for a VectorField.
[in] | exec_space | The space on which the function is executed (CPU/GPU). |
[in] | function | The function whose norm is calcuated. |
|
inline |
Compute the infinity norm of the error between 2 Fields.
[in] | exec_space | The space on which the function is executed (CPU/GPU). |
[in] | function | The calculated function. |
[in] | exact_function | The exact function with which the calculated function is compared. |
|
inline |
Compute the infinity norm of the error between 2 VectorFields.
[in] | exec_space | The space on which the function is executed (CPU/GPU). |
[in] | function | The calculated function. |
[in] | exact_function | The exact function with which the calculated function is compared. |
double norm_L1 | ( | ExecSpace | exec_space, |
Quadrature< IdxRangeQuad, IdxRangeQuad, typename ExecSpace::memory_space > | quadrature, | ||
DField< IdxRangeQuad, typename ExecSpace::memory_space > | function | ||
) |
Compute L1 norm of a function with a given quadrature.
\( \int_{\Omega} |f(X)| dX \)
[in] | exec_space | The space on which the function is executed (CPU/GPU). |
[in] | quadrature | The quadrature used to compute the integral. |
[in] | function | A Field to the value of the function on the quadrature grid. |
double error_norm_L1 | ( | ExecSpace | exec_space, |
Quadrature< IdxRangeQuad, IdxRangeQuad, typename ExecSpace::memory_space > | quadrature, | ||
DField< IdxRangeQuad, typename ExecSpace::memory_space > | function, | ||
DField< IdxRangeQuad, typename ExecSpace::memory_space > | exact_function | ||
) |
Compute the L1 norm of the error between 2 Fields.
[in] | exec_space | The space on which the function is executed (CPU/GPU). |
[in] | quadrature | The quadrature used to compute the integral. |
[in] | function | The calculated function. |
[in] | exact_function | The exact function with which the calculated function is compared. |
double norm_L2 | ( | ExecSpace | exec_space, |
Quadrature< IdxRangeQuad, IdxRangeQuad, typename ExecSpace::memory_space > | quadrature, | ||
DField< IdxRangeQuad, typename ExecSpace::memory_space > | function | ||
) |
Compute L2 norm of a function with a given quadrature.
\( \sqrt{\int_{\Omega} |f(X)|^2 dX} \)
[in] | exec_space | The space on which the function is executed (CPU/GPU). |
[in] | quadrature | The quadrature used to compute the integral. |
[in] | function | A Field to the value of the function on the quadrature grid. |
double error_norm_L2 | ( | ExecSpace | exec_space, |
Quadrature< IdxRangeQuad, IdxRangeQuad, typename ExecSpace::memory_space > | quadrature, | ||
DField< IdxRangeQuad, typename ExecSpace::memory_space > | function, | ||
DField< IdxRangeQuad, typename ExecSpace::memory_space > | exact_function | ||
) |
Compute the L2 norm of the error between 2 Fields.
[in] | exec_space | The space on which the function is executed (CPU/GPU). |
[in] | quadrature | The quadrature used to compute the integral. |
[in] | function | The calculated function. |
[in] | exact_function | The exact function with which the calculated function is compared. |