2014-02-04 12:24:28 +01:00
|
|
|
Fitting the tail of a Matsubara Green's function
|
|
|
|
#################################################
|
|
|
|
|
|
|
|
API
|
|
|
|
~~~~~
|
|
|
|
|
|
|
|
The tail of a given ``gf<imfreq>/gf<block_index, gf<imfreq>> gw`` can be fitted using the two following functions:
|
|
|
|
|
2014-10-01 10:52:32 +02:00
|
|
|
``void fit_tail(gf<imfreq> &gf, tail_view known_moments, int n_moments, size_t n_min, size_t n_max, bool replace_by_fit = false);``
|
2014-02-04 12:24:28 +01:00
|
|
|
|
2014-10-01 10:52:32 +02:00
|
|
|
``void fit_tail(gf<block_index, gf<imfreq>> &block_gf, tail_view known_moments, int n_moments, size_t n_min, size_t n_max, bool replace_by_fit = false);``
|
2014-02-04 12:24:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
where
|
|
|
|
|
2014-02-04 17:13:14 +01:00
|
|
|
+------------+----------------+----------------------------------------------------------------------+---------+
|
|
|
|
| type | name | description | default |
|
|
|
|
+============+================+======================================================================+=========+
|
|
|
|
| gf<imfreq> | gf | Green's function to be fit (bosonic/fermionic) | no |
|
|
|
|
+------------+----------------+----------------------------------------------------------------------+---------+
|
|
|
|
| tail_view | known_moments | known part of the tail | no |
|
|
|
|
+------------+----------------+----------------------------------------------------------------------+---------+
|
|
|
|
| int | n_moments | number of moments in the final tail (including known ones) | no |
|
|
|
|
+------------+----------------+----------------------------------------------------------------------+---------+
|
2014-02-19 12:59:47 +01:00
|
|
|
| size_t | n_min | Matsubara index on mesh to start the fit | no |
|
2014-02-04 17:13:14 +01:00
|
|
|
+------------+----------------+----------------------------------------------------------------------+---------+
|
2014-02-19 12:59:47 +01:00
|
|
|
| size_t | n_max | final Matsubara index for fit (included) | no |
|
2014-02-04 17:13:14 +01:00
|
|
|
+------------+----------------+----------------------------------------------------------------------+---------+
|
|
|
|
| bool | replace_by_fit | if true, replace the gf data in the fitting range by the tail values | true |
|
|
|
|
+------------+----------------+----------------------------------------------------------------------+---------+
|
2014-02-04 12:24:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
Example
|
|
|
|
~~~~~~~~
|
|
|
|
|
2014-10-01 10:52:32 +02:00
|
|
|
.. triqs_example:: ./fit_tail_0.cpp
|
2014-02-04 12:24:28 +01:00
|
|
|
Implementation
|
|
|
|
~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
The fitting problem is written as a linear system of equations, which is solved by SVD.
|
|
|
|
|