calculate energy in the beginning only once

This commit is contained in:
alxvov 2019-07-02 17:03:15 +00:00
parent ee8d3ced31
commit fd5bc857b2
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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);

View File

@ -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);