Skip to content

Commit

Permalink
add tJ
Browse files Browse the repository at this point in the history
  • Loading branch information
tmisawa committed Apr 15, 2024
1 parent f1c877d commit 4a5afe5
Show file tree
Hide file tree
Showing 21 changed files with 197 additions and 82 deletions.
4 changes: 3 additions & 1 deletion src/CalcByLOBPCG.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,12 +650,14 @@ int CalcByLOBPCG(
switch (X->Bind.Def.iCalcModel) {
case HubbardGC:
case SpinGC:
case KondoGC:
case SpinlessFermionGC:
initial_mode = 1; // 1 -> random initial vector
break;
case Hubbard:
case Kondo:
case KondoGC:
case tJ:
case tJGC:
case Spin:
case SpinlessFermion:

Expand Down
4 changes: 3 additions & 1 deletion src/CalcByLanczos.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@ int CalcByLanczos(
switch(X->Bind.Def.iCalcModel){
case HubbardGC:
case SpinGC:
case KondoGC:
case SpinlessFermionGC:
initial_mode = 1; // 1 -> random initial vector
break;
case Hubbard:
case Kondo:
case KondoGC:
case tJ:
case tJGC:
case Spin:
case SpinlessFermion:

Expand Down
26 changes: 20 additions & 6 deletions src/CalcSpectrum.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,12 @@ int MakeExcitedList(
case HubbardGC:
break;
case HubbardNConserved:
case KondoGC:
case Hubbard:
case Kondo:
case KondoGC:
case tJ:
case tJNConserved:
case tJGC:
*iFlgListModifed = TRUE;
break;
case Spin:
Expand All @@ -466,13 +469,16 @@ int MakeExcitedList(
}
} else if (X->Def.NPairExcitationOperator > 0) {
switch (X->Def.iCalcModel) {
case HubbardGC:
case SpinGC:
case HubbardNConserved:
break;
case HubbardGC:
case KondoGC:
case tJNConserved:
case tJGC:
break;
case Hubbard:
case Kondo:
case tJ:
case Spin:
if (X->Def.PairExcitationOperator[0][1] != X->Def.PairExcitationOperator[0][3]) {
*iFlgListModifed = TRUE;
Expand Down Expand Up @@ -519,16 +525,20 @@ int MakeExcitedList(
case HubbardGC:
break;
case HubbardNConserved:
case KondoNConserved:/*To be confirmed*/
case tJNConserved:/*To be confirmed*/
if (X->Def.SingleExcitationOperator[0][2] == 1) { //cis
X->Def.Ne = X->Def.NeMPI + 1;
}
else{
X->Def.Ne = X->Def.NeMPI - 1;
}
break;
case KondoGC:
case Hubbard:
case Kondo:
case KondoGC:
case tJ:
case tJGC:
if (X->Def.SingleExcitationOperator[0][2] == 1) { //cis
X->Def.Ne = X->Def.NeMPI + 1;
if (X->Def.SingleExcitationOperator[0][1] == 0) {//up
Expand Down Expand Up @@ -557,13 +567,17 @@ int MakeExcitedList(
} else if (X->Def.NPairExcitationOperator > 0) {
X->Def.Ne=X->Def.NeMPI;
switch (X->Def.iCalcModel) {
case HubbardGC:
case SpinGC:
case HubbardNConserved:
case HubbardGC:
case KondoNConserved:/*To be confirmed*/
case tJNConserved:/*To be confirmed*/
break;
case KondoGC:
case Hubbard:
case Kondo:
case KondoGC:
case tJ:
case tJGC:
if (X->Def.PairExcitationOperator[0][1] != X->Def.PairExcitationOperator[0][3]) {
if (X->Def.PairExcitationOperator[0][1] == 0) {//up
X->Def.Nup = X->Def.NupOrg + 1;
Expand Down
30 changes: 26 additions & 4 deletions src/CheckMPI.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ int CheckMPI(struct BindStruct *X/**< [inout] */)
case Kondo:
case KondoNConserved:
case KondoGC:
case tJ:
case tJNConserved:
case tJGC:

/**@brief
<li> For Hubbard & Kondo
Expand Down Expand Up @@ -79,6 +82,7 @@ int CheckMPI(struct BindStruct *X/**< [inout] */)
switch (X->Def.iCalcModel) /*2 (inner)*/ {

case Hubbard:
case tJ:
/**@brief
<li>For canonical Hubbard
DefineList::Nup, DefineList::Ndown, and DefineList::Ne should be
Expand Down Expand Up @@ -106,6 +110,8 @@ int CheckMPI(struct BindStruct *X/**< [inout] */)
break;/*case Hubbard:*/

case HubbardNConserved:
case tJNConserved:
case tJGC:/*is this correct?*/
/**@brief
<li>For N-conserved canonical Hubbard
DefineList::Ne should be differerent in each PE.</li>
Expand Down Expand Up @@ -319,11 +325,15 @@ void CheckMPI_Summary(struct BindStruct *X/**< [inout] */) {
fprintf(stdoutMPI, " Site Bit\n");
for (isite = 0; isite < X->Def.Nsite; isite++) {
switch (X->Def.iCalcModel) {
case HubbardGC:
case Hubbard:
case HubbardNConserved:
case HubbardGC:
case Kondo:
case KondoNConserved:
case KondoGC:
case tJ:
case tJNConserved:
case tJGC:

fprintf(stdoutMPI, " %4d %4d\n", isite, 4);
break;
Expand All @@ -347,11 +357,15 @@ void CheckMPI_Summary(struct BindStruct *X/**< [inout] */) {
fprintf(stdoutMPI, " Site Bit\n");
for (isite = X->Def.Nsite; isite < X->Def.NsiteMPI; isite++) {
switch (X->Def.iCalcModel) {
case HubbardGC:
case Hubbard:
case HubbardNConserved:
case HubbardGC:
case Kondo:
case KondoNConserved:
case KondoGC:
case tJ:
case tJNConserved:
case tJGC:

fprintf(stdoutMPI, " %4d %4d\n", isite, 4);
break;
Expand Down Expand Up @@ -405,11 +419,15 @@ void CheckMPI_Summary(struct BindStruct *X/**< [inout] */) {
as a binary (excepting general spin) format.
*/
switch (X->Def.iCalcModel) {
case HubbardGC: /****************************************************/
case Hubbard:
case HubbardNConserved:
case HubbardGC: /****************************************************/
case Kondo:
case KondoNConserved:
case KondoGC:
case tJ:
case tJNConserved:
case tJGC:

SmallDim = iproc;
for (isite = X->Def.Nsite; isite < X->Def.NsiteMPI; isite++) {
Expand Down Expand Up @@ -467,11 +485,15 @@ void CheckMPI_Summary(struct BindStruct *X/**< [inout] */) {
affected by the number of processes.
*/
switch (X->Def.iCalcModel) {
case HubbardGC: /****************************************************/
case Hubbard:
case HubbardNConserved:
case HubbardGC: /****************************************************/
case Kondo:
case KondoNConserved:
case KondoGC:
case tJ:
case tJNConserved:
case tJGC:

X->Def.Tpow[2 * X->Def.Nsite] = 1;
for (isite = 2 * X->Def.Nsite + 1; isite < 2 * X->Def.NsiteMPI; isite++)
Expand Down
4 changes: 3 additions & 1 deletion src/PairEx.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ int GetPairExcitedState
iret=GetPairExcitedStateHubbardGC(X, tmp_v0, tmp_v1);
break;

case KondoGC:
case Hubbard:
case Kondo:
case KondoGC:
case tJ:
case tJGC:
iret=GetPairExcitedStateHubbard(X, tmp_v0, tmp_v1);
break;

Expand Down
4 changes: 3 additions & 1 deletion src/SingleEx.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ int GetSingleExcitedState(
iret = GetSingleExcitedStateHubbardGC(X, tmp_v0, tmp_v1);
break;

case KondoGC:
case Hubbard:
case Kondo:
case KondoGC:
case tJ:
case tJGC:
iret = GetSingleExcitedStateHubbard(X, tmp_v0, tmp_v1);
break;

Expand Down
7 changes: 5 additions & 2 deletions src/bitcalc.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,15 @@ int GetSplitBitByModel(
{
int tmpNsite=Nsite;
switch(iCalcModel){
case Hubbard:
case HubbardGC:
case KondoGC:
case HubbardNConserved:
case Hubbard:
case Kondo:
case KondoNConserved:
case KondoGC:
case tJ:
case tJNConserved:
case tJGC:
tmpNsite *= 2;
break;
case Spin:
Expand Down
9 changes: 9 additions & 0 deletions src/check.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ int check(struct BindStruct *X){
case Kondo:
case KondoNConserved:
case KondoGC:
case tJ:
case tJNConserved:
case tJGC:
case Spin:
X->Check.max_mem = 5.5 * X->Check.idim_max * 8.0 / (pow(10, 9));
break;
Expand All @@ -289,6 +292,9 @@ int check(struct BindStruct *X){
case Kondo:
case KondoNConserved:
case KondoGC:
case tJ:
case tJNConserved:
case tJGC:
case Spin:
X->Check.max_mem = (6 * X->Def.k_exct + 2) * X->Check.idim_max * 16.0 / (pow(10, 9));
break;
Expand All @@ -306,6 +312,9 @@ int check(struct BindStruct *X){
case Kondo:
case KondoNConserved:
case KondoGC:
case tJ:
case tJNConserved:
case tJGC:
case Spin:
if (X->Def.iFlgCalcSpec != CALCSPEC_NOT) {
X->Check.max_mem = (2) * X->Check.idim_max * 16.0 / (pow(10, 9));
Expand Down
Loading

0 comments on commit 4a5afe5

Please sign in to comment.