Commit 13ef1320 by Francois Gygi

fixed current_gfdata_pos variable

git-svn-id: http://qboxcode.org/svn/qb/trunk@1326 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 043a2e54
......@@ -35,7 +35,8 @@ using namespace std;
////////////////////////////////////////////////////////////////////////////////
WavefunctionHandler::WavefunctionHandler(Wavefunction& wf,
DoubleMatrix& gfdata, int& current_gfdata_pos ) : wf_(wf), gfdata_(gfdata) {}
DoubleMatrix& gfdata, int& current_gfdata_pos ) : wf_(wf), gfdata_(gfdata),
current_gfdata_pos_(current_gfdata_pos) {}
////////////////////////////////////////////////////////////////////////////////
WavefunctionHandler::~WavefunctionHandler() {}
......@@ -406,12 +407,12 @@ void WavefunctionHandler::endElement(const XMLCh* const uri,
cout << "WavefunctionHandler: sd->nst()= " << sd->nst() << endl;
cout << "WavefunctionHandler: wf_.nkp()= " << wf_.nkp() << endl;
cout << "WavefunctionHandler: current_gfdata_pos= "
<< current_gfdata_pos << endl;
<< current_gfdata_pos_ << endl;
#endif
assert(current_gfdata_pos < gfdata_.n());
wftmpr.getsub(gfdata_,wftmpr_size,sd->nst(),0,current_gfdata_pos);
current_gfdata_pos += sd->nst();
assert(current_gfdata_pos_ < gfdata_.n());
wftmpr.getsub(gfdata_,wftmpr_size,sd->nst(),0,current_gfdata_pos_);
current_gfdata_pos_ += sd->nst();
#if DEBUG
// Check orthogonality by computing overlap matrix
......
......@@ -38,7 +38,8 @@ class WavefunctionHandler : public StructureHandler
int nx_, ny_, nz_;
int current_gf_nx,current_gf_ny,current_gf_nz;
std::string current_gf_encoding;
int current_ispin,current_ikp, current_gfdata_pos;
int current_ispin,current_ikp;
int& current_gfdata_pos_;
std::vector<double> dmat_;
double current_kx, current_ky, current_kz, current_weight;
int current_size;
......
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