Commit 6461979a by Francois Gygi

fixed init in deallocate, cleaned up syntax

git-svn-id: http://qboxcode.org/svn/qb/trunk@1140 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 9a917bbb
......@@ -77,7 +77,7 @@ void Wavefunction::allocate(void)
// create SlaterDets using kpoint list
const int nkp = kpoint_.size();
sd_.resize(nspin_);
for ( int ispin = 0; ispin < nspin_; ispin ++ )
for ( int ispin = 0; ispin < nspin_; ispin++ )
{
sd_[ispin].resize(nkp);
for ( int ikp = 0; ikp < nkp; ikp++ )
......@@ -90,7 +90,7 @@ void Wavefunction::allocate(void)
////////////////////////////////////////////////////////////////////////////////
void Wavefunction::deallocate(void)
{
for ( int ispin = 0; ispin < sd_.size(); ispin ++ )
for ( int ispin = 0; ispin < sd_.size(); ispin++ )
{
for ( int ikp = 0; ikp < sd_[ispin].size(); ikp++ )
{
......@@ -281,7 +281,7 @@ void Wavefunction::set_nspin(int nspin)
compute_nst();
allocate();
resize(cell_,refcell_,ecut_);
reset();
init();
}
////////////////////////////////////////////////////////////////////////////////
......
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