Merge branch 'devel'

Conflicts:
	Makefile
Merging with 'devel' branch.
Code moved to nup,ndw basis.
Ready to merge with multi-band code as soon as it
is thoroughly tested.
Merge branch 'devel'
Merge branch 'devel'

Conflicts:
	Makefile
update: add driver for BHZ model driver/ed_bhz.f90 (not working yet)
Merge branch 'devel'

Conflicts:
	Makefile
Merge branch 'master' of github.com:aamaricci/CompleteED
Merge branch 'devel'
Merge branch 'devel'
update: code cleaned. H*v products have been regrouped so to have a two routines (each with
 _d and _c cases): the routine spHtimesV_x perform matrix-vector product within arpack
diagonalization to get the spectrum of H, using small blocks vectors in parallel mode.
the routine lanc_spHtimesV_x perform matrix-vector product withing plain lanczos
algorithm for green's function evaluation, using large vectors and reshuffling where
necessary.

Code was tested at 1st loop against serial case and F77 code (M.Capone) with perfect
agreement.

MPI_UPDATE: mpi version of the code updated.
STORING (hash-table) of the Hamiltonian has been REINTRODUCED.
To keep memeory low the hash-table is allocated to Nchunk row on each node (previously
all nodes allocated the full sparse matrix!).
This required a modified version of the matrix mpi vector-product and to introduce a
parallel version of the matrix-vector product for the plain lanczos too (used for GF).
In addtion the building up of the Hamiltonian now (ed_geth) needs to explicitly
construct hermitian-conjugate parts of the Hamiltonian rather then obtaining them
by symmetry, in order to respect locality of the rows.

note: the products of operators needs to be normal ordered so that c-operators apply BEFORE cdg-operators.

hint: it should be possible to clean out the code by simplifying a little the definition of the matrix vector products
so to have same routines name, with same arguments!, but different behavior exploiting pre-compilation.

note2: it would be interesting to implement the nup-ndw scheme for the Hilbert space construction, while keeping
the Hamiltonian structure identical (this is a trick just for the vectors).
Merge branch 'devel'

Conflicts:
	Makefile
UPDATE: fit of the G_0(iw) added.

The flag cg_scheme has been added to select which function to fit (delta for \Delta function,
weiss for G_0). The fit scheme weiss DOES NOT rely on analytic calculation of the gradient.
While this is in princple easy to do, my implementation was kind of unstable so I decided to
rely on numerical differentiation.

Actually I extended the fmin_cg routine in SCIFOR so to behave like in scipy: it the gradient
function is optional now. If not provided is evaluated numerically.

Tests for the Hubbard model give good results, though performed for small number of Bath sites.
The Matsubara functions are almost identical, the spectral function have some differences probably
caused by the small cluster size and the different fit scheme.

Massimo noted that it is in principle more meaningful to fit the Green's function G_0, though
the \Delta function can be more sensible in some circumstances.
For the time being I will stick to \Delta fit scheme, unless the fit becomes unstable, such as
near band insulators.
Merge branch 'devel'

Conflicts:
	ARPACK_LANCZOS.f90
	ED_AUX_FUNX.f90
	ED_CHI2FIT.f90
	ED_DIAG.f90
	ED_GREENS_FUNCTIONS.f90
	ED_HAMILTONIAN.f90
	ED_OBSERVABLES.f90
	MATRIX_SPARSE.f90
	Makefile
	ed_HtimesV_direct.f90
	ed_HtimesV_direct_mpi.f90
	lanczos_arpack_c.f90
Merge branch 'devel'

Conflicts:
	ED_BATH.f90
	ED_CHI2FIT.f90
	ED_HAMILTONIAN.f90
Merge branch 'devel'

Conflicts:
	ED_CHI2FIT.f90
bugs fixed:
- now evaluates spin-spin <sz_a,sz_b> rather than moment-moment <m_a,m_b> correlation
function.
- found a bug in the printing routine for the irreducible bath chi^2 fit:
always printed G0 field rather than G0 or \Delta depending on the value of
cg_scheme.
Merge branch 'devel'
bugs fixed:
- now evaluates spin-spin <sz_a,sz_b> rather than moment-moment <m_a,m_b> correlation
function.
- found a bug in the printing routine for the irreducible bath chi^2 fit:
always printed G0 field rather than G0 or \Delta depending on the value of
cg_scheme.
- new bath initialization: generate a smart bath in the range -Hband:Hband (input of
ed_init_solver, default=2) and optionally read bath from file so that
restarting from different bath levels is possible. bath center is at 1.d-4.
Merge branch 'devel'
update.
- evaluates spin-spin and density-density correlations <n_a,n_b>
- introduced numbering in the columns.info file from greater readibility.
bugs fixed:
- now evaluates spin-spin <sz_a,sz_b> rather than moment-moment <m_a,m_b> correlation
function.
- found a bug in the printing routine for the irreducible bath chi^2 fit:
always printed G0 field rather than G0 or \Delta depending on the value of
cg_scheme.
- new bath initialization: generate a smart bath in the range -Hband:Hband (input of
ed_init_solver, default=2) and optionally read bath from file so that
restarting from different bath levels is possible. bath center is at 1.d-4.
Merge branch 'devel'

Conflicts:
	ED_AUX_FUNX.f90
	ED_OBSERVABLES.f90