HΦ  3.2.0
xsetmem.c
Go to the documentation of this file.
1 /* HPhi - Quantum Lattice Model Simulator */
2 /* Copyright (C) 2015 The University of Tokyo */
3 
4 /* This program is free software: you can redistribute it and/or modify */
5 /* it under the terms of the GNU General Public License as published by */
6 /* the Free Software Foundation, either version 3 of the License, or */
7 /* (at your option) any later version. */
8 
9 /* This program is distributed in the hope that it will be useful, */
10 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
11 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
12 /* GNU General Public License for more details. */
13 
14 /* You should have received a copy of the GNU General Public License */
15 /* along with this program. If not, see <http://www.gnu.org/licenses/>. */
16 
17 #include "Common.h"
18 #include "common/setmemory.h"
19 #include "xsetmem.h"
20 #include "wrapperMPI.h"
33 static unsigned long int mfint[7];/*for malloc*/
34 
40 void setmem_HEAD
41 (
42  struct BindStruct *X
43  )
44 {
45  X->Def.CDataFileHead = (char*)malloc(D_FileNameMax*sizeof(char));
46  X->Def.CParaFileHead = (char*)malloc(D_FileNameMax*sizeof(char));
47 }
48 
54 void setmem_def
55 (
56  struct BindStruct *X,
57  struct BoostList *xBoost
58  ) {
59  unsigned long int i = 0;
60  unsigned long int j = 0;
61  unsigned long int k = 0;
62  X->Def.Tpow = lui_1d_allocate(2 * X->Def.Nsite + 2);
63  X->Def.OrgTpow = lui_1d_allocate(2 * X->Def.Nsite + 2);
64  X->Def.SiteToBit = li_1d_allocate(X->Def.Nsite + 1);
65  X->Def.LocSpn = i_1d_allocate(X->Def.Nsite);
66  X->Phys.spin_real_cor = d_1d_allocate(X->Def.Nsite * X->Def.Nsite);
67  X->Phys.charge_real_cor = d_1d_allocate(X->Def.Nsite * X->Def.Nsite);
68  X->Phys.loc_spin_z = d_1d_allocate(X->Def.Nsite * X->Def.Nsite);
69 
70  X->Def.EDChemi = i_1d_allocate(X->Def.EDNChemi + X->Def.NInterAll + X->Def.NTransfer);
71  X->Def.EDSpinChemi = i_1d_allocate(X->Def.EDNChemi + X->Def.NInterAll + X->Def.NTransfer);
72  X->Def.EDParaChemi = d_1d_allocate(X->Def.EDNChemi + X->Def.NInterAll + X->Def.NTransfer);
73  X->Def.GeneralTransfer = i_2d_allocate(X->Def.NTransfer, 4);
74  X->Def.ParaGeneralTransfer = cd_1d_allocate(X->Def.NTransfer);
75 
76  if (X->Def.iCalcType == TimeEvolution) {
77  X->Def.EDGeneralTransfer = i_2d_allocate(X->Def.NTransfer + X->Def.NTETransferMax, 4);
78  X->Def.EDParaGeneralTransfer = cd_1d_allocate(X->Def.NTransfer + X->Def.NTETransferMax);
79  } else {
80  X->Def.EDGeneralTransfer = i_2d_allocate(X->Def.NTransfer, 4);
81  X->Def.EDParaGeneralTransfer = cd_1d_allocate(X->Def.NTransfer);
82  }
83 
84  X->Def.CoulombIntra = i_2d_allocate(X->Def.NCoulombIntra, 1);
85  X->Def.ParaCoulombIntra = d_1d_allocate(X->Def.NCoulombIntra);
86  X->Def.CoulombInter = i_2d_allocate(X->Def.NCoulombInter + X->Def.NIsingCoupling, 2);
87  X->Def.ParaCoulombInter = d_1d_allocate(X->Def.NCoulombInter + X->Def.NIsingCoupling);
88  X->Def.HundCoupling = i_2d_allocate(X->Def.NHundCoupling + X->Def.NIsingCoupling, 2);
89  X->Def.ParaHundCoupling = d_1d_allocate(X->Def.NHundCoupling + X->Def.NIsingCoupling);
90  X->Def.PairHopping = i_2d_allocate(X->Def.NPairHopping, 2);
91  X->Def.ParaPairHopping = d_1d_allocate(X->Def.NPairHopping);
92  X->Def.ExchangeCoupling = i_2d_allocate(X->Def.NExchangeCoupling, 2);
93  X->Def.ParaExchangeCoupling = d_1d_allocate(X->Def.NExchangeCoupling);
94  X->Def.PairLiftCoupling = i_2d_allocate(X->Def.NPairLiftCoupling, 2);
95  X->Def.ParaPairLiftCoupling = d_1d_allocate(X->Def.NPairLiftCoupling);
96 
97  X->Def.InterAll = i_2d_allocate(X->Def.NInterAll, 8);
98  X->Def.ParaInterAll = cd_1d_allocate(X->Def.NInterAll);
99 
100  X->Def.CisAjt = i_2d_allocate(X->Def.NCisAjt, 4);
101  X->Def.CisAjtCkuAlvDC = i_2d_allocate(X->Def.NCisAjtCkuAlvDC, 8);
102 
103  X->Def.SingleExcitationOperator = i_2d_allocate(X->Def.NSingleExcitationOperator, 3);
105  X->Def.PairExcitationOperator = i_2d_allocate(X->Def.NPairExcitationOperator, 5);
107 
108  X->Def.ParaLaser = d_1d_allocate(X->Def.NLaser);
109 
110  unsigned int ipivot, iarrayJ, ispin;
111  xBoost->list_6spin_star = i_2d_allocate(xBoost->R0 * xBoost->num_pivot, 7);
112  xBoost->list_6spin_pair = i_3d_allocate(xBoost->R0 * xBoost->num_pivot, 7, 15);
113  xBoost->arrayJ = cd_3d_allocate(xBoost->NumarrayJ, 3, 3);
114 
115  int NInterAllSet;
116  NInterAllSet = (X->Def.iCalcType == TimeEvolution) ? X->Def.NInterAll + X->Def.NTEInterAllMax : X->Def.NInterAll;
117  X->Def.InterAll_OffDiagonal = i_2d_allocate(NInterAllSet, 8);
118  X->Def.ParaInterAll_OffDiagonal = cd_1d_allocate(NInterAllSet);
119  X->Def.InterAll_Diagonal = i_2d_allocate(NInterAllSet, 4);
120  X->Def.ParaInterAll_Diagonal = d_1d_allocate(NInterAllSet);
121 
122  if (X->Def.iCalcType == TimeEvolution) {
123  X->Def.TETime = d_1d_allocate(X->Def.NTETimeSteps);
124  //Time-dependent Transfer
125  X->Def.NTETransfer = ui_1d_allocate(X->Def.NTETimeSteps);
126  X->Def.NTETransferDiagonal = ui_1d_allocate(X->Def.NTETimeSteps);
127  X->Def.TETransfer = i_3d_allocate(X->Def.NTETimeSteps, X->Def.NTETransferMax, 4);
128  X->Def.TETransferDiagonal = i_3d_allocate(X->Def.NTETimeSteps, X->Def.NTETransferMax, 2);
129  X->Def.ParaTETransfer = cd_2d_allocate(X->Def.NTETimeSteps, X->Def.NTETransferMax);
130  X->Def.ParaTETransferDiagonal = d_2d_allocate(X->Def.NTETimeSteps, X->Def.NTETransferMax);
131  //Time-dependent InterAll
132  X->Def.NTEInterAll = ui_1d_allocate(X->Def.NTETimeSteps);
133  X->Def.NTEInterAllDiagonal = ui_1d_allocate(X->Def.NTETimeSteps);
134  X->Def.TEInterAll = i_3d_allocate(X->Def.NTETimeSteps, X->Def.NTEInterAllMax, 8);
135  X->Def.TEInterAllDiagonal = i_3d_allocate(X->Def.NTETimeSteps, X->Def.NTEInterAllMax, 4);
136  X->Def.ParaTEInterAll = cd_2d_allocate(X->Def.NTETimeSteps, X->Def.NTEInterAllMax);
137  X->Def.ParaTEInterAllDiagonal = d_2d_allocate(X->Def.NTETimeSteps, X->Def.NTEInterAllMax);
138  X->Def.NTEInterAllOffDiagonal = ui_1d_allocate(X->Def.NTETimeSteps);
139  X->Def.TEInterAllOffDiagonal = i_3d_allocate(X->Def.NTETimeSteps, X->Def.NTEInterAllMax, 8);
140  X->Def.ParaTEInterAllOffDiagonal = cd_2d_allocate(X->Def.NTETimeSteps, X->Def.NTEInterAllMax);
141  //Time-dependent Chemi generated by InterAll diagonal components
142  X->Def.NTEChemi = ui_1d_allocate(X->Def.NTETimeSteps);
143  X->Def.TEChemi = i_2d_allocate(X->Def.NTETimeSteps, X->Def.NTEInterAllMax);
144  X->Def.SpinTEChemi = i_2d_allocate(X->Def.NTETimeSteps, X->Def.NTEInterAllMax);
145  X->Def.ParaTEChemi = d_2d_allocate(X->Def.NTETimeSteps, X->Def.NTEInterAllMax);
146  }
147 }
148 
149 
156 int setmem_large
157 (
158  struct BindStruct *X
159  ) {
160 
161  unsigned long int j = 0;
162  unsigned long int idim_maxMPI;
163 
164  idim_maxMPI = MaxMPI_li(X->Check.idim_max);
165 
166  if (GetlistSize(X) == TRUE) {
167  list_1 = lui_1d_allocate(X->Check.idim_max + 1);
168 #ifdef MPI
169  list_1buf = lui_1d_allocate(idim_maxMPI + 1);
170 #endif // MPI
171  list_2_1 = lui_1d_allocate(X->Large.SizeOflist_2_1);
172  list_2_2 = lui_1d_allocate(X->Large.SizeOflist_2_2);
173  if (list_1 == NULL
174  || list_2_1 == NULL
175  || list_2_2 == NULL
176  ) {
177  return -1;
178  }
179  }
180 
181  list_Diagonal = d_1d_allocate(X->Check.idim_max + 1);
182  v0 = cd_1d_allocate(X->Check.idim_max + 1);
183  v1 = cd_1d_allocate(X->Check.idim_max + 1);
184  if (X->Def.iCalcType == TimeEvolution) {
185  v2 = cd_1d_allocate(X->Check.idim_max + 1);
186  } else {
187  v2 = cd_1d_allocate(1);
188  }
189 #ifdef MPI
190  v1buf = cd_1d_allocate(idim_maxMPI + 1);
191 #endif // MPI
192  if (X->Def.iCalcType == TPQCalc) {
193  vg = cd_1d_allocate(1);
194  } else {
195  vg = cd_1d_allocate(X->Check.idim_max + 1);
196  }
197  alpha = d_1d_allocate(X->Def.Lanczos_max + 1);
198  beta = d_1d_allocate(X->Def.Lanczos_max + 1);
199 
200  if (
201  list_Diagonal == NULL
202  || v0 == NULL
203  || v1 == NULL
204  || vg == NULL
205  ) {
206  return -1;
207  }
208 
209  if (X->Def.iCalcType == TPQCalc || X->Def.iFlgCalcSpec != CALCSPEC_NOT) {
210  vec = cd_2d_allocate(X->Def.Lanczos_max + 1, X->Def.Lanczos_max + 1);
211  } else if (X->Def.iCalcType == Lanczos || X->Def.iCalcType == CG) {
212  if (X->Def.LanczosTarget > X->Def.nvec) {
213  vec = cd_2d_allocate(X->Def.LanczosTarget + 1, X->Def.Lanczos_max + 1);
214  } else {
215  vec = cd_2d_allocate(X->Def.nvec + 1, X->Def.Lanczos_max + 1);
216  }
217  }
218 
219  if (X->Def.iCalcType == FullDiag) {
220  X->Phys.all_num_down = d_1d_allocate(X->Check.idim_max + 1);
221  X->Phys.all_num_up = d_1d_allocate( X->Check.idim_max + 1);
222  X->Phys.all_energy = d_1d_allocate(X->Check.idim_max + 1);
223  X->Phys.all_doublon = d_1d_allocate(X->Check.idim_max + 1);
224  X->Phys.all_sz = d_1d_allocate(X->Check.idim_max + 1);
225  X->Phys.all_s2 = d_1d_allocate(X->Check.idim_max + 1);
226  Ham = cd_2d_allocate(X->Check.idim_max + 1, X->Check.idim_max + 1);
227  L_vec = cd_2d_allocate(X->Check.idim_max + 1, X->Check.idim_max + 1);
228 
229  if (X->Phys.all_num_down == NULL
230  || X->Phys.all_num_up == NULL
231  || X->Phys.all_energy == NULL
232  || X->Phys.all_doublon == NULL
233  || X->Phys.all_s2 == NULL
234  ) {
235  return -1;
236  }
237  for (j = 0; j < X->Check.idim_max + 1; j++) {
238  if (Ham[j] == NULL || L_vec[j] == NULL) {
239  return -1;
240  }
241  }
242  } else if (X->Def.iCalcType == CG) {
243  X->Phys.all_num_down = d_1d_allocate(X->Def.k_exct);
244  X->Phys.all_num_up = d_1d_allocate(X->Def.k_exct);
245  X->Phys.all_energy = d_1d_allocate(X->Def.k_exct);
246  X->Phys.all_doublon = d_1d_allocate(X->Def.k_exct);
247  X->Phys.all_sz = d_1d_allocate(X->Def.k_exct);
248  X->Phys.all_s2 = d_1d_allocate( X->Def.k_exct);
249  }
250  fprintf(stdoutMPI, "%s", cProFinishAlloc);
251  return 0;
252 }
253 
264  (
265  int **InterAllOffDiagonal,
266  double complex *ParaInterAllOffDiagonal,
267  int **InterAllDiagonal,
268  double *ParaInterAllDiagonal,
269  const int NInterAll
270  ) {
271  InterAllOffDiagonal = i_2d_allocate(NInterAll, 8);
272  ParaInterAllOffDiagonal = cd_1d_allocate(NInterAll);
273  InterAllDiagonal = i_2d_allocate(NInterAll, 4);
274  ParaInterAllDiagonal = d_1d_allocate(NInterAll);
275  }
276 
277 
287  int GetlistSize
288  (
289  struct BindStruct *X
290  ) {
291  // unsigned int idim_maxMPI;
292 
293 // idim_maxMPI = MaxMPI_li(X->Check.idim_max);
294 
295  switch (X->Def.iCalcModel) {
296  case Spin:
297  case Hubbard:
298  case HubbardNConserved:
299  case Kondo:
300  case KondoGC:
301  if (X->Def.iFlgGeneralSpin == FALSE) {
302  if (X->Def.iCalcModel == Spin && X->Def.Nsite % 2 == 1) {
303  X->Large.SizeOflist_2_1 = X->Check.sdim * 2 + 2;
304  } else {
305  X->Large.SizeOflist_2_1 = X->Check.sdim + 2;
306  }
307  X->Large.SizeOflist_2_2 = X->Check.sdim + 2;
308  X->Large.SizeOflistjb = X->Check.sdim + 2;
309  } else {//for spin-canonical general spin
310  X->Large.SizeOflist_2_1 = X->Check.sdim + 2;
311  X->Large.SizeOflist_2_2 =
312  X->Def.Tpow[X->Def.Nsite - 1] * X->Def.SiteToBit[X->Def.Nsite - 1] / X->Check.sdim + 2;
313  X->Large.SizeOflistjb =
314  X->Def.Tpow[X->Def.Nsite - 1] * X->Def.SiteToBit[X->Def.Nsite - 1] / X->Check.sdim + 2;
315  }
316  break;
317  default:
318  return FALSE;
319  }
320  return TRUE;
321 }
unsigned int NTETimeSteps
Definition: struct.h:246
double * all_num_down
[CheckList::idim_max+1] Number of spin-down electrons for FullDiag and LOBPCG. malloc in setmem_large...
Definition: struct.h:381
unsigned int NSingleExcitationOperator
Number of single excitaion operator for spectrum.
Definition: struct.h:182
unsigned int * NTEInterAllOffDiagonal
Definition: struct.h:273
double * all_s2
[CheckList::idim_max+1] for FullDiag and LOBPCG. malloc in setmem_large().
Definition: struct.h:377
struct DefineList Def
Definision of system (Hamiltonian) etc.
Definition: struct.h:410
unsigned int NHundCoupling
Number of Hund coupling.
Definition: struct.h:133
int *** TEInterAll
Definition: struct.h:278
int * EDSpinChemi
[DefineList::Nsite]
Definition: struct.h:99
int ** list_6spin_star
Definition: struct.h:403
int ** SpinTEChemi
Definition: struct.h:295
unsigned int NTEInterAllMax
Definition: struct.h:270
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
double * ParaInterAll_Diagonal
[DefineList::NInterAll_Diagonal] Coupling constant of diagonal inter-all term. malloc in setmem_def()...
Definition: struct.h:168
unsigned int NLaser
Definition: struct.h:250
int *** TETransferDiagonal
Definition: struct.h:262
double complex * v1
Definition: global.h:35
#define D_FileNameMax
Definition: global.h:23
double * TETime
Definition: struct.h:247
double complex * v2
Definition: global.h:36
double complex ** vec
Definition: global.h:45
int ** TEChemi
Definition: struct.h:293
long unsigned int * list_1buf
Definition: global.h:48
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.h:412
int * LocSpn
[DefineList::NLocSpn] Flag (and size) of the local spin. malloc in setmem_def().
Definition: struct.h:82
int ** CisAjtCkuAlvDC
[DefineList::NCisAjtCkuAlvDC][4] Indices of two-body correlation function. malloc in setmem_def()...
Definition: struct.h:177
int ** EDGeneralTransfer
Index of transfer integrals for calculation. malloc in setmem_def(). Data Format [DefineList::NTransf...
Definition: struct.h:110
long unsigned int num_pivot
Definition: struct.h:398
struct PhysList Phys
Physical quantities.
Definition: struct.h:413
long int SizeOflist_2_1
Size of list_2_1.
Definition: struct.h:318
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 *** list_6spin_pair
Definition: struct.h:404
void setmem_def(struct BindStruct *X, struct BoostList *xBoost)
Set size of memories for Def and Phys in BindStruct.
Definition: xsetmem.c:55
unsigned int nvec
Read from Calcmod in readdef.h.
Definition: struct.h:46
double * ParaLaser
Definition: struct.h:251
double complex ** ParaTETransfer
Definition: struct.h:264
int setmem_large(struct BindStruct *X)
Set size of memories for Hamiltonian (Ham, L_vec), vectors(vg, v0, v1, v2, vec, alpha, beta), lists (list_1, list_2_1, list_2_2, list_Diagonal) and Phys(BindStruct.PhysList) struct in the case of Full Diag mode.
Definition: xsetmem.c:157
#define TRUE
Definition: global.h:26
double ** ParaTEChemi
Definition: struct.h:296
unsigned int * NTETransfer
Definition: struct.h:256
unsigned long int sdim
Dimension for Ogata-Lin ???
Definition: struct.h:307
unsigned int * NTEChemi
Definition: struct.h:294
int ** InterAll_OffDiagonal
[DefineList::NinterAll_OffDiagonal][8] Interacted quartet
Definition: struct.h:161
int ** InterAll_Diagonal
[DefineList::NinterAll_Diagonal][4] Interacted quartet
Definition: struct.h:162
double * loc_spin_z
Malloc, but Not used ???
Definition: struct.h:387
int ** GeneralTransfer
Index of transfer integrals obtained by a def file. malloc in setmem_def(). Data Format [DefineList::...
Definition: struct.h:106
long unsigned int * OrgTpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
Definition: struct.h:92
int ** PairHopping
[DefineList::NPairHopping][2] Index of pair-hopping. malloc in setmem_def().
Definition: struct.h:140
double ** ParaTETransferDiagonal
Definition: struct.h:266
int ** PairLiftCoupling
[DefineList::NPairHopping][2] Index of pair-lift term. malloc in setmem_def().
Definition: struct.h:154
int ** HundCoupling
[DefineList::NHundCoupling][2] Index of Hund coupling. malloc in setmem_def().
Definition: struct.h:134
double complex ** ParaTEInterAll
Definition: struct.h:286
double complex * ParaInterAll
[DefineList::NInterAll] Coupling constant of inter-all term. malloc in setmem_def().
Definition: struct.h:166
double complex * ParaGeneralTransfer
Value of general transfer integrals by a def file. malloc in setmem_def(). Data Format [DefineList::N...
Definition: struct.h:113
Bind.
Definition: struct.h:409
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
double complex ** Ham
Definition: global.h:73
double * ParaCoulombInter
[DefineList::NCoulombInter]Coupling constant of off-site Coulomb interaction. malloc in setmem_def()...
Definition: struct.h:130
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
double complex * ParaPairExcitationOperator
[DefineList::NPairExcitationOperator] Coefficient of pair excitaion operator for spectrum. malloc in setmem_def().
Definition: struct.h:189
int ** CoulombInter
Definition: struct.h:128
unsigned int NCoulombIntra
Definition: struct.h:121
double complex *** arrayJ
Definition: struct.h:401
double complex ** ParaTEInterAllOffDiagonal
Definition: struct.h:288
unsigned int NIsingCoupling
Number of Ising term.
Definition: struct.h:151
const char * cProFinishAlloc
int ** SingleExcitationOperator
[DefineList::NSingleExcitationOperator][3] Indices of single excitaion operator for spectrum...
Definition: struct.h:180
unsigned long int MaxMPI_li(unsigned long int idim)
MPI wrapper function to obtain maximum unsigned long integer across processes.
Definition: wrapperMPI.c:171
long unsigned int * list_2_1
Definition: global.h:49
static unsigned long int mfint[7]
Definition: xsetmem.c:33
double * EDParaChemi
[DefineList::Nsite] On-site potential parameter. malloc in setmem_def().
Definition: struct.h:100
void setmem_HEAD(struct BindStruct *X)
Set size of memories headers of output files.
Definition: xsetmem.c:41
double * all_doublon
[CheckList::idim_max+1] Doublon for FullDiag and LOBPCG. malloc in setmem_large().
Definition: struct.h:373
int GetlistSize(struct BindStruct *X)
Set size of lists for the canonical ensemble.
Definition: xsetmem.c:288
long unsigned int R0
Definition: struct.h:396
int *** TETransfer
Definition: struct.h:260
double complex ** L_vec
Definition: global.h:74
double * alpha
Definition: global.h:44
char * CParaFileHead
Read from Calcmod in readdef.h. It is not used. Just for the compatibility to mVMC.
Definition: struct.h:44
unsigned int NExchangeCoupling
Number of exchange term.
Definition: struct.h:145
int iFlgGeneralSpin
Flag for the general (Sz/=1/2) spin.
Definition: struct.h:86
#define FALSE
Definition: global.h:25
long unsigned int * list_1
Definition: global.h:47
unsigned int NCisAjtCkuAlvDC
Number of indices of two-body correlation function.
Definition: struct.h:178
unsigned int NPairHopping
Number of pair-hopping term.
Definition: struct.h:139
unsigned int NCisAjt
Number of indices of two-body correlation function.
Definition: struct.h:175
unsigned int NPairExcitationOperator
Number of pair excitaion operator for spectrum.
Definition: struct.h:188
long int * SiteToBit
[DefineList::NsiteMPI] Similar to DefineList::Tpow. For general spin.
Definition: struct.h:94
double complex * vg
Definition: global.h:41
long unsigned int * list_2_2
Definition: global.h:50
unsigned int * NTEInterAllDiagonal
Definition: struct.h:276
int ** CisAjt
[DefineList::NCisAjt][4] Indices of one-body correlation function. malloc in setmem_def().
Definition: struct.h:174
double ** ParaTEInterAllDiagonal
Definition: struct.h:291
int ** PairExcitationOperator
[DefineList::NPairExcitationOperator][5] Indices of pair excitaion operator for spectrum. malloc in setmem_def().
Definition: struct.h:186
double * ParaPairHopping
[DefineList::NPairHopping] Coupling constant of pair-hopping term. malloc in setmem_def().
Definition: struct.h:142
unsigned int NInterAll
Total Number of Interacted quartet.
Definition: struct.h:163
double * beta
Definition: global.h:44
int ** CoulombIntra
Definition: struct.h:122
unsigned int NTransfer
Number of transfer integrals obtained by a def file.
Definition: struct.h:104
double * charge_real_cor
Malloc, but Not used ???
Definition: struct.h:386
For Boost.
Definition: struct.h:394
double * ParaHundCoupling
[DefineList::NHundCoupling] Hund coupling constant. malloc in setmem_def().
Definition: struct.h:136
double * spin_real_cor
Malloc, but Not used ???
Definition: struct.h:385
struct EDMainCalStruct X
Definition: struct.h:432
int LanczosTarget
Which eigenstate is used to check convergence. Read from Calcmod in readdef.h.
Definition: struct.h:50
double * list_Diagonal
Definition: global.h:46
double * all_sz
[CheckList::idim_max+1] for FullDiag and LOBPCG. malloc in setmem_large().
Definition: struct.h:375
int iCalcModel
Switch for model. 0:Hubbard, 1:Spin, 2:Kondo, 3:HubbardGC, 4:SpinGC, 5:KondoGC, 6:HubbardNConserved.
Definition: struct.h:198
int *** TEInterAllOffDiagonal
Definition: struct.h:281
unsigned int NCoulombInter
Number of off-site Coulomb interaction.
Definition: struct.h:127
double * ParaCoulombIntra
Definition: struct.h:124
unsigned int EDNChemi
Number of on-site term.
Definition: struct.h:97
void setmem_IntAll_Diagonal(int **InterAllOffDiagonal, double complex *ParaInterAllOffDiagonal, int **InterAllDiagonal, double *ParaInterAllDiagonal, const int NInterAll)
Set the size of memories for InterAllDiagonal and InterAllOffDiagonal arrays.
Definition: xsetmem.c:264
int *** TEInterAllDiagonal
Definition: struct.h:284
int iFlgCalcSpec
Input parameter CalcSpec in teh CalcMod file.
Definition: struct.h:216
double complex * ParaSingleExcitationOperator
[DefineList::NSingleExcitationOperator] Coefficient of single excitaion operator for spectrum...
Definition: struct.h:183
int ** InterAll
[DefineList::NinterAll][8] Interacted quartet
Definition: struct.h:160
unsigned int NumarrayJ
Definition: struct.h:400
long int SizeOflistjb
Used for computing Sz.
Definition: struct.h:320
int * EDChemi
[DefineList::Nsite] Chemical potential. malloc in setmem_def().
Definition: struct.h:98
unsigned int NTETransferMax
Definition: struct.h:255
double complex * v0
Definition: global.h:34
double complex * v1buf
Definition: global.h:37
unsigned int * NTEInterAll
Definition: struct.h:271
struct CheckList Check
Size of the Hilbert space.
Definition: struct.h:411
unsigned int * NTETransferDiagonal
Definition: struct.h:258
char * CDataFileHead
Read from Calcmod in readdef.h. Header of output file such as Green&#39;s function.
Definition: struct.h:42
long int SizeOflist_2_2
Size of list_2_2.
Definition: struct.h:319
double * all_num_up
[CheckList::idim_max+1] Number of spin-up electrons for FullDiag and LOBPCG. malloc in setmem_large()...
Definition: struct.h:379
unsigned int Lanczos_max
Maximum number of iterations.
Definition: struct.h:74
int iCalcType
Switch for calculation type. 0:Lanczos, 1:TPQCalc, 2:FullDiag.
Definition: struct.h:192
FILE * stdoutMPI
File pointer to the standard output defined in InitializeMPI()
Definition: global.h:165
double * all_energy
[CheckList::idim_max+1] Energy for FullDiag and LOBPCG. malloc in setmem_large(). ...
Definition: struct.h:371
unsigned int k_exct
Read from Calcmod in readdef.h.
Definition: struct.h:47