3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-01 11:43:47 +01:00
dft_tools/test/pytriqs/base/CMakeLists.txt
Olivier Parcollet 7cf7d09c77 Fix #112 and put back g +=/-= matrix for imfreq
- The issue comes from the fact that the default generated
  += and co by the Python API is the one for immutable types, like int.
- Indeed, in python, for an int :
  x=1
  id(x)
  140266967205832
  x+=1
  id(x)
  140266967205808
- For a mutable type, like a gf, it is necessary to
  add explicitly the xxx_inplace_add functions.
- Added :
   - the generation of the inplace_xxx functions
   - a method in class_ in the wrapper generator that
     deduce all += operator from the + operators.
   - this assumes that the +=, ... are defined in C++.
   - The generation of such operators are optional, with option
     with_inplace_operators in the arithmetic flag.
- Also, added the overload g += M and g -= M for
  g : GfImfreq, M a complex matrix.
  Mainly for legacy Python codes.
2014-09-06 19:07:34 +02:00

24 lines
537 B
CMake

# A sample test with text output
add_triqs_test_txt(test_example)
add_triqs_test_txt(operator_python_test)
# A sample test with hdf5 output
add_triqs_test_hdf(h5_example " -p 1.e-6")
# Some basic HDF IO stuff:
add_triqs_test_hdf(hdf5_io " -p 1.e-6")
# Greens functions:
add_triqs_test_hdf(gf_init " -d 1.e-6")
add_triqs_test_hdf(gf_base_op " -d 1.e-6")
# a simple dos on square lattice
add_triqs_test_hdf(dos " -d 1.e-6")
# Pade approximation
add_triqs_test_hdf(pade " -d 1.e-6")
# Bug fix #112
add_triqs_test_txt(gf_inplace_112)