Skip to content

Commit 85446e0

Browse files
committed
Wrapped block-sparse self-energy routine
1 parent 0a12bbd commit 85446e0

5 files changed

Lines changed: 44 additions & 7 deletions

File tree

c++/triqs_xca/self_energy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
using namespace triqs;
1313
using namespace triqs::atom_diag;
1414

15-
std::vector<nda::array<dcomplex, 3>> solve(double beta, double Lambda, double eps, nda::array<dcomplex, 3> hyb, nda::vector<double> hyb_poles, nda::array<dcomplex, 3> hyb_coeffs,
15+
std::vector<nda::array<dcomplex, 3>> compute_self_energy(double beta, double Lambda, double eps, nda::array<dcomplex, 3> hyb, nda::vector<double> hyb_poles, nda::array<dcomplex, 3> hyb_coeffs,
1616
triqs::atom_diag::atom_diag<false> ad, int order) {
1717
auto dlr_rf = build_dlr_rf(Lambda, eps);
1818
auto itops = imtime_ops(Lambda, dlr_rf);

c++/triqs_xca/self_energy.hpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ namespace triqs::atom_diag {
2121
* @param order Perturbation order (1, 2, or 3)
2222
* @return std::vector<nda::array<dcomplex, 3>> Self-energy blocks
2323
*/
24-
std::vector<nda::array<dcomplex, 3>> solve(double beta, double Lambda, double eps,
25-
nda::array<dcomplex, 3> hyb,
26-
nda::vector<double> hyb_poles,
27-
nda::array<dcomplex, 3> hyb_coeffs,
28-
triqs::atom_diag::atom_diag<false> ad,
29-
int order);
24+
std::vector<nda::array<dcomplex, 3>> compute_self_energy(double beta, double Lambda, double eps, nda::array<dcomplex, 3> hyb,
25+
nda::vector<double> hyb_poles, nda::array<dcomplex, 3> hyb_coeffs,
26+
triqs::atom_diag::atom_diag<false> ad, int order);

python/triqs_xca/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11

2+
from .module import compute_self_energy
23
from .triqs_solver import TriqsSolver as Solver

python/triqs_xca/module.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// clair-c2py --gen-default-config module.cpp --> module.toml (template)
2+
3+
#include <c2py/c2py.hpp>
4+
#include <triqs/atom_diag.hpp>
5+
6+
#include "triqs_xca/self_energy.hpp"
7+
8+
#include "module.wrap.cxx"

python/triqs_xca/module.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Name of the package [optional].
2+
# Name of the module will be package_name.module_filename
3+
package_name = "triqs_xca"
4+
5+
# The documentation string of the module.
6+
documentation = ""
7+
8+
# List of namespaces as a space separated string e.g. "A A::B"
9+
# If non-empty, only the elements declared in EXACTLY these namespaces are wrapped.
10+
# NB e.g. in previous example A::detail will be ignored, whatever match_names.
11+
namespaces = ""
12+
13+
# Match/reject elements according to a regex (LLVM regex)
14+
# If match_names/match_names are both set, the algorithm is
15+
# for X of fully qualified name qname
16+
# if match_names and match_names does not match Qname : skip X
17+
# if reject_names and reject_names matches Qname : skip X
18+
# else keep X.
19+
#
20+
match_names = "compute_self_energy"
21+
reject_names = ""
22+
23+
# Only keep elements declared in files matching the pattern
24+
match_files = "" # String must be a regex
25+
26+
# If true, transform methods with no arguments into a read only property
27+
wrap_no_arg_methods_as_properties = false
28+
29+
# [Advanced] If yes (default), all elements (class/enum/functions)
30+
# declared in headers included with -isystem are ignored for better performance.
31+
# exclude_system_headers = true

0 commit comments

Comments
 (0)