Skip to content

Commit

Permalink
add KondoNConserved in CheckMPI.c
Browse files Browse the repository at this point in the history
  • Loading branch information
tmisawa committed Apr 18, 2024
1 parent f1e5a84 commit be577e2
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions src/CheckMPI.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ int CheckMPI(struct BindStruct *X/**< [inout] */)
} /*for (isite = X->Def.Nsite; isite < X->Def.NsiteMPI; isite++)*/
break; /*case HubbardNConserved:*/

case KondoGC:
case Kondo:
case KondoNConserved:
case KondoGC:
/**@brief
<li>For canonical Kondo system
DefineList::Nup, DefineList::Ndown, and DefineList::Ne should be
Expand Down Expand Up @@ -200,7 +201,32 @@ int CheckMPI(struct BindStruct *X/**< [inout] */)
}
}/*for (isite = X->Def.Nsite; isite < X->Def.NsiteMPI; isite++)*/
} /*if (X->Def.iCalcModel == Kondo)*/

else if(X->Def.iCalcModel == KondoNConserved){
SmallDim = myrank;
for (isite = X->Def.Nsite; isite < X->Def.NsiteMPI; isite++) {
SpinNum = SmallDim % 4;
SmallDim /= 4;
if (X->Def.LocSpn[isite] == ITINERANT) {
if (SpinNum == 1 /*01*/) {
//X->Def.Nup -= 1;
X->Def.Ne -= 1;
}
else if (SpinNum == 2 /*10*/) {
//X->Def.Ndown -= 1;
X->Def.Ne -= 1;
}
else if (SpinNum == 3 /*11*/) {
//X->Def.Nup -= 1;
//X->Def.Ndown -= 1;
X->Def.Ne -= 2;
}
}
else {
fprintf(stdoutMPI, "\n Stop because local spin in the inter process region\n");
return FALSE;
}
}/*for (isite = X->Def.Nsite; isite < X->Def.NsiteMPI; isite++)*/
}
break; /*case KondoGC, Kondo*/

} /*switch (X->Def.iCalcModel) 2(inner)*/
Expand Down

0 comments on commit be577e2

Please sign in to comment.