Commit d9306a58 authored by julient31's avatar julient31
Browse files

Commit JT 092419

- added inf norm option
parent a0f0c235
Loading
Loading
Loading
Loading
+14.5 KiB
Loading image diff...
+15 −0
Original line number Diff line number Diff line
\documentclass[preview]{standalone}
\usepackage{varwidth}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath, amssymb, graphics, setspace}

\begin{document}
\begin{varwidth}{50in}
  \begin{equation}
    || \vec{F} ||_{inf} 
    = {\rm max}\left(|F_1^1|, |F_1^2|, |F_1^3| \cdots, 
    |F_N^1|, |F_N^2|, |F_N^3|\right)
    \nonumber
  \end{equation}
\end{varwidth}
\end{document}
+7 −1
Original line number Diff line number Diff line
@@ -20,7 +20,8 @@ keyword = {dmax} or {line} or {norm} or {alpha_damp} or {discrete_factor}
    backtrack,quadratic,forcezero,spin_cubic,spin_none = style of linesearch to use 
  {norm} value = {two} or {max}
    two = Euclidean two-norm (length of 3N vector)
    max = max value of across all 3-vectors
    inf = max force component across all 3-vectors
    max = max force norm across all 3-vectors
  {alpha_damp} value = damping
    damping = fictitious Gilbert damping for spin minimization (adim)
  {discrete_factor} value = factor
@@ -86,6 +87,11 @@ all atoms

:c,image(Eqs/norm_max.jpg) 

The {inf} norm takes the maximum component across the forces of
all atoms in the system: 

:c,image(Eqs/norm_inf.jpg) 

For the min styles {spin}, {spin/cg} and {spin/lbfgs}, the force
norm is replaced by the spin-torque norm.

+4 −2
Original line number Diff line number Diff line
@@ -165,8 +165,10 @@ int MinSpin::iterate(int maxiter)

    fmdotfm = fmsq = 0.0;
    if (update->ftol > 0.0) {
      if (normstyle == MAX) fmsq = max_torque();	// max norm
      else fmsq = total_torque();			// Euclidean 2-norm
      if (normstyle == MAX) fmsq = max_torque();	// max torque norm
      else if (normstyle == INF) fmsq = inf_torque();	// inf torque norm
      else if (normstyle == TWO) fmsq = total_torque();	// Euclidean torque 2-norm
      else error->all(FLERR,"Illegal min_modify command");
      fmdotfm = fmsq*fmsq;
      if (update->multireplica == 0) {
        if (fmdotfm < update->ftol*update->ftol) return FTOL;
+4 −2
Original line number Diff line number Diff line
@@ -270,8 +270,10 @@ int MinSpinCG::iterate(int maxiter)

    fmdotfm = fmsq = 0.0;
    if (update->ftol > 0.0) {
      if (normstyle == MAX) fmsq = max_torque();	// max norm
      else fmsq = total_torque();			// Euclidean 2-norm
      if (normstyle == MAX) fmsq = max_torque();	// max torque norm
      else if (normstyle == INF) fmsq = inf_torque();	// inf torque norm
      else if (normstyle == TWO) fmsq = total_torque();	// Euclidean torque 2-norm
      else error->all(FLERR,"Illegal min_modify command");
      fmdotfm = fmsq*fmsq;
      if (update->multireplica == 0) {
        if (fmdotfm < update->ftol*update->ftol) return FTOL;
Loading