DiFfRG
Loading...
Searching...
No Matches
DiFfRG::Integrator2DCartesianTBB< NT, KERNEL > Class Template Reference

Integration of an arbitrary 2D function from (qx_min, qy_min) to (qx_max, qy_max) using TBB. More...

#include <integrator_2D_cartesian_cpu.hh>

Public Types

using ctype = typename get_type::ctype<NT>
 Numerical type to be used for integration tasks e.g. the argument or possible jacobians.
 

Public Member Functions

 Integrator2DCartesianTBB (QuadratureProvider &quadrature_provider, const std::array< uint, 2 > grid_sizes, const ctype x_extent, const JSONValue &json)
 Construct a new Integrator2DCartesianTBB object.
 
 Integrator2DCartesianTBB (QuadratureProvider &quadrature_provider, std::array< uint, 2 > grid_sizes, const ctype x_extent, const uint max_block_size=0, const ctype qx_min=-M_PI, const ctype qy_min=-M_PI, const ctype qx_max=M_PI, const ctype qy_max=M_PI)
 Construct a new Integrator2DCartesianTBB object.
 
void set_qx_min (const ctype qx_min)
 Set the minimum value of the qx integration range.
 
void set_qy_min (const ctype qy_min)
 Set the minimum value of the qy integration range.
 
void set_qx_max (const ctype qx_max)
 Set the maximum value of the qx integration range.
 
void set_qy_max (const ctype qy_max)
 Set the maximum value of the qy integration range.
 
template<typename... T>
NT get (const ctype k, const T &...t) const
 Get the value of the integral.
 
template<typename... T>
std::future< NT > request (const ctype k, const T &...t) const
 Get the value of the integral asynchronously.
 

Private Attributes

const std::array< uint, 2 > grid_sizes
 
ctype qx_min = -M_PI
 
ctype qy_min = -M_PI
 
ctype qx_extent = 2 * M_PI
 
ctype qy_extent = 2 * M_PI
 
const std::vector< ctype > & x_quadrature_p
 
const std::vector< ctype > & x_quadrature_w
 
const std::vector< ctype > & y_quadrature_p
 
const std::vector< ctype > & y_quadrature_w
 

Detailed Description

template<typename NT, typename KERNEL>
class DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >

Integration of an arbitrary 2D function from (qx_min, qy_min) to (qx_max, qy_max) using TBB.

Template Parameters
NTThe numerical type of the result.
KERNELThe kernel to integrate.

Member Typedef Documentation

◆ ctype

template<typename NT , typename KERNEL >
using DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::ctype = typename get_type::ctype<NT>

Numerical type to be used for integration tasks e.g. the argument or possible jacobians.

Constructor & Destructor Documentation

◆ Integrator2DCartesianTBB() [1/2]

template<typename NT , typename KERNEL >
DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::Integrator2DCartesianTBB ( QuadratureProvider & quadrature_provider,
const std::array< uint, 2 > grid_sizes,
const ctype x_extent,
const JSONValue & json )
inline

Construct a new Integrator2DCartesianTBB object.

Parameters
quadrature_providerThe quadrature provider to use.
grid_sizesThe number of grid points in x and y direction.
x_extentThe extent of the x integration range. This argument is not used, but kept for compatibility with flow classes.
jsonThe JSON object to read additional parameters from.

◆ Integrator2DCartesianTBB() [2/2]

template<typename NT , typename KERNEL >
DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::Integrator2DCartesianTBB ( QuadratureProvider & quadrature_provider,
std::array< uint, 2 > grid_sizes,
const ctype x_extent,
const uint max_block_size = 0,
const ctype qx_min = -M_PI,
const ctype qy_min = -M_PI,
const ctype qx_max = M_PI,
const ctype qy_max = M_PI )
inline

Construct a new Integrator2DCartesianTBB object.

Parameters
quadrature_providerThe quadrature provider to use.
grid_sizesThe number of grid points in x and y direction.
x_extentThe extent of the x integration range. This argument is not used, but kept for compatibility with flow classes.
max_block_sizeThe maximum block size to use on GPU. This argument is not used, but kept for compatibility.
qx_minThe minimum value of the x integration range.
qy_minThe minimum value of the y integration range.
qx_maxThe maximum value of the x integration range.
qy_maxThe maximum value of the y integration range.

Member Function Documentation

◆ get()

template<typename NT , typename KERNEL >
template<typename... T>
NT DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::get ( const ctype k,
const T &... t ) const
inline

Get the value of the integral.

Parameters
kThe current RG scale.
tThe additional parameters for the kernel.
Returns
The value of the integral.

◆ request()

template<typename NT , typename KERNEL >
template<typename... T>
std::future< NT > DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::request ( const ctype k,
const T &... t ) const
inline

Get the value of the integral asynchronously.

Parameters
kThe current RG scale.
tThe additional parameters for the kernel.
Returns
An std::future<NT> which returns the value of the integral.

◆ set_qx_max()

template<typename NT , typename KERNEL >
void DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::set_qx_max ( const ctype qx_max)
inline

Set the maximum value of the qx integration range.

◆ set_qx_min()

template<typename NT , typename KERNEL >
void DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::set_qx_min ( const ctype qx_min)
inline

Set the minimum value of the qx integration range.

◆ set_qy_max()

template<typename NT , typename KERNEL >
void DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::set_qy_max ( const ctype qy_max)
inline

Set the maximum value of the qy integration range.

◆ set_qy_min()

template<typename NT , typename KERNEL >
void DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::set_qy_min ( const ctype qy_min)
inline

Set the minimum value of the qy integration range.

Member Data Documentation

◆ grid_sizes

template<typename NT , typename KERNEL >
const std::array<uint, 2> DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::grid_sizes
private

◆ qx_extent

template<typename NT , typename KERNEL >
ctype DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::qx_extent = 2 * M_PI
private

◆ qx_min

template<typename NT , typename KERNEL >
ctype DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::qx_min = -M_PI
private

◆ qy_extent

template<typename NT , typename KERNEL >
ctype DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::qy_extent = 2 * M_PI
private

◆ qy_min

template<typename NT , typename KERNEL >
ctype DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::qy_min = -M_PI
private

◆ x_quadrature_p

template<typename NT , typename KERNEL >
const std::vector<ctype>& DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::x_quadrature_p
private

◆ x_quadrature_w

template<typename NT , typename KERNEL >
const std::vector<ctype>& DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::x_quadrature_w
private

◆ y_quadrature_p

template<typename NT , typename KERNEL >
const std::vector<ctype>& DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::y_quadrature_p
private

◆ y_quadrature_w

template<typename NT , typename KERNEL >
const std::vector<ctype>& DiFfRG::Integrator2DCartesianTBB< NT, KERNEL >::y_quadrature_w
private

The documentation for this class was generated from the following file: