52 return std::apply([&](
auto &&...
args) {
return int_element * weight * KERNEL::kernel(q, cos,
k,
args...); },
69 const uint maxeval = 100000)
92 integrator.cudathreadsperblock = json.
get_int(
"/integration/cudathreadsperblock");
93 }
catch (
const std::exception &e) {
94 spdlog::get(
"log")->warn(
"Please provide all integrator parameters in the json file. Using default values.");
95 spdlog::get(
"log")->warn(
96 "QMC integrator parameters: minm = 32, minn = 512, cudablocks = 64, cudathreadsperblock = 32");
114 template <
typename... T> NT
get(
const ctype k,
const T &...t)
const
119 const NT constant = KERNEL::constant(k, t...);
134 template <
typename... T> std::future<NT>
request(
const ctype k,
const T &...t)
const
136 const NT constant = KERNEL::constant(k, t...);
138 return std::async(std::launch::deferred, [=,
this]() {
141 return constant + m_integrator.integrate(functor).integral;
Definition integrator_angle_qmc.hh:35
std::tuple< Args... > args
Definition integrator_angle_qmc.hh:59
Functor(const ctype x_extent, const ctype k, const Args &...args)
Definition integrator_angle_qmc.hh:39
const ctype x_extent
Definition integrator_angle_qmc.hh:57
__host__ __device__ NT operator()(ctype *x) const
Definition integrator_angle_qmc.hh:41
const ctype k
Definition integrator_angle_qmc.hh:58
static constexpr unsigned long long int number_of_integration_variables
Definition integrator_angle_qmc.hh:37
GPU integrator for the integration of a function with one angle with quasi-Monte-Carlo....
Definition integrator_angle_qmc.hh:27
typename get_type::ctype< NT > ctype
Numerical type to be used for integration tasks e.g. the argument or possible jacobians.
Definition integrator_angle_qmc.hh:32
const ctype x_extent
Definition integrator_angle_qmc.hh:147
NT get(const ctype k, const T &...t) const
Get the integral of the kernel.
Definition integrator_angle_qmc.hh:114
IntegratorAngleQMC(const ctype x_extent, const JSONValue &json)
Definition integrator_angle_qmc.hh:82
IntegratorAngleQMC(QuadratureProvider &quadrature_provider, const std::array< uint, 2 > grid_size, const ctype x_extent, const JSONValue &json)
Definition integrator_angle_qmc.hh:62
IntegratorAngleQMC(const ctype x_extent, const double rel_tol=1e-3, const double abs_tol=1e-14, const uint maxeval=100000)
Definition integrator_angle_qmc.hh:68
std::future< NT > request(const ctype k, const T &...t) const
Request a future for the integral of the kernel.
Definition integrator_angle_qmc.hh:134
integrators::Qmc< NT, ctype, 2, integrators::transforms::None::type > integrator
Definition integrator_angle_qmc.hh:146
A wrapper around the boost json value class.
Definition json.hh:19
double get_double(const std::string &key) const
Get the value of a key in the json object.
int get_int(const std::string &key) const
Get the value of a key in the json object.
A class that provides quadrature points and weights, in host and device memory. The quadrature points...
Definition quadrature_provider.hh:139
typename internal::_ctype< CT >::value ctype
Definition types.hh:106
Definition complex_math.hh:14
constexpr __forceinline__ __host__ __device__ NumberType powr(const NumberType x)
A compile-time evaluatable power function for whole number exponents.
Definition math.hh:45
constexpr __forceinline__ __host__ __device__ double S_d(NT d)
Surface of a d-dimensional sphere.
Definition math.hh:91
consteval NT S_d_prec(uint d)
Surface of a d-dimensional sphere (precompiled)
Definition math.hh:104
unsigned int uint
Definition utils.hh:22
T integral
Definition qmc.hpp:71