140 long int irght, ilft, ihfbit;
141 long int org_isite1, org_isite2, org_sigma1, org_sigma2;
142 long int tmp_off = 0;
144 std::complex<double> tmp_trans = 0, dmv;
146 int tmp_sgn, num1, one = 1;
148 long int is, Asum, Adiff;
149 long int ibitsite1, ibitsite2;
168 ibitsite1 = X->
Def.
OrgTpow[2 * org_isite1 - 2 + org_sigma1];
169 ibitsite2 = X->
Def.
OrgTpow[2 * org_isite2 - 2 + org_sigma2];
175 && org_sigma1 != org_sigma2) {
180 -tmp_trans, X, nstate, tmp_v0, tmp_v1);
185 if (org_isite1 < org_isite2) {
187 -tmp_trans, X, nstate, tmp_v0, tmp_v1);
191 -conj(tmp_trans), X, nstate, tmp_v0, tmp_v1);
195 #pragma omp parallel for default(none) shared(tmp_v0,tmp_v1,one,nstate) \ 196 firstprivate(i_max,tmp_trans,Asum,Adiff,ibitsite1,ibitsite2,X,list_1_org,list_1,myrank) \ 197 private(j,tmp_sgn,tmp_off,dmv) 198 for (j = 1; j <= i_max; j++) {
200 dmv = tmp_trans * (std::complex<double>)tmp_sgn;
201 zaxpy_(&nstate, &dmv, tmp_v1[j], &one, tmp_v0[tmp_off], &one);
208 if (org_isite1 == org_isite2 && org_sigma1 == org_sigma2) {
209 is = X->
Def.
Tpow[2 * org_isite1 - 2 + org_sigma1];
210 ibit = (
long int)
myrank & is;
214 #pragma omp parallel for default(none) shared(tmp_v0, tmp_v1,one,dmv,nstate) \ 215 firstprivate(i_max, tmp_trans) private(j) 216 for (j = 1; j <= i_max; j++) {
217 zaxpy_(&nstate, &dmv, tmp_v1[j], &one, tmp_v0[j], &one);
223 zaxpy_long(i_max*nstate, tmp_trans, &tmp_v1[1][0], &tmp_v0[1][0]);
229 -tmp_trans, X, nstate, tmp_v0, tmp_v1);
233 if (org_isite1 < org_isite2) {
235 -tmp_trans, X, nstate, tmp_v0, tmp_v1);
239 -conj(tmp_trans), X, nstate, tmp_v0, tmp_v1);
246 if (org_isite1 == org_isite2 && org_sigma1 == org_sigma2) {
247 is = X->
Def.
Tpow[2 * org_isite1 - 2 + org_sigma1];
249 #pragma omp parallel for default(none) shared(list_1,nstate,tmp_v0,tmp_v1,one) \ 250 firstprivate(i_max,is,tmp_trans) private(num1,ibit,dmv) 251 for (j = 1; j <= i_max; j++) {
253 num1 = (1 - ibit / is);
254 dmv = -tmp_trans * (std::complex<double>)num1;
255 zaxpy_(&nstate, &dmv, tmp_v1[j], &one, tmp_v0[j], &one);
259 #pragma omp parallel for default(none) shared(list_1,nstate,tmp_v0,tmp_v1,one) \ 260 firstprivate(i_max,is,tmp_trans) private(num1,ibit,dmv) 261 for (j = 1; j <= i_max; j++) {
264 dmv = tmp_trans * (std::complex<double>)num1;
265 zaxpy_(&nstate, &dmv, tmp_v1[j], &one, tmp_v0[j], &one);
struct DefineList Def
Definision of system (Hamiltonian) etc.
int GetSplitBitByModel(const int Nsite, const int iCalcModel, long int *irght, long int *ilft, long int *ihfbit)
function of splitting original bit into right and left spaces.
void child_general_hopp(int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, struct BindStruct *X, std::complex< double > trans)
Compute hopping (canonical)
long int * OrgTpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
int iFlagListModified
When the Hilbert space of excited state differs from the original one.
int Nsite
Number of sites in the INTRA process region.
void zaxpy_long(long int n, std::complex< double > a, std::complex< double > *x, std::complex< double > *y)
Wrapper of zaxpy.
long int idim_maxOrg
The local Hilbert-space dimention of original state for the spectrum.
struct LargeList Large
Variables for Matrix-Vector product.
void X_child_CisAjt_MPIdouble(int org_isite1, int org_ispin1, int org_isite2, int org_ispin2, std::complex< double > tmp_trans, struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1)
Hopping term in Hubbard + MPI When both site1 and site2 are in the inter process region.
int * NPairExcitationOperator
Number of pair excitaion operator for spectrum.
int mode
multiply or expectation value.
long int irght
Used for Ogata-Lin ???
std::complex< double > ** ParaPairExcitationOperator
[DefineList::NPairExcitationOperator] Coefficient of pair excitaion operator for spectrum. malloc in setmem_def().
long int A_spin
Mask used in the bit oeration.
long int ilft
Used for Ogata-Lin ???
void X_child_general_hopp_MPIsingle(int org_isite1, int org_ispin1, int org_isite2, int org_ispin2, std::complex< double > tmp_trans, struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1)
Hopping term in Hubbard (Kondo) + Canonical ensemble When only site2 is in the inter process region...
long int ihfbit
Used for Ogata-Lin ???
long int i_max
Length of eigenvector.
int myrank
Process ID, defined in InitializeMPI()
int X_CisAjt(long int list_1_j, struct BindStruct *X, long int is1_spin, long int is2_spin, long int sum_spin, long int diff_spin, long int *tmp_off)
Compute index of wavefunction of final state.
long int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
int child_general_hopp_GetInfo(struct BindStruct *X, long int isite1, long int isite2, long int sigma1, long int sigma2)
Compute mask for bit operation of hopping term.
int iCalcModel
Switch for model. 0:Hubbard, 1:Spin, 2:Kondo, 3:HubbardGC, 4:SpinGC, 5:KondoGC, 6:HubbardNConserved.
long int isA_spin
Mask used in the bit oeration.
void X_child_CisAjt_MPIsingle(int org_isite1, int org_ispin1, int org_isite2, int org_ispin2, std::complex< double > tmp_trans, struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1)
Hopping term in Hubbard (Kondo) + Canonical ensemble When only site2 is in the inter process region...
struct CheckList Check
Size of the Hilbert space.
void X_child_general_hopp_MPIdouble(int org_isite1, int org_ispin1, int org_isite2, int org_ispin2, std::complex< double > tmp_trans, struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1)
Hopping term in Hubbard (Kondo) + Canonical ensemble When both site1 and site2 are in the inter proce...
int *** PairExcitationOperator
[DefineList::NPairExcitationOperator][5] Indices of pair excitaion operator for spectrum. malloc in setmem_def().