Commit ac7fb4af by Francois Gygi

converted occ and eig from valarray to vector


git-svn-id: http://qboxcode.org/svn/qb/trunk@115 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 748c5578
......@@ -3,7 +3,7 @@
// SlaterDet.h
//
////////////////////////////////////////////////////////////////////////////////
// $Id: SlaterDet.h,v 1.11 2003-10-02 17:29:50 fgygi Exp $
// $Id: SlaterDet.h,v 1.12 2003-11-21 19:10:14 fgygi Exp $
#ifndef SLATERDET_H
#define SLATERDET_H
......@@ -33,8 +33,8 @@ class SlaterDet
const Context& ctxt_;
Basis basis_;
ComplexMatrix c_;
valarray<double> occ_;
valarray<double> eig_;
vector<double> occ_;
vector<double> eig_;
void byteswap_double(size_t n, double* x);
double fermi(double e, double mu, double fermitemp);
......@@ -51,8 +51,8 @@ class SlaterDet
const D3vector kpoint(void) const { return basis_.kpoint(); }
const ComplexMatrix& c(void) const { return c_; }
ComplexMatrix& c(void) { return c_; }
const valarray<double>& occ(void) const { return occ_; }
const valarray<double>& eig(void) const { return eig_; }
const vector<double>& occ(void) const { return occ_; }
const vector<double>& eig(void) const { return eig_; }
int nst(void) const { return c_.n(); }
int nstloc(void) const { return c_.nloc(); }
void resize(const UnitCell& cell, const UnitCell& refcell,
......@@ -69,9 +69,9 @@ class SlaterDet
void update_occ(int nspin, double mu, double temp);
double eig(int i) const { return eig_[i]; };
double occ(int i) const { return occ_[i]; };
void set_occ(valarray<double>& occ)
void set_occ(vector<double>& occ)
{ assert(occ_.size()==occ.size()); occ_ = occ; }
void set_eig(valarray<double>& eig)
void set_eig(vector<double>& eig)
{ assert(eig_.size()==eig.size()); eig_ = eig; }
double entropy(int nspin);
double ortho_error(void);
......
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