Commit 38af1af8 by Francois Gygi

rel1_57_11

git-svn-id: http://qboxcode.org/svn/qb/branches/rel1_57@1351 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 3da5749a
......@@ -871,10 +871,11 @@ Wavefunction& Wavefunction::operator=(const Wavefunction& wf)
assert(nspin_ == wf.nspin_);
assert(nrowmax_ == wf.nrowmax_);
assert(deltaspin_ == wf.deltaspin_);
assert(cell_ == wf.cell_);
//!!assert(cell_ == wf.cell_);
assert(refcell_ == wf.refcell_);
assert(ecut_ == wf.ecut_);
cell_ = wf.cell_;
weight_ = wf.weight_;
kpoint_ = wf.kpoint_;
......
--------------------------------------------------------------------------------
rel1_57_11
--------------------------------------------------------------------------------
r1349: modified Wavefunction::operator= to allow assignment between wfs with
different cell sizes. Needed for variable cell calculations.
--------------------------------------------------------------------------------
rel1_57_10
--------------------------------------------------------------------------------
r1344: removed dependency on Context in multiple classes
......
......@@ -19,5 +19,5 @@
#include "release.h"
std::string release(void)
{
return std::string("1.57.10");
return std::string("1.57.11");
}
......@@ -18,7 +18,6 @@
#include <iomanip>
using namespace std;
#include "Context.h"
#include "Basis.h"
#include "FourierTransform.h"
#include "Timer.h"
......@@ -41,8 +40,6 @@ int main(int argc, char **argv)
#if USE_APC
ApcInit();
#endif
// extra scope to ensure that Context objects get destructed before
// the MPI_Finalize call
{
#if USE_MPI
......@@ -53,8 +50,8 @@ int main(int argc, char **argv)
const char* processor_name = "serial";
#endif
Context ctxt_global;
int mype = ctxt_global.mype();
int mype;
MPI_Comm_rank(MPI_COMM_WORLD,&mype);
cout << " Process " << mype << " on " << processor_name << endl;
D3vector a,b,c,kpoint;
......@@ -89,17 +86,11 @@ int main(int argc, char **argv)
UnitCell cell(a,b,c);
const double omega = cell.volume();
//cout << " ctxt_global: " << ctxt_global;
//cout << " ctxt_global.comm(): " << ctxt_global.comm() << endl;
Context ctxt(ctxt_global.size(),1);
//cout << " ctxt: " << ctxt;
//cout << " ctxt.comm(): " << ctxt.comm() << endl;
// start scope of wf-v transforms
{
// transform and interpolate as for wavefunctions
Basis basis(ctxt,kpoint);
Basis basis(MPI_COMM_WORLD,kpoint);
basis.resize(cell,cell,ecut);
FourierTransform ft(basis,basis.np(0),basis.np(1),basis.np(2));
FourierTransform ft2(basis,2*basis.np(0),2*basis.np(1),2*basis.np(2));
......@@ -112,7 +103,7 @@ int main(int argc, char **argv)
double flops = 2*basis.nrod_loc() * fft_flops(ft2.np2()) +
ft2.np1()/2 * ft2.np2() * fft_flops(ft2.np0()) +
ft2.np0() * ft2.np2() * fft_flops(ft2.np1());
if ( ctxt.onpe0() )
if ( mype == 0 )
{
cout << " wfbasis.size() = " << basis.size() << endl;
cout << " wfbasis.np() = " << basis.np(0) << " " << basis.np(1)
......@@ -143,13 +134,13 @@ int main(int argc, char **argv)
#endif
// test ft (small grid)
cout << ctxt.mype() << ": ft.np2_loc(): " << ft.np2_loc() << endl;
cout << mype << ": ft.np2_loc(): " << ft.np2_loc() << endl;
cout << " test ft: ";
ft.forward(&f1[0],&x[0]);
cout << " forward done ";
ft.backward(&x[0],&f1[0]);
cout << " backward done " << endl;
ctxt.barrier();
MPI_Barrier(MPI_COMM_WORLD);
#if 0
......@@ -328,7 +319,7 @@ int main(int argc, char **argv)
#if 1
////////////////////////////////////////////////////////////
// v(g)->vgrid
Basis vbasis(ctxt,kpoint);
Basis vbasis(MPI_COMM_WORLD,kpoint);
vbasis.resize(cell,cell,4.0*ecut);
cout << " vbasis.np() = " << vbasis.np(0) << " " << vbasis.np(1)
<< " " << vbasis.np(2) << 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