File providing functions to adapt quadrature coefficients so they can integrate over a N-D volume. More...
#include <ddc/ddc.hpp>
#include <sll/mapping/mapping_tools.hpp>
#include "ddc_alias_inline_functions.hpp"
#include "ddc_aliases.hpp"
#include "quadrature.hpp"
Go to the source code of this file.
Functions | |
template<class Mapping , class IdxRangeCoeffs , class ExecSpace > | |
DFieldMem< IdxRangeCoeffs, typename ExecSpace::memory_space > | compute_coeffs_on_mapping (ExecSpace exec_space, Mapping &mapping, DFieldMem< IdxRangeCoeffs, typename ExecSpace::memory_space > &&coefficients_alloc) |
Add the Jacobian determinant to the coefficients. | |
File providing functions to adapt quadrature coefficients so they can integrate over a N-D volume.
A N-D volume is a surface in 2D and a volume in 3D.
DFieldMem< IdxRangeCoeffs, typename ExecSpace::memory_space > compute_coeffs_on_mapping | ( | ExecSpace | exec_space, |
Mapping & | mapping, | ||
DFieldMem< IdxRangeCoeffs, typename ExecSpace::memory_space > && | coefficients_alloc | ||
) |
Add the Jacobian determinant to the coefficients.
For polar integration, we can add the Jacobian determinant to the quadrature coefficients.
\( \int_{\Omega_{\text{cart}}} f(x,y) dxdy = \int_{\Omega} f(r,\theta) |det(J(r,\theta))| drd\theta \simeq \sum_{i,j} [q_{i,j}| det(J(r_i,\theta_j))|] f_{ij}\)
This function uses rvalues. It means that coefficients is a temporary input parameter and it returns a temporary coefficient object. The Quadrature object can only be instantiate with rvalues.
[in] | exec_space | The space on which the function is executed (CPU/GPU). |
[in] | mapping | The mapping function from the logical index range \( (r,\theta) \) to the physical index range \( (x, y) \). |
[in] | coefficients_alloc | The quadrature coefficients \(\{q_{ij}\}_{ij} \). |