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

44 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
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
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
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
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
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
e1e9ee20fd gf: correct auto_assign
- g(om_)(i_,j_) was not working.
- add the triqs_clef_auto_assign function for matrix_proxy.
- simplified a bit the triqs_clef_auto_assign for gf.
2014-04-07 13:21:36 +02:00
Olivier Parcollet
5128126055 arrays: change operator() && for const_view
Changed operator()(int, int...) && for array, and views.

- For const_view and regular type, returns value_type (i.e. a copy).
  NB : does make a copy, not a move. Ok for scalar type. TODO: think for complicated types.
  This allows codes like :
  f(x)(0,0) where f : x-> matrix or const_view
  to be correct in clef expression evaluation.

- For _view : return a value_type &, as before to allow :
    A(....)(0,0) = rhs;
  It is not possible to detect dangling refs in that case at compile time.
  Added a security in TRIQS_ARRAYS_DEBUG mode to detect a dangling ref at run time,
  i.e. the case where the view is "unique" (ref count ==1).
  This would be a quite bad design anyway ...

- also :

 - clean operator[] for vector (old workaround for old gcc...)
 - add IsView flag in ISP impl class, for the impl. of operator() &&
2014-03-02 17:11:48 +01:00
Olivier Parcollet
b8d7373177 arrays : fix auto_assign for chains assignment.
A(i_)(om_) << ...
for A an array of gf was not working.
Modified the auto_assign of arrays to handle the case when the object
in the array is itself autoassigned.
Using the model of std::vector adapter for clef, which works.
Also fixed the gf for a little details (gf_impl is usually in the expression tree, not gf).
2014-02-21 21:00:38 +01:00
Olivier Parcollet
e82d95d1a8 gf: add C++14 impl of meshes products
-  add c14 include
- the C++14 is lot more readable (due to generic lambda).
- for mesh/product.hpp -> now 2 versions (C++14 and C++11 for temporary
  backward compatibility).
2014-02-18 15:37:57 +01:00
Olivier Parcollet
85141350e7 remove warnings in compilation
- triqs & tests now compiles with -Wall on clang (3.2)
Checked on OS X.
Todo : recheck on other compilers.
2014-01-30 22:17:28 +01:00
Olivier Parcollet
6820f4865a gf : target_shape_t. change size_t to int
- to avoid narrowing pbs.
- otherwise {n,n}, with n int does not work, which is crazy.
2014-01-10 21:47:33 +01:00
Olivier Parcollet
bdac3e159c work on doc for gf, and details.
- little details : code cleaning, clang formatting,  along
with documentation writing for c++ gf.
- separated the mesh in small class for better doc.
- work on documentation : reorganize specialisation, ...
2013-12-30 22:32:16 +01:00
Olivier Parcollet
5f7e0989a3 gfs. Rm code introduced only for Krylov QMC
- This function was redondant : qmc code cleaned.
- using make_clone in gfs namespace for ADL usage.
2013-12-23 23:21:30 +01:00
Olivier Parcollet
f45dedb94e gf : improve error message 2013-11-18 23:41:32 +01:00
tayral
4c1c14b989 gf:fourier Add missing function in no_tail case
- one only the Matsubara case.
- TODO: the real omega case : decide and implement.
- impl: remove superfluous dispatch in x_impl
2013-10-31 14:41:48 +01:00
Olivier Parcollet
6326c2b4eb gf/clef. Bug fix, and added scalar->matrix reinterpret for blocks
- clef : fix a little bug in storage when evaluating
  (was using the wrong trait to deduce storage type).
- gf : block :
     - added reinterpret_scalar_valued_gf_as_matrix_valued
       for block function
     - cleaned make_block_gf_view_from_vector
     - added make_block_gf_view_from_vectormake_block_gf_view_from_vector_of_cython_proxy
       and changed the cython accordingly because it requires a slightly different syntax.
     - updated tests
- gf : cleaned some template.
2013-10-31 14:41:48 +01:00
Olivier Parcollet
0f324df3ef gf: Fix for make_fourier in scalar_valued mode 2013-10-30 13:19:33 +01:00
Olivier Parcollet
12cb2db2ba gf: fix auto_assign for chained calls.
- g[k_][om_] << expression was not working.
 now  implemented like for std::vector adapter.
2013-10-26 13:49:24 +02:00
Olivier Parcollet
579368f24b gf. Clean Fourier
- lazy_fourier and co --> fourier
- ex fourier --> make_gf_from_fourier to make a new gf
- = fourier (g) works only iif lhs is a view, like scalar.
- updated python (commented fourier method).
2013-10-23 18:46:55 +02:00
Olivier Parcollet
603e397e16 gf. Clean code, rereading for doc
- no major change. Code cleaning + clang-format.
2013-10-22 21:29:27 +02:00
Olivier Parcollet
2fc4f1cd09 gf: add rebind view/const + delete swap 2013-10-22 21:29:27 +02:00
Olivier Parcollet
e5648d2bfd gf : various fixes
- blocks : including the iterator
  --> there is still an issue, with the use of & intead of a view
- details after rereading...
2013-10-21 15:12:53 +02:00
Olivier Parcollet
9edda8724d implement gf_const_view 2013-10-21 15:12:53 +02:00
Olivier Parcollet
9002c1e456 implement array_const_view 2013-10-21 15:12:53 +02:00
Olivier Parcollet
1517cdaaeb clean the TRIQS_COMPILER macros
- from now on, C++11 compilers only.
- no ressources to maintain old stuff.
2013-10-21 15:12:08 +02:00
Olivier Parcollet
39edb2f846 [API change] gf : factories -> constructors
- Make more general constructors for the gf.
  gf( mesh, target_shape_t)
