3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-01 19:53:45 +01:00
Commit Graph

279 Commits

Author SHA1 Message Date
Olivier Parcollet
0c64c2a010 Add date+time in C++ exceptions in wrapper
- the wrapper will now add date and time
  at the boundary between C++ and Python.
- using C lib, not C++ (lack of support of C++ chrono functions in gcc).
2014-07-23 15:47:19 +02:00
Priyanka Seth
c61b8941ee More prettification: can not --> cannot 2014-07-16 23:30:05 +02:00
Priyanka Seth
5df128aab4 Prettification. 2014-07-16 23:29:56 +02:00
Olivier Parcollet
a6e1528730 hdfarchive + gf : two corrections
- hdfarchive : transform the key to string with str
  because they can be unicode and C wrapper does not convert python unicode strings.
- gf : Correct the scheme for BlockGf : not very clean, to be improved ?
2014-07-08 23:38:00 +02:00
Olivier Parcollet
62e84aa821 Fix #100.
- The workaround for align_t in C++14 mode has been fixed in recent
  version of clang.
- Does not apply to OS X (it uses libc++).
2014-07-03 19:50:16 +02:00
Olivier Parcollet
8d7dd34aeb fourier. Add one overload to make_gf_from_fourier API.
- To be able to give explicitely the number of point.
- two functions : if the number of points is not given, take as before.
- updated the doc.
2014-07-03 19:50:16 +02:00
Michel Ferrero
cbfecdf623 Fix make_mesh_fourier_compatible to correct size
The number of points in imaginary time must be at least twice
as big as the number of pionts in matsubara frequencies.
2014-07-02 22:56:06 +02:00
Olivier Parcollet
9583afc671 Fix #98
- A silly copy paste error : the operator - for matrix expression was
  defined twice.
- second error : a typo in unary method.
2014-07-02 18:22:25 +02:00
Michel Ferrero
88f8e4cce4 Fix bug with full bins in Fourier transforms
I also added a test to make sure the time mesh is twice as
long as the frequency mesh. Obviously now some tests don't
pass... I will fix them in the next commit.
2014-07-01 18:04:30 +02:00
Olivier Parcollet
c8be004055 gf : bug correction in make_block_gf
- See comment : a move + undefined order of args eval. of function
  error.
2014-06-23 16:13:27 +02:00
Olivier Parcollet
6bacb101bc Fix #93
- Forgot to test on gcc 4.8 ...
2014-06-23 13:58:47 +02:00
Olivier Parcollet
4af1afbdaf hdf5 : clean up
- For users : only change is :
   H5::H5File in apps. to be replaced by triqs::h5::file, same API.

- using only the C API because :
   - it is cleaner, better documented, more examples.
   - it is the native hdf5 interface.
   - simplify the installation e.g. on mac. Indeed, hdf5 is
     usually installed without C++ interface, which is optional.
     E.g. EPD et al., brew by default.
     Also the infamous mpi+ hdf5_cpp bug, for which we have no clean solution.

- clean the notion of parent of a group. Not needed, better iterate function in C LT API.
- modified doc : no need for C++ bindings any more.
- modified cmake to avoid requiring CPP bindings.
2014-06-22 13:57:47 +02:00
Olivier Parcollet
36a60ce529 tuple tools : simplify
- simplify implementation of several functions.
- clean API, rename, etc...
- add more documentation
2014-06-21 21:11:33 +02:00
Olivier Parcollet
6d12c4b7f6 Fix #92
- A silly error : forgot to resize when rereading indices...
2014-06-21 16:17:40 +02:00
Olivier Parcollet
c8eefe0ad6 Correction: remove a cerr print
- forgotten print
2014-06-21 14:11:43 +02:00
Olivier Parcollet
b3e2c337c3 Fix static missing in wrapper tools
- numpy import function should be static
- Fix bug in gcc 4.9
2014-06-15 18:14:06 +02:00
Olivier Parcollet
add3a075b7 test arrays. clean include
- clean include path.
  (pragma once issue on icc).
- clean icc debug macros
2014-06-15 18:14:06 +02:00
Olivier Parcollet
33b120948d gf: inverse for gf_view and gf
- correction
2014-06-13 17:58:05 +02:00
Olivier Parcollet
0727bddeee Fix #85 : narrowing conversion 2014-06-12 23:01:34 +02:00
Olivier Parcollet
8cf7465114 C14 : add sequence.
correct seq gcc code inclusion
2014-06-12 22:59:22 +02:00
Olivier Parcollet
6e987f4563 Correction of f273c09c6f
- a missing include...
2014-06-12 17:56:07 +02:00
Olivier Parcollet
25eec4e046 Silence some gcc warnings...
- Silence some trivial warning.
- TODO: narrowing in a few places.
2014-06-12 17:45:12 +02:00
Olivier Parcollet
f273c09c6f Make it compile again in pure C mode 2014-06-12 17:41:32 +02:00
Olivier Parcollet
842274003f Fix import array in extensions.
- import arrays in extensions (mako file).
- put import_arrays in converter,
  along the lines of our own objects (numpy and triqs uses
  the same capsule technique, i.e. the standard technique from python
  doc.)
2014-06-12 17:27:48 +02:00
Olivier Parcollet
cbf6092956 pytream : add pragma to remove warning
- usual char * in python
2014-06-12 13:18:26 +02:00
Olivier Parcollet
f1c32012a6 magic : redirect std::cout to python sys.out.write
- for all functions, except when GIL option (not implemented) is here
  we use a triqs::py_stream, which redirect the stream
  to python sys.write
- so that a simple C++ code with a std::cout
  print its output in the notebook...
