40 return std::apply([&](
auto &&...
args) {
return int_element * weight * KERNEL::kernel(q,
k,
args...); },
args);
56 const uint maxeval = 100000)
79 integrator.cudathreadsperblock = json.
get_int(
"/integration/cudathreadsperblock");
80 }
catch (
const std::exception &e) {
81 spdlog::get(
"log")->warn(
"Please provide all integrator parameters in the json file. Using default values.");
82 spdlog::get(
"log")->warn(
83 "QMC integrator parameters: minm = 32, minn = 512, cudablocks = 64, cudathreadsperblock = 32");
101 template <
typename... T> NT
get(
const ctype k,
const T &...t)
const
106 const NT constant = KERNEL::constant(k, t...);
121 template <
typename... T> std::future<NT>
request(
const ctype k,
const T &...t)
const
123 const NT constant = KERNEL::constant(k, t...);
125 return std::async(std::launch::deferred, [=,
this]() {
128 return constant + m_integrator.integrate(functor).integral;
Definition integrator_qmc.hh:25
std::tuple< Args... > args
Definition integrator_qmc.hh:46
__host__ __device__ NT operator()(ctype *x) const
Definition integrator_qmc.hh:31
Functor(const ctype x_extent, const ctype k, const Args &...args)
Definition integrator_qmc.hh:29
const ctype k
Definition integrator_qmc.hh:45
const ctype x_extent
Definition integrator_qmc.hh:44
static constexpr unsigned long long int number_of_integration_variables
Definition integrator_qmc.hh:27
Definition integrator_qmc.hh:17
const ctype x_extent
Definition integrator_qmc.hh:134
typename get_type::ctype< NT > ctype
Numerical type to be used for integration tasks e.g. the argument or possible jacobians.
Definition integrator_qmc.hh:22
IntegratorQMC(const ctype x_extent, const double rel_tol=1e-3, const double abs_tol=1e-14, const uint maxeval=100000)
Definition integrator_qmc.hh:55
NT get(const ctype k, const T &...t) const
Get the integral of the kernel.
Definition integrator_qmc.hh:101
integrators::Qmc< NT, ctype, 1, integrators::transforms::None::type > integrator
Definition integrator_qmc.hh:133
std::future< NT > request(const ctype k, const T &...t) const
Request a future for the integral of the kernel.
Definition integrator_qmc.hh:121
IntegratorQMC(const ctype x_extent, const JSONValue &json)
Definition integrator_qmc.hh:69
IntegratorQMC(QuadratureProvider &quadrature_provider, const std::array< uint, 1 > grid_size, const ctype x_extent, const JSONValue &json)
Definition integrator_qmc.hh:49
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