Integrator_fT< dim, NT, KERNEL, ExecutionSpace > Class Template Reference#
|
DiFfRG
Discretization Framework for functional Renormalization Group flows
|
Sums a kernel over the Matsubara frequencies at temperature \(T\), with no spatial integral. More...
#include <integrator_fT.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. | |
| using | execution_space = ExecutionSpace |
| Execution space to be used for the integration, e.g. GPU_exec, TBB_exec. | |
Public Types inherited from QuadratureIntegrator_fT< 1, NT, KERNEL, ExecutionSpace > | |
| using | ctype |
Type of the integration variables: NT with complex and autodiff parts stripped, e.g. double. | |
| using | execution_space |
| The execution space the integrand is evaluated in. | |
Public Member Functions | |
| void | apply_matsubara_overrides (const ConfigTree &config) |
| Apply the optional Matsubara settings from the parameter file. | |
| Integrator_fT (QuadratureProvider &quadrature_provider, const ConfigTree &config) | |
| Construct from the parameter file. | |
| Integrator_fT (QuadratureProvider &quadrature_provider, ctype T=1, ctype k=1, ctype x_extent=0) | |
| void | set_x_extent (ctype x_extent) |
| Set \(x_\text{extent}\), so that \(\Lambda_0 = \sqrt{x_\text{extent}}\, k\). | |
| void | set_k (ctype k) |
| Set the RG scale \(k\): moves \(\Lambda_0\) and sets the default energy scale of the Matsubara rule. | |
| void | set_typical_E (ctype typical_E) |
| Set the energy scale the Matsubara rule is built around, replacing \(k\). Zero means: use \(k\). | |
Public Member Functions inherited from QuadratureIntegrator_fT< 1, NT, KERNEL, ExecutionSpace > | |
| QuadratureIntegrator_fT (QuadratureProvider &quadrature_provider, const std::array< size_t, sdim > _grid_size, std::array< ctype, sdim > grid_min, std::array< ctype, sdim > grid_max, const std::array< QuadratureType, sdim > quadrature_type, const ctype T=1, const ctype k=1) | |
| void | set_grid_extents (const std::array< ctype, sdim > grid_min, const std::array< ctype, sdim > grid_max) |
| Change the box, keeping the quadrature rules; see QuadratureIntegrator::set_grid_extents. | |
| void | set_T (const ctype T) |
| Set the temperature and rebuild the frequency rule. | |
| void | set_k (const ctype k) |
| Set the RG scale \(k\), the scale the frequency rule is sized for unless set_typical_E() was given one. | |
| void | set_typical_E (const ctype typical_E) |
| Set the energy scale the frequency rule is sized for, replacing \(k\). Zero (default) means \(k\). | |
| void | set_frequency_cutoff (const ctype freq_cutoff) |
| Set the frequency \(\Lambda_0\) above which the summand vanishes, enabling the exact sum. | |
| void | set_allow_exact_matsubara_sum (const bool allow) |
| Allow (or forbid) the exact sum regardless of the kernel's traits. | |
| void | set_matsubara_extent_margin (const ctype margin) |
Sum exactly up to margin times the frequency cutoff, plus one mode \(2\pi T\). Default 1. | |
| size_t | get_matsubara_size () const |
| Nodes on the frequency axis, INCLUDING the zero mode. | |
| bool | uses_exact_matsubara_sum () const |
| True if the frequency axis is currently the exact sum rather than a Gaussian quadrature rule. | |
| void | set_pre_table_reuse (const bool reuse) |
| Turn reuse of the pre() table across calls on or off (default on); see kernel_has_pre. | |
| void | fill_pre_table (ExecutionSpace &space, PT *table, const PosArr &pos, const ArgTuple &args) const |
| void | fill_pre_table_points (PT *table, const DeviceArgs &device_args) |
| fill_pre_table() for map_points(). Public for the same reason. | |
| void | get (NT &dest, const T &...t) const |
Compute the integral for the extra kernel arguments t and write it to dest. | |
| void | get (OT &dest, const T &...t) const |
| Single-precision integration handing back a double result. | |
| void | get (OT &dest, const T &...t) const |
Compute the integral into a Kokkos reduction target dest (e.g. a rank-0 View) without waiting. | |
| void | get (ExecutionSpace &space, OT &dest, const Args &...t) const |
Launch the integral on space into a Kokkos reduction target dest without waiting. | |
| void | map (ExecutionSpace &space, const view_type integral_view, const Coordinates &coordinates, const Args &...args) |
| auto | map (OT *dest, const Coordinates &coordinates, const Args &...args) |
| Compute the integral at every point of a grid of external values; see QuadratureIntegrator::map. | |
| auto | map (const std::array< OT *, N > &dest, const Coordinates &coordinates, const Args &...args) |
map() for a kernel returning MultiValue<T, N>: component j of every integral lands in dest[j]. | |
| auto | map (OT *const(&dest)[N], const Coordinates &coordinates, const Args &...args) |
map() into MultiValue destinations given as a braced list: map({&a[0], &b[0]}, coordinates, args...). | |
| size_t | quadrature_volume () const |
| Number of quadrature points, i.e. kernel evaluations per integral (frequency nodes included). | |
| void | map_points (const PointSpan< OT > dest, const A &...args) |
| Evaluate the integral at dest.size() points in a single launch; see QuadratureIntegrator::map_points. The frequency rule (Matsubara sum, exact sum or vacuum integral) is the one get() uses, i.e. the one chosen for the current T, k and typical_E: it is shared by all points. | |
| void | map_points (const std::array< PointSpan< OT >, N > &dest, const A &...args) |
map_points() for a kernel returning MultiValue<T, N>: component j of every integral lands in dest[j]. | |
| void | set_map_points_policy (const MapPointsPolicy policy) |
| How a device map_points() distributes its work; see MapPointsPolicy. | |
| void | launch_map_points_hoisted (const ResultView &result, const size_t n, const DeviceArgs &device_args, const PT *table) |
| void | launch_map_points (const ResultView &result, const size_t n, const DeviceArgs &device_args) |
| auto | map_dist (OT *dest, const Coordinates &coordinates, const Args &...args) |
map() without the MapScheduler: computes the whole of coordinates on this rank. | |
| auto | map_dist (const std::array< OT *, N > &dest, const Coordinates &coordinates, const Args &...args) |
| map_dist() for MultiValue destinations. | |
Public Member Functions inherited from AbstractIntegrator | |
| AbstractIntegrator () | |
| KOKKOS_FORCEINLINE_FUNCTION size_t | integrator_id () const |
| Stable, rank-independent identity of this integrator. | |
Additional Inherited Members | |
Static Public Member Functions inherited from QuadratureIntegrator_fT< 1, NT, KERNEL, ExecutionSpace > | |
| static KOKKOS_INLINE_FUNCTION NT | node_value (const XArr &x, const PosArr &pos, const ArgTuple &args, const ctype xt, const ctype wt, const bool is_tail) |
| One Matsubara node's contribution at one spatial point, weight excluded. | |
| static KOKKOS_INLINE_FUNCTION auto | pre_value (const XArr &x, const ctype q0, const PosArr &pos, const ArgTuple &args) |
pre() at box point x and frequency q0; pos and args as in node_value(). | |
| static KOKKOS_INLINE_FUNCTION auto | pre_value_points (const XArr &x, const ctype q0, const DeviceArgs &device_args) |
| pre_value() with the arguments of map_points() point 0, whose per-point values pre() does not read. | |
| static KOKKOS_INLINE_FUNCTION NT | hoisted_node_value (const PT *entry, const XArr &x, const PosArr &pos, const ArgTuple &args, const ctype xt, const ctype wt) |
As node_value(), from the pre() table entries entry[0] (at +xt) and entry[1] (at -xt). | |
| static KOKKOS_INLINE_FUNCTION device::array< ctype, sdim > | first_box_point (const size_t i0, const NodeArr &n, const StartArr &start, const StartArr &scale) |
Box point with the first variable at node i0 and all others zero (pre() reads only the first). | |
Static Public Attributes inherited from QuadratureIntegrator_fT< 1, NT, KERNEL, ExecutionSpace > | |
| static constexpr int | sdim |
| Number of integration variables besides the frequency (not necessarily the physical spatial dimension). | |
| static constexpr bool | can_hoist |
| Whether this kernel can be hoisted at all: pre() reads no box variable but the first. | |
Protected Member Functions inherited from QuadratureIntegrator_fT< 1, NT, KERNEL, ExecutionSpace > | |
| size_t | pre_table_entries () const |
| Number of pre() table rows: first box nodes times frequency nodes. | |
| PT * | pre_table_storage () const |
| Storage for the pre() table with entries of type PT. | |
| std::string | pre_table_key (const size_t first, const A &...rest) const |
| const PT * | prepare_pre_table (ExecutionSpace &space, const PosArr &pos, const ArgTuple &args, const size_t first, const A &...rest) const |
The pre() table for kernel() parameters rest (see pre_table_key()), rebuilt on space if stale. | |
Protected Attributes inherited from QuadratureIntegrator_fT< 1, NT, KERNEL, ExecutionSpace > | |
| ExecutionSpace | space |
| QuadratureProvider & | quadrature_provider |
| device::array< device::array< ctype, sdim >, 2 > | grid_extents |
| device::array< ctype, sdim > | grid_start |
| device::array< ctype, sdim > | grid_scale |
| device::array< size_t, dim > | grid_size |
| device::array< Kokkos::View< const ctype *, typename ExecutionSpace::memory_space >, sdim > | nodes |
| device::array< Kokkos::View< const ctype *, typename ExecutionSpace::memory_space >, sdim > | weights |
| ctype | T |
| ctype | m_k |
| The RG scale, which is the frequency scale unless the model set one; see set_k(). | |
| ctype | m_typical_E_user |
| The model's heaviest scale, or zero if it never said; see set_typical_E(). | |
| ctype | m_freq_cutoff |
| Support boundary in frequency; zero means "unknown", which disables the exact sum. | |
| size_t | m_n_tail |
| Nodes before the boundary of the concatenated axis of a split kernel; 0 when not split. | |
| Kokkos::View< ctype *, typename ExecutionSpace::memory_space > | m_split_nodes |
| Kokkos::View< ctype *, typename ExecutionSpace::memory_space > | m_split_weights |
| bool | m_allow_exact |
| bool | m_using_exact |
| ctype | m_extent_margin |
| Kokkos::View< const ctype *, typename ExecutionSpace::memory_space > | matsubara_nodes |
| Kokkos::View< const ctype *, typename ExecutionSpace::memory_space > | matsubara_weights |
| KokkosNDView< 1+dim, NT, ExecutionSpace > | m_cache |
| device::array< size_t, 1+dim > | m_cache_extents |
| Kokkos::View< ctype *, typename ExecutionSpace::memory_space > | m_positions |
| std::string | m_positions_key |
| internal::MapStagingSet< NT, ExecutionSpace > | m_staging |
| internal::MapPointsBuffers< NT, ExecutionSpace > | m_map_points |
| MapPointsPolicy | m_map_points_policy |
| Kokkos::View< NT, typename ExecutionSpace::memory_space > | m_result_view |
| Kokkos::View< NT, typenameExecutionSpace::memory_space >::host_mirror_type | m_result_host |
| bool | m_result_views_initialized |
| internal::PreTable< ExecutionSpace > | m_pre_table |
Protected Attributes inherited from AbstractIntegrator | |
| size_t | m_integrator_id |
Detailed Description
requires (dim == 1)
class DiFfRG::Integrator_fT< dim, NT, KERNEL, ExecutionSpace >
Sums a kernel over the Matsubara frequencies at temperature \(T\), with no spatial integral.
\[ I = \texttt{constant}(\ldots) + T \sum_{n\in\mathbb{Z}} K(\omega_n, \ldots)\,, \]
where \(\omega_n = 2\pi n T\) are the bosonic Matsubara frequencies; a fermionic kernel shifts its frequency argument itself. At \(T = 0\), or when the sum would need too many modes, the sum is replaced by the integral \(\int \frac{dq_0}{2\pi}\).
If the kernel declares static constexpr bool matsubara_finite_extent = true (its summand vanishes for \(|\omega_n| > \Lambda_0 = \sqrt{x_\text{extent}}\, k\)), the finitely many contributing modes are summed exactly whenever that is cheaper than the approximate rule. \(x_\text{extent} = 0\) disables this.
Kernel interface:
- get():
KERNEL::kernel(q0, args...)andKERNEL::constant(args...) - map():
KERNEL::kernel(q0, pos..., args...)andKERNEL::constant(pos..., args...)
- See also
- QuadratureIntegrator for the kernel interface, QuadratureIntegrator_fT for the frequency rule.
- Template Parameters
-
dim must be 1 NT numerical type of the result KERNEL kernel to be summed, providing static kernelandconstantExecutionSpace GPU_exec, TBB_exec or KokkosHost_exec
Member Typedef Documentation
◆ ctype
| using ctype = typename get_type::ctype<NT> |
Numerical type to be used for integration tasks e.g. the argument or possible jacobians.
◆ execution_space
| using execution_space = ExecutionSpace |
Execution space to be used for the integration, e.g. GPU_exec, TBB_exec.
Constructor & Destructor Documentation
◆ Integrator_fT() [1/2]
|
inline |
Construct from the parameter file.
Reads the temperature /physical/T (default 1) and the settings of apply_matsubara_overrides(), and finds \(x_\text{extent}\) with optimize_x_extent() for KERNEL::Regulator.
◆ Integrator_fT() [2/2]
|
inline |
- Parameters
-
quadrature_provider source of the quadrature rules T temperature k initial RG scale, which sets the frequency scale of the Matsubara rule until set_k() is called x_extent frequency cutoff of a finite-extent kernel, \(\Lambda_0^2 / k^2\); 0 disables the exact sum
Member Function Documentation
◆ apply_matsubara_overrides()
|
inline |
Apply the optional Matsubara settings from the parameter file.
/integration/force_exact_matsubara_sum(bool): allow (true) or forbid (false) the exact frequency sum, overriding the kernel's traits. Allowing it for a summand that does not vanish above \(\Lambda_0\) truncates the sum./integration/matsubara_extent_margin(double): factor on the frequency cutoff \(\Lambda_0\) of the exact sum.
◆ set_k()
|
inline |
Set the RG scale \(k\): moves \(\Lambda_0\) and sets the default energy scale of the Matsubara rule.
◆ set_typical_E()
|
inline |
Set the energy scale the Matsubara rule is built around, replacing \(k\). Zero means: use \(k\).
◆ set_x_extent()
|
inline |
Set \(x_\text{extent}\), so that \(\Lambda_0 = \sqrt{x_\text{extent}}\, k\).
The documentation for this class was generated from the following file:
- /home/runner/work/DiFfRG/DiFfRG/DiFfRG/include/DiFfRG/physics/integration/finiteT/integrator_fT.hh
Generated by
Public Types inherited from