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

193 Commits

Author SHA1 Message Date
Olivier Parcollet
1b5aceb2a5 gf: Work on documentation 2013-10-22 21:29:40 +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
Michel Ferrero
6a140d2950 Update documentation
Changelog and some updates were done.
2013-10-21 15:12:11 +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
Olivier Parcollet
a5938a8d9e Fix arithmetic of mesh_points in gf
- the arithmetics of the gf mesh_points :
the forwarding of the second argument was missing,
leading to subtle bugs e.g. in  (in matrix case) :

  deltaw(iom_) << iom_ * gw.singularity()(-1) + gw.singularity()(0) - gw(iom_);

because the partial evaluation of the expression introduced a dangling const matrix_view &
instead of moving the temporary matrix_view into the final matrix expression template.
2013-10-18 21:52:57 +02:00
Olivier Parcollet
7419b1a68e Fix #20 2013-10-18 13:55:04 +02:00
Olivier Parcollet
25cb68e253 add clang-format file ... 2013-10-17 00:32:09 +02:00
Olivier Parcollet
588dd6e50a arrays: clean inverse
- does not use view
- determinant not lazy any more
2013-10-17 00:32:09 +02:00
Olivier Parcollet
800aea4c5e remove workaround for icc 13.0
- deprecated....
- remove the TRIQS_WORKAROUND_INTEL_COMPILER_BUGS macro
2013-10-17 00:32:09 +02:00
Olivier Parcollet
4d0bb56790 arrays. Clean expression templates
- clean array, matrix, vector expression template
  they take const & of objects, or move && objects
  no more views. -> C++11 modernisation
- Fix a bug in array resize : it was resetting the indexmap
  to C memory layout e.g. for a fortran array
- Fix a bug in read h5 array when not in C order
  (forgot an else, the array was read twice).
2013-10-17 00:32:09 +02:00
Olivier Parcollet
59288e597f clef. Clean evaluator when producing temporaries...
- When evaluation produces temporaries in intermediate
steps, they were capture by ref, not properly forwarded.
This results in bugs in more complex cases,
like evaluation of objects returning new arrays expression template.
(preparation for next commit).
2013-10-17 00:32:08 +02:00
Olivier Parcollet
437c6e3a70 Fix #21
- change has_h5_read implementation, with a simpler pointer cast
  that gcc now accepts.
2013-10-17 00:32:08 +02:00
Michel Ferrero
3de5c682f6 Add TRIQS_CATCH_AND_ABORT macro
modified:   triqs/utility/macros.hpp
2013-10-17 00:32:08 +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
44bd729252 cmake: in test macro, add rpath 2013-10-11 16:19:38 +02:00
Olivier Parcollet
89c1ae23d1 exported cmake: add add_all_C_tests_in_current_directory
- for applications...
2013-10-11 11:44:41 +02:00
Michel Ferrero
c95b548108 Remove useless files
I removed a misplaced file and also the examples directory. Examples and
tutorials will end up in a different repository.
2013-10-03 11:02:09 +02:00
Michel Ferrero
fc3e6b904a Fix TRIQSConfig for standalone projects
Small fix to allow standalone project to use the triqs_set_rpath_for_target
macro.

  modified:   cmake/TRIQSConfig.cmake.in
2013-09-30 11:03:14 +02:00
Olivier Parcollet
674797efb3 array: add a contructor for reshaping temporary
- add a constructor from indexmap and storage &&,
- used when reshaping a temp. array.
2013-09-28 22:54:21 +02:00
Olivier Parcollet
6f7deca96a tuple tools : add reverse for a tuple...
- add in std:: the reverse to be able to apply the algorithms on a
  reversed tuple
- overloaded std::get, std::tuple_size for this
- added tests.
2013-09-28 22:54:21 +02:00
Olivier Parcollet
e8af74a030 h5: add a parent in group
- add a parent in the group, to allow iteration on group
elements
- normally in h5, one needs to have the parent group and the name
of the group to iterate on its elements.
- added a parent (possibly empty) to get a simply syntax to
get the element of a group...
2013-09-28 16:11:46 +02:00
Olivier Parcollet
33a19227ab arrays: length of domain corrected for && 2013-09-28 14:02:03 +02:00
Michel Ferrero
007b88f2cd Fix small uninitialized problem in mc_tools
modified:   triqs/mc_tools/mc_generic.hpp
2013-09-28 14:01:52 +02:00
Michel Ferrero
fe1aeb8dbf Fix for compatibility with 32-bit systems
This is a fix for issue #18. The type float128 doesn't exist on 32-bit
machines. I removed it from the matrix_stack.pyx detection of a scalar.

  modified:   pytriqs/gf/local/matrix_stack.pyx
2013-09-26 21:59:21 +02:00
Michel Ferrero
68e742df53 Add list/tuple of long in python parameter class
modified:   pytriqs/parameters/parameters.pyx
2013-09-23 15:39:20 +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
Michel Ferrero
1e94eab495 Put back the meta in documentation
modified:   doc/index.rst
2013-09-18 11:50:18 +02:00
Michel Ferrero
5addd5412b Modification of triqs_prepare_local_pytriqs macro
With this modification it should now be possible to compile
an application even if:

1) It has already been installed
2) One does not have write permissions on the installed dir

  modified:   cmake/TRIQSConfig.cmake.in
2013-09-17 16:26:58 +02:00
Michel Ferrero
28140f14fb Work on documentation
Mainly on the python part. I had a quick browse through to check if
the scripts were still working.
2013-09-17 14:55:55 +02:00
Michel Ferrero
2921cbcc06 Cythonize random generators
A trivial cythonized version of the c++ random_generator class.
Useful to get the names of the generators from the python.

  new file:   pytriqs/random/*
  new file:   doc/reference/python/random/*
2013-09-16 12:20:06 +02:00
Olivier Parcollet
7607d3963d Fix 2cca958 for gcc 4.6
- forgot a type...
2013-09-13 20:26:46 +02:00
Olivier Parcollet
5fe1ebcc3b add wrap_clean make target.
-> to clean the cython wrappers.
2013-09-13 19:16:08 +02:00
tayral
e0f0c85c3d doc: fixed a few typos+ put back tutorial for arrays+changed a few titles 2013-09-13 17:46:51 +02:00
Michel Ferrero
84df58aad7 Fix upper bound problem in tails
There was a mistake in the computation of omax in the tail multiplication.

  modified:   triqs/gfs/local/functions.cpp
  modified:   triqs/gfs/local/tail.hpp
2013-09-13 12:16:04 +02:00
Olivier Parcollet
2cca9584b9 mpi: first draft for #12
- a thin layer, using a bit boost::mpi (for the communicator mostly ...)
  along the lines discussed in #12.
- implemented reduce, allreduce, bcast for arrays, simple scalars,
and any custom type that support boost serialization.
- Custom types :  the operations are done recursively on members.
  No change is needed in the class to use this mpi routine, as long as
  serialize function is defined.
- For arrays of basic types (int, double...), a direct call to MPI C API, which works also for views
  (as long as they are contiguous).
- For arrays of more complex types, we revert to boost::mpi.
- Added a simple test.
- Work still in progress :
   - missing a simple scatter/gather for the arrays
   - need more tests & API thinking.
   - dispatch array code to array lib
   - reduce is "sum" only, but do we need more.
2013-09-13 09:20:21 +02:00