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

307 Commits

Author SHA1 Message Date
Olivier Parcollet
ed6379ce63 [clang tool] add parameter class treatment and h5 generator
wrapper generator: add treatment of parameter class

- methods taking a parameter class are called by **kw
- the dict is passed to the C++
- the converters for the parameters are generated.
2014-10-18 21:20:41 +02:00
Olivier Parcollet
0a1285405c [gfs] Lattice fourier, multivar G, curry, tail
- Add Fourier for lattice.
  - Add regular_bz_mesh, cyclic_lattice, and their FFT.

- rm freq_infty.
- The gf can now be evaluated on a tail_view, which result in composing the tail.
- Fix the following issue :
  g(om_) << g(om_ +1)
  will recompose the tail correctly.
- TODO : TEST THIS NEW FEATURE IN DETAIL.

- Work on singularity for G(x, omega)

 - Separate the factory for singularity from the data factory in gf.
 - overload assign_from_functoin (renamed).
 - Fix singularity_t and co in the gf (const issue).

- Clean tail, add tail_const_view
 - add m_tail for x -> tail on any mesh
 - test curry + fourier works on k
2014-10-18 21:20:35 +02:00
Olivier Parcollet
47cb8a03f7 [arrays] Important changes in implementation.
- Simplify group_indices
  - Only for C ordered, remove complex compile time.
  - Could be generalized to non C ordered, but no need.
- Fix slice for custom orders.
- Generalize the group_indices for the custom order.
- Add c_ordered_transposed_view (useful ?)
- Improve slice, special for ellipsis (quicker).
- Simplify TraversalOrder
- Assignement. Specialize one case for speed.
- use FORCEINLINE in foreach, according to speed test for clang
- add one speed test
- Modify iterators for better speed.
- along the lines decided for the foreach
- update doc.
2014-10-18 21:20:17 +02:00
Olivier Parcollet
d1c8a9a46e gcc compilation detail 2014-10-18 21:20:17 +02:00
Olivier Parcollet
672834fd68 A few parts of the lib only in C++14 mode
- multivariable gf
- some part of tuple tools.
- modified tests
2014-10-18 21:20:17 +02:00
Olivier Parcollet
f8aef6a290 [gfs] Add memory layout option 2014-10-18 21:20:17 +02:00
Olivier Parcollet
fa07abbea9 [gfs] Singularity as an explicit template parameter
- change the underlying data : do not flatten the linear indices of the
  mesh into a single index, keep a higher dim array.
- easier for various places, and necessary for g(nu,nu').
- work on several 2 part. containers.
- add default target (may not be always matrix_valued)
2014-10-18 21:20:16 +02:00
Olivier Parcollet
9c129cb224 [mpi] draft of gf support
- done Matsubara freq for testing and rereading.
- TODO: generalize to other meshes.
- draft for multi var gf
2014-10-18 21:20:01 +02:00
Hartmut Hafermann
ebbb2f0b25 [mpi] vector, test and draft of doc 2014-10-18 21:19:52 +02:00
Olivier Parcollet
38cfef4e9f Implement mpi lib (1). Array, generic, base, vector
- Implement the basic structure of the mpi lib
  and specialization for arrays, basic types, std::vector
- adapted the array class for the lazy mpi mechanism
- pass tests on arrays :
   - scatter, gather on array<long,2> array<complex,2>, etc...
   - broadcast
- several files for readibility
- the std::vector coded but not tested.
- generic mecanism implemented and tested (mpi_generic test)
- added several tests for the mpi lib.
- TODO : more tests, doc...
2014-10-18 21:19:51 +02:00
Olivier Parcollet
dddae19853 Clean old boost and old mc_tools code (v1) 2014-10-18 21:05:07 +02:00
Olivier Parcollet
c1f221e085 [arrays] More include by default 2014-10-16 22:32:11 +02:00
Olivier Parcollet
5b6b0ecf38 Revert "include map and fold headers into array.hpp"
This is not the right place for include...

This reverts commit 63fd1b8b2d.
2014-10-16 22:21:37 +02:00
Hartmut Hafermann
63fd1b8b2d include map and fold headers into array.hpp 2014-10-16 16:30:48 +02:00
Priyanka Seth
d8e79056bf Modify det_manip to access determinant x_values and y_values 2014-10-14 16:26:08 +02:00
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
Priyanka Seth
6a38d6747c Fix in tail-matrix multiplication
Set order_max to correspond to the mask
2014-10-07 13:55:56 +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
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
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
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
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
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