Skip to content

Commit

Permalink
Merge pull request #106 from mingpu/sweep_read_in_default
Browse files Browse the repository at this point in the history
Minor change of the file sweeps.h
  • Loading branch information
emstoudenmire committed Jul 9, 2016
2 parents 3e357c9 + 3edc76a commit 4df7b8c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions itensor/mps/sweeps.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,24 @@ tableInit(InputGroup& table)
noise_ = std::vector<Real>(nsweep_+1);

table.SkipLine(); //SkipLine so we can have a table key
int n_last = 1;
for(int i = 1; i <= nsweep_; i++)
{
table.file() >> maxm_[i] >> minm_[i] >> cutoff_[i] >> niter_[i] >> noise_[i];
if(maxm_[i] == 0)
{
n_last = i - 1 ;
break ;
}
}
for(int i = n_last + 1; i <= nsweep_; i++)
{
maxm_[i] = maxm_[n_last];
minm_[i] = minm_[n_last];
cutoff_[i] = cutoff_[n_last];
niter_[i] = niter_[n_last];
noise_[i] = noise_[n_last];
}

} //Sweeps::tableInit

Expand Down

0 comments on commit 4df7b8c

Please sign in to comment.