diff --git a/ChangeLog b/ChangeLog index b9c2bf8e..c1a153ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,14 @@ -changes +-------------- +October 29, 2026 +Name: Sayan Bhowmik +Changes: doc/.LaTeX/Electrostatics.tex, doc/.LaTeX/Introduction.tex, doc/Manual.pdf, src/initialization.c +1. Documented REFERENCE_CUTOFF_FAC (integer, default 0) in the manual. If > 0, REFERENCE_CUTOFF is set to + REFERENCE_CUTOFF_FAC * max(dx, dy, dz); this overrides REFERENCE_CUTOFF. +2. Corrected the comments on the REFERENCE_CUTOFF and REFERENCE_CUTOFF_FAC defaults. + -------------- October 27, 2026 Name: Sayan Bhowmik diff --git a/doc/.LaTeX/Electrostatics.tex b/doc/.LaTeX/Electrostatics.tex index 32edb2ff..a68d6877 100644 --- a/doc/.LaTeX/Electrostatics.tex +++ b/doc/.LaTeX/Electrostatics.tex @@ -141,7 +141,43 @@ \end{block} \begin{block}{Remark} -This number should be smaller than half the smallest interatomic distance. +This number should be smaller than half the smallest interatomic distance. It is overridden by \hyperlink{REFERENCE_CUTOFF_FAC}{\texttt{REFERENCE\_CUTOFF\_FAC}} when the latter is greater than 0. +\end{block} + +\end{frame} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{frame}[allowframebreaks]{\texttt{REFERENCE\_CUTOFF\_FAC}} \label{REFERENCE_CUTOFF_FAC} +\vspace*{-12pt} +\begin{columns} +\column{0.4\linewidth} +\begin{block}{Type} +Integer +\end{block} + +\begin{block}{Default} +0 +\end{block} + +\column{0.4\linewidth} +\begin{block}{Unit} +No unit +\end{block} + +\begin{block}{Example} +\texttt{REFERENCE\_CUTOFF\_FAC}: 2 +\end{block} +\end{columns} + +\begin{block}{Description} +If greater than 0, \hyperlink{REFERENCE_CUTOFF}{\texttt{REFERENCE\_CUTOFF}} is set to \texttt{REFERENCE\_CUTOFF\_FAC} $\times \max(\Delta x, \Delta y, \Delta z)$, where $\Delta x$, $\Delta y$, $\Delta z$ are the mesh spacings. The default 0 disables this option. +\end{block} + +\begin{block}{Remark} +Overrides \hyperlink{REFERENCE_CUTOFF}{\texttt{REFERENCE\_CUTOFF}} when greater than 0. \end{block} \end{frame} diff --git a/doc/.LaTeX/Introduction.tex b/doc/.LaTeX/Introduction.tex index b92abdd6..544e45a7 100644 --- a/doc/.LaTeX/Introduction.tex +++ b/doc/.LaTeX/Introduction.tex @@ -346,7 +346,8 @@ \hyperlink{TOL_POISSON}{\texttt{TOL\_POISSON}} $\vert$ \hyperlink{MAXIT_POISSON}{\texttt{MAXIT\_POISSON}} $\vert$ \hyperlink{TOL_PSEUDOCHARGE}{\texttt{TOL\_PSEUDOCHARGE}} $\vert$ - \hyperlink{REFERENCE_CUTOFF}{\texttt{REFERENCE\_CUTOFF}} + \hyperlink{REFERENCE_CUTOFF}{\texttt{REFERENCE\_CUTOFF}} $\vert$ + \hyperlink{REFERENCE_CUTOFF_FAC}{\texttt{REFERENCE\_CUTOFF\_FAC}} \end{block} \vspace{-2mm} diff --git a/doc/Manual.pdf b/doc/Manual.pdf index 8a603a28..20c5c4e2 100644 Binary files a/doc/Manual.pdf and b/doc/Manual.pdf differ diff --git a/src/initialization.c b/src/initialization.c index 886c8dc0..0fdef3da 100644 --- a/src/initialization.c +++ b/src/initialization.c @@ -772,8 +772,8 @@ void set_defaults(SPARC_INPUT_OBJ *pSPARC_Input, SPARC_OBJ *pSPARC) { pSPARC_Input->precond_resta_q0 = 1.36; pSPARC_Input->precond_resta_Rs = 2.76; - pSPARC_Input->REFERENCE_CUTOFF = 0.5; // default reference cutoff radius for nonlocal pseudopotential - pSPARC_Input->REFERENCE_CUTOFF_FAC = 0; // default reference cutoff radius relative to mesh size for nonlocal pseudopotential + pSPARC_Input->REFERENCE_CUTOFF = 0.5; // default cutoff radius (Bohr) of the reference potential for the overlapping pseudocharge correction + pSPARC_Input->REFERENCE_CUTOFF_FAC = 0; // default: off; if > 0, REFERENCE_CUTOFF = REFERENCE_CUTOFF_FAC * max(dx, dy, dz) /* default mixing */ pSPARC_Input->MixingVariable = -1; // default mixing variabl (will be set to 'density' mixing) @@ -4000,7 +4000,7 @@ void write_output_init(SPARC_OBJ *pSPARC) { } fprintf(output_fp,"***************************************************************************\n"); - fprintf(output_fp,"* SPARC (version October 27, 2026) *\n"); + fprintf(output_fp,"* SPARC (version October 29, 2026) *\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);