Interpol2D Class Reference

#include <Interpol2D.h>

List of all members.

Public Member Functions

 Interpol2D ()
 Interpol2D (unsigned int xdivs, double xmin, double xmax, unsigned int ydivs, double ymin, double ymax)
void setXmin (double value)
double getXmin () const
void setXmax (double value)
double getXmax () const
void setXdivs (unsigned int value)
unsigned int getXdivs () const
void setDx (double value)
double getDx () const
void setYmin (double value)
double getYmin () const
void setYmax (double value)
double getYmax () const
void setYdivs (unsigned int value)
unsigned int getYdivs () const
void setDy (double value)
double getDy () const
void setSy (double value)
double getSy () const
double getInterpolatedValue (vector< double > xy) const
void lookupReturn (const Eref &e, double v1, double v2)
void lookup (double v1, double v2)
void appendTableVector (vector< vector< double > > value)
double interpolate (double x, double y) const
double indexWithoutCheck (double x, double y) const
double innerLookup (double x, double y) const
bool operator== (const Interpol2D &other) const
bool operator< (const Interpol2D &other) const
double invDy () const
void setTableValue (vector< unsigned int > index, double value)
double getTableValue (vector< unsigned int > index) const
void setTableVector (vector< vector< double > > value)
vector< vector< double > > getTableVector () const
void appendTableVector (const vector< vector< double > > &value)
void resize (unsigned int xsize, unsigned int ysize, double init=0.0)
unsigned int xdivs () const
unsigned int ydivs () const
void print (const string &fname, bool doAppend) const
void load (const string &fname, unsigned int skiplines)

Static Public Member Functions

static const CinfoinitCinfo ()

Static Public Attributes

static const unsigned int MAX_DIVS = 100000

Friends

istream & operator>> (istream &, Interpol2D &)

Detailed Description

2 Dimensional table, with interpolation. The internal vector is accessed like this: table_[ xIndex ][ yIndex ], with the x- and y-coordinates used as the first and second indices respectively.


Constructor & Destructor Documentation

Interpol2D::Interpol2D (  ) 
Interpol2D::Interpol2D ( unsigned int  xdivs,
double  xmin,
double  xmax,
unsigned int  ydivs,
double  ymin,
double  ymax 
)

References doubleEq(), and resize().

Here is the call graph for this function:


Member Function Documentation

void Interpol2D::appendTableVector ( const vector< vector< double > > &  value  ) 
void Interpol2D::appendTableVector ( vector< vector< double > >  value  ) 
double Interpol2D::getDx (  )  const

References xdivs().

Referenced by initCinfo().

Here is the call graph for this function:

double Interpol2D::getDy (  )  const

References ydivs().

Referenced by initCinfo().

Here is the call graph for this function:

double Interpol2D::getInterpolatedValue ( vector< double >  xy  )  const

Referenced by initCinfo().

double Interpol2D::getSy (  )  const
double Interpol2D::getTableValue ( vector< unsigned int >  index  )  const

Referenced by initCinfo().

vector< vector< double > > Interpol2D::getTableVector (  )  const
unsigned int Interpol2D::getXdivs (  )  const
double Interpol2D::getXmax (  )  const
double Interpol2D::getXmin (  )  const
unsigned int Interpol2D::getYdivs (  )  const
double Interpol2D::getYmax (  )  const
double Interpol2D::getYmin (  )  const
double Interpol2D::indexWithoutCheck ( double  x,
double  y 
) const
const Cinfo * Interpol2D::initCinfo (  )  [static]
double Interpol2D::innerLookup ( double  x,
double  y 
) const

References interpolate().

Referenced by HHGate2D::lookupBoth(), and lookupReturn().

Here is the call graph for this function:

double Interpol2D::interpolate ( double  x,
double  y 
) const

Performs bi-linear interpolation.

Modified by Vishaka Datta S, 2011, NCBS. Interpolation now performs bounds checking.

