TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
Tail fitting tools

Detailed Description

Tools to fit the high- and low-frequency tails of functions defined on real or imaginary frequency meshes.

Classes

class  triqs::mesh::tail_fitter
 Fit the high- and low-frequency tail of a function \( f \) defined on a triqs::mesh::refreq or a triqs::mesh::imfreq frequency mesh. More...
class  triqs::mesh::tail_fitter_handle
 Shared handle for tail fitting. More...

Functions

template<int R>
auto triqs::mesh::detail::tail_eval (nda::array_const_view< std::complex< double >, R > A, std::complex< double > z_0)
 Evaluate the tail expansion of a function \( f(z) \) at a given point \( z_0 \).
auto triqs::mesh::detail::vander (std::vector< std::complex< double > > const &z_pts, int q)
 Construct a Vandermonde matrix.

Function Documentation

◆ tail_eval()

template<int R>
auto triqs::mesh::detail::tail_eval ( nda::array_const_view< std::complex< double >, R > A,
std::complex< double > z_0 )

#include <triqs/mesh/tail_fitter.hpp>

Evaluate the tail expansion of a function \( f(z) \) at a given point \( z_0 \).

Suppose the function to be evaluated returns an \( R - 1 \)-dimensional array with shape \( (d_1, \dots, d_{R-1}) \). Then the given coefficient array \( A \) is an array of rank \( R \) with shape \((q + 1, d_1, \dots, d_{R-1}) \), where \( q \) is the expansion order.

This function simply evaluates

\[ f(z_0) \approx \sum_{n=0}^{q} \frac{A_n}{z_0^n} \; , \]

where \( A_n = A(n, \dots) \) is the \( R - 1 \) dimensional array of coefficients for the n-th term in the expansion.

Template Parameters
RRank of the coefficient array.
Parameters
AArray \( A \) of rank \( R \) containing the coefficients of the tail expansion.
z_0Point \( z_0 \) at which to evaluate the tail expansion.
Returns
Evaluated tail expansion of \( f(z_0) \) which can either be a complex number (if \( R = 1 \)) or an array of complex numbers (if \( R > 1 \)).

Definition at line 111 of file tail_fitter.hpp.

◆ vander()

auto triqs::mesh::detail::vander ( std::vector< std::complex< double > > const & z_pts,
int q )
inline

#include <triqs/mesh/tail_fitter.hpp>

Construct a Vandermonde matrix.

The resulting matrix will be of size \( p \times (q+1) \), where \( p \) is the number of points \( z_i \) in the input vector and \( q \) is the expansion order.

The Vandermonde matrix has the following form:

\[ V = \begin{bmatrix} 1 & z_0 & z_0^2 & \cdots & z_0^q \\ 1 & z_1 & z_1^2 & \cdots & z_1^q \\ 1 & z_2 & z_2^2 & \cdots & z_2^q \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 1 & z_{p-1} & z_{p-1}^2 & \cdots & z_{p-1}^q \end{bmatrix} \]

For more details see Wikipedia.

Parameters
z_ptsstd::vector of size \( p \) containing the points \( z_i \).
qExpansion order \( q \).
Returns
Vandermonde matrix \( V \).

Definition at line 79 of file tail_fitter.hpp.