- remove the old make_gf for the basic gf.
- 2 var non generic gf removed.
- clean evaluator
- add tensor_valued
- add a simple vertex test.
- clean specialisation
- Fix bug introduced in 1906dc3
- forgot to resize the gf in new version of operator =
- Fix make_singularity in gf.hpp

- clean resize in operator =

- update h5 read/write for block gf
  - changed a bit the general trait to save *all* the gf.
  - allows a more general specialization, then a correct for blocks

- NOT FINISHED : need to save the block indice for python.
  How to reread ?
  Currently it read the blocks names and reconstitute the mesh from it.
  Is it sufficient ?

- clean block constructors

 - block constructors simplest possible : an int for the number of blocks
 - rest in free factories.
 - fixed the generic constructor from GfType for the regular type :
   only enable iif GfType is ImmutableGreenFunction

- multivar. fix linear index in C, and h5 format

  - linear index now correctly flatten in C mode
    (was in fortran mode), using a simple reverse of the tuple in the folding.
  - fix the h5 read write of the multivar fonctions
   in order to write an array on dimension # variables + dim_target
   i.e. without flattening the indices of the meshes.
   Easier for later data analysis, e.g. in Python.

- merge matrix/tensor_valued. improve factories

  - matrix_valued now = tensor_valued<2>
    (simplifies generic code for h5).
  - factories_one_var -> factories : this is the generic case ...
    only a few specialization, code is simpler.

- clef expression call with rvalue for *this
- generalize matrix_proxy to tensor and clean

 - clean exception catch in tests

  - exception catching catch in need in test
    because the silly OS X does not print anything, just "exception occurred".
    Very convenient for the developer...
  - BUT, one MUST add return 1, or the make test will *pass* !!
  - --> systematically replace the catch by a macro TRIQS_CATCH_AND_ABORT
    which return a non zero error code.
   - exception : curry_and_fourier which does not work at this stage
   (mesh incompatible).

- gf: clean draft of gf 2 times
  - comment the python interface for the moment.
  - rm useless tests
2013-10-21 15:11:44 +02:00
Michel Ferrero
f4444f3b49 Revert a wrong fix in expression template for gf
This reverts the part of the commit 1906dc30a5
which introduced modifications in the expr templates of the Green's
functions. The commit had introduced some bugs and this revert
removes them (the expr templates will be taken care of fully in later
commits). This is a temporary fix for issues #18 and #25.

  reverted:   triqs/gfs/data_proxies.hpp
  reverted:   triqs/gfs/gf.hpp
  reverted:   triqs/gfs/gf_expr.hpp
2013-10-17 00:28:51 +02:00
Olivier Parcollet
1906dc30a5 Fix expression template for gf & std::vector
- add move semantics in expression template.

for gfs :
- rm descriptor
- Remove data from expr, rewrote assignment
  which now iterates on the mesh, simply.
  RHS models now FunctionOnMesh
- This fix the multiplication bug of gf
- Remove assign_no_resize/assign_with_resize from proxy
2013-09-22 18:17:40 +02:00
Olivier Parcollet
2c542647fd clef : new version using lvalues and moving rvalues
- change : all objects are by default
  stored now by reference, not by copy any more.
  Unless the trait force_copy_in_expr is true.
- rvalue refs are moved into the tree
- simplifies a lot the writing of lazy method, objects.
- added a macro for methods
- tests ok. Further check needed to control absence of copies...
- improved documentation
2013-09-08 15:04:12 +02:00
Olivier Parcollet
9790fe8bd0 Work on gf
- clean curry.
- start testing.
2013-09-06 16:00:51 +02:00
Olivier Parcollet
5a12b7eeb5 gf : correction for block
- forgot a constructor on the domain
 (was a pb for cthyb_krylov code).
- a few details (better make_gf).
2013-08-30 12:59:46 +02:00
Olivier Parcollet
b45045e81c gfs: change the name of the mesh -> gf_mesh for gcc
gcc has a pb because the template mesh<Variable,Opt>
has the name same as the gf mesh method (!).
Clang is fine however on this...

Solution : rename the template mesh<...> to gf_mesh...
Not very elegant, but ok.
2013-08-27 14:20:50 +02:00
Olivier Parcollet
165b44a081 gf: mesh. const_iterator and add cbegin
- for meshes :
clean concept w/ doc, add cbegin, and changed
iterator to const_iterator (more standard name).
2013-08-27 13:43:58 +02:00
Olivier Parcollet
7898bd8d88 gf : mesh now the class, not a trait.
simplify : mesh was a impl trait,
make it the class itself.
corrected the gf, tests and the cython.
2013-08-27 13:43:58 +02:00
Olivier Parcollet
f78e6baf9e code cleaning
- TRIQS_MODEL_CONCEPT renamed : clearer for doc
- index_value_type : remove, useless...
2013-08-27 13:43:58 +02:00
Olivier Parcollet
41bc8d0338 changing non_view_type to regular_type
- cosmetic : for clarity of the code.
2013-08-27 13:43:57 +02:00
Olivier Parcollet
44bf1e322a gf product and curry. First draft
- works on simple case, to be reread.
- curry in general. To be reread ..
- added some tests.
2013-07-30 22:37:41 +02:00
Olivier Parcollet
f6fa63c9b3 gf: clean h5name
- _s automatically done for scalar_valued.
- add simple reinterpretation of gf scalar to matrix view to
easy h5 saving to plot in python
2013-07-30 22:37:41 +02:00
Olivier Parcollet
bd4926157c [API BREAK] rename directory gf -> gfs 2013-07-29 11:53:02 +02:00