- NB : it only works for the code within the cell.
  If it calls another function on the lib which uses cout,
  print is not redirected.
  Designed for simple tests....
- cerr not (yet) redirected. (useful ?).
2014-06-11 16:25:47 +02:00
Olivier Parcollet
aa126e178b update for xcode 5.1.1
- clang 3.4 on default Os X.
- automatically in C++14 mode.
- a little fix in clef (var >> ...) because of an apparent bug in auto
  detection in clang.
2014-06-11 16:23:48 +02:00
Michel Ferrero
62c4b54e56 Add maps to py_converters 2014-06-04 01:11:45 +02:00
Michel Ferrero
dfa27554f5 Add map<string,T> to h5 2014-06-03 18:13:14 +02:00
Michel Ferrero
422cabd52e Fix detail in callbacks 2014-06-03 17:07:44 +02:00
Olivier Parcollet
3e0d53564a gf: triqs_auto_assign for gf_view
g[k][om] : missing an overload for views
2014-05-30 22:27:13 +02:00
Olivier Parcollet
446f817111 wrapper: add release_GIL_and_enable_signal option.
- Add to the wrapper generator (add_method) the release_GIL_and_enable_signal option which :

   - release the GIL
   - save the python signal handler
   - enable the C++ triqs signal handler instead.
   - undo all of this after the code runs, or in a case of exception.
   - used python include, ceval.h, line 72 comments and below.

- reworked the triqs::signal_handler.
  simple C like function, no object (no need).
  start, stop, received, cf header file.

- clean the call_back.cpp : only place using the signal directly
  (qmc uses the callback).
  in particular, remove the old BOOST CHRONO, since
  the std::chrono works fine on platforms we use now.
2014-05-30 21:09:18 +02:00
Olivier Parcollet
31927c9132 wrapper : remove the need of default constructor
- change the constructor wrapper.
- in the new method, leave the pointer _c to NULL.
- in the init, allocate it.
- It seems ok to leave the object in this non initialized state,
  but that is not so clear from the doc.
  Added check for this pointer == NULL in converters.
2014-05-30 19:34:13 +02:00
Olivier Parcollet
2d071bb74b Remove Cython & prepare wrapper for applis.
- removed cython : macro, detection, pxd, etc...
- adapt wrapper tools for external applis.
- cleaned doc for cython
2014-05-30 19:34:13 +02:00
Olivier Parcollet
a920697e78 fixes in wrap_generator, parameters, h5 for strings
- string size in h5. Add +1 (or empty string is wrong).
- parameters : modified flags from python
- minor corrections in wrapper
2014-05-30 14:16:15 +02:00
Olivier Parcollet
e6529b608e Change implementation of random_generator & python wrapper.
- Use a new buffered_function to replace the complicated generator code from ALPS.
- Clean the implementation of the random_generator
- update the documentation
- update to the new python wrapper (could not be done with the previous
  version, because of lack of move constructor).
2014-05-29 22:25:22 +02:00
Olivier Parcollet
2b5dd322ce lattice : python wrapper 2014-05-29 22:25:22 +02:00
Michel Ferrero
d3c1b9779d Add many_body_operator header in triqs 2014-05-22 23:58:07 +02:00
Olivier Parcollet
6934692327 add converter for scalar_valued gf
- converted as 1x1 matrix view.
- add a small test
2014-05-22 23:42:51 +02:00
Olivier Parcollet
f2136f7b80 gf. wrap legendre. 2014-05-22 17:56:42 +02:00
Olivier Parcollet
cfe3532c94 array & gf transpose
- implement transposed_view for arrays.
- .transpose method for gf
- wrapped to python
- add call op. for GfImTime, using C++
- Added ChangeLog
- rm matrix_stack
- start cleaning old code
2014-05-22 16:08:23 +02:00
Olivier Parcollet
5c8270c437 gf_block converter 2014-05-21 23:01:52 +02:00
Olivier Parcollet
4789dccda6 parameters : small details
- an include missing on OS X
- change serialization in the general case where hdf5 can be used,
  (version of hdf5 high enough) to use only one buffer,
  not a buffer per field.
- put back the mpi_param example.
2014-05-21 17:51:40 +02:00
Olivier Parcollet
27af80c04e Serialization boost/h5 and clean parameters
- parameters : clean, add back serialization. Clean whitespace

- serialization : depending on the version of the hdf5 lib,
  uses h5 or boost.

- TODO : test it on a machine with new hdf5.
2014-05-21 14:35:26 +02:00
Olivier Parcollet
945116a54b Fix h5 serialization: no test for old hdf5
- if version is  < 1.8.9, the test is ignored.
2014-05-21 11:05:48 +02:00
Michel Ferrero
e377522879 Fix wrong commit 068c4a1
The fix in simple_read_write was wrong. This should be correct now.
2014-05-21 00:28:40 +02:00
Olivier Parcollet
ccc17bbb4e h5 serialization
- add an h5 serialization using hdf5 >= 1.8.9
  and a file in memory.
- following doc.
2014-05-20 22:24:30 +02:00
Olivier Parcollet
8c0bf592d0 Fix compilation of py_converter.
- py_converters in hpp files
- add guard to prevent inclusion in the wrapper (to avoid 2
  specialisation of the same py_converter).
2014-05-20 22:24:30 +02:00
Michel Ferrero
068c4a116d Fix a bug in simple_read_write.hpp 2014-05-20 18:08:28 +02:00
Olivier Parcollet
914901864a wrapper. Correction
- clean the call to py_converter.
- add a & in the generic function py2c (to be specialized later).
2014-05-19 21:58:33 +02:00