Commit c67d4c31 by Francois Gygi

Fix units of ext_stress

parent 648574ea
......@@ -724,7 +724,8 @@ double EnergyFunctional::energy(bool compute_hpsi, Wavefunction& dwf,
if ( compute_stress )
{
valarray<double> sigma_ext(s_.ctrl.ext_stress,6);
const double pext = (sigma_ext[0]+sigma_ext[1]+sigma_ext[2])/3.0;
const double gpa = 29421.5;
const double pext = (sigma_ext[0]+sigma_ext[1]+sigma_ext[2])/(3.0*gpa);
epv_ = pext * omega;
enthalpy_ += epv_;
}
......@@ -880,7 +881,6 @@ double EnergyFunctional::energy(bool compute_hpsi, Wavefunction& dwf,
if ( debug_stress && s_.ctxt_.onpe0() )
{
//const double gpa = 29421.5;
cout.setf(ios::fixed,ios::floatfield);
cout.setf(ios::right,ios::adjustfield);
cout << setprecision(8);
......
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