Referenced by innerLookup().

double Interpol2D::invDy (  )  const [inline]
void Interpol2D::load ( const string &  fname,
unsigned int  skiplines 
)
void Interpol2D::lookup ( double  v1,
double  v2 
)

Referenced by initCinfo().

void Interpol2D::lookupReturn ( const Eref e,
double  v1,
double  v2 
)

Looks up table value based on indices v1 and v2, and sends value back on the 'lookupOut' message.

lookupReturn uses its argument to do an interpolating lookup of the table. It sends a return message to the originating object with the looked up value. This should be avoided, instead use the fastGet function.

References innerLookup().

Referenced by initCinfo().

Here is the call graph for this function:

bool Interpol2D::operator< ( const Interpol2D other  )  const
bool Interpol2D::operator== ( const Interpol2D other  )  const
void Interpol2D::print ( const string &  fname,
bool  doAppend 
) const
void Interpol2D::resize ( unsigned int  xsize,
unsigned int  ysize,
double  init = 0.0 
)

Resizes 2-D vector. If either argument is zero, it remains unchanged

References xdivs(), and ydivs().

Referenced by Interpol2D(), setDx(), setXdivs(), and setYdivs().

Here is the call graph for this function:

void Interpol2D::setDx ( double  value  ) 

References doubleEq(), MAX_DIVS, resize(), and xdivs().

Referenced by initCinfo().

Here is the call graph for this function:

void Interpol2D::setDy ( double  value  ) 
Todo:

Later do interpolation etc to preserve contents.

Later also check that it is OK for xmax_ < xmin_

References doubleEq(), MAX_DIVS, setYdivs(), and ydivs().

Referenced by initCinfo().

Here is the call graph for this function:

void Interpol2D::setSy ( double  value  ) 

References doubleEq().

Here is the call graph for this function:

void Interpol2D::setTableValue ( vector< unsigned int >  index,
double  value 
)

Referenced by initCinfo().

void Interpol2D::setTableVector ( vector< vector< double > >  value  ) 

Referenced by initCinfo().

void Interpol2D::setXdivs ( unsigned int  value  ) 

References resize().

Referenced by initCinfo(), HHGate2D::setXdivsA(), and HHGate2D::setXdivsB().

Here is the call graph for this function:

void Interpol2D::setXmax ( double  value  ) 

References doubleApprox(), and xdivs().

Referenced by initCinfo(), HHGate2D::setXmaxA(), and HHGate2D::setXmaxB().

Here is the call graph for this function:

void Interpol2D::setXmin ( double  value  ) 

References doubleApprox(), and xdivs().

Referenced by initCinfo(), HHGate2D::setXminA(), and HHGate2D::setXminB().

Here is the call graph for this function:

void Interpol2D::setYdivs ( unsigned int  value  ) 

References resize().

Referenced by initCinfo(), setDy(), HHGate2D::setYdivsA(), and HHGate2D::setYdivsB().

Here is the call graph for this function:

void Interpol2D::setYmax ( double  value  ) 

References doubleApprox(), and ydivs().

Referenced by initCinfo(), HHGate2D::setYmaxA(), and HHGate2D::setYmaxB().

Here is the call graph for this function:

void Interpol2D::setYmin ( double  value  ) 

References doubleApprox(), and ydivs().

Referenced by initCinfo(), HHGate2D::setYminA(), and HHGate2D::setYminB().

Here is the call graph for this function:

unsigned int Interpol2D::xdivs (  )  const
unsigned int Interpol2D::ydivs (  )  const

Friends And Related Function Documentation

istream& operator>> ( istream &  ,
Interpol2D  
) [friend]

Member Data Documentation

const unsigned int Interpol2D::MAX_DIVS = 100000 [static]

Referenced by setDx(), and setDy().


The documentation for this class was generated from the following files:

Generated on 1 Jul 2015 for MOOSE by  doxygen 1.6.1