HΦ  3.2.0
mltplySpin.c File Reference

Functions for spin Hamiltonian. More...

#include <bitcalc.h>
#include "common/setmemory.h"
#include "mltplyCommon.h"
#include "mltplySpin.h"
#include "CalcTime.h"
#include "mltplySpinCore.h"
#include "mltplyHubbardCore.h"
#include "mltplyMPISpin.h"
#include "mltplyMPISpinCore.h"
#include "mltplyMPIBoost.h"
+ Include dependency graph for mltplySpin.c:

Go to the source code of this file.

Functions

int mltplySpin (struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
 Driver function for Spin hamiltonian. More...
 
int mltplyHalfSpin (struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
 Driver function for Spin 1/2 hamiltonian. More...
 
int mltplyGeneralSpin (struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
 Driver function for General Spin hamiltonian. More...
 
int mltplySpinGC (struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
 Driver function for Spin hamiltonian. More...
 
int mltplyHalfSpinGC (struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
 Driver function for Spin 1/2 Hamiltonian (grandcanonical) More...
 
int mltplyGeneralSpinGC (struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
 Driver function for General Spin hamiltonian (grandcanonical) More...
 
int mltplySpinGCBoost (struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
 Driver function for Spin hamiltonian (Boost) More...
 
double complex child_exchange_spin (double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X)
 Compute exchange term of spin Hamiltonian (canonical) More...
 
double complex GC_child_exchange_spin (double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X)
 Compute exchange term of spin Hamiltonian (grandcanonical) More...
 
double complex GC_child_pairlift_spin (double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X)
 Compute pair-lift term of spin Hamiltonian (grandcanonical) More...
 
double complex child_general_int_spin (double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X)
 Compute Inter-All term of spin Hamiltonian (canonical) More...
 
double complex GC_child_general_int_spin (double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X)
 Compute Inter-All term of spin Hamiltonian (grandcanonical) More...
 

Detailed Description

Functions for spin Hamiltonian.

Hub routines

Get info Canonical Grandcanonical
Exchange child_exchange_spin_GetInfo child_exchange_spin, child_exchange_spin_element GC_child_exchange_spin, GC_child_exchange_spin_element
Pair lift child_pairlift_spin_GetInfo GC_child_pairlift_spin, GC_child_pairlift_spin_element
General int. child_general_int_spin_GetInfo child_general_int_spin, child_general_int_spin_MPIsingle X_child_general_int_spin_MPIsingle, child_general_int_spin_MPIdouble, X_child_general_int_spin_MPIdouble GC_child_general_int_spin, GC_child_general_int_spin_MPIsingle, GC_child_general_int_spin_MPIdouble
General int for 1/2 spin child_general_int_spin_GetInfo child_general_int_spin, child_general_int_spin_MPIsingle X_child_general_int_spin_MPIsingle, child_general_int_spin_MPIdouble, X_child_general_int_spin_MPIdouble GC_child_general_int_spin, GC_child_general_int_spin_MPIsingle, GC_child_general_int_spin_MPIdouble
General int for general spin child_general_int_GeneralSpin_MPIsingle, child_general_int_GeneralSpin_MPIdouble GC_child_general_int_GeneralSpin_MPIsingle, GC_child_general_int_GeneralSpin_MPIdouble

General on-site term

1/2 spin 1/2 spin 1/2 spin 1/2 spin General spin General spin
Canonical Canonical Grand canonical Grand canonical Canonical Grand canonical
In process Across process In process Across process Across process Across process
\(c_{i s}^\dagger c_{i s}\) X_Spin_CisAis ::X_child_CisAis_spin_MPIdouble X_SpinGC_CisAis X_GC_child_CisAis_spin_MPIdouble ::X_child_CisAis_GeneralSpin_MPIdouble X_GC_child_CisAis_GeneralSpin_MPIdouble
\(c_{i s}^\dagger c_{i t}\) X_Spin_CisAit X_child_CisAit_spin_MPIdouble X_SpinGC_CisAit X_GC_child_CisAit_spin_MPIdouble X_child_CisAit_GeneralSpin_MPIdouble X_GC_child_CisAit_GeneralSpin_MPIdouble
\(c_{i s}^\dagger c_{i s} c_{i s}^\dagger c_{i s}\) child_CisAisCisAis_spin_element GC_child_CisAisCisAis_spin_element
\(c_{i s}^\dagger c_{i s} c_{i t}^\dagger c_{i u}\) GC_child_CisAisCitAiu_spin_element
\(c_{i s}^\dagger c_{i t} c_{i u}^\dagger c_{i u}\) GC_child_CisAitCiuAiu_spin_element
\(c_{i s}^\dagger c_{i t} c_{i u}^\dagger c_{i v}\) GC_child_CisAitCiuAiv_spin_element GC_child_CisAitCiuAiv_spin_MPIsingle, X_GC_child_CisAitCiuAiv_spin_MPIsingle, GC_child_CisAitCiuAiv_spin_MPIdouble, X_GC_child_CisAitCiuAiv_spin_MPIdouble

Definition in file mltplySpin.c.

Function Documentation

◆ child_exchange_spin()

double complex child_exchange_spin ( double complex *  tmp_v0,
double complex *  tmp_v1,
struct BindStruct X 
)

Compute exchange term of spin Hamiltonian (canonical)

Returns
Fragment of \(\langle v_1|{\hat H}|v_1\rangle\)
Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in,out]tmp_v0Result vector
[in]tmp_v1Input producted vector
[in,out]X

Definition at line 870 of file mltplySpin.c.

References child_exchange_spin_element(), LargeList::i_max, and BindStruct::Large.

Referenced by mltplyHalfSpin().

874  {
875  long unsigned int j;
876  long unsigned int i_max = X->Large.i_max;
877  long unsigned int off = 0;
878  double complex dam_pr = 0;
879 
880 #pragma omp parallel for default(none) reduction(+:dam_pr) \
881 firstprivate(i_max, X,off) private(j) shared(tmp_v0, tmp_v1)
882  for (j = 1; j <= i_max; j++)
883  dam_pr += child_exchange_spin_element(j, tmp_v0, tmp_v1, X, &off);
884  return dam_pr;
885 }/*double complex child_exchange_spin*/
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.h:412
long int i_max
Length of eigenvector.
Definition: struct.h:317
double complex child_exchange_spin_element(long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off)
Multiply Hamiltonian of exchange term of canonical spin system.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ child_general_int_spin()

double complex child_general_int_spin ( double complex *  tmp_v0,
double complex *  tmp_v1,
struct BindStruct X 
)

Compute Inter-All term of spin Hamiltonian (canonical)

Returns
Fragment of \(\langle v_1|{\hat H}|v_1\rangle\)
Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in,out]tmp_v0Result vector
[in]tmp_v1Input producted vector
[in,out]X

Definition at line 936 of file mltplySpin.c.

References LargeList::i_max, LargeList::is1_up, LargeList::is2_spin, LargeList::is2_up, LargeList::is4_spin, BindStruct::Large, LargeList::tmp_V, and X_child_exchange_spin_element().

Referenced by mltplyHalfSpin().

940  {
941  double complex dam_pr, tmp_V, dmv;
942  long unsigned int j, i_max;
943  long unsigned int org_sigma2, org_sigma4;
944  long unsigned int isA_up, isB_up;
945  long unsigned int tmp_off = 0;
946  int tmp_sgn;
947 
948  i_max = X->Large.i_max;
949  org_sigma2 = X->Large.is2_spin;
950  org_sigma4 = X->Large.is4_spin;
951  tmp_V = X->Large.tmp_V;
952  isA_up = X->Large.is1_up;
953  isB_up = X->Large.is2_up;
954  dam_pr = 0.0;
955 
956 #pragma omp parallel for default(none) reduction(+:dam_pr) private(j, tmp_sgn, dmv) \
957 firstprivate(i_max,X,isA_up,isB_up,org_sigma2,org_sigma4,tmp_off,tmp_V) shared(tmp_v1, tmp_v0)
958  for (j = 1; j <= i_max; j++) {
959  tmp_sgn = X_child_exchange_spin_element(j, X, isA_up, isB_up, org_sigma2, org_sigma4, &tmp_off);
960  if (tmp_sgn != 0) {
961  dmv = tmp_v1[j] * tmp_sgn * tmp_V;
962  tmp_v0[tmp_off] += dmv;
963  dam_pr += conj(tmp_v1[tmp_off]) * dmv;
964  }/*if (tmp_sgn != 0)*/
965  }/*for (j = 1; j <= i_max; j++)*/
966  return dam_pr;
967 }/*double complex child_general_int_spin*/
long unsigned int is2_up
Mask used in the bit oeration.
Definition: struct.h:327
long unsigned int is4_spin
Mask used in the bit oeration.
Definition: struct.h:335
int X_child_exchange_spin_element(long unsigned int j, struct BindStruct *X, long unsigned int isA_up, long unsigned int isB_up, long unsigned int sigmaA, long unsigned int sigmaB, long unsigned int *tmp_off)
Compute index of final wavefunction associated to spin-exchange term.
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.h:412
long unsigned int is1_up
Mask used in the bit oeration.
Definition: struct.h:325
long int i_max
Length of eigenvector.
Definition: struct.h:317
long unsigned int is2_spin
Mask used in the bit oeration.
Definition: struct.h:333
double complex tmp_V
Coupling constant.
Definition: struct.h:348
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GC_child_exchange_spin()

double complex GC_child_exchange_spin ( double complex *  tmp_v0,
double complex *  tmp_v1,
struct BindStruct X 
)

Compute exchange term of spin Hamiltonian (grandcanonical)

Returns
Fragment of \(\langle v_1|{\hat H}|v_1\rangle\)
Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in,out]tmp_v0Result vector
[in]tmp_v1Input producted vector
[in,out]X

Definition at line 892 of file mltplySpin.c.

References GC_child_exchange_spin_element(), LargeList::i_max, and BindStruct::Large.

Referenced by mltplyHalfSpinGC().

896  {
897  long unsigned int j;
898  long unsigned int i_max = X->Large.i_max;
899  long unsigned int off = 0;
900  double complex dam_pr = 0;
901 
902 #pragma omp parallel for default(none) reduction(+:dam_pr) \
903 firstprivate(i_max, X,off) private(j) shared(tmp_v0, tmp_v1)
904  for (j = 1; j <= i_max; j++)
905  dam_pr += GC_child_exchange_spin_element(j, tmp_v0, tmp_v1, X, &off);
906  return dam_pr;
907 }/*double complex GC_child_exchange_spin*/
double complex GC_child_exchange_spin_element(long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off)
Multiply Hamiltonian of exchange term of grandcanonical spin system.
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.h:412
long int i_max
Length of eigenvector.
Definition: struct.h:317
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GC_child_general_int_spin()

double complex GC_child_general_int_spin ( double complex *  tmp_v0,
double complex *  tmp_v1,
struct BindStruct X 
)

Compute Inter-All term of spin Hamiltonian (grandcanonical)

Returns
Fragment of \(\langle v_1|{\hat H}|v_1\rangle\)
Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in,out]tmp_v0Result vector
[in]tmp_v1Input producted vector
[in,out]X

Definition at line 974 of file mltplySpin.c.

References BindStruct::Def, GC_child_CisAisCisAis_spin_element(), GC_child_CisAisCitAiu_spin_element(), GC_child_CisAitCiuAiu_spin_element(), GC_child_CisAitCiuAiv_spin_element(), LargeList::i_max, LargeList::is1_spin, LargeList::is2_spin, LargeList::is3_spin, LargeList::is4_spin, LargeList::isite1, LargeList::isite2, BindStruct::Large, LargeList::tmp_V, and DefineList::Tpow.

Referenced by mltplyHalfSpinGC().

978  {
979  double complex dam_pr, tmp_V;
980  long unsigned int j, i_max;
981  long unsigned int org_isite1, org_isite2;
982  long unsigned int org_sigma1, org_sigma2, org_sigma3, org_sigma4;
983  long unsigned int isA_up, isB_up;
984  long unsigned int tmp_off = 0;
985 
986  i_max = X->Large.i_max;
987  org_isite1 = X->Large.isite1;
988  org_isite2 = X->Large.isite2;
989  org_sigma1 = X->Large.is1_spin;
990  org_sigma2 = X->Large.is2_spin;
991  org_sigma3 = X->Large.is3_spin;
992  org_sigma4 = X->Large.is4_spin;
993  tmp_V = X->Large.tmp_V;
994  dam_pr = 0.0;
995  isA_up = X->Def.Tpow[org_isite1 - 1];
996  isB_up = X->Def.Tpow[org_isite2 - 1];
997 
998 #pragma omp parallel default(none) reduction(+:dam_pr) \
999 private(j) shared(tmp_v0, tmp_v1) \
1000 firstprivate(i_max,X,isA_up,isB_up,org_sigma1,org_sigma2,org_sigma3,org_sigma4,tmp_off, tmp_V)
1001  {
1002  if (org_sigma1 == org_sigma2 && org_sigma3 == org_sigma4) { //diagonal
1003 #pragma omp for
1004  for (j = 1; j <= i_max; j++)
1006  j, isA_up, isB_up, org_sigma2, org_sigma4, tmp_V, tmp_v0, tmp_v1, X);
1007  }
1008  else if (org_sigma1 == org_sigma2 && org_sigma3 != org_sigma4) {
1009 #pragma omp for
1010  for (j = 1; j <= i_max; j++)
1012  j, org_sigma2, org_sigma4, isA_up, isB_up, tmp_V, tmp_v0, tmp_v1, X, &tmp_off);
1013  }
1014  else if (org_sigma1 != org_sigma2 && org_sigma3 == org_sigma4) {
1015 #pragma omp for
1016  for (j = 1; j <= i_max; j++)
1018  j, org_sigma2, org_sigma4, isA_up, isB_up, tmp_V, tmp_v0, tmp_v1, X, &tmp_off);
1019  }
1020  else if (org_sigma1 != org_sigma2 && org_sigma3 != org_sigma4) {
1021 #pragma omp for
1022  for (j = 1; j <= i_max; j++)
1024  j, org_sigma2, org_sigma4, isA_up, isB_up, tmp_V, tmp_v0, tmp_v1, X, &tmp_off);
1025  }
1026  }/*End of parallel region*/
1027  return dam_pr;
1028 }/*double complex GC_child_general_int_spin*/
struct DefineList Def
Definision of system (Hamiltonian) etc.
Definition: struct.h:410
double complex GC_child_CisAitCiuAiu_spin_element(long unsigned int j, long unsigned int org_sigma2, long unsigned int org_sigma4, long unsigned int isA_up, long unsigned int isB_up, double complex tmp_V, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off)
Compute term of grandcanonical spsin system.
double complex GC_child_CisAisCitAiu_spin_element(long unsigned int j, long unsigned int org_sigma2, long unsigned int org_sigma4, long unsigned int isA_up, long unsigned int isB_up, double complex tmp_V, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off)
Compute term of grandcanonical spsin system.
long unsigned int is4_spin
Mask used in the bit oeration.
Definition: struct.h:335
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.h:412
long unsigned int is1_spin
Mask used in the bit oeration.
Definition: struct.h:332
double complex GC_child_CisAitCiuAiv_spin_element(long unsigned int j, long unsigned int org_sigma2, long unsigned int org_sigma4, long unsigned int isA_up, long unsigned int isB_up, double complex tmp_V, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off_2)
Compute term of grandcanonical spsin system.
int isite2
Is it realy used ???
Definition: struct.h:337
long unsigned int is3_spin
Mask used in the bit oeration.
Definition: struct.h:334
double complex GC_child_CisAisCisAis_spin_element(long unsigned int j, long unsigned int isA_up, long unsigned int isB_up, long unsigned int org_sigma2, long unsigned int org_sigma4, double complex tmp_V, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X)
Compute term of grandcanonical spsin system.
long unsigned int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
Definition: struct.h:90
long int i_max
Length of eigenvector.
Definition: struct.h:317
long unsigned int is2_spin
Mask used in the bit oeration.
Definition: struct.h:333
double complex tmp_V
Coupling constant.
Definition: struct.h:348
int isite1
Is it realy used ???
Definition: struct.h:336
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GC_child_pairlift_spin()

