Commit e9f5cfb7 by Francois Gygi

fixed const-ness of some members


git-svn-id: http://qboxcode.org/svn/qb/trunk@612 cba15fb0-1239-40c8-b417-11db7ca47a34
parent f6791fd6
......@@ -3,7 +3,7 @@
// SlaterDet.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: SlaterDet.C,v 1.49 2008-04-18 03:40:03 fgygi Exp $
// $Id: SlaterDet.C,v 1.50 2008-05-23 03:23:09 fgygi Exp $
#include "SlaterDet.h"
#include "FourierTransform.h"
......@@ -954,7 +954,7 @@ void SlaterDet::update_occ(int nel, int nspin)
}
////////////////////////////////////////////////////////////////////////////////
double SlaterDet::total_charge(void)
double SlaterDet::total_charge(void) const
{
// compute total charge from occ_[i]
double sum = 0.0;
......@@ -1016,7 +1016,7 @@ double SlaterDet::fermi(double e, double mu, double fermitemp)
}
////////////////////////////////////////////////////////////////////////////////
double SlaterDet::entropy(int nspin)
double SlaterDet::entropy(int nspin) const
{
// return dimensionless entropy
// the contribution to the free energy is - t_kelvin * k_boltz * wf.entropy()
......@@ -1036,7 +1036,7 @@ double SlaterDet::entropy(int nspin)
}
////////////////////////////////////////////////////////////////////////////////
double SlaterDet::ortho_error(void)
double SlaterDet::ortho_error(void) const
{
// deviation from orthogonality of c_
double error;
......@@ -1157,7 +1157,7 @@ double SlaterDet::localmemsize(void) const
////////////////////////////////////////////////////////////////////////////////
void SlaterDet::print(ostream& os, string encoding, double weight, int ispin,
int nspin)
int nspin) const
{
FourierTransform ft(*basis_,basis_->np(0),basis_->np(1),basis_->np(2));
vector<complex<double> > wftmp(ft.np012loc());
......@@ -1328,7 +1328,7 @@ void SlaterDet::print(ostream& os, string encoding, double weight, int ispin,
////////////////////////////////////////////////////////////////////////////////
void SlaterDet::write(SharedFilePtr& sfp, string encoding, double weight, int ispin,
int nspin)
int nspin) const
{
FourierTransform ft(*basis_,basis_->np(0),basis_->np(1),basis_->np(2));
vector<complex<double> > wftmp(ft.np012loc());
......@@ -1708,7 +1708,7 @@ void SlaterDet::write(SharedFilePtr& sfp, string encoding, double weight, int is
}
////////////////////////////////////////////////////////////////////////////////
void SlaterDet::info(ostream& os)
void SlaterDet::info(ostream& os) const
{
if ( ctxt_.onpe0() )
{
......
......@@ -3,7 +3,7 @@
// SlaterDet.h
//
////////////////////////////////////////////////////////////////////////////////
// $Id: SlaterDet.h,v 1.24 2008-04-18 03:40:33 fgygi Exp $
// $Id: SlaterDet.h,v 1.25 2008-05-23 03:23:09 fgygi Exp $
#ifndef SLATERDET_H
#define SLATERDET_H
......@@ -67,7 +67,7 @@ class SlaterDet
void align(const SlaterDet& sd);
void ortho_align(const SlaterDet& sd);
std::complex<double> dot(const SlaterDet& sd) const;
double total_charge(void);
double total_charge(void) const;
void update_occ(int nel, int nspin);
void update_occ(int nspin, double mu, double temp);
double eig(int i) const { return eig_[i]; };
......@@ -85,16 +85,16 @@ class SlaterDet
for ( int i = 0; i < eig.size(); i++ )
eig_[i] = eig[i];
}
double entropy(int nspin);
double ortho_error(void);
double entropy(int nspin) const;
double ortho_error(void) const;
double memsize(void) const;
double localmemsize(void) const;
SlaterDet& operator=(SlaterDet& rhs);
void print(std::ostream& os, std::string encoding, double weight, int ispin,
int nspin);
int nspin) const;
void write(SharedFilePtr& fh, std::string encoding, double weight, int ispin,
int nspin);
void info(std::ostream& os);
int nspin) const;
void info(std::ostream& os) const;
};
std::ostream& operator << ( std::ostream& os, SlaterDet& sd );
......
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