Commit 6dfeabcd by Francois Gygi

modif resize member: recompute basis only if refcell or ecut changes


git-svn-id: http://qboxcode.org/svn/qb/trunk@177 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 2bca4a17
......@@ -3,7 +3,7 @@
// Basis.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: Basis.C,v 1.11 2003-11-20 20:30:26 fgygi Exp $
// $Id: Basis.C,v 1.12 2004-03-11 21:45:31 fgygi Exp $
#include "Basis.h"
#include "Context.h"
......@@ -311,6 +311,14 @@ bool BasisImpl::resize(const UnitCell& cell, const UnitCell& refcell,
assert(cell.volume() >= 0.0);
assert(refcell.volume() >= 0.0);
if ( ecut == ecut_ && refcell == refcell_ && refcell_.volume() != 0.0 )
{
cell_ = cell;
// only the cell changes, ecut and the refcell remain unchanged
update_g();
return true;
}
ecut_ = ecut;
cell_ = cell;
refcell_ = refcell;
......
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