double complex GC_child_pairlift_spin ( double complex *  tmp_v0,
double complex *  tmp_v1,
struct BindStruct X 
)

Compute pair-lift term of spin Hamiltonian (grandcanonical)

Returns
Fragment of \(\langle v_1|{\hat H}|v_1\rangle\)
Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in,out]tmp_v0Result vector
[in]tmp_v1Input producted vector
[in,out]X

Definition at line 914 of file mltplySpin.c.

References GC_child_pairlift_spin_element(), LargeList::i_max, and BindStruct::Large.

Referenced by mltplyHalfSpinGC().

918  {
919  long int j;
920  long unsigned int i_max = X->Large.i_max;
921  long unsigned int off = 0;
922  double complex dam_pr = 0;
923 
924 #pragma omp parallel for default(none) reduction(+:dam_pr) \
925 firstprivate(i_max, X,off) private(j) shared(tmp_v0, tmp_v1)
926  for (j = 1; j <= i_max; j++)
927  dam_pr += GC_child_pairlift_spin_element(j, tmp_v0, tmp_v1, X, &off);
928  return dam_pr;
929 }/*double complex GC_child_pairlift_spin*/
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.h:412
long int i_max
Length of eigenvector.
Definition: struct.h:317
double complex GC_child_pairlift_spin_element(long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off)
Multiply Hamiltonian of pairlift term of grandcanonical spin system.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mltplyGeneralSpin()

