20 #include "mltplySpin.h" 21 #include "mltplyHubbard.h" 22 #include "wrapperMPI.h" 24 #include "mltplyCommon.h" 25 #include "diagonalcalc.h" 57 long unsigned int j=0;
58 long unsigned int irght=0;
59 long unsigned int ilft=0;
60 long unsigned int ihfbit=0;
62 double complex dam_pr;
64 long unsigned int i_max;
67 i_max =
X->Check.idim_max;
72 if (
X->Def.iFlgGeneralSpin ==
FALSE) {
78 if(
X->Def.iCalcModel==Spin){
90 X->Large.i_max = i_max;
91 X->Large.irght = irght;
93 X->Large.ihfbit = ihfbit;
94 X->Large.mode = M_MLTPLY;
97 #pragma omp parallel for default(none) reduction(+:dam_pr) firstprivate(i_max) shared(tmp_v0, tmp_v1, list_Diagonal) 98 for (j = 1; j <= i_max; j++) {
102 X->Large.prdct += dam_pr;
106 switch (
X->Def.iCalcModel) {
int mltply(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Parent function of multiplying the wavefunction by the Hamiltonian. . First, the calculation of diago...
void StartTimer(int n)
function for initializing elapse time [start]
int GetSplitBitForGeneralSpin(const int Nsite, long unsigned int *ihfbit, const long int *SiteToBit)
function of getting right, left and half bits corresponding to a original space.
double complex SumMPI_dc(double complex norm)
MPI wrapper function to obtain sum of Double complex across processes.
void StopTimer(int n)
function for calculating elapse time [elapse time=StartTimer-StopTimer]
int mltplySpinGC(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Driver function for Spin hamiltonian.
int GetSplitBitByModel(const int Nsite, const int iCalcModel, long unsigned int *irght, long unsigned int *ilft, long unsigned int *ihfbit)
function of splitting original bit into right and left spaces.
int mltplyHubbardGC(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
perform Hamiltonian vector product for (extended) Hubbard type model (Grandcanonical).
int diagonalcalcForTE(const int _istep, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
int mltplySpin(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Driver function for Spin hamiltonian.
int mltplyHubbard(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
perform Hamiltonian vector product for (extended) Hubbard type model.