Skip to content

Commit

Permalink
Merge pull request #236 from ltimmerman3/master
Browse files Browse the repository at this point in the history
  • Loading branch information
phanish-suryanarayana authored Dec 5, 2024
2 parents 99e4b7e + d821e18 commit 6b53441
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 5 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
-Date
-Name
-changes
--------------
Dec 4, 2024
Name: Lucas Timmerman
Changes: (md.c, ofdft.c, relax.c, driver.c)
1. Add catch for Calculate_local_kpoints
2. Update printing in ofdft

--------------
Nov 28, 2024
Name: Tian Tian
Expand Down
2 changes: 1 addition & 1 deletion src/electronicGroundState.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ void scf(SPARC_OBJ *pSPARC)
pSPARC->RelaxCount + pSPARC->restartCount + (pSPARC->RestartFlag == 0));
#ifdef USE_SOCKET
else if(pSPARC->SocketFlag == 1)
fprintf(output_fp," Self Consistent Field (SCF#%d) \n", pSPARC->SocketSCFCount);
fprintf(output_fp," Self Consistent Field (SCF#%d) \n", pSPARC->SocketSCFCount);
#endif
else
fprintf(output_fp," Self Consistent Field (SCF#%d) \n",1);
Expand Down
2 changes: 1 addition & 1 deletion src/initialization.c
Original file line number Diff line number Diff line change
Expand Up @@ -3649,7 +3649,7 @@ void write_output_init(SPARC_OBJ *pSPARC) {
}

fprintf(output_fp,"***************************************************************************\n");
fprintf(output_fp,"* SPARC (version Nov 28, 2024) *\n");
fprintf(output_fp,"* SPARC (version Dec 4, 2024) *\n");
fprintf(output_fp,"* Copyright (c) 2020 Material Physics & Mechanics Group, Georgia Tech *\n");
fprintf(output_fp,"* Distributed under GNU General Public License 3 (GPL) *\n");
fprintf(output_fp,"* Start time: %s *\n",c_time_str);
Expand Down
4 changes: 3 additions & 1 deletion src/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,9 @@ void reinitialize_mesh_NPT(SPARC_OBJ *pSPARC)

// re-calculate local k-points array
if (pSPARC->Nkpts >= 1 && pSPARC->kptcomm_index != -1) {
Calculate_local_kpoints(pSPARC);
if (pSPARC->sqAmbientFlag == 0 && pSPARC->sqHighTFlag == 0 && pSPARC->OFDFTFlag == 0) {
Calculate_local_kpoints(pSPARC);
}
}

#ifdef DEBUG
Expand Down
8 changes: 8 additions & 0 deletions src/ofdft/ofdft.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ void OFDFT_NLCG_TETER(SPARC_OBJ *pSPARC) {
if(pSPARC->RelaxFlag >= 1)
fprintf(output_fp," Orbital Free DFT NLCG (OFDFT-NLCG#%d) \n",
pSPARC->RelaxCount + pSPARC->restartCount + (pSPARC->RestartFlag == 0));
else if (pSPARC->MDFlag == 1)
fprintf(output_fp," Orbital Free DFT NLCG (OFDFT-NLCG#%d) \n",
pSPARC->MDCount + pSPARC->restartCount + (pSPARC->RestartFlag == 0));
#ifdef USE_SOCKET
else if(pSPARC->SocketFlag == 1)
fprintf(output_fp," Orbital Free DFT NLCG (OFDFT-NLCG#%d) \n",
pSPARC->SocketSCFCount);
#endif
else
fprintf(output_fp," Orbital Free DFT NLCG (OFDFT-NLCG#%d) \n",1);

Expand Down
4 changes: 3 additions & 1 deletion src/relax.c
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,9 @@ void reinitialize_cell_mesh(SPARC_OBJ *pSPARC, double vol)

// re-calculate local k-points array
if (pSPARC->Nkpts >= 1 && pSPARC->kptcomm_index != -1) {
Calculate_local_kpoints(pSPARC);
if (pSPARC->sqAmbientFlag == 0 && pSPARC->sqHighTFlag == 0 && pSPARC->OFDFTFlag == 0) {
Calculate_local_kpoints(pSPARC);
}
}

#ifdef DEBUG
Expand Down
5 changes: 4 additions & 1 deletion src/socket/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,10 @@ void reinit_mesh(SPARC_OBJ *pSPARC){

Calculate_kpoints(pSPARC);
if (pSPARC->Nkpts >= 1 && pSPARC->kptcomm_index != -1) {
Calculate_local_kpoints(pSPARC);
// set up sub-communicators
if (pSPARC->sqAmbientFlag == 0 && pSPARC->sqHighTFlag == 0 && pSPARC->OFDFTFlag == 0) {
Calculate_local_kpoints(pSPARC);
}
}
Calculate_PseudochargeCutoff(pSPARC);

Expand Down

0 comments on commit 6b53441

Please sign in to comment.