Commit f657c7a2 by Francois Gygi

Use sigma only if compute_stress==true


git-svn-id: http://qboxcode.org/svn/qb/trunk@740 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 48b4e625
......@@ -15,7 +15,7 @@
// EnergyFunctional.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: EnergyFunctional.C,v 1.34 2009-08-30 00:22:57 fgygi Exp $
// $Id: EnergyFunctional.C,v 1.35 2009-11-05 07:03:39 fgygi Exp $
#include "EnergyFunctional.h"
#include "Sample.h"
......@@ -729,8 +729,10 @@ double EnergyFunctional::energy(bool compute_hpsi, Wavefunction& dwf,
}
}
sigma = sigma_ekin + sigma_econf + sigma_eps + sigma_enl +
sigma_ehart + sigma_exc + sigma_esr;
if ( compute_stress )
sigma = sigma_ekin + sigma_econf + sigma_eps + sigma_enl +
sigma_ehart + sigma_exc + sigma_esr;
if ( debug_stress && s_.ctxt_.onpe0() )
{
const double gpa = 29421.5;
......@@ -838,7 +840,6 @@ double EnergyFunctional::energy(bool compute_hpsi, Wavefunction& dwf,
<< " </stress_tensor>" << endl;
}
return etotal_;
}
......
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