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

144 Commits

Author SHA1 Message Date
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
59b969dbd3 arrays: fix mapped_function (conj overload)
- conj overload should return complex, as in standard.
- changed the test output for mapped_function.
- fixed make_matrix_view and example in doc.
2013-12-30 22:32:15 +01:00
Olivier Parcollet
74469ad5b0 gf: generalize the constructor of gf_mesh from domain
- to add "positive_only" flags, in the case
we need both negative and positive frequencies in matsubara.
2013-12-27 15:18:46 +01:00
Olivier Parcollet
c0993d9db8 mc_tools : add debug print under macro
When TRIQS_MCTOOLS_DEBUG is defined,
the qmc now reports some basic debug info
(when is a move accepted, rejected, ...).
2013-12-23 23:21:30 +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
8cc5012347 Fix #42. Conj overload issue
std::conj returns a complex according to std.
On gcc, we need to define it (bug?) but on clang libc++
it is an error.

-> one test is still failing : to be decided later
2013-12-21 20:07:52 +01:00
Laura Messio
477f5f4ea1 bug in a det_manip constructor (from vectors for x and y values) corrected 2013-12-18 11:21:39 +01:00
Olivier Parcollet
ce221dfc1c gf: add negative matsubara freqs
- add possibility of having negative matsubara freqs
in the matsubara mesh.

- TODO :
   finish imtime complex
   adapt fourier in this case
   test
2013-12-17 15:09:34 +01:00
Olivier Parcollet
02b6cedd14 callback: move to std::chrono instead of boost
- and rm boost::function clashing with std:function
(detected by new clang).
2013-12-10 11:52:53 +01:00
Olivier Parcollet
fb6b47cacf cmake. group c++11 flags
Now that boost compilation is gone, no need
of that mess.
Put same compilation flags for all code.
2013-12-04 22:24:14 +01:00
Olivier Parcollet
f6e006c2e0 gf. Correct evaluator imfreq
- overload for matsubara_freq, not the point.
2013-12-04 12:11:48 +01:00
Olivier Parcollet
17ab555213 gf: fix matsubara_freq and mesh_pt
- cleaner implementation, solve some bugs...
2013-11-20 15:16:53 +01:00
Olivier Parcollet
9ce291d640 gf: update gf imfreq for g( om - nu) case
DRAFT : to be tested further...

- update gf<imfreq>
- write a specific mesh for matsubara frequencies
- now the cast series is :
  mesh_pt --> matsubara_freq --> complex<double>
- matsubara_freq is just the matsubara frequency
- arithmetic of the mesh_pt casted to matsubara_freq
- arithmetic of matsubara_freq is casted to complex, except + and -,
  which are kept as matsubara_freq.
- evaluator now accept : int, mesh_pt, and matsubara_freq
  for matsubara_freq : for negative omega, use conjugation
  for omega outside windows, evaluate the tail on omega.
- as a result : g( om - nu) where om, nu are 2 meshes points,
  is the extrapolation outside the grid if necessary.
- updated tests
- added evaluation for tail.
2013-11-18 23:41:32 +01:00
Olivier Parcollet
184274c893 gf : fix bug in mesh_pt_generator
- in the default constructor, do not call the pointer
that may be null.
- appeared only in python (unused in c++), for new matsubara...
2013-11-18 23:41:32 +01:00
Olivier Parcollet
e703b1e2b7 port to clang 3.4
- little narrowing details
2013-11-18 23:41:32 +01:00
Olivier Parcollet
d7cf223994 arrays: clean cache, add traits ...
- also add simple c14 helpers ....
2013-11-18 23:41:32 +01:00
Olivier Parcollet
9cdc139214 arrays: add conj function for arrays/matrix and tests
- map conj (and extend it for integers).
2013-11-18 23:41:32 +01:00
Olivier Parcollet
fa6f991473 arrays: clean h5 code
- c++11 cleaning, more doc.
- clean the array_stack and its doc.
2013-11-18 23:41:32 +01:00
Olivier Parcollet
899210ff53 arrays: fix bug in ellipsis when it is of size 0
- a(1,ellipsis()) for a an array<T,1> e.g.,
was not compiling.
- also added const_iterator for range to allow simple code :
  for (auto i : range {3,6}) ....-> i = 3,4,5 as in python
2013-11-18 23:41:32 +01:00
Olivier Parcollet
c151e63de2 arrays : rm old array_proxy
- useless old draft
2013-11-18 23:41:32 +01:00
Olivier Parcollet
172ecaa29e add header helper files 2013-11-18 23:41:32 +01:00
Olivier Parcollet
f45dedb94e gf : improve error message 2013-11-18 23:41:32 +01:00
Olivier Parcollet
abc743c0a1 gf deprecated : correction 2013-11-05 11:39:50 +01:00
Olivier Parcollet
c1fa2c75de utility/mpi: forgot 2 inlines 2013-10-31 14:59:49 +01:00
Olivier Parcollet
8be0c208c2 gf.Fourier scalar_valued. Fix tail size
- tail is 0, but must be of dimension (1,1)
2013-10-31 14:54:43 +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
2eca9d8659 clef : forgot a forward in unary operator eval 2013-10-30 13:19:58 +01:00
Olivier Parcollet
0f324df3ef gf: Fix for make_fourier in scalar_valued mode 2013-10-30 13:19:33 +01:00
Olivier Parcollet
928ef222cc [API Change] parameters: required, optional
- now chain the required

- pdef.optional( "B", short(0), " short ")
  .optional( "C", 1u, " unsigned short ")
  .optional( "D", int(2), " int ")
  .optional( "E", 3u, " unsigned int ")
  .optional( "F", long(4), " long ")
2013-10-26 14:34:10 +02: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
1d5ea99d4f gf block : clean
- clean some constructor and clang format
2013-10-23 18:08:12 +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
de0e41ed15 gf: finish block iterator 2013-10-22 21:29:27 +02:00
Olivier Parcollet
1d929c1a91 arrays: add rebind const_view from view
- also add some static assert to forbid += and co on const_view
2013-10-22 21:29:27 +02:00
Olivier Parcollet
dcb1386630 arrays const_matrix_tensor_proxy delete = 2013-10-21 21:53:49 +02:00
Olivier Parcollet
e48a451550 gfs: cleaning code.
Using construction delegation to simplify code.
2013-10-21 21:53:49 +02:00
Olivier Parcollet
cbf2142af6 gf curry: clean call for a single index
- if the index is not a tuple, make it a tuple...
- better API.
2013-10-21 17:05:15 +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
d6cb6d2945 gf/imfreq : remove the little () workaround
- was a bug workaround. Should be ok, but
 reason of previous fix unclear. Suspicious...
- necessary to remove this :
  - it is useless normally.
  - it prevent the evaluator to work for scalar valued gf
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
445f7d42e1 arrays: clean dead code 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
Laura Messio
7693077b79 gf: Fix out of bound in linear mesh in gf eval.
- When reaching the last point of the grid,
move one step back and set w =1.
- fix the gf_2times but and related issues.
2013-10-21 15:11:44 +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
Olivier Parcollet
a4305f8f2a utility : correct a compile macro
- _j notation was not compiled...
2013-10-21 15:11:42 +02:00
Olivier Parcollet
b9451e7018 clef : code cleaning
- remove a useless opertor(...)
2013-10-18 21:54:38 +02:00