Commit b3b25b6a by Francois Gygi

added phi function


git-svn-id: http://qboxcode.org/svn/qb/trunk@507 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 225c3596
......@@ -3,7 +3,7 @@
// Species.C:
//
////////////////////////////////////////////////////////////////////////////////
// $Id: Species.C,v 1.8 2007-08-14 04:10:27 fgygi Exp $
// $Id: Species.C,v 1.9 2007-09-30 04:46:11 fgygi Exp $
#include "Species.h"
#include "spline.h"
......@@ -461,6 +461,18 @@ bool Species::initialize(double rcpsval)
return true;
}
void Species::phi(int l, double r, double &val)
{
if ( l > lmax_ || r > rps_[ndft_-1] )
{
val = 0.0;
}
else
{
splint(ndft_,&rps_[0],&phi_[l][0],&phi_spl_[l][0],r,&val);
}
}
void Species::vpsr(int l, double r, double &v)
{
if ( l > lmax_ || r > rps_[ndft_-1] )
......
......@@ -3,7 +3,7 @@
// Species.h:
//
////////////////////////////////////////////////////////////////////////////////
// $Id: Species.h,v 1.5 2007-03-17 01:14:00 fgygi Exp $
// $Id: Species.h,v 1.6 2007-09-30 04:46:11 fgygi Exp $
#ifndef SPECIES_H
#define SPECIES_H
......@@ -73,6 +73,7 @@ class Species
double eself(void)
{ return zval_ * zval_ / ( sqrt ( 2.0 * M_PI ) * rcps_ ); };
void phi(int l, double r, double &val); // phi(l,r) in r space
void vpsr(int l, double r, double &v); // Vps(l,r) in r space
void dvpsr(int l, double r, double &v, double &dv); // Vps and dVps/dr
void vlocg(double q, double &v); // Vloc(g)
......
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