Commit c467a75f by Francois Gygi

disabled quad extrapolation and compute_fv for (real) 1.14.0 release


git-svn-id: http://qboxcode.org/svn/qb/trunk@197 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 6a097341
......@@ -3,7 +3,7 @@
// BOSampleStepper.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: BOSampleStepper.C,v 1.6 2004-04-17 01:18:36 fgygi Exp $
// $Id: BOSampleStepper.C,v 1.7 2004-04-19 21:54:13 fgygi Exp $
#include "BOSampleStepper.h"
#include "EnergyFunctional.h"
......@@ -30,7 +30,8 @@ BOSampleStepper::BOSampleStepper(Sample& s, EnergyFunctional& ef, int nite) :
////////////////////////////////////////////////////////////////////////////////
void BOSampleStepper::step(int niter)
{
const bool quad_extrapolation = true;
const bool quad_extrapolation = false;
const bool compute_fv = false;
enum ortho_type { GRAM, LOWDIN, ORTHO_ALIGN, RICCATI };
AtomSet& atoms = s_.atoms;
......@@ -359,10 +360,18 @@ void BOSampleStepper::step(int niter)
wf_stepper->preprocess();
for ( int ite = 0; ite < nite_; ite++ )
{
//double energy = ef_.energy(true,dwf,false,fion,false,sigma_eks);
double energy = 0.0;
// compute forces at each electronic step for monitoring
double energy = ef_.energy(true,dwf,compute_forces,fion,false,sigma_eks);
if ( compute_forces && compute_fv )
{
// compute forces at each electronic step for monitoring
energy = ef_.energy(true,dwf,compute_forces,fion,false,sigma_eks);
}
else
{
// normal case: do not compute forces during wf optimization
energy =ef_.energy(true,dwf,false,fion,false,sigma_eks);
}
wf_stepper->update(dwf);
......@@ -395,7 +404,7 @@ void BOSampleStepper::step(int niter)
}
// compute force*velocity
if ( compute_forces )
if ( compute_forces && compute_fv )
{
double fv = 0.0;
for ( int is = 0; is < atoms.atom_list.size(); is++ )
......
......@@ -54,9 +54,10 @@ uninitialized matrices sometimes caused NaNs to appear in the padding areas
of the danl matrix in NonLocalPotential.C.
Note that the clear() call was removed in rel1_13_0, which invalidates 1_13_0.
Matrix.C: Added assert()'s in clear() functions.
BOSampleStepper.C: Introduced quadratic extrapolation of wfs. Added calculation
BOSampleStepper.C: Introduced quadratic wf extrapolation option (switch
in BOSampleStepper.C, currently disabled in 1.14.0. Added calculation
of forces at each electronic step to monitor the convergence
of the force x velocity product.
of the force x velocity product (disabled in 1.14.0).
PSDWavefunctionStepper.C: Fixed bug in usage of preconditioner (affects
1_13_0 only).
PSDAWavefunctionStepper.C: Fixed bug in usage of preconditioner (see above).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment