Commit 6b59e0d3 by Francois Gygi

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 @@
// ChargeDensity.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: ChargeDensity.C,v 1.19 2008-09-08 15:56:18 fgygi Exp $
#include "ChargeDensity.h"
#include "Basis.h"
......@@ -29,10 +28,10 @@ using namespace std;
////////////////////////////////////////////////////////////////////////////////
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());
const Basis& vb = *vbasis_;
......
......@@ -15,7 +15,6 @@
// ChargeDensity.h
//
////////////////////////////////////////////////////////////////////////////////
// $Id: ChargeDensity.h,v 1.8 2008-09-08 15:56:18 fgygi Exp $
#ifndef CHARGEDENSITY_H
#define CHARGEDENSITY_H
......@@ -39,7 +38,7 @@ class ChargeDensity
private:
const Context& ctxt_;
const Context& vcontext_;
MPI_Comm vcomm_;
const Wavefunction& wf_;
Basis* vbasis_;
FourierTransform* vft_;
......@@ -56,8 +55,9 @@ class ChargeDensity
void update_density(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_; }
const Context& vcontext(void) const { return vcontext_; }
FourierTransform* vft(void) const { return vft_; }
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