forked from TRIQS/tprf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinalg_desc.py
61 lines (34 loc) · 11.9 KB
/
linalg_desc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Generated automatically using the command :
# c++2py ../../c++/triqs_tprf/linalg.hpp --members_read_only -N triqs_tprf -a triqs_tprf -m linalg -o linalg -C pytriqs --moduledoc="Product, Inverse and Identity for two-particle response functions" --cxxflags="-std=c++17"
from cpp2py.wrap_generator import *
# The module
module = module_(full_name = "linalg", doc = "Product, Inverse and Identity for two-particle response functions", app_name = "triqs_tprf")
# Imports
import pytriqs.gf
# Add here all includes
module.add_include("triqs_tprf/linalg.hpp")
# Add here anything to add in the C++ code at the start, e.g. namespace using
module.add_preamble("""
#include <triqs/cpp2py_converters/gf.hpp>
using namespace triqs_tprf;
""")
module.add_enum("Channel_t", ['Channel_t::PP', 'Channel_t::PH', 'Channel_t::PH_bar'], "triqs_tprf", """Two-particle channel enum class, PP (particle-particle), PH (particle-hole), PH_bar (particle-hole-bar)""")
module.add_function ("triqs_tprf::g2_iw_t triqs_tprf::inverse_PH (triqs_tprf::g2_iw_vt g)", doc = """Two-particle response-function inversion :math:`[g]^{-1}` in the particle-hole channel (PH).\n \n The two-particle response function :math:`g_{abcd}(\\omega, \\nu, \\nu\')` \n is cast to matrix form and inverted\n\n .. math::\n [g]^{-1} = [ g_{\\{\\nu\\alpha\\beta\\}, \\{\\nu\'\\gamma\\delta\\}}(\\omega) ]^{-1}\n\n where the mapping of target-space indices :math:`\\{a, b, c, d \\}` to :math:`\\{\\alpha, \\beta\\}, \\{\\gamma, \\delta\\}` is channel dependent.\n \n Storage is allocated and the inverse is returned by value.\n \n :param g: two-particle response function to invert, :math:`g \\equiv g_{abcd}(\\omega, \\nu, \\nu\')`\n @return :math:`[g]^{-1}` in the given channel\n @include tprf/linalg.hpp\n @note Assign to gf (g2_iw_t) yields move operation while assigning to gf_view (g2_iw_vt) causes extra copy operation""")
module.add_function ("triqs_tprf::g2_iw_t triqs_tprf::inverse_PP (triqs_tprf::g2_iw_vt g)", doc = """Two-particle response-function inversion :math:`[g]^{-1}` in the particle-particle channel (PP).\n \n The two-particle response function :math:`g_{abcd}(\\omega, \\nu, \\nu\')` \n is cast to matrix form and inverted\n\n .. math::\n [g]^{-1} = [ g_{\\{\\nu\\alpha\\beta\\}, \\{\\nu\'\\gamma\\delta\\}}(\\omega) ]^{-1}\n\n where the mapping of target-space indices :math:`\\{a, b, c, d \\}` to :math:`\\{\\alpha, \\beta\\}, \\{\\gamma, \\delta\\}` is channel dependent.\n \n Storage is allocated and the inverse is returned by value.\n \n :param g: two-particle response function to invert, :math:`g \\equiv g_{abcd}(\\omega, \\nu, \\nu\')`\n @return :math:`[g]^{-1}` in the given channel\n @include tprf/linalg.hpp\n @note Assign to gf (g2_iw_t) yields move operation while assigning to gf_view (g2_iw_vt) causes extra copy operation""")
module.add_function ("triqs_tprf::g2_iw_t triqs_tprf::inverse_PH_bar (triqs_tprf::g2_iw_vt g)", doc = """Two-particle response-function inversion :math:`[g]^{-1}` in the particle-hole-bar channel (PH-bar).\n \n The two-particle response function :math:`g_{abcd}(\\omega, \\nu, \\nu\')` \n is cast to matrix form and inverted\n\n .. math::\n [g]^{-1} = [ g_{\\{\\nu\\alpha\\beta\\}, \\{\\nu\'\\gamma\\delta\\}}(\\omega) ]^{-1}\n\n where the mapping of target-space indices :math:`\\{a, b, c, d \\}` to :math:`\\{\\alpha, \\beta\\}, \\{\\gamma, \\delta\\}` is channel dependent.\n \n Storage is allocated and the inverse is returned by value.\n \n :param g: two-particle response function to invert, :math:`g \\equiv g_{abcd}(\\omega, \\nu, \\nu\')`\n @return :math:`[g]^{-1}` in the given channel\n @include tprf/linalg.hpp\n @note Assign to gf (g2_iw_t) yields move operation while assigning to gf_view (g2_iw_vt) causes extra copy operation""")
module.add_function ("triqs_tprf::g2_nn_t triqs_tprf::inverse_PH (triqs_tprf::g2_nn_vt g)", doc = """""")
module.add_function ("triqs_tprf::g2_nn_t triqs_tprf::inverse_PP (triqs_tprf::g2_nn_vt g)", doc = """""")
module.add_function ("triqs_tprf::g2_nn_t triqs_tprf::inverse_PH_bar (triqs_tprf::g2_nn_vt g)", doc = """""")
module.add_function ("triqs_tprf::g2_iw_t triqs_tprf::product_PH (triqs_tprf::g2_iw_vt A, triqs_tprf::g2_iw_vt B)", doc = """Two-particle response-function product :math:`A * B` in the particle-hole channel (PH).\n \n The two-particle response functions :math:`A \\equiv A_{abcd}(\\omega, \\nu, \\nu\')` \n and :math:`B \\equiv B_{abcd}(\\omega, \\nu, \\nu\')` are cast to matrix form and their\n product is computed\n\n .. math::\n (A * B)_{\\{\\nu\\alpha\\beta\\}, \\{\\nu\'\\gamma\\delta\\}}(\\omega) \n = \\sum_{\\bar{\\nu}ab} \n A_{\\{\\nu\\alpha\\beta\\}, \\{\\bar{\\nu}ab\\}}(\\omega) \n B_{\\{\\bar{\\nu}ab\\}, \\{\\nu\'\\gamma\\delta\\}}(\\omega) \n\n where the mapping of target-space indices :math:`\\{a, b, c, d \\}` to :math:`\\{\\alpha, \\beta\\}, \\{\\gamma, \\delta\\}` is channel dependent.\n\n Storage is allocated and the product is returned by value.\n \n @tparam CH selects the two-particle channel\n :param A: two-particle response function :math:`A \\equiv A_{abcd}(\\omega, \\nu, \\nu\')`\n :param B: two-particle response function :math:`B \\equiv A_{abcd}(\\omega, \\nu, \\nu\')`\n @return :math:`(A * B)` in the given channel\n @include tprf/linalg.hpp\n @note Assign to gf (g2_iw_t) yields move operation while assigning to gf_view (g2_iw_vt) causes extra copy operation""")
module.add_function ("triqs_tprf::g2_iw_t triqs_tprf::product_PP (triqs_tprf::g2_iw_vt A, triqs_tprf::g2_iw_vt B)", doc = """Two-particle response-function product :math:`A * B` in the particle-particle channel (PP).\n \n The two-particle response functions :math:`A \\equiv A_{abcd}(\\omega, \\nu, \\nu\')` \n and :math:`B \\equiv B_{abcd}(\\omega, \\nu, \\nu\')` are cast to matrix form and their\n product is computed\n\n .. math::\n (A * B)_{\\{\\nu\\alpha\\beta\\}, \\{\\nu\'\\gamma\\delta\\}}(\\omega) \n = \\sum_{\\bar{\\nu}ab} \n A_{\\{\\nu\\alpha\\beta\\}, \\{\\bar{\\nu}ab\\}}(\\omega) \n B_{\\{\\bar{\\nu}ab\\}, \\{\\nu\'\\gamma\\delta\\}}(\\omega) \n\n where the mapping of target-space indices :math:`\\{a, b, c, d \\}` to :math:`\\{\\alpha, \\beta\\}, \\{\\gamma, \\delta\\}` is channel dependent.\n\n Storage is allocated and the product is returned by value.\n \n @tparam CH selects the two-particle channel\n :param A: two-particle response function :math:`A \\equiv A_{abcd}(\\omega, \\nu, \\nu\')`\n :param B: two-particle response function :math:`B \\equiv A_{abcd}(\\omega, \\nu, \\nu\')`\n @return :math:`(A * B)` in the given channel\n @include tprf/linalg.hpp\n @note Assign to gf (g2_iw_t) yields move operation while assigning to gf_view (g2_iw_vt) causes extra copy operation""")
module.add_function ("triqs_tprf::g2_iw_t triqs_tprf::product_PH_bar (triqs_tprf::g2_iw_vt A, triqs_tprf::g2_iw_vt B)", doc = """Two-particle response-function product :math:`A * B` in the particle-hole-bar channel (PH-bar).\n \n The two-particle response functions :math:`A \\equiv A_{abcd}(\\omega, \\nu, \\nu\')` \n and :math:`B \\equiv B_{abcd}(\\omega, \\nu, \\nu\')` are cast to matrix form and their\n product is computed\n\n .. math::\n (A * B)_{\\{\\nu\\alpha\\beta\\}, \\{\\nu\'\\gamma\\delta\\}}(\\omega) \n = \\sum_{\\bar{\\nu}ab} \n A_{\\{\\nu\\alpha\\beta\\}, \\{\\bar{\\nu}ab\\}}(\\omega) \n B_{\\{\\bar{\\nu}ab\\}, \\{\\nu\'\\gamma\\delta\\}}(\\omega) \n\n where the mapping of target-space indices :math:`\\{a, b, c, d \\}` to :math:`\\{\\alpha, \\beta\\}, \\{\\gamma, \\delta\\}` is channel dependent.\n\n Storage is allocated and the product is returned by value.\n \n @tparam CH selects the two-particle channel\n :param A: two-particle response function :math:`A \\equiv A_{abcd}(\\omega, \\nu, \\nu\')`\n :param B: two-particle response function :math:`B \\equiv A_{abcd}(\\omega, \\nu, \\nu\')`\n @return :math:`(A * B)` in the given channel\n @include tprf/linalg.hpp\n @note Assign to gf (g2_iw_t) yields move operation while assigning to gf_view (g2_iw_vt) causes extra copy operation""")
module.add_function ("triqs_tprf::g2_nn_t triqs_tprf::product_PH (triqs_tprf::g2_nn_vt A, triqs_tprf::g2_nn_vt B)", doc = """""")
module.add_function ("triqs_tprf::g2_nn_t triqs_tprf::product_PP (triqs_tprf::g2_nn_vt A, triqs_tprf::g2_nn_vt B)", doc = """""")
module.add_function ("triqs_tprf::g2_nn_t triqs_tprf::product_PH_bar (triqs_tprf::g2_nn_vt A, triqs_tprf::g2_nn_vt B)", doc = """""")
module.add_function ("triqs_tprf::g2_iw_t triqs_tprf::identity_PH (triqs_tprf::g2_iw_vt g)", doc = """Two-particle response-function identity operator :math:`\\mathbf{1}` in the particle-hole channel (PH).\n \n Constructs the unity-operator in the given channel\n \n .. math::\n \\mathbf{1}_{abcd}(\\omega,\\nu,\\nu\') =\n \\mathbf{1}_{\\{\\nu\\alpha\\beta\\}, \\{\\nu\'\\gamma\\delta\\}}(\\omega) \n \\equiv \n \\delta_{\\nu\\nu\'} \\delta_{\\alpha\\gamma} \\delta_{\\beta\\delta}\n\n where the mapping of target-space indices :math:`\\{a, b, c, d \\}` to :math:`\\{\\alpha, \\beta\\}, \\{\\gamma, \\delta\\}` is channel dependent.\n\n Storage is allocated and the result is returned by value.\n \n @tparam CH selects the two-particle channel\n :param A: two-particle response function :math:`A \\equiv A_{abcd}(\\omega, \\nu, \\nu\')` determinig the shape and size of the unity operator\n @return the unity operator :math:`\\mathbf{1}`, in the given channel\n @include tprf/linalg.hpp\n @note Assign to gf (g2_iw_t) yields move operation while assigning to gf_view (g2_iw_vt) causes extra copy operation""")
module.add_function ("triqs_tprf::g2_iw_t triqs_tprf::identity_PP (triqs_tprf::g2_iw_vt g)", doc = """Two-particle response-function identity operator :math:`\\mathbf{1}` in the particle-particle channel (PP).\n \n Constructs the unity-operator in the given channel\n \n .. math::\n \\mathbf{1}_{abcd}(\\omega,\\nu,\\nu\') =\n \\mathbf{1}_{\\{\\nu\\alpha\\beta\\}, \\{\\nu\'\\gamma\\delta\\}}(\\omega) \n \\equiv \n \\delta_{\\nu\\nu\'} \\delta_{\\alpha\\gamma} \\delta_{\\beta\\delta}\n\n where the mapping of target-space indices :math:`\\{a, b, c, d \\}` to :math:`\\{\\alpha, \\beta\\}, \\{\\gamma, \\delta\\}` is channel dependent.\n\n Storage is allocated and the result is returned by value.\n \n @tparam CH selects the two-particle channel\n :param A: two-particle response function :math:`A \\equiv A_{abcd}(\\omega, \\nu, \\nu\')` determinig the shape and size of the unity operator\n @return the unity operator :math:`\\mathbf{1}`, in the given channel\n @include tprf/linalg.hpp\n @note Assign to gf (g2_iw_t) yields move operation while assigning to gf_view (g2_iw_vt) causes extra copy operation""")
module.add_function ("triqs_tprf::g2_iw_t triqs_tprf::identity_PH_bar (triqs_tprf::g2_iw_vt g)", doc = """Two-particle response-function identity operator :math:`\\mathbf{1}` in the particle-hole-bar channel (PH-bar).\n \n Constructs the unity-operator in the given channel\n \n .. math::\n \\mathbf{1}_{abcd}(\\omega,\\nu,\\nu\') =\n \\mathbf{1}_{\\{\\nu\\alpha\\beta\\}, \\{\\nu\'\\gamma\\delta\\}}(\\omega) \n \\equiv \n \\delta_{\\nu\\nu\'} \\delta_{\\alpha\\gamma} \\delta_{\\beta\\delta}\n\n where the mapping of target-space indices :math:`\\{a, b, c, d \\}` to :math:`\\{\\alpha, \\beta\\}, \\{\\gamma, \\delta\\}` is channel dependent.\n\n Storage is allocated and the result is returned by value.\n \n @tparam CH selects the two-particle channel\n :param A: two-particle response function :math:`A \\equiv A_{abcd}(\\omega, \\nu, \\nu\')` determinig the shape and size of the unity operator\n @return the unity operator :math:`\\mathbf{1}`, in the given channel\n @include tprf/linalg.hpp\n @note Assign to gf (g2_iw_t) yields move operation while assigning to gf_view (g2_iw_vt) causes extra copy operation""")
module.add_function ("triqs_tprf::g2_nn_t triqs_tprf::identity_PH (triqs_tprf::g2_nn_vt g)", doc = """""")
module.add_function ("triqs_tprf::g2_nn_t triqs_tprf::identity_PP (triqs_tprf::g2_nn_vt g)", doc = """""")
module.add_function ("triqs_tprf::g2_nn_t triqs_tprf::identity_PH_bar (triqs_tprf::g2_nn_vt g)", doc = """""")
module.generate_code()