3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-26 06:14:14 +01:00
Commit Graph

474 Commits

Author SHA1 Message Date
Michel Ferrero
2f2374ea29 Fix issue #128
This is just cosmetics but should be fine.
2014-10-09 13:15:58 +02:00
Michel Ferrero
173a97d07c Fix for issue #134
There was a bug in the transpose of the indices. Added a test.
2014-10-09 12:46:07 +02:00
Olivier Parcollet
0fd82579e3 [cmake] Fix cmake python for Ubuntu 14.04
There is a bug in Ubuntu 14.04 : the interpreter
does not return the correct position of the libpython.
We add the correct path to the path hints, at the end (lowest priority).
In most machines, the first hint is the correct answer.
2014-10-08 17:01:40 +02:00
Priyanka Seth
6a38d6747c Fix in tail-matrix multiplication
Set order_max to correspond to the mask
2014-10-07 13:55:56 +02:00
Priyanka Seth
9be131e8e1 Allow indices in gf_struct/operator names to be strings. 2014-10-07 13:53:18 +02:00
Michel Ferrero
3b59d26a67 Two fixes in tight binding part 2014-10-06 23:18:10 +02:00
Priyanka Seth
71fa498833 API change for tail fitters
python fit_tail, replace_by_tail ==> fit_tail_depr, replace_by_tail_depr
c++ set_tail_from_fit ==> fit_tail
2014-10-01 10:52:32 +02:00
Priyanka Seth
11f17631b5 Added predefined hamiltonians to operators 2014-09-27 01:16:28 +02:00
Michel Ferrero
d73c1cf00c Fix and wrap set_tail_from_fit
The c++ version of the tail fit is wrapped to python. I also changed
slightly the code so that when replace_by_fit is true the data is
changed all the way to the end of the Matsubara axis not only on the
interval where the fit was done.
2014-09-26 12:35:59 +02:00
Olivier Parcollet
b31f4a0a09 Correction: include cmake dir 2014-09-19 20:52:26 +02:00
Olivier Parcollet
c9a5856fb8 [clef] Fix placeholder () and [] operators
- had been forgotten.
- modified g(k,om) test
2014-09-18 22:47:53 +02:00
Olivier Parcollet
c7a1a25846 Fix bug in building regular type from python
- the flag is really enforce_copy and should force a copy
- for a view : it is false, no change
- for a regular type : it is true, and now this will enforce the
  copy in the call of numpy. numpy does it for us.
- The problematic case was when we construct a regular type
  from a complicated view in python, which is an array
  but is not C contiguous.
  (hence the PyArray_Check was false, and the C_Contiguous flag was not set)
  Now it is fine, since we ask numpy to systematically copy the data for us
  and build a C contigous array.
  --> the constructor from python does not support custom memory layout
  because numpy only support C and Fortran

Conflicts:

	triqs/arrays/impl/indexmap_storage_pair.hpp
2014-09-18 15:01:17 +02:00
Olivier Parcollet
1a85b9eb81 Fix #122 : correction : forgot inline 2014-09-09 10:06:41 +02:00
Olivier Parcollet
e6234ed3d5 Fix #122
- the conj_ function was not written properly
  (T is a ref, the trait is_complex was not returning true).
- a simpler version is clearly better !
2014-09-08 20:54:59 +02:00
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
Olivier Parcollet
dcbdd5bc54 Clean the eigenelements tests.
- Clean the output of the test.
- Separate from previous commit to be able to retest previous test
  with same lib code.
2014-09-04 11:58:20 +02:00
Olivier Parcollet
9265c2db7f Fix #119
- Cleaned of the eigensystems computations (worker is simpler, decision
  at runtime, etc..).
- Fix #119 : When the matrix is in C order, the fortran lapack
  sees in fact its conjugate, so we need to conjugate the eigenvectors at the end.
  NB : not true if the storage order of the matrix is already fortran of course.
2014-09-04 11:55:32 +02:00
Olivier Parcollet
be1b9b6f19 python wrapper. No new function if no constructor
- When a type has no python constructor (E.g. parameters)
  do not define the xxx_new function.
- Leads to a better error message when trying to construct
  such an object in python.
- TODO : check there is no issue with serialization ?
2014-07-27 16:27:16 +02:00
Olivier Parcollet
522477eb2d desc generator : minor cleaning
- while porting apps. examples to 1.2
- add build_ipytriqs, etc...
- various details...
2014-07-27 15:38:22 +02:00
Olivier Parcollet
51b008c369 cmake: make TRIQS_PATH absolute
- when TRIQS_PATH is given e.g. with ~, make it absolute
  to avoid config. error.
2014-07-27 15:38:22 +02:00
Olivier Parcollet
06dbfb71bf correct previous commit after linux test 2014-07-26 18:46:57 +02:00
Olivier Parcollet
6fb71f50c9 desc wrapper generator: small improve, clean
- detect the use module.
- clean the code specific to wrapper generation from clang_parser.
- add support for default arguments for int, double, char.
- TODO : add more complex default arguments
2014-07-26 18:37:20 +02:00
Olivier Parcollet
03dbf576ae rm obsolete brew boost
deleted:    packaging/os_x/boost.rb
2014-07-24 20:44:41 +02:00
Olivier Parcollet
e5928de7f5 Fix #108 (tentatively).
- Pb was that indices for gf where empty when constructed
  with default args from C++.
- changed into : make indices from the shape in the default
  case.
- also added more, simpler construction, for the indices
  to easy C++ construction.
2014-07-24 17:17:16 +02:00
Olivier Parcollet
88800c903c doc: adapt to new web site subdirectory
triqs/1.1
triqs/1.2
etc...
2014-07-23 17:25:02 +02:00
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
e3e652f556 Doc changes -- installation 2014-07-23 14:14: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
Hartmut Hafermann
bd7c8abd75 minor change in install doc for osx 2014-07-16 18:06:30 +02:00
Hartmut Hafermann
32112d47b7 added check for mpi4py in config 2014-07-16 11:35:46 +02:00
Hartmut Hafermann
34414cc096 fixed cmake dependency warnings 2014-07-16 11:26:10 +02:00
Michel Ferrero
f6da304234 Add indicesR/L to gf_desc 2014-07-10 11:56:05 +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
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