19 #include <bitcalc.hpp> 20 #include "xsetmem.hpp" 21 #include "wrapperMPI.hpp" 22 #include "mltplyCommon.hpp" 23 #include "mltplySpinCore.hpp" 99 std::complex<double> tmp_V
170 A_ibit_tmp = ((
list_1[j] & is1_spin) / is1_spin) ^ (1 - sigma1);
188 A_ibit_tmp = ((list_1_j & is1_spin) / is1_spin) ^ (1 - sigma1);
204 long int list_1_j, ibit_tmp_1;
208 ibit_tmp_1 = list_1_j & is1_spin;
209 if (ibit_tmp_1 == 0 && sigma2 == 0) {
210 *tmp_off = list_1_j + is1_spin;
213 else if (ibit_tmp_1 != 0 && sigma2 == 1) {
214 *tmp_off = list_1_j - is1_spin;
242 long int iexchg, off;
246 long int ibit_tmp_A, ibit_tmp_B;
248 ibit_tmp_A = ((
list_1[j] & isA_up) / isA_up);
249 ibit_tmp_B = ((
list_1[j] & isB_up) / isB_up);
250 if (ibit_tmp_A == sigmaA && ibit_tmp_B == sigmaB) {
251 iexchg =
list_1[j] ^ (isA_up + isB_up);
268 int nstate, std::complex<double> **tmp_v0,
269 std::complex<double> **tmp_v1,
283 ibit_tmp = (
list_1[j] & is_up);
284 if (ibit_tmp == 0 || ibit_tmp == is_up) {
288 iexchg =
list_1[j] ^ is_up;
291 zaxpy_(&nstate, &tmp_J, &tmp_v1[j][0], &one, &tmp_v0[off][0], &one);
301 int nstate, std::complex<double> **tmp_v0,
302 std::complex<double> **tmp_v1,
308 long int list_1_j, list_1_off;
314 ibit_tmp = (list_1_j & is_up);
315 if (ibit_tmp == 0 || ibit_tmp == is_up) {
319 list_1_off = list_1_j ^ is_up;
320 *tmp_off = list_1_off;
321 zaxpy_(&nstate, &tmp_J, &tmp_v1[j][0], &one, &tmp_v0[list_1_off + 1][0], &one);
331 int nstate, std::complex<double> **tmp_v0,
332 std::complex<double> **tmp_v1,
340 long int list_1_j = j - 1;
343 ibit_tmp = (list_1_j & is_up);
344 if (ibit_tmp == 0 || ibit_tmp == is_up) {
345 list_1_off = list_1_j ^ is_up;
346 *tmp_off = list_1_off;
347 zaxpy_(&nstate, &tmp_J, &tmp_v1[j][0], &one, &tmp_v0[list_1_off + 1][0], &one);
363 std::complex<double> tmp_V,
364 int nstate, std::complex<double> **tmp_v0,
365 std::complex<double> **tmp_v1
368 std::complex<double> dmv;
373 dmv = (std::complex<double>)tmp_sgn * tmp_V;
374 zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[j][0], &one);
392 std::complex<double> tmp_V,
393 int nstate, std::complex<double> **tmp_v0,
394 std::complex<double> **tmp_v1
397 std::complex<double> dmv = 0;
403 dmv = (std::complex<double>)tmp_sgn * tmp_V;
404 zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[j][0], &one);
419 std::complex<double> tmp_V,
420 int nstate, std::complex<double> **tmp_v0,
421 std::complex<double> **tmp_v1,
425 std::complex<double> dmv;
431 dmv = (std::complex<double>)tmp_sgn * tmp_V;
432 zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[*tmp_off + 1][0], &one);
448 std::complex<double> tmp_V,
449 int nstate, std::complex<double> **tmp_v0,
450 std::complex<double> **tmp_v1,
454 std::complex<double> dmv;
460 dmv = (std::complex<double>)tmp_sgn * tmp_V;
461 zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[*tmp_off + 1][0], &one);
477 std::complex<double> tmp_V,
478 int nstate, std::complex<double> **tmp_v0,
479 std::complex<double> **tmp_v1,
484 std::complex<double> dmv;
488 tmp_sgn *=
X_SpinGC_CisAit((tmp_off_1 + 1), isA_up, org_sigma2, tmp_off_2);
490 dmv = (std::complex<double>)tmp_sgn * tmp_V;
491 zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[*tmp_off_2 + 1][0], &one);
struct DefineList Def
Definision of system (Hamiltonian) etc.
void GC_child_CisAisCisAis_spin_element(long int j, long int isA_up, long int isB_up, long int org_sigma2, long int org_sigma4, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1)
Compute term of grandcanonical spsin system.
long int is2_spin
Mask used in the bit oeration.
void GC_child_pairlift_spin_element(long int j, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, struct BindStruct *X, long int *tmp_off)
Multiply Hamiltonian of pairlift term of grandcanonical spin system.
int X_Spin_CisAis(long int j, long int is1_spin, long int sigma1)
Compute the spin state with bit mask is1_spin.
void GC_child_CisAisCitAiu_spin_element(long int j, long int org_sigma2, long int org_sigma4, long int isA_up, long int isB_up, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, long int *tmp_off)
Compute term of grandcanonical spsin system.
int ** ExchangeCoupling
[DefineList::NExchangeCoupling][2] Index of exchange term. malloc in setmem_def().
int X_child_exchange_spin_element(long int j, struct BindStruct *X, long int isA_up, long int isB_up, long int sigmaA, long int sigmaB, long int *tmp_off)
Compute index of final wavefunction associated to spin-exchange term.
int child_general_int_spin_GetInfo(struct BindStruct *X, long int isite1, long int isite2, long int sigma1, long int sigma2, long int sigma3, long int sigma4, std::complex< double > tmp_V)
Set parameters for the bit operation of spin-general interaction term.
long int is1_up
Mask used in the bit oeration.
int X_SpinGC_CisAis(long int j, long int is1_spin, long int sigma1)
Compute the grandcanonical spin state with bit mask is1_spin.
struct LargeList Large
Variables for Matrix-Vector product.
std::complex< double > tmp_J
Coupling constant.
int isite2
Is it realy used ???
long int is4_spin
Mask used in the bit oeration.
long int irght
Used for Ogata-Lin ???
int ** PairLiftCoupling
[DefineList::NPairHopping][2] Index of pair-lift term. malloc in setmem_def().
long int ilft
Used for Ogata-Lin ???
double * ParaExchangeCoupling
[DefineList::NExchangeCoupling] Coupling constant of exchange term. malloc in setmem_def().
double * ParaPairLiftCoupling
[DefineList::NPairHopping] Coupling constant of pair-lift term. malloc in setmem_def().
int GetOffComp(long int *_list_2_1, long int *_list_2_2, long int _ibit, const long int _irght, const long int _ilft, const long int _ihfbit, long int *_ioffComp)
function of getting off-diagonal component
long int ihfbit
Used for Ogata-Lin ???
int child_exchange_spin_GetInfo(int iExchange, struct BindStruct *X)
Set parameters for the bit operation of spin-exchange term.
int child_pairlift_spin_GetInfo(int iPairLift, struct BindStruct *X)
Set parameters for the bit operation of spin-pairlift term.
void GC_child_exchange_spin_element(long int j, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, struct BindStruct *X, long int *tmp_off)
Multiply Hamiltonian of exchange term of grandcanonical spin system.
void child_exchange_spin_element(long int j, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, struct BindStruct *X, long int *tmp_off)
Multiply Hamiltonian of exchange term of canonical spin system.
long int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
int X_SpinGC_CisAit(long int j, long int is1_spin, long int sigma2, long int *tmp_off)
Compute index of final wavefunction by term (grandcanonical).
void child_CisAisCisAis_spin_element(long int j, long int isA_up, long int isB_up, long int org_sigma2, long int org_sigma4, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1)
Compute term of canonical spsin system.
long int is3_spin
Mask used in the bit oeration.
long int is1_spin
Mask used in the bit oeration.
int X_Spin_CisAit(long int j, struct BindStruct *X, long int is1_spin, long int sigma2, long int *tmp_off)
Compute index of final wavefunction by term.
long int isA_spin
Mask used in the bit oeration.
void GC_child_CisAitCiuAiu_spin_element(long int j, long int org_sigma2, long int org_sigma4, long int isA_up, long int isB_up, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, long int *tmp_off)
Compute term of grandcanonical spsin system.
int isite1
Is it realy used ???
long int is2_up
Mask used in the bit oeration.
void GC_child_CisAitCiuAiv_spin_element(long int j, long int org_sigma2, long int org_sigma4, long int isA_up, long int isB_up, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, long int *tmp_off_2)
Compute term of grandcanonical spsin system.
std::complex< double > tmp_V
Coupling constant.