int mltplyGeneralSpin ( struct BindStruct X,
double complex *  tmp_v0,
double complex *  tmp_v1 
)

Driver function for General Spin hamiltonian.

Returns
error code
Author
Kazuyoshi Yoshimi (The University of Tokyo)

Transfer absorbed in Diagonal term. InterAll

Parameters
[in,out]X
[in,out]tmp_v0Result vector
[in]tmp_v1Input producted vector

Definition at line 299 of file mltplySpin.c.

References BindStruct::Check, child_general_int_GeneralSpin_MPIdouble(), child_general_int_GeneralSpin_MPIsingle(), ConvertToList1GeneralSpin(), BindStruct::Def, GetOffCompGeneralSpin(), CheckList::idim_max, DefineList::InterAll_OffDiagonal, BindStruct::Large, list_1, LargeList::mode, DefineList::NInterAll_OffDiagonal, DefineList::Nsite, DefineList::ParaInterAll_OffDiagonal, LargeList::prdct, CheckList::sdim, DefineList::SiteToBit, StartTimer(), StopTimer(), DefineList::Tpow, and TRUE.

Referenced by mltplySpin().

303  {
304  long unsigned int j;
305  long unsigned int i;
306  long unsigned int off = 0;
307  long unsigned int tmp_off = 0;
308  long unsigned int tmp_off2 = 0;
309  long unsigned int ihfbit=0;
310  long unsigned int isite1, isite2, sigma1, sigma2;
311  long unsigned int sigma3, sigma4;
312 
313  double complex dam_pr;
314  long int tmp_sgn;
315  /*[s] For InterAll */
316  double complex tmp_V;
317  double complex dmv=0;
318  /*[e] For InterAll */
319 
320  long unsigned int i_max;
321  i_max = X->Check.idim_max;
322  int ihermite=0;
323  int idx=0;
324 
325  StartTimer(400);
330  StartTimer(410);
331  ihfbit =X->Check.sdim;
332  for (i = 0; i < X->Def.NInterAll_OffDiagonal; i += 2) {
333  if (X->Def.InterAll_OffDiagonal[i][0] + 1 > X->Def.Nsite &&
334  X->Def.InterAll_OffDiagonal[i][4] + 1 > X->Def.Nsite) {
335  StartTimer(411);
336  child_general_int_GeneralSpin_MPIdouble(i, X, tmp_v0, tmp_v1);
337  StopTimer(411);
338  }
339  else if (X->Def.InterAll_OffDiagonal[i][4] + 1 > X->Def.Nsite) {
340  StartTimer(412);
341  child_general_int_GeneralSpin_MPIsingle(i, X, tmp_v0, tmp_v1);
342  StopTimer(412);
343  }
344  else if (X->Def.InterAll_OffDiagonal[i][0] + 1 > X->Def.Nsite) {
345  StartTimer(412);
346  child_general_int_GeneralSpin_MPIsingle(i + 1, X, tmp_v0, tmp_v1);
347  StopTimer(412);
348  }
349  else {
350  StartTimer(413);
351  for (ihermite = 0; ihermite < 2; ihermite++) {
352  idx = i + ihermite;
353  isite1 = X->Def.InterAll_OffDiagonal[idx][0] + 1;
354  isite2 = X->Def.InterAll_OffDiagonal[idx][4] + 1;
355  sigma1 = X->Def.InterAll_OffDiagonal[idx][1];
356  sigma2 = X->Def.InterAll_OffDiagonal[idx][3];
357  sigma3 = X->Def.InterAll_OffDiagonal[idx][5];
358  sigma4 = X->Def.InterAll_OffDiagonal[idx][7];
359  tmp_V = X->Def.ParaInterAll_OffDiagonal[idx];
360  dam_pr = 0.0;
361 #pragma omp parallel for default(none) reduction(+:dam_pr) \
362  private(j, tmp_sgn, dmv, off, tmp_off, tmp_off2) \
363  firstprivate(i_max, isite1, isite2, sigma1, sigma2, sigma3, sigma4, X, tmp_V, ihfbit) \
364  shared(tmp_v0, tmp_v1, list_1, list_2_1, list_2_2)
365  for (j = 1; j <= i_max; j++) {
366  tmp_sgn = GetOffCompGeneralSpin(list_1[j], isite2, sigma4, sigma3, &tmp_off, X->Def.SiteToBit, X->Def.Tpow);
367  if (tmp_sgn == TRUE) {
368  tmp_sgn = GetOffCompGeneralSpin(tmp_off, isite1, sigma2, sigma1, &tmp_off2, X->Def.SiteToBit, X->Def.Tpow);
369  if (tmp_sgn == TRUE) {
370  ConvertToList1GeneralSpin(tmp_off2, ihfbit, &off);
371  dmv = tmp_v1[j] * tmp_V;
372  if (X->Large.mode == M_MLTPLY) { // for multply
373  tmp_v0[off] += dmv;
374  }
375  dam_pr += conj(tmp_v1[off]) * dmv;
376  }
377  }/*if (tmp_sgn == TRUE)*/
378  }/*for (j = 1; j <= i_max; j++)*/
379  X->Large.prdct += dam_pr;
380  }/*for (ihermite = 0; ihermite < 2; ihermite++)*/
381  StopTimer(413);
382  }
383  }/*for (i = 0; i < X->Def.NInterAll_OffDiagonal; i += 2)*/
384  StopTimer(410);
385  StopTimer(400);
386  return 0;
387 }/*int mltplyGeneralSpin*/
struct DefineList Def
Definision of system (Hamiltonian) etc.
Definition: struct.h:410
void StartTimer(int n)
function for initializing elapse time [start]
Definition: time.c:71
unsigned long int idim_max
The dimension of the Hilbert space of this process.
Definition: struct.h:303
void StopTimer(int n)
function for calculating elapse time [elapse time=StartTimer-StopTimer]
Definition: time.c:83
double complex prdct
The expectation value of the energy.
Definition: struct.h:314
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.h:412
int ConvertToList1GeneralSpin(const long unsigned int org_ibit, const long unsigned int ihlfbit, long unsigned int *_ilist1Comp)
function of converting component to list_1
Definition: bitcalc.c:285
double complex * ParaInterAll_OffDiagonal
[DefineList::NInterAll_OffDiagonal] Coupling constant of off-diagonal inter-all term. malloc in setmem_def().
Definition: struct.h:170
int mode
multiply or expectation value.
Definition: struct.h:330
#define TRUE
Definition: global.h:26
unsigned int NInterAll_OffDiagonal
Number of interall term (off-diagonal)
Definition: struct.h:165
unsigned long int sdim
Dimension for Ogata-Lin ???
Definition: struct.h:307
int ** InterAll_OffDiagonal
[DefineList::NinterAll_OffDiagonal][8] Interacted quartet
Definition: struct.h:161
void child_general_int_GeneralSpin_MPIdouble(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
General interaction term in the Spin model + GC When both site1 and site2 are in the inter process re...
unsigned int Nsite
Number of sites in the INTRA process region.
Definition: struct.h:56
long unsigned int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
Definition: struct.h:90
long unsigned int * list_1
Definition: global.h:47
long int * SiteToBit
[DefineList::NsiteMPI] Similar to DefineList::Tpow. For general spin.
Definition: struct.h:94
int GetOffCompGeneralSpin(const long unsigned int org_ibit, const int org_isite, const int org_ispin, const int off_ispin, long unsigned int *_ioffComp, const long int *SiteToBit, const long unsigned int *Tpow)
function of getting off-diagonal component for general spin
Definition: bitcalc.c:243
struct CheckList Check
Size of the Hilbert space.
Definition: struct.h:411
void child_general_int_GeneralSpin_MPIsingle(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
General interaction term in the Spin model + GC When both site1 and site2 are in the inter process re...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mltplyGeneralSpinGC()

int mltplyGeneralSpinGC ( struct BindStruct X,
double complex *  tmp_v0,
double complex *  tmp_v1 
)

Driver function for General Spin hamiltonian (grandcanonical)

Returns
error code
Author
Kazuyoshi Yoshimi (The University of Tokyo)

InterAll

Parameters
[in,out]X
[in,out]tmp_v0Result vector
[in]tmp_v1Input producted vector

Definition at line 625 of file mltplySpin.c.

References BitCheckGeneral(), BindStruct::Check, BindStruct::Def, DefineList::EDGeneralTransfer, DefineList::EDNTransfer, DefineList::EDParaGeneralTransfer, GC_child_general_int_GeneralSpin_MPIdouble(), GC_child_general_int_GeneralSpin_MPIsingle(), GetOffCompGeneralSpin(), CheckList::idim_max, DefineList::InterAll_OffDiagonal, BindStruct::Large, LargeList::mode, DefineList::NInterAll_OffDiagonal, DefineList::Nsite, DefineList::ParaInterAll_OffDiagonal, LargeList::prdct, DefineList::SiteToBit, StartTimer(), StopTimer(), DefineList::Tpow, TRUE, and X_GC_child_CisAit_GeneralSpin_MPIdouble().

Referenced by mltplySpinGC().

629  {
630  long unsigned int j;
631  long unsigned int i;
632  long unsigned int off = 0;
633  long unsigned int tmp_off = 0;
634  long unsigned int isite1, isite2, sigma1, sigma2;
635  long unsigned int sigma3, sigma4;
636  double complex dam_pr;
637  double complex tmp_trans;
638  long int tmp_sgn;
639  double num1 = 0;
640  /*[s] For InterAll */
641  double complex tmp_V;
642  double complex dmv=0;
643  /*[e] For InterAll */
644 
645  long unsigned int i_max;
646  i_max = X->Check.idim_max;
647 
648  int ihermite=0;
649  int idx=0;
650 
651  StartTimer(500);
652 
653  StartTimer(510);
654  for (i = 0; i < X->Def.EDNTransfer; i += 2) {
655  isite1 = X->Def.EDGeneralTransfer[i][0] + 1;
656  isite2 = X->Def.EDGeneralTransfer[i][2] + 1;
657  sigma1 = X->Def.EDGeneralTransfer[i][1];
658  sigma2 = X->Def.EDGeneralTransfer[i][3];
659  tmp_trans = -X->Def.EDParaGeneralTransfer[idx];
660  dam_pr = 0.0;
661  if (isite1 == isite2) {
662  if (sigma1 != sigma2) {
663  if (isite1 > X->Def.Nsite) {
665  isite1 - 1, sigma1, sigma2, tmp_trans, X, tmp_v0, tmp_v1);
666  X->Large.prdct += dam_pr;
667  }/*if (isite1 > X->Def.Nsite)*/
668  else {
669  for (ihermite = 0; ihermite<2; ihermite++) {
670  idx = i + ihermite;
671  isite1 = X->Def.EDGeneralTransfer[idx][0] + 1;
672  isite2 = X->Def.EDGeneralTransfer[idx][2] + 1;
673  sigma1 = X->Def.EDGeneralTransfer[idx][1];
674  sigma2 = X->Def.EDGeneralTransfer[idx][3];
675  tmp_trans = -X->Def.EDParaGeneralTransfer[idx];
676 
677  // transverse magnetic field
678  dam_pr = 0.0;
679 #pragma omp parallel for default(none) reduction(+:dam_pr) \
680 private(j, tmp_sgn, num1) firstprivate(i_max, isite1, sigma1, sigma2, X, off, tmp_trans) \
681 shared(tmp_v0, tmp_v1)
682  for (j = 1; j <= i_max; j++) {
683  num1 = GetOffCompGeneralSpin(
684  j - 1, isite1, sigma2, sigma1, &off, X->Def.SiteToBit, X->Def.Tpow);
685  if (num1 != 0) { // for multply
686  tmp_v0[off + 1] += tmp_v1[j] * tmp_trans;
687  dam_pr += conj(tmp_v1[off + 1]) * tmp_v1[j] * tmp_trans;
688  }/*if (num1 != 0)*/
689  }/*for (j = 1; j <= i_max; j++)*/
690  X->Large.prdct += dam_pr;
691  }/*for (ihermite = 0; ihermite<2; ihermite++)*/
692  }
693  }// sigma1 != sigma2
694  else{ // sigma1 = sigma2
695  fprintf(stderr, "Error: Transverse_Diagonal component must be absorbed !");
696  }
697  }//isite1 = isite2
698  else { // isite1 != isite2
699  // hopping is not allowed in localized spin system
700  return -1;
701  }
702  }/*for (i = 0; i < X->Def.EDNTransfer; i += 2)*/
703  StopTimer(510);
707  StartTimer(520);
708  for (i = 0; i< X->Def.NInterAll_OffDiagonal; i += 2) {
709  if (X->Def.InterAll_OffDiagonal[i][0] + 1 > X->Def.Nsite &&
710  X->Def.InterAll_OffDiagonal[i][4] + 1 > X->Def.Nsite) {
711  StartTimer(521);
712  GC_child_general_int_GeneralSpin_MPIdouble(i, X, tmp_v0, tmp_v1);
713  StopTimer(521);
714  }
715  else if (X->Def.InterAll_OffDiagonal[i][4] + 1 > X->Def.Nsite) {
716  StartTimer(522);
717  GC_child_general_int_GeneralSpin_MPIsingle(i, X, tmp_v0, tmp_v1);
718  StopTimer(522);
719  }
720  else if (X->Def.InterAll_OffDiagonal[i][0] + 1 > X->Def.Nsite) {
721  StartTimer(522);
722  GC_child_general_int_GeneralSpin_MPIsingle(i + 1, X, tmp_v0, tmp_v1);
723  StopTimer(522);
724  }
725  else {
726  StartTimer(523);
727  for (ihermite = 0; ihermite < 2; ihermite++) {
728  idx = i + ihermite;
729  isite1 = X->Def.InterAll_OffDiagonal[idx][0] + 1;
730  isite2 = X->Def.InterAll_OffDiagonal[idx][4] + 1;
731  sigma1 = X->Def.InterAll_OffDiagonal[idx][1];
732  sigma2 = X->Def.InterAll_OffDiagonal[idx][3];
733  sigma3 = X->Def.InterAll_OffDiagonal[idx][5];
734  sigma4 = X->Def.InterAll_OffDiagonal[idx][7];
735  tmp_V = X->Def.ParaInterAll_OffDiagonal[idx];
736 
737  dam_pr = 0.0;
738  if (sigma1 == sigma2) {
739  if (sigma3 == sigma4) {
740  fprintf(stderr, "InterAll_OffDiagonal component is illegal.\n");
741  return -1;
742  }/*if (sigma3 == sigma4)*/
743  else {
744  //sigma3=sigma4 term is considerd as a diagonal term.
745 #pragma omp parallel for default(none) reduction(+:dam_pr) \
746  private(j, tmp_sgn, dmv, off) \
747  firstprivate(i_max, isite1, isite2, sigma1, sigma3, sigma4, X, tmp_V) \
748  shared(tmp_v0, tmp_v1)
749  for (j = 1; j <= i_max; j++) {
750  tmp_sgn = GetOffCompGeneralSpin(
751  j - 1, isite2, sigma4, sigma3, &off, X->Def.SiteToBit, X->Def.Tpow);
752  if (tmp_sgn == TRUE) {
753  tmp_sgn = BitCheckGeneral(off, isite1, sigma1, X->Def.SiteToBit, X->Def.Tpow);
754  if (tmp_sgn == TRUE) {
755  dmv = tmp_v1[j] * tmp_V;
756  if (X->Large.mode == M_MLTPLY) { // for multply
757  tmp_v0[off + 1] += dmv;
758  }
759  dam_pr += conj(tmp_v1[off + 1]) * dmv;
760  }/*if (tmp_sgn == TRUE)*/
761  }/*if (tmp_sgn == TRUE)*/
762  }/*for (j = 1; j <= i_max; j++)*/
763  }
764  }/*if (sigma1 == sigma2)*/
765  else if (sigma3 == sigma4) {
766  //sigma1=sigma2 term is considerd as a diagonal term.
767 #pragma omp parallel for default(none) reduction(+:dam_pr) \
768  private(j, tmp_sgn, dmv, off, tmp_off) \
769  firstprivate(i_max, isite1, isite2, sigma1, sigma2, sigma3, sigma4, X, tmp_V) \
770  shared(tmp_v0, tmp_v1)
771  for (j = 1; j <= i_max; j++) {
772  tmp_sgn = BitCheckGeneral(j - 1, isite2, sigma3, X->Def.SiteToBit, X->Def.Tpow);
773  if (tmp_sgn == TRUE) {
774  tmp_sgn = GetOffCompGeneralSpin(
775  j - 1, isite1, sigma2, sigma1, &off, X->Def.SiteToBit, X->Def.Tpow);
776  if (tmp_sgn == TRUE) {
777  dmv = tmp_v1[j] * tmp_V;
778  if (X->Large.mode == M_MLTPLY) { // for multply
779  tmp_v0[off + 1] += dmv;
780  }
781  dam_pr += conj(tmp_v1[off + 1]) * dmv;
782  }/*if (tmp_sgn == TRUE)*/
783  }/*if (tmp_sgn == TRUE)*/
784  }/*for (j = 1; j <= i_max; j++)*/
785  }/*else if (sigma3 == sigma4)*/
786  else {
787 #pragma omp parallel for default(none) reduction(+:dam_pr) \
788  private(j, tmp_sgn, dmv, off, tmp_off) \
789  firstprivate(i_max, isite1, isite2, sigma1, sigma2, sigma3, sigma4, X, tmp_V) \
790  shared(tmp_v0, tmp_v1)
791  for (j = 1; j <= i_max; j++) {
792  tmp_sgn = GetOffCompGeneralSpin(
793  j - 1, isite2, sigma4, sigma3, &tmp_off, X->Def.SiteToBit, X->Def.Tpow);
794  if (tmp_sgn == TRUE) {
795  tmp_sgn = GetOffCompGeneralSpin(
796  tmp_off, isite1, sigma2, sigma1, &off, X->Def.SiteToBit, X->Def.Tpow);
797  if (tmp_sgn == TRUE) {
798  dmv = tmp_v1[j] * tmp_V;
799  if (X->Large.mode == M_MLTPLY) { // for multply
800  tmp_v0[off + 1] += dmv;
801  }
802  dam_pr += conj(tmp_v1[off + 1]) * dmv;
803  }/*if (tmp_sgn == TRUE)*/
804  }/*if (tmp_sgn == TRUE)*/
805  }/*for (j = 1; j <= i_max; j++)*/
806  }
807  X->Large.prdct += dam_pr;
808  }
809  StopTimer(523);
810  }
811  }/*for (i = 0; i< X->Def.NInterAll_OffDiagonal; i += 2)*/
812  StopTimer(520);
813 
814  StopTimer(500);
815  return 0;
816 }/*int mltplyGeneralSpinGC*/
struct DefineList Def
Definision of system (Hamiltonian) etc.
Definition: struct.h:410
void StartTimer(int n)
function for initializing elapse time [start]
Definition: time.c:71
unsigned long int idim_max
The dimension of the Hilbert space of this process.
Definition: struct.h:303
void StopTimer(int n)
function for calculating elapse time [elapse time=StartTimer-StopTimer]
Definition: time.c:83
double complex prdct
The expectation value of the energy.
Definition: struct.h:314
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.h:412
int ** EDGeneralTransfer
Index of transfer integrals for calculation. malloc in setmem_def(). Data Format [DefineList::NTransf...
Definition: struct.h:110
double complex * ParaInterAll_OffDiagonal
[DefineList::NInterAll_OffDiagonal] Coupling constant of off-diagonal inter-all term. malloc in setmem_def().
Definition: struct.h:170
int mode
multiply or expectation value.
Definition: struct.h:330
#define TRUE
Definition: global.h:26
unsigned int NInterAll_OffDiagonal
Number of interall term (off-diagonal)
Definition: struct.h:165
double complex X_GC_child_CisAit_GeneralSpin_MPIdouble(int org_isite1, int org_ispin1, int org_ispin2, double complex tmp_trans, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Compute term in the grandcanonical general spin system when both site is in the inter process region...
int ** InterAll_OffDiagonal
[DefineList::NinterAll_OffDiagonal][8] Interacted quartet
Definition: struct.h:161
unsigned int Nsite
Number of sites in the INTRA process region.
Definition: struct.h:56
double complex * EDParaGeneralTransfer
Value of general transfer integrals by a def file. malloc in setmem_def(). Data Format [DefineList::N...
Definition: struct.h:116
long unsigned int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
Definition: struct.h:90
long int * SiteToBit
[DefineList::NsiteMPI] Similar to DefineList::Tpow. For general spin.
Definition: struct.h:94
void GC_child_general_int_GeneralSpin_MPIsingle(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
General interaction term in the Spin model + GC When both site1 and site2 are in the inter process re...
int BitCheckGeneral(const long unsigned int org_bit, const unsigned int org_isite, const unsigned int target_ispin, const long int *SiteToBit, const long unsigned int *Tpow)
bit check function for general spin
Definition: bitcalc.c:393
unsigned int EDNTransfer
Number of transfer integrals for calculation.
Definition: struct.h:105
int GetOffCompGeneralSpin(const long unsigned int org_ibit, const int org_isite, const int org_ispin, const int off_ispin, long unsigned int *_ioffComp, const long int *SiteToBit, const long unsigned int *Tpow)
function of getting off-diagonal component for general spin
Definition: bitcalc.c:243
struct CheckList Check
Size of the Hilbert space.
Definition: struct.h:411
void GC_child_general_int_GeneralSpin_MPIdouble(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
General interaction term in the Spin model + GC When both site1 and site2 are in the inter process re...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mltplyHalfSpin()

int mltplyHalfSpin ( struct BindStruct X,
double complex *  tmp_v0,
double complex *  tmp_v1 
)

Driver function for Spin 1/2 hamiltonian.

Returns
error code
Author
Kazuyoshi Yoshimi (The University of Tokyo)

Transfer absorbed in Diagonal term. InterAll

Exchange

Parameters
[in,out]X
[in,out]tmp_v0Result vector
[in]tmp_v1Input producted vector

Definition at line 192 of file mltplySpin.c.

References child_exchange_spin(), child_exchange_spin_GetInfo(), child_general_int_spin(), child_general_int_spin_GetInfo(), child_general_int_spin_MPIdouble(), child_general_int_spin_MPIsingle(), BindStruct::Def, DefineList::ExchangeCoupling, DefineList::InterAll_OffDiagonal, BindStruct::Large, DefineList::NExchangeCoupling, DefineList::NInterAll_OffDiagonal, DefineList::Nsite, DefineList::ParaExchangeCoupling, DefineList::ParaInterAll_OffDiagonal, LargeList::prdct, StartTimer(), StopTimer(), X_child_general_int_spin_MPIdouble(), and X_child_general_int_spin_MPIsingle().

Referenced by mltplySpin().

196  {
197  long unsigned int i;
198  long unsigned int isite1, isite2, sigma1, sigma2;
199  long unsigned int sigma3, sigma4;
200 
201  double complex dam_pr;
202  /*[s] For InterAll */
203  double complex tmp_V;
204  /*[e] For InterAll */
205  int ihermite=0;
206  int idx=0;
207 
208  StartTimer(400);
213  StartTimer(410);
214  for (i = 0; i < X->Def.NInterAll_OffDiagonal; i+=2) {
215  if (X->Def.InterAll_OffDiagonal[i][0] + 1 > X->Def.Nsite &&
216  X->Def.InterAll_OffDiagonal[i][4] + 1 > X->Def.Nsite) {
217  StartTimer(411);
218  child_general_int_spin_MPIdouble(i, X, tmp_v0, tmp_v1);
219  StopTimer(411);
220  }
221  else if (X->Def.InterAll_OffDiagonal[i][4] + 1 > X->Def.Nsite) {
222  StartTimer(412);
223  child_general_int_spin_MPIsingle(i, X, tmp_v0, tmp_v1);
224  StopTimer(412);
225  }
226  else if (X->Def.InterAll_OffDiagonal[i][0] + 1 > X->Def.Nsite) {
227  StartTimer(413);
228  child_general_int_spin_MPIsingle(i + 1, X, tmp_v0, tmp_v1);
229  StopTimer(413);
230  }
231  else {
232  StartTimer(414);
233  for (ihermite = 0; ihermite<2; ihermite++) {
234  idx = i + ihermite;
235  isite1 = X->Def.InterAll_OffDiagonal[idx][0] + 1;
236  isite2 = X->Def.InterAll_OffDiagonal[idx][4] + 1;
237  sigma1 = X->Def.InterAll_OffDiagonal[idx][1];
238  sigma2 = X->Def.InterAll_OffDiagonal[idx][3];
239  sigma3 = X->Def.InterAll_OffDiagonal[idx][5];
240  sigma4 = X->Def.InterAll_OffDiagonal[idx][7];
241  tmp_V = X->Def.ParaInterAll_OffDiagonal[idx];
242  child_general_int_spin_GetInfo(X, isite1, isite2, sigma1, sigma2, sigma3, sigma4, tmp_V);
243  dam_pr = child_general_int_spin(tmp_v0, tmp_v1, X);
244  X->Large.prdct += dam_pr;
245  }/*for (ihermite = 0; ihermite<2; ihermite++)*/
246  StopTimer(414);
247  }
248  }/*for (i = 0; i < X->Def.NInterAll_OffDiagonal; i+=2)*/
249  StopTimer(410);
253  StartTimer(420);
254  for (i = 0; i < X->Def.NExchangeCoupling; i++) {
255  sigma1=0; sigma2=1;
256  if (X->Def.ExchangeCoupling[i][0] + 1 > X->Def.Nsite &&
257  X->Def.ExchangeCoupling[i][1] + 1 > X->Def.Nsite) {
258  StartTimer(421);
260  X->Def.ExchangeCoupling[i][0], sigma1, sigma2,
261  X->Def.ExchangeCoupling[i][1], sigma2, sigma1,
262  X->Def.ParaExchangeCoupling[i], X, tmp_v0, tmp_v1);
263  StopTimer(421);
264  }
265  else if (X->Def.ExchangeCoupling[i][1] + 1 > X->Def.Nsite) {
266  StartTimer(422);
268  X->Def.ExchangeCoupling[i][0], sigma1, sigma2,
269  X->Def.ExchangeCoupling[i][1], sigma2, sigma1,
270  X->Def.ParaExchangeCoupling[i], X, tmp_v0, tmp_v1);
271  StopTimer(422);
272  }
273  else if (X->Def.ExchangeCoupling[i][0] + 1 > X->Def.Nsite) {
274  StartTimer(423);
276  X->Def.ExchangeCoupling[i][1], sigma2, sigma1,
277  X->Def.ExchangeCoupling[i][0], sigma1, sigma2,
278  conj(X->Def.ParaExchangeCoupling[i]), X, tmp_v0, tmp_v1);
279  StopTimer(423);
280  }
281  else {
282  StartTimer(424);
284  dam_pr = child_exchange_spin(tmp_v0, tmp_v1, X);
285  StopTimer(424);
286  }
287  X->Large.prdct += dam_pr;
288  }/*for (i = 0; i < X->Def.NExchangeCoupling; i += 2)*/
289  StopTimer(420);
290 
291  StopTimer(400);
292  return 0;
293 }/*int mltplyHalfSpin*/
struct DefineList Def
Definision of system (Hamiltonian) etc.
Definition: struct.h:410
void StartTimer(int n)
function for initializing elapse time [start]
Definition: time.c:71
int ** ExchangeCoupling
[DefineList::NExchangeCoupling][2] Index of exchange term. malloc in setmem_def().
Definition: struct.h:146
double complex child_exchange_spin(double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X)
Compute exchange term of spin Hamiltonian (canonical)
Definition: mltplySpin.c:870
void StopTimer(int n)
function for calculating elapse time [elapse time=StartTimer-StopTimer]
Definition: time.c:83
double complex prdct
The expectation value of the energy.
Definition: struct.h:314
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.h:412
double complex * ParaInterAll_OffDiagonal
[DefineList::NInterAll_OffDiagonal] Coupling constant of off-diagonal inter-all term. malloc in setmem_def().
Definition: struct.h:170
int child_general_int_spin_GetInfo(struct BindStruct *X, long unsigned int isite1, long unsigned int isite2, long unsigned int sigma1, long unsigned int sigma2, long unsigned int sigma3, long unsigned int sigma4, double complex tmp_V)
Set parameters for the bit operation of spin-general interaction term.
unsigned int NInterAll_OffDiagonal
Number of interall term (off-diagonal)
Definition: struct.h:165
int ** InterAll_OffDiagonal
[DefineList::NinterAll_OffDiagonal][8] Interacted quartet
Definition: struct.h:161
double * ParaExchangeCoupling
[DefineList::NExchangeCoupling] Coupling constant of exchange term. malloc in setmem_def().
Definition: struct.h:148
unsigned int Nsite
Number of sites in the INTRA process region.
Definition: struct.h:56
int child_exchange_spin_GetInfo(int iExchange, struct BindStruct *X)
Set parameters for the bit operation of spin-exchange term.
void child_general_int_spin_MPIdouble(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Exchange term in Spin model When both site1 and site2 are in the inter process region.
Definition: mltplyMPISpin.c:35
unsigned int NExchangeCoupling
Number of exchange term.
Definition: struct.h:145
double complex child_general_int_spin(double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X)
Compute Inter-All term of spin Hamiltonian (canonical)
Definition: mltplySpin.c:936
double complex X_child_general_int_spin_MPIdouble(int org_isite1, int org_ispin1, int org_ispin2, int org_isite3, int org_ispin3, int org_ispin4, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Exchange term in Spin model When both site1 and site2 are in the inter process region.
Definition: mltplyMPISpin.c:61
double complex X_child_general_int_spin_MPIsingle(int org_isite1, int org_ispin1, int org_ispin2, int org_isite3, int org_ispin3, int org_ispin4, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
void child_general_int_spin_MPIsingle(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Exchange term in Spin model When only site2 is in the inter process region.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mltplyHalfSpinGC()

int mltplyHalfSpinGC ( struct BindStruct X,
double complex *  tmp_v0,
double complex *  tmp_v1 
)

Driver function for Spin 1/2 Hamiltonian (grandcanonical)

Returns
error code
Author
Kazuyoshi Yoshimi (The University of Tokyo)

InterAll

Exchange

PairLift

Parameters
[in,out]X
[in,out]tmp_v0Result vector
[in]tmp_v1Input producted vector

Definition at line 416 of file mltplySpin.c.

References BindStruct::Check, child_exchange_spin_GetInfo(), child_general_hopp_GetInfo(), child_general_int_spin_GetInfo(), child_pairlift_spin_GetInfo(), BindStruct::Def, DefineList::EDGeneralTransfer, DefineList::EDNTransfer, DefineList::EDParaGeneralTransfer, DefineList::ExchangeCoupling, GC_child_exchange_spin(), GC_child_general_int_spin(), GC_child_general_int_spin_MPIdouble(), GC_child_general_int_spin_MPIsingle(), GC_child_pairlift_spin(), CheckList::idim_max, DefineList::InterAll_OffDiagonal, BindStruct::Large, DefineList::NExchangeCoupling, DefineList::NInterAll_OffDiagonal, DefineList::NPairLiftCoupling, DefineList::Nsite, DefineList::PairLiftCoupling, DefineList::ParaExchangeCoupling, DefineList::ParaInterAll_OffDiagonal, DefineList::ParaPairLiftCoupling, LargeList::prdct, StartTimer(), StopTimer(), DefineList::Tpow, X_GC_child_CisAit_spin_MPIdouble(), X_GC_child_CisAitCiuAiv_spin_MPIdouble(), X_GC_child_CisAitCiuAiv_spin_MPIsingle(), and X_SpinGC_CisAit().

Referenced by mltplySpinGC().

420  {
421  long unsigned int j;
422  long unsigned int i;
423  long unsigned int off = 0;
424  long unsigned int is1_spin = 0;
425  long unsigned int isite1, isite2, sigma1, sigma2;
426  long unsigned int sigma3, sigma4;
427  double complex dam_pr;
428  double complex tmp_trans;
429  long int tmp_sgn;
430  /*[s] For InterAll */
431  double complex tmp_V;
432  /*[e] For InterAll */
433 
434  long unsigned int i_max;
435  i_max = X->Check.idim_max;
436 
437  int ihermite=0;
438  int idx=0;
439 
440  StartTimer(500);
441 
442  StartTimer(510);
443  for (i = 0; i < X->Def.EDNTransfer; i+=2 ) {
444  if(X->Def.EDGeneralTransfer[i][0]+1 > X->Def.Nsite){
445  dam_pr=0;
446  if(X->Def.EDGeneralTransfer[i][1]==X->Def.EDGeneralTransfer[i][3]){
447  fprintf(stderr, "Transverse_OffDiagonal component is illegal.\n");
448  }
449  else{
450  StartTimer(511);
452  X->Def.EDGeneralTransfer[i][0], X->Def.EDGeneralTransfer[i][1],
454  X, tmp_v0, tmp_v1);
455  StopTimer(511);
456  }
457  }/*if(X->Def.EDGeneralTransfer[i][0]+1 > X->Def.Nsite)*/
458  else{
459  StartTimer(512);
460  dam_pr = 0;
461  for(ihermite=0; ihermite<2; ihermite++){
462  idx=i+ihermite;
463  isite1 = X->Def.EDGeneralTransfer[idx][0] + 1;
464  isite2 = X->Def.EDGeneralTransfer[idx][2] + 1;
465  sigma1 = X->Def.EDGeneralTransfer[idx][1];
466  sigma2 = X->Def.EDGeneralTransfer[idx][3];
467  tmp_trans = -X->Def.EDParaGeneralTransfer[idx];
468  if (child_general_hopp_GetInfo(X, isite1, isite2, sigma1, sigma2) != 0) {
469  return -1;
470  }
471 
472  if(sigma1==sigma2){
473  fprintf(stderr, "Transverse_OffDiagonal component is illegal.\n");
474  }
475  else{
476  // longitudinal magnetic field (considerd in diagonalcalc.c)
477  // transverse magnetic field
478  is1_spin = X->Def.Tpow[isite1 - 1];
479 #pragma omp parallel for default(none) reduction(+:dam_pr) \
480 private(j, tmp_sgn) firstprivate(i_max, is1_spin, sigma2, X,off, tmp_trans) \
481 shared(tmp_v0, tmp_v1)
482  for (j = 1; j <= i_max; j++) {
483  tmp_sgn = X_SpinGC_CisAit(j, X, is1_spin, sigma2, &off);
484  if(tmp_sgn !=0){
485  tmp_v0[off+1] += tmp_v1[j]*tmp_trans;
486  dam_pr += tmp_trans * conj(tmp_v1[off + 1]) * tmp_v1[j];
487  }/*if(tmp_sgn !=0)*/
488  }/*for (j = 1; j <= i_max; j++)*/
489  }//sigma1 != sigma2
490  }/*for(ihermite=0; ihermite<2; ihermite++)*/
491  StopTimer(512);
492  }
493  X->Large.prdct += dam_pr;
494  }/*for (i = 0; i < X->Def.EDNTransfer; i+=2 )*/
495  StopTimer(510);
499  StartTimer(520);
500  for (i = 0; i < X->Def.NInterAll_OffDiagonal; i += 2) {
501  if (X->Def.InterAll_OffDiagonal[i][0] + 1 > X->Def.Nsite &&
502  X->Def.InterAll_OffDiagonal[i][4] + 1 > X->Def.Nsite) {
503  StartTimer(521);
504  GC_child_general_int_spin_MPIdouble(i, X, tmp_v0, tmp_v1);
505  StopTimer(521);
506  }
507  else if (X->Def.InterAll_OffDiagonal[i][4] + 1 > X->Def.Nsite) {
508  StartTimer(522);
509  GC_child_general_int_spin_MPIsingle(i, X, tmp_v0, tmp_v1);
510  StopTimer(522);
511  }
512  else if (X->Def.InterAll_OffDiagonal[i][0] + 1 > X->Def.Nsite) {
513  StartTimer(522);
514  GC_child_general_int_spin_MPIsingle(i + 1, X, tmp_v0, tmp_v1);
515  StopTimer(522);
516  }
517  else {
518  StartTimer(523);
519  for (ihermite = 0; ihermite < 2; ihermite++) {
520  idx = i + ihermite;
521  isite1 = X->Def.InterAll_OffDiagonal[idx][0] + 1;
522  isite2 = X->Def.InterAll_OffDiagonal[idx][4] + 1;
523  sigma1 = X->Def.InterAll_OffDiagonal[idx][1];
524  sigma2 = X->Def.InterAll_OffDiagonal[idx][3];
525  sigma3 = X->Def.InterAll_OffDiagonal[idx][5];
526  sigma4 = X->Def.InterAll_OffDiagonal[idx][7];
527  tmp_V = X->Def.ParaInterAll_OffDiagonal[idx];
528  child_general_int_spin_GetInfo(X, isite1, isite2, sigma1, sigma2, sigma3, sigma4, tmp_V);
529  dam_pr = GC_child_general_int_spin(tmp_v0, tmp_v1, X);
530  X->Large.prdct += dam_pr;
531  }
532  StopTimer(523);
533  }
534  }/*for (i = 0; i < X->Def.NInterAll_OffDiagonal; i += 2)*/
535  StopTimer(520);
539  StartTimer(530);
540  for (i = 0; i < X->Def.NExchangeCoupling; i++) {
541  sigma1=0; sigma2=1;
542  if (X->Def.ExchangeCoupling[i][0] + 1 > X->Def.Nsite &&
543  X->Def.ExchangeCoupling[i][1] + 1 > X->Def.Nsite){
544  StartTimer(531);
546  X->Def.ExchangeCoupling[i][0], sigma1, sigma2,
547  X->Def.ExchangeCoupling[i][1], sigma2, sigma1,
548  X->Def.ParaExchangeCoupling[i], X, tmp_v0, tmp_v1);
549  StopTimer(531);
550  }
551  else if (X->Def.ExchangeCoupling[i][1] + 1 > X->Def.Nsite) {
552  StartTimer(532);
554  X->Def.ExchangeCoupling[i][0], sigma1, sigma2,
555  X->Def.ExchangeCoupling[i][1], sigma2, sigma1,
556  X->Def.ParaExchangeCoupling[i], X, tmp_v0, tmp_v1);
557  StopTimer(532);
558  }
559  else if (X->Def.ExchangeCoupling[i][0] + 1 > X->Def.Nsite) {
560  StartTimer(532);
562  X->Def.ExchangeCoupling[i][1], sigma2, sigma1,
563  X->Def.ExchangeCoupling[i][0], sigma1, sigma2,
564  conj(X->Def.ParaExchangeCoupling[i]), X, tmp_v0, tmp_v1);
565  StopTimer(532);
566  }
567  else {
568  StartTimer(533);
570  dam_pr = GC_child_exchange_spin(tmp_v0, tmp_v1, X);
571  StopTimer(533);
572  }
573  X->Large.prdct += dam_pr;
574  }/* for (i = 0; i < X->Def.NExchangeCoupling; i ++) */
575  StopTimer(530);
579  StartTimer(540);
580  for (i = 0; i < X->Def.NPairLiftCoupling; i++) {
581  sigma1 =0; sigma2=1;
582  if (X->Def.PairLiftCoupling[i][0] + 1 > X->Def.Nsite &&
583  X->Def.PairLiftCoupling[i][1] + 1 > X->Def.Nsite) {
584  StartTimer(541);
586  X->Def.PairLiftCoupling[i][0], sigma1, sigma2,
587  X->Def.PairLiftCoupling[i][1], sigma1, sigma2,
588  X->Def.ParaPairLiftCoupling[i], X, tmp_v0, tmp_v1);
589  StopTimer(541);
590  }
591  else if (X->Def.PairLiftCoupling[i][1] + 1 > X->Def.Nsite) {
592  StartTimer(542);
594  X->Def.PairLiftCoupling[i][0], sigma1, sigma2,
595  X->Def.PairLiftCoupling[i][1], sigma1, sigma2,
596  X->Def.ParaPairLiftCoupling[i], X, tmp_v0, tmp_v1);
597  StopTimer(542);
598  }
599  else if (X->Def.PairLiftCoupling[i][0] + 1 > X->Def.Nsite) {
600  StartTimer(542);
602  X->Def.PairLiftCoupling[i][1], sigma1, sigma2,
603  X->Def.PairLiftCoupling[i][0], sigma1, sigma2,
604  conj(X->Def.ParaPairLiftCoupling[i]), X, tmp_v0, tmp_v1);
605  StopTimer(542);
606  }
607  else {
608  StartTimer(543);
610  dam_pr = GC_child_pairlift_spin(tmp_v0, tmp_v1, X);
611  StopTimer(543);
612  }
613  X->Large.prdct += dam_pr;
614  }/*for (i = 0; i < X->Def.NPairLiftCoupling; i += 2)*/
615  StopTimer(540);
616 
617  StopTimer(500);
618  return 0;
619 }/*int mltplyHalfSpinGC*/
struct DefineList Def
Definision of system (Hamiltonian) etc.
Definition: struct.h:410
void StartTimer(int n)
function for initializing elapse time [start]
Definition: time.c:71
double complex GC_child_exchange_spin(double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X)
Compute exchange term of spin Hamiltonian (grandcanonical)
Definition: mltplySpin.c:892
void GC_child_general_int_spin_MPIsingle(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
General interaction term in the Spin model + GC When both site1 and site2 are in the inter process re...
double complex GC_child_pairlift_spin(double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X)
Compute pair-lift term of spin Hamiltonian (grandcanonical)
Definition: mltplySpin.c:914
unsigned long int idim_max
The dimension of the Hilbert space of this process.
Definition: struct.h:303
int ** ExchangeCoupling
[DefineList::NExchangeCoupling][2] Index of exchange term. malloc in setmem_def().
Definition: struct.h:146
void StopTimer(int n)
function for calculating elapse time [elapse time=StartTimer-StopTimer]
Definition: time.c:83
double complex X_GC_child_CisAitCiuAiv_spin_MPIsingle(int org_isite1, int org_ispin1, int org_ispin2, int org_isite3, int org_ispin3, int org_ispin4, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Exchange and Pairlifting term in Spin model + GC When only site2 is in the inter process region...
double complex X_GC_child_CisAit_spin_MPIdouble(int org_isite1, int org_ispin1, int org_ispin2, double complex tmp_trans, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Hopping term in Spin + GC When both site1 and site2 are in the inter process region.
double complex prdct
The expectation value of the energy.
Definition: struct.h:314
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.h:412
int ** EDGeneralTransfer
Index of transfer integrals for calculation. malloc in setmem_def(). Data Format [DefineList::NTransf...
Definition: struct.h:110
double complex * ParaInterAll_OffDiagonal
[DefineList::NInterAll_OffDiagonal] Coupling constant of off-diagonal inter-all term. malloc in setmem_def().
Definition: struct.h:170
unsigned int NPairLiftCoupling
Number of pair-lift term.
Definition: struct.h:153
int child_general_int_spin_GetInfo(struct BindStruct *X, long unsigned int isite1, long unsigned int isite2, long unsigned int sigma1, long unsigned int sigma2, long unsigned int sigma3, long unsigned int sigma4, double complex tmp_V)
Set parameters for the bit operation of spin-general interaction term.
unsigned int NInterAll_OffDiagonal
Number of interall term (off-diagonal)
Definition: struct.h:165
int child_pairlift_spin_GetInfo(int iPairLift, struct BindStruct *X)
Set parameters for the bit operation of spin-pairlift term.
int ** InterAll_OffDiagonal
[DefineList::NinterAll_OffDiagonal][8] Interacted quartet
Definition: struct.h:161
int ** PairLiftCoupling
[DefineList::NPairHopping][2] Index of pair-lift term. malloc in setmem_def().
Definition: struct.h:154
double * ParaExchangeCoupling
[DefineList::NExchangeCoupling] Coupling constant of exchange term. malloc in setmem_def().
Definition: struct.h:148
unsigned int Nsite
Number of sites in the INTRA process region.
Definition: struct.h:56
int child_exchange_spin_GetInfo(int iExchange, struct BindStruct *X)
Set parameters for the bit operation of spin-exchange term.
double complex * EDParaGeneralTransfer
Value of general transfer integrals by a def file. malloc in setmem_def(). Data Format [DefineList::N...
Definition: struct.h:116
double * ParaPairLiftCoupling
[DefineList::NPairHopping] Coupling constant of pair-lift term. malloc in setmem_def().
Definition: struct.h:156
long unsigned int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
Definition: struct.h:90
void GC_child_general_int_spin_MPIdouble(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
General interaction term in the Spin model + GC When both site1 and site2 are in the inter process re...
unsigned int NExchangeCoupling
Number of exchange term.
Definition: struct.h:145
int child_general_hopp_GetInfo(struct BindStruct *X, unsigned long int isite1, unsigned long int isite2, unsigned long int sigma1, unsigned long int sigma2)
Compute mask for bit operation of hopping term.
double complex GC_child_general_int_spin(double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X)
Compute Inter-All term of spin Hamiltonian (grandcanonical)
Definition: mltplySpin.c:974
unsigned int EDNTransfer
Number of transfer integrals for calculation.
Definition: struct.h:105
int X_SpinGC_CisAit(long unsigned int j, struct BindStruct *X, long unsigned int is1_spin, long unsigned int sigma2, long unsigned int *tmp_off)
Compute index of final wavefunction by term (grandcanonical).
double complex X_GC_child_CisAitCiuAiv_spin_MPIdouble(int org_isite1, int org_ispin1, int org_ispin2, int org_isite3, int org_ispin3, int org_ispin4, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
term in Spin model + GC. When both site1 and site2 are in the inter process region.
struct CheckList Check
Size of the Hilbert space.
Definition: struct.h:411
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mltplySpin()

int mltplySpin ( struct BindStruct X,
double complex *  tmp_v0,
double complex *  tmp_v1 
)

Driver function for Spin hamiltonian.

Returns
error code
Author
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in,out]X
[in,out]tmp_v0Result vector
[in]tmp_v1Input producted vector

Definition at line 175 of file mltplySpin.c.

References BindStruct::Def, FALSE, DefineList::iFlgGeneralSpin, mltplyGeneralSpin(), and mltplyHalfSpin().

Referenced by mltply().

179  {
180  int iret=0;
181  if (X->Def.iFlgGeneralSpin == FALSE)
182  iret = mltplyHalfSpin(X, tmp_v0, tmp_v1);
183  else
184  iret = mltplyGeneralSpin(X, tmp_v0, tmp_v1);
185  return iret;
186 }/*int mltplySpin*/
struct DefineList Def
Definision of system (Hamiltonian) etc.
Definition: struct.h:410
int mltplyGeneralSpin(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Driver function for General Spin hamiltonian.
Definition: mltplySpin.c:299
int mltplyHalfSpin(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Driver function for Spin 1/2 hamiltonian.
Definition: mltplySpin.c:192
int iFlgGeneralSpin
Flag for the general (Sz/=1/2) spin.
Definition: struct.h:86
#define FALSE
Definition: global.h:25
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mltplySpinGC()

int mltplySpinGC ( struct BindStruct X,
double complex *  tmp_v0,
double complex *  tmp_v1 
)

Driver function for Spin hamiltonian.

Returns
error code
Author
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in,out]X
[in,out]tmp_v0Result vector
[in]tmp_v1Input producted vector

Definition at line 393 of file mltplySpin.c.

References BindStruct::Boost, BindStruct::Def, FALSE, BoostList::flgBoost, DefineList::iFlgGeneralSpin, mltplyGeneralSpinGC(), mltplyHalfSpinGC(), and mltplySpinGCBoost().

Referenced by mltply().

397  {
398  int iret=0;
399  if (X->Def.iFlgGeneralSpin == FALSE)
400  iret = mltplyHalfSpinGC(X, tmp_v0, tmp_v1);
401  else
402  iret = mltplyGeneralSpinGC(X, tmp_v0, tmp_v1);
403 
404  if(iret != 0) return iret;
405 
406  if(X->Boost.flgBoost == 1)
407  iret = mltplySpinGCBoost(X, tmp_v0, tmp_v1);
408 
409  return iret;
410 }/*int mltplySpinGC*/
struct DefineList Def
Definision of system (Hamiltonian) etc.
Definition: struct.h:410
int mltplyHalfSpinGC(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Driver function for Spin 1/2 Hamiltonian (grandcanonical)
Definition: mltplySpin.c:416
struct BoostList Boost
For Boost.
Definition: struct.h:414
int mltplyGeneralSpinGC(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Driver function for General Spin hamiltonian (grandcanonical)
Definition: mltplySpin.c:625
int iFlgGeneralSpin
Flag for the general (Sz/=1/2) spin.
Definition: struct.h:86
#define FALSE
Definition: global.h:25
int mltplySpinGCBoost(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Driver function for Spin hamiltonian (Boost)
Definition: mltplySpin.c:822
int flgBoost
Flag whether use CMA algorithm.
Definition: struct.h:395
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mltplySpinGCBoost()

int mltplySpinGCBoost ( struct BindStruct X,
double complex *  tmp_v0,
double complex *  tmp_v1 
)

Driver function for Spin hamiltonian (Boost)

Returns
error code
Author
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in,out]X
[in,out]tmp_v0Result vector
[in]tmp_v1Input producted vector

Definition at line 822 of file mltplySpin.c.

References BindStruct::Check, child_general_int_spin_MPIBoost(), CheckList::idim_max, BindStruct::Large, LargeList::prdct, StartTimer(), and StopTimer().

Referenced by mltplySpinGC().

827 {
828  long unsigned int j;
829 
830  double complex dam_pr;
831 
832  /* SpinGCBoost */
833  double complex* tmp_v2;
834  double complex* tmp_v3;
835  /* SpinGCBoost */
836 
837  long unsigned int i_max;
838  i_max = X->Check.idim_max;
839 
840  StartTimer(500);
841  tmp_v2 = cd_1d_allocate(i_max+1);
842  tmp_v3 = cd_1d_allocate(i_max+1);
843 
844  child_general_int_spin_MPIBoost(X, tmp_v0, tmp_v1, tmp_v2, tmp_v3);
845  dam_pr = 0.0;
846 #pragma omp parallel for default(none) reduction(+:dam_pr) \
847 private(j) shared(tmp_v1,tmp_v0) firstprivate(i_max)
848  for(j=1;j<=i_max;j++)
849  dam_pr += conj(tmp_v1[j])*tmp_v0[j]; // <H>=<v1|H|v1>
850  X->Large.prdct += dam_pr;
851 
852  /* SpinGCBoost */
853  free_cd_1d_allocate(tmp_v2);
854  free_cd_1d_allocate(tmp_v3);
855  /* SpinGCBoost */
856  StopTimer(500);
857  return 0;
858 }/*int mltplySpinGCBoost*/
void StartTimer(int n)
function for initializing elapse time [start]
Definition: time.c:71
unsigned long int idim_max
The dimension of the Hilbert space of this process.
Definition: struct.h:303
void StopTimer(int n)
function for calculating elapse time [elapse time=StartTimer-StopTimer]
Definition: time.c:83
double complex prdct
The expectation value of the energy.
Definition: struct.h:314
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.h:412
void child_general_int_spin_MPIBoost(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1, double complex *tmp_v2, double complex *tmp_v3)
struct CheckList Check
Size of the Hilbert space.
Definition: struct.h:411
+ Here is the call graph for this function:
+ Here is the caller graph for this function: