Commit cebed54a authored by julient31's avatar julient31
Browse files

Merge branch 'OSO' of github.com:alxvov/lammps into OSO

parents 66a50419 e3ed8d85
Loading
Loading
Loading
Loading
+1 −1
Changes for src/SPIN/min_spin.cpp: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ int MinSpin::iterate(int maxiter)
    // optimize timestep accross processes / replicas
    // need a force calculation for timestep optimization

    energy_force(0);
    if (iter == 0) energy_force(0);
    dts = evaluate_dt();

    // apply damped precessional dynamics to the spins
+6 −3
Changes for src/SPIN/min_spin_oso_cg.cpp: 6 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
------------------------------------------------------------------------- */

/* ------------------------------------------------------------------------
   Contributing authors: Aleksei Ivanov (UI)
   Contributing authors: Aleksei Ivanov (University of Iceland)
                         Julien Tranchida (SNL)

   Please cite the related publication:
@@ -181,7 +181,7 @@ int MinSpinOSO_CG::iterate(int maxiter)
    // optimize timestep accross processes / replicas
    // need a force calculation for timestep optimization

    energy_force(0);
    if (iter == 0) energy_force(0);
    dts = evaluate_dt();
  
    calc_gradient(dts);
@@ -313,7 +313,10 @@ void MinSpinOSO_CG::calc_gradient(double dts)
}

/* ----------------------------------------------------------------------
   search direction
   search direction:
   The Fletcher-Reeves conj. grad. method
   See Jorge Nocedal and Stephen J. Wright 'Numerical
   Optimization' Second Edition, 2006 (p. 121)
---------------------------------------------------------------------- */

void MinSpinOSO_CG::calc_search_direction(int iter)
+9 −6
Changes for src/SPIN/min_spin_oso_lbfgs.cpp: 9 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
------------------------------------------------------------------------- */

/* ------------------------------------------------------------------------
   Contributing authors: Aleksei Ivanov (UI)
   Contributing authors: Aleksei Ivanov (University of Iceland)
                         Julien Tranchida (SNL)

   Please cite the related publication:
@@ -171,9 +171,9 @@ int MinSpinOSO_LBFGS::iterate(int maxiter)

  if (nlocal_max < nlocal) {
    nlocal_max = nlocal;
    memory->grow(g_old,3*nlocal_max,"min/spin/oso/cg:g_old");
    memory->grow(g_cur,3*nlocal_max,"min/spin/oso/cg:g_cur");
    memory->grow(p_s,3*nlocal_max,"min/spin/oso/cg:p_s");
    memory->grow(g_old,3*nlocal_max,"min/spin/oso/lbfgs:g_old");
    memory->grow(g_cur,3*nlocal_max,"min/spin/oso/lbfgs:g_cur");
    memory->grow(p_s,3*nlocal_max,"min/spin/oso/lbfgs:p_s");
    memory->grow(rho,num_mem,"min/spin/oso/lbfgs:rho");
    memory->grow(ds,num_mem,3*nlocal_max,"min/spin/oso/lbfgs:ds");
    memory->grow(dy,num_mem,3*nlocal_max,"min/spin/oso/lbfgs:dy");
@@ -190,7 +190,7 @@ int MinSpinOSO_LBFGS::iterate(int maxiter)
    // optimize timestep accross processes / replicas
    // need a force calculation for timestep optimization
  
    energy_force(0);
    if (iter == 0) energy_force(0);
    //  dts = evaluate_dt();
    //  dts = 1.0;
    calc_gradient(1.0);
@@ -322,7 +322,10 @@ void MinSpinOSO_LBFGS::calc_gradient(double dts)
}

/* ----------------------------------------------------------------------
   search direction
   search direction:
   Limited-memory BFGS.
   See Jorge Nocedal and Stephen J. Wright 'Numerical
   Optimization' Second Edition, 2006 (p. 177)
---------------------------------------------------------------------- */

void MinSpinOSO_LBFGS::calc_search_direction(int iter)
+735 −0

File added.

Preview size limit exceeded, changes collapsed.

+84 −0

File added.

Preview size limit exceeded, changes collapsed.