Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 37 additions & 1 deletion doc/.LaTeX/Electrostatics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
3 changes: 2 additions & 1 deletion doc/.LaTeX/Introduction.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Binary file modified doc/Manual.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions src/initialization.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down
Loading