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

465 Commits

Author SHA1 Message Date
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
Olivier Parcollet
8f975234c6 doc: fix cmake for Ubuntu
- findpackage missing
2014-06-06 14:31:44 +02:00
Michel Ferrero
dd42025458 Add future test for operators in parameters 2014-06-06 11:12:33 +02:00
Michel Ferrero
a56f490492 Add python test for operators 2014-06-06 10:44:50 +02:00
Michel Ferrero
31d8120b64 Add missing file in installation of gf 2014-06-05 14:07:44 +02:00
Michel Ferrero
3eb9b16a57 Add number operator in operator class 2014-06-05 14:07:15 +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
e891474544 Avoid that wrap_test gets installed 2014-06-03 17:24:08 +02:00
Michel Ferrero
89de284cc8 Add test for many_body_operators 2014-06-03 17:12:29 +02:00
Michel Ferrero
422cabd52e Fix detail in callbacks 2014-06-03 17:07:44 +02:00
Michel Ferrero
bf3833f803 Fix a bug in buffered function test 2014-06-03 15:24:52 +02:00
Michel Ferrero
6295d563ae Add absolute c_type in many_body_operator desc 2014-06-03 15:09:07 +02:00
Michel Ferrero
8c75aa6373 Small fix in wrap_generator 2014-06-03 15:08:24 +02:00
Michel Ferrero
fa06eaf3ae Fix for issue #82 2014-06-03 15:07:38 +02:00
Olivier Parcollet
d29be978e9 magic : correct for linux
- compiler path, etc...
2014-06-02 11:04:17 +02:00
Olivier Parcollet
28a12c7b2f ipython triqs magic v1
- first version of triqs magic for the notebook
- add add_preamble to the wrap_generator.
2014-06-01 21:00:07 +02:00
Olivier Parcollet
3fe400d34c doc : split c++ code from rst
- examples split from the rst file using a python script (split_code).
- Final result for the doc is unchanged.
- examples are compiled and tested with the other tests.
- examples' code have been clang-formatted, with triqs style.
- doc compiles much faster, and with the same options as the rest of the
  test.
- examples are added as tests, so they are run by make test, as simple C
  tests.
- done for the tutorials and the reference.
- autocompile removed (changed into triqs_example directive).
- add triqs_example :
   - make a literal include of the source code.
   - runs the compiled example
   - add, as before, the result to the source code in the doc.
- added the script split_code, used to make the changes automatically,
  maybe for later reuse. (in _tools)
2014-05-31 23:00:16 +02:00
Olivier Parcollet
4f51c1e043 Correction.
- forgot the doc file.
- minor correction for wrapping application
2014-05-31 18:51:50 +02:00
Olivier Parcollet
4e9460bc1c Wrapper : clean and document.
- clean the c_name.
- add more refined signature (with c_name optionally in it).
- add some autodoc.
- clean code : move class in nested, remove useless dict call, etc...
- operator2 : move unary - and unit in algebra in general wrapper.
- various name change to make private function start with _, for
  autodoc.
2014-05-31 16:10:07 +02:00
Olivier Parcollet
2abf36a2ff move wrap_test to test/pytriqs 2014-05-30 23:08:32 +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
243d4a798b wrapper: add use_module
- a module can use the converters used by another
  with the use_module('A') command.
  In which case :
    - the generate converter header for A will be included.
    - the header, at the top, now contains a simple list of all
      wrapped types, which is then included in the wrapped_types
      of the module for proper code generation.
- simplify the code generation : just generate_code.
- all arguments are analyzed from sys.argv at the import of the
  wrap_generator module. In any case, the xx_desc.py will be called from the corresponding
  cmake command, hence with the right arguments.
- Added a dependencies in my_module_B of wrap_test to show how to make
  the dependencies in the cmake file, if needed.
2014-05-30 19:34:13 +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
3036fe6529 wrapper : correct namespace in enum in converters
- the absolute path was missing for the value of the enum.
2014-05-30 14:16:15 +02:00
Olivier Parcollet
ad45adbadd wrapper: add static methods
- is_static= True to wrap a static method.
2014-05-30 13:03:51 +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
Olivier Parcollet
5f6dadfede gf : clean test output
- remove the tt group, we can not save a tail independantly any more,
  makes little sense.
2014-05-29 22:25:22 +02:00
Olivier Parcollet
22f9576834 Finish gf wrapping
- clean old.
- clean gf_desc.py
2014-05-29 21:39:36 +02:00
Michel Ferrero
3be8e65ae7 Fix operator generator to have converter header 2014-05-24 01:00:16 +02:00
Michel Ferrero
4404fd191b Add macro to get git hash for applications 2014-05-24 00:40:49 +02:00
Michel Ferrero
b0c969a507 Add hdf5 version detection in CMakeLists.txt
Might be useful at some point.
2014-05-22 23:58:07 +02:00
Michel Ferrero
76aa6120e9 Add new python operators
For now they are called operators2.
2014-05-22 23:58:07 +02:00
Michel Ferrero
df09891219 Add unary operators in python wrapper
This is useful to add unary operators to the number_protocol.
2014-05-22 23:58:07 +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
16057c7a4e forgot one file 2014-05-22 21:08:08 +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