Commit 5f9675bb by Francois Gygi

Moved ekin and temp to IonicStepper. Added member functions.


git-svn-id: http://qboxcode.org/svn/qb/trunk@131 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 38a06a40
......@@ -3,7 +3,7 @@
// IonicStepper.h:
//
////////////////////////////////////////////////////////////////////////////////
// $Id: IonicStepper.h,v 1.1 2003-11-21 20:01:06 fgygi Exp $
// $Id: IonicStepper.h,v 1.2 2003-11-27 01:18:41 fgygi Exp $
#ifndef IONICSTEPPER_H
#define IONICSTEPPER_H
......@@ -24,6 +24,7 @@ class IonicStepper
vector<vector< double> > tau0_; // tau0_[nsp_][3*na_]
vector<vector< double> > vel_; // vel_[nsp_][3*na_]
vector<double> pmass_; // pmass_[nsp_]
double ekin_; // kinetic energy
public:
......@@ -47,12 +48,21 @@ class IonicStepper
atoms_.get_velocities(vel_);
}
double tau0(int is, int i) const { return tau0_[is][i]; }
double vel(int is, int i) const { return vel_[is][i]; }
const vector<vector<double> >& tau0(void) const { return tau0_; }
virtual void preprocess(const vector<vector<double> >&fion) {}
virtual void postprocess(const vector<vector<double> >&fion) {}
virtual void update(const vector<vector< double> >& fion) = 0;
virtual double ekin(void) const = 0;
virtual double temp(void) const = 0;
double ekin(void) const { return ekin_; }
double temp(void) const
{
const double boltz = 1.0 / ( 11605.0 * 2.0 * 13.6058 );
if ( ndofs_ > 0.0 )
return 2.0 * ( ekin_ / boltz ) / ndofs_;
else
return 0.0;
}
virtual ~IonicStepper() {}
......
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