24 #include "lapack_diag.hpp" 26 #include "mltplyCommon.hpp" 27 #include "CalcTime.hpp" 28 #include "common/setmemory.hpp" 29 #include "CalcSpectrum.hpp" 41 std::complex<double> **dcSpectrum,
42 std::complex<double> *dcomega,
43 std::complex<double> **v1Org
46 int idim, jdim, iomega, idim_max_int, idcSpectrum;
47 std::complex<double> **vR, **vL, vRv, vLv, *vLvvRv;
54 vR = cd_2d_allocate(idim_max_int, 1);
55 vL = cd_2d_allocate(idim_max_int, 1);
56 vLvvRv = cd_1d_allocate(idim_max_int);
77 for (idcSpectrum = 0; idcSpectrum < NdcSpectrum; idcSpectrum++) {
81 for (idim = 0; idim < idim_max_int; idim++) {
84 for (jdim = 0; jdim < idim_max_int; jdim++) {
85 vRv += conj(
v1[jdim][idim]) * vR[jdim][1];
86 vLv += conj(
v1[jdim][idim]) * vL[jdim][1];
88 vLvvRv[idim] = conj(vLv) * vRv;
100 for (iomega = 0; iomega < Nomega; iomega++) {
101 dcSpectrum[iomega][idcSpectrum] = 0.0;
102 for (idim = 0; idim < idim_max_int; idim++) {
103 dcSpectrum[iomega][idcSpectrum] += vLvvRv[idim] / (dcomega[iomega] - X->
Bind.
Phys.
energy[idim]);
108 free_cd_2d_allocate(vL);
109 free_cd_2d_allocate(vR);
110 free_cd_1d_allocate(vLvvRv);
int CalcSpectrumByFullDiag(struct EDMainCalStruct *X, int Nomega, int NdcSpectrum, std::complex< double > **dcSpectrum, std::complex< double > *dcomega, std::complex< double > **v1Org)
Compute the Green function with the Lehmann representation and FD .
int GetExcitedState(struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, int iEx)
Parent function to calculate the excited state.
std::complex< double > ** v0
int mltply(struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1)
Parent function of multiplying the wavefunction by the Hamiltonian. . First, the calculation of diago...
struct PhysList Phys
Physical quantities.
std::complex< double > ** v1
void zclear(long int n, std::complex< double > *x)
clear std::complex<double> array.
int lapack_diag(struct BindStruct *X)
performing full diagonalization using lapack
double * energy
Expectation value of the total energy.
void StopTimer(int n)
function for calculating elapse time [elapse time=StartTimer-StopTimer]
struct CheckList Check
Size of the Hilbert space.
long int idim_max
The dimension of the Hilbert space of this process.
struct BindStruct Bind
Binded struct.
void StartTimer(int n)
function for initializing elapse time [start]