From 991f54ebab0245b306d214e7d73b13ef4d327c57 Mon Sep 17 00:00:00 2001 From: Francois Gygi Date: Fri, 4 Mar 2016 00:21:46 +0000 Subject: [PATCH] changed name of gcontext_ to ctxt_ git-svn-id: http://qboxcode.org/svn/qb/trunk@1809 cba15fb0-1239-40c8-b417-11db7ca47a34 --- src/Bisection.C | 19 +++++++++---------- src/Bisection.h | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/Bisection.C b/src/Bisection.C index 45b7d76..59a6a89 100644 --- a/src/Bisection.C +++ b/src/Bisection.C @@ -74,12 +74,11 @@ int walsh(int l, int n, int i) } //////////////////////////////////////////////////////////////////////////////// -Bisection::Bisection(const SlaterDet& sd, int nlevels[3]) +Bisection::Bisection(const SlaterDet& sd, int nlevels[3]) : ctxt_(sd.context()) { // localization vectors are long int assert(sizeof(long int) >= 4); - gcontext_ = sd.context(); nst_ = sd.nst(); nstloc_ = sd.nstloc(); @@ -160,7 +159,7 @@ Bisection::Bisection(const SlaterDet& sd, int nlevels[3]) // max_xyproj_rsize: maximum real-space size of xy projectors vector max_xyproj_rsize( ndiv_[0]*ndiv_[1] , 0 ); MPI_Allreduce((void*)&xyproj_rsize[0] , (void*)&max_xyproj_rsize[0], - (int)xyproj_rsize.size(), MPI_INT ,MPI_MAX , gcontext_.comm()); + (int)xyproj_rsize.size(), MPI_INT ,MPI_MAX , ctxt_.comm()); // allocate matrices rmat_[i] for ( int i = 0; i < rmat_.size(); i++ ) @@ -404,7 +403,7 @@ void Bisection::compute_transform(const SlaterDet& sd, int maxsweep, double tol) // diagonalize projectors int nsweep = jade(maxsweep,tol,amat_,*u_,adiag_); #ifdef TIMING - if ( gcontext_.onpe0() ) + if ( ctxt_.onpe0() ) cout << "Bisection::compute_transform: nsweep=" << nsweep << " maxsweep=" << maxsweep << " tol=" << tol << endl; #endif @@ -422,7 +421,7 @@ void Bisection::compute_transform(const SlaterDet& sd, int maxsweep, double tol) { // broadcast diagonal of all matrices a to all tasks MPI_Bcast( (void *) &adiag_[imat][0], adiag_[imat].size(), - MPI_DOUBLE, 0, gcontext_.comm() ); + MPI_DOUBLE, 0, ctxt_.comm() ); } // print timers #ifdef TIMING @@ -431,9 +430,9 @@ void Bisection::compute_transform(const SlaterDet& sd, int maxsweep, double tol) double time = (*i).second.real(); double tmin = time; double tmax = time; - gcontext_.dmin(1,1,&tmin,1); - gcontext_.dmax(1,1,&tmax,1); - if ( gcontext_.myproc()==0 ) + ctxt_.dmin(1,1,&tmin,1); + ctxt_.dmax(1,1,&tmax,1); + if ( ctxt_.myproc()==0 ) { cout << "