Commit 801eaec0 by Francois Gygi

Fixed bug in reading reference cell for wavefunction velocity


git-svn-id: http://qboxcode.org/svn/qb/trunk@189 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 3659b48d
......@@ -3,7 +3,7 @@
// SampleReader.C:
//
////////////////////////////////////////////////////////////////////////////////
// $Id: SampleReader.C,v 1.13 2004-03-11 21:52:31 fgygi Exp $
// $Id: SampleReader.C,v 1.14 2004-03-19 00:56:04 fgygi Exp $
#include "Sample.h"
......@@ -347,35 +347,25 @@ void SampleReader::readSample (Sample& s, const string uri, bool serial)
wfvtmp.set_nempty(nempty);
// domain
double buf[3];
ctxt_.dbcast_recv(3,1,buf,1,0,0);
double buf[9];
ctxt_.dbcast_recv(9,1,buf,1,0,0);
D3vector a(buf[0],buf[1],buf[2]);
ctxt_.dbcast_recv(3,1,buf,1,0,0);
D3vector b(buf[0],buf[1],buf[2]);
ctxt_.dbcast_recv(3,1,buf,1,0,0);
D3vector c(buf[0],buf[1],buf[2]);
D3vector b(buf[3],buf[4],buf[5]);
D3vector c(buf[6],buf[7],buf[8]);
UnitCell uc(a,b,c);
// test if reference_domain present
UnitCell ruc;
int flag;
ctxt_.ibcast_recv(1,1,&flag,1,0,0);
if ( flag != 0 )
{
ctxt_.dbcast_recv(3,1,buf,1,0,0);
D3vector a(buf[0],buf[1],buf[2]);
ctxt_.dbcast_recv(3,1,buf,1,0,0);
D3vector b(buf[0],buf[1],buf[2]);
ctxt_.dbcast_recv(3,1,buf,1,0,0);
D3vector c(buf[0],buf[1],buf[2]);
ruc.set(a,b,c);
}
// grid
// receive only computed ecut
double ecut;
ctxt_.dbcast_recv(1,1,&ecut,1,0,0);
// reference_domain
ctxt_.dbcast_recv(9,1,buf,1,0,0);
D3vector ar(buf[0],buf[1],buf[2]);
D3vector br(buf[3],buf[4],buf[5]);
D3vector cr(buf[6],buf[7],buf[8]);
UnitCell ruc(ar,br,cr);
wfvtmp.resize(uc,ruc,ecut);
//cout << ctxt_.mype() << ": wfv resized, ecut=" << ecut << endl;
......
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