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

491 Commits

Author SHA1 Message Date
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
ab3b9b3d4d Draft libclang based python wrapper desc generator
- Given a C++ file, e.g. a class,
  it calls libclang to parse the C++, and retrieve from
  its AST the necessary info to write a xxx_desc.py file.

- THIS IS WORK IN PROGRESS. There are several corner cases for which we
  may want (or not) the script to do better.
- It is not designed to be used automatically, but to to 90 % of the
  boring typesetting work...
- The preamble still needs manual choices

- The properties, methods, functions are automatically declared in
  the _desc file, in the simplest possible way.
- An option --properties, -p : to transform some simple methods or
  get_x, set_x into python properties, not methods.
  Cf doc.

- requires clang (tested on 3.4).
- the script is configured by cmake and installed in
  INSTALLATION_DIRECTORY/bin, with some other files.
  It can only be used for applications, after the lib has been installed.
  It is cmake configured, to include automatically the various include
  paths configure in the triqs installation, including the triqs install dir
  in order to simplify invocation.

- TODO : improve, and test more in real cases.
2014-07-08 23:37:59 +02:00
Hartmut Hafermann
04be667811 updated installation instructions for Mac OS X 2014-07-08 15:30:31 +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
Olivier Parcollet
eeba763171 Fix #101 operator: add python wrapper for is_zero
- added is_zero in python
- reorder a bit (module defined first), but that is cosmetics
2014-07-03 19:23:32 +02:00
Michel Ferrero
58659415ad Update tests related to Fourier transforms 2014-07-02 22:56:06 +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
fcfcce8d61 Cmake. Fix #97 and #89
- C++14 mode not automatic. Was based on compiler version,
  but the version of the C++ lib also matters....
  Now, there is an explicit USE_CPP14 option [default =OFF]
  to set to compile in c++1y mode.
  Solve also #89, i.e. the flags is now in TRIQS_CXX_DEFINITIONS and
  therefore pass to applications (including ipython magic).

- Python_use_mpi4py is now ON by default.
  Rational : it has been used for a while by e.g. Thomas,
  and it is necessary on OS X (boost.mpi.python raises a lot of issues).
  Hence we put it as default.

- Rename the option Build_Triqs_General_Tools_Test to a simpler
  Build_Tests
2014-07-02 21:44:51 +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
Olivier Parcollet
3b2372c437 python wrapper. Pre/postcall can now be inlined
- Add the possibility to give a function "on the fly"
  for the precall and postcall of a python wrapped functoin.
- No change for previous code, it is a simple new feature.
- changed test accordingly. See my_module_desc.py for an example.
2014-07-02 16:48:15 +02:00
Michel Ferrero
7040e9f934 Fix wrong minus sign in FT definition
This is a copy of commit 3fcf727 that has been done on the master branch.
2014-07-01 18:08:15 +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
76798cf6a2 wrap generator : minor correction
- setter was not working in general.
  name variable error.
2014-06-23 17:08:13 +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
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