Commit de867adb by Francois Gygi

make gcontext_ a const reference


git-svn-id: http://qboxcode.org/svn/qb/trunk@1810 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 991f54eb
......@@ -36,7 +36,8 @@ using namespace std;
////////////////////////////////////////////////////////////////////////////////
ExchangeOperator::ExchangeOperator( Sample& s, double HFCoeff)
: s_(s), wf0_(s.wf), dwf0_(s.wf), wfc_(s.wf), HFCoeff_(HFCoeff)
: s_(s), wf0_(s.wf), dwf0_(s.wf), wfc_(s.wf), HFCoeff_(HFCoeff),
gcontext_(s.wf.sd(0,0)->context())
{
eex_ = 0.0; // exchange energy
rcut_ = 1.0; // constant of support function for exchange integration
......@@ -46,9 +47,6 @@ ExchangeOperator::ExchangeOperator( Sample& s, double HFCoeff)
// column communicator
vcomm_ = s_.wf.sd(0,0)->basis().comm();
// global context
gcontext_ = s_.wf.sd(0,0)->context();
// check if the only kpoint is the gamma point:
gamma_only_ = ( s_.wf.nkp()==1 ) && ( s_.wf.sd(0,0)->basis().real() );
......
......@@ -113,7 +113,7 @@ class ExchangeOperator
vector<complex<double> > buffer_forces_2_;
// contexts and communicators
Context gcontext_;
const Context &gcontext_;
MPI_Comm vcomm_;
// Communications
......
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