Commit c1261b79 by Francois Gygi

Fix units of stress_tol test in BOSampleStepper

parent 211d894b
...@@ -178,6 +178,8 @@ void BOSampleStepper::step(int niter) ...@@ -178,6 +178,8 @@ void BOSampleStepper::step(int niter)
const bool compute_mlwfc = s_.ctrl.wf_diag == "MLWFC"; const bool compute_mlwfc = s_.ctrl.wf_diag == "MLWFC";
enum ortho_type { GRAM, LOWDIN, ORTHO_ALIGN, RICCATI }; enum ortho_type { GRAM, LOWDIN, ORTHO_ALIGN, RICCATI };
const double gpa = 29421.5;
AtomSet& atoms = s_.atoms; AtomSet& atoms = s_.atoms;
Wavefunction& wf = s_.wf; Wavefunction& wf = s_.wf;
const int nspin = wf.nspin(); const int nspin = wf.nspin();
...@@ -396,8 +398,9 @@ void BOSampleStepper::step(int niter) ...@@ -396,8 +398,9 @@ void BOSampleStepper::step(int niter)
if ( stress_tol > 0.0 ) if ( stress_tol > 0.0 )
{ {
compute_sigma();
for ( int i = 0; i < sigma.size(); i++ ) for ( int i = 0; i < sigma.size(); i++ )
maxstress = max(maxstress, fabs(sigma[i])); maxstress = max(maxstress, gpa*fabs(sigma[i]));
} }
if ( onpe0 ) if ( onpe0 )
......
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