Commit 6b59e0d3 authored by Francois Gygi's avatar Francois Gygi
Browse files

update for use of Basis without Context

git-svn-id: http://qboxcode.org/svn/qb/trunk@1337 cba15fb0-1239-40c8-b417-11db7ca47a34
parent df1b947a
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
// ChargeDensity.C // ChargeDensity.C
// //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// $Id: ChargeDensity.C,v 1.19 2008-09-08 15:56:18 fgygi Exp $
#include "ChargeDensity.h" #include "ChargeDensity.h"
#include "Basis.h" #include "Basis.h"
...@@ -29,10 +28,10 @@ using namespace std; ...@@ -29,10 +28,10 @@ using namespace std;
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
ChargeDensity::ChargeDensity(const Wavefunction& wf) : ctxt_(wf.context()), ChargeDensity::ChargeDensity(const Wavefunction& wf) : ctxt_(wf.context()),
wf_(wf), vcontext_(wf.sd(0,0)->basis().context()) wf_(wf), vcomm_(wf.sd(0,0)->basis().comm())
{ {
vbasis_ = new Basis(vcontext_, D3vector(0,0,0)); vbasis_ = new Basis(vcomm_, D3vector(0,0,0));
vbasis_->resize(wf.cell(),wf.refcell(),4.0*wf.ecut()); vbasis_->resize(wf.cell(),wf.refcell(),4.0*wf.ecut());
const Basis& vb = *vbasis_; const Basis& vb = *vbasis_;
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
// ChargeDensity.h // ChargeDensity.h
// //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// $Id: ChargeDensity.h,v 1.8 2008-09-08 15:56:18 fgygi Exp $
#ifndef CHARGEDENSITY_H #ifndef CHARGEDENSITY_H
#define CHARGEDENSITY_H #define CHARGEDENSITY_H
...@@ -39,7 +38,7 @@ class ChargeDensity ...@@ -39,7 +38,7 @@ class ChargeDensity
private: private:
const Context& ctxt_; const Context& ctxt_;
const Context& vcontext_; MPI_Comm vcomm_;
const Wavefunction& wf_; const Wavefunction& wf_;
Basis* vbasis_; Basis* vbasis_;
FourierTransform* vft_; FourierTransform* vft_;
...@@ -56,8 +55,9 @@ class ChargeDensity ...@@ -56,8 +55,9 @@ class ChargeDensity
void update_density(void); void update_density(void);
void update_rhor(void); void update_rhor(void);
const Context& context(void) const { return ctxt_; }
MPI_Comm vcomm(void) const { return vcomm_; }
Basis* vbasis(void) const { return vbasis_; } Basis* vbasis(void) const { return vbasis_; }
const Context& vcontext(void) const { return vcontext_; }
FourierTransform* vft(void) const { return vft_; } FourierTransform* vft(void) const { return vft_; }
FourierTransform* ft(int ikp) const { return ft_[ikp]; } FourierTransform* ft(int ikp) const { return ft_[ikp]; }
......
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