Skip to content

Commit

Permalink
update te
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yoshimi committed Apr 17, 2024
1 parent 68ebc47 commit f674795
Showing 1 changed file with 45 additions and 16 deletions.
61 changes: 45 additions & 16 deletions src/readdef.c
Original file line number Diff line number Diff line change
Expand Up @@ -1861,24 +1861,53 @@ int ReadDefFileIdxPara(
X->NTEInterAll[idx] = icnt_interall;
X->NTEInterAllDiagonal[idx] = icnt_diagonal;
X->NTEInterAllOffDiagonal[idx] = icnt_interall - icnt_diagonal;

//Diagonal -> OffDiagonal -> search pair -> hermite
if (GetDiagonalInterAll(X->TEInterAll[idx], X->ParaTEInterAll[idx], X->NTEInterAll[idx], X->TEInterAllDiagonal[idx], X->ParaTEInterAllDiagonal[idx],
X->TEInterAllOffDiagonal[idx], X->ParaTEInterAllOffDiagonal[idx], X->TEChemi[idx], X->SpinTEChemi[idx], X->ParaTEChemi[idx], &X->NTEChemi[idx], X->iCalcModel) != 0)
{
fclose(fp);
return (-1);
}
// if (GetDiagonalInterAll(X->TEInterAll[idx], X->ParaTEInterAll[idx], X->NTEInterAll[idx], X->TEInterAllDiagonal[idx], X->ParaTEInterAllDiagonal[idx],
// X->TEInterAllOffDiagonal[idx], X->ParaTEInterAllOffDiagonal[idx], X->TEChemi[idx], X->SpinTEChemi[idx], X->ParaTEChemi[idx], &X->NTEChemi[idx], X->iCalcModel) != 0)
// {
// fclose(fp);
// return (-1);
// }
//
// if(CheckInterAllHermite(
// X->TEInterAll[idx], X->ParaTEInterAll[idx],
// X->TEInterAllOffDiagonal[idx], X->ParaTEInterAllOffDiagonal[idx],
// X->NTEInterAllOffDiagonal[idx], X->iCalcModel
// )!=0) {
// fprintf(stdoutMPI, "%s", cErrNonHermiteInterAllForAll);
// fclose(fp);
// return (-1);
// }
// idx++;
// }

if (GetDiagonalInterAll_simple(X->TEInterAll[idx], X->ParaTEInterAll[idx], X->NTEInterAll[idx], X->TEInterAllDiagonal[idx], X->ParaTEInterAllDiagonal[idx],
X->TEInterAllOffDiagonal[idx], X->ParaTEInterAllOffDiagonal[idx], X->TEChemi[idx], X->SpinTEChemi[idx], X->ParaTEChemi[idx], &X->NTEChemi[idx], X->iCalcModel) != 0)
{
fclose(fp);
return (-1);
}

if(CheckInterAllHermite(
X->TEInterAll[idx], X->ParaTEInterAll[idx],
X->TEInterAllOffDiagonal[idx], X->ParaTEInterAllOffDiagonal[idx],
X->NTEInterAllOffDiagonal[idx], X->iCalcModel
)!=0) {
fprintf(stdoutMPI, "%s", cErrNonHermiteInterAllForAll);
fclose(fp);
return (-1);
}
idx++;
if(CheckInterAllHermite_simple(
X->TEInterAll[idx], X->ParaTEInterAll[idx],
X->TEInterAllOffDiagonal[idx], X->ParaTEInterAllOffDiagonal[idx],
X->NTEInterAllOffDiagonal[idx], X->iCalcModel
)!=0) {
fprintf(stdoutMPI, "%s", cErrNonHermiteInterAllForAll);
fclose(fp);
return (-1);
}

if(ArrangeInterAllOffDiagonal(
X->NTEInterAllOffDiagonal[idx],
X->TEInterAllOffDiagonal[idx], X->ParaTEInterAllOffDiagonal[idx],
X->iCalcModel
)!=0){
fclose(fp);
return(-1);
}
idx++;
}

if(idx!=X->NTETimeSteps){
Expand Down

0 comments on commit f674795

Please sign in to comment.