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

487 Commits

Author SHA1 Message Date
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
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
dd91c51647 wrapper.
Correction converter specialization
(avoid redeclaration).
2014-05-19 22:18:17 +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
Olivier Parcollet
af084f5d59 parameters & wrapper
- new parameter class :
  parameters are viewed as form, built in C++, and filled in C++/python.
  Each field of the form as a precise C++ type (erased using standard techniques).
  First tests ok, to be reread/checked.

  TODO : serialization is commented. Lead to long compilation time & large code
  due to boost::serialization. Use h5 when possible.

- wrapper :
  - separated the converters of the wrapped type in the TRIQS library
  - necessary for parameters (it used outside an .so) and potentially
    other codes, outside an .so module
2014-05-19 15:19:18 +02:00
Olivier Parcollet
a9bcc33c7e minor correction for linux
- vector on C++14 has explicit default (until C++14 apparently)
  it is a small difference between libc++ and gnu libstdC++
2014-05-11 21:57:18 +02:00
Olivier Parcollet
e32602180c Cleaning h5 interface 2014-05-11 21:47:52 +02:00
Olivier Parcollet
3a31077d51 gf : new wrapper 2014-05-11 21:47:52 +02:00
Olivier Parcollet
3a9f986461 gf: add a few functions in C++ 2014-05-11 21:47:52 +02:00
Olivier Parcollet
376056f7bd gf : add indices, name in C++ 2014-05-11 21:47:51 +02:00
Olivier Parcollet
5105e04ac7 Add new wrapper generator
- with pytriqs.wrap_test as an example.
2014-05-11 21:47:46 +02:00
tayral
2be9587078 Small fix in gf doc. 2014-05-08 12:29:39 +02:00
tayral
3aa380ba9d Fixed abs bug in bravais_lattice + added method
When constructing the last unit vector in 2D, the sanity check was wrong because of usage of abs instead of std::abs.

Added method energy_on_bz_path_2 that returns the energy *matrix* at each k point on a given path instead of the eigenvalues of this matrix. The name of the function should be changed (to energy_matrix_on_bz_path?)

Renaming energies_on_bz_path_2 to energy_matrix_on_bz_path
2014-05-08 12:09:58 +01:00
tayral
7752db89c2 Added linear_to_index to matsub_freq 2014-05-08 12:04:54 +01:00
tayral
91dc34a869 Added accessor positive only to MeshImFreq 2014-05-08 12:04:54 +01:00
Olivier Parcollet
78cbbaa52f Fix #74. Correction of previous commit for gcc 4.8.1
- an include was missing after reorganisation.
2014-05-05 18:29:52 +02:00
Olivier Parcollet
8c725f8d5e Work on compilation speed.
- h5/make_h5.... only used in parameters.
- old boost includes before C++11
- remove boost serialization, make macro TRIQS_MAKE_NVP temporarely
- remove boost::is_complex (can be written in 2 lines...)
- move some lib in cpp
2014-05-02 20:49:19 +02:00
Olivier Parcollet
5172f342be correct include in ising2d test.
triqs include goes FIRST.
(for C++14 mode in clang, e.g.).
2014-04-25 16:07:32 +02:00
Olivier Parcollet
09bf713dc8 clef: correct TRIQS_CLEF_IMPLEMENT_LAZY_METHOD
- The name of the object was left to the name used in the test/debug.
2014-04-25 16:06:44 +02:00
Olivier Parcollet
384c05188c exceptions handling : slight improve
- separate the stack trace from the error message for better python
  handling
- separate triqs::excption from triqs::runtime_error
2014-04-23 19:57:56 +02:00
Hartmut Hafermann
a0bfead2c6 added a missing dependency for compiling doc 2014-04-22 11:45:09 +02:00
Olivier Parcollet
b1508a07ff statistics : fix get_value_type detection
- clean a bit the auto_correlation_time
2014-04-17 13:48:54 +02:00
tayral
2c6da6a35a Made autocorrtime calculation from binning faster.
Bin size is doubled at each step to converge faster and reuse previous binned series.
2014-04-17 13:39:51 +02:00
tayral
0e23db7f92 Added constructor of observable on binned_series 2014-04-17 13:39:51 +02:00