MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
nuParser Class Reference
+ Inheritance diagram for nuParser:
+ Collaboration diagram for nuParser:

Public Types

enum  valArgs {
  EXPR, P, G, EL,
  LEN, DIA, MAXP, MAXG,
  MAXL, X, Y, Z,
  OLDVAL
}
 Defines the order of arguments in the val array. More...
 

Public Member Functions

double eval (vector< double >::const_iterator arg0)
 
 nuParser (const string &expr)
 

Static Public Member Functions

static double H (double arg)
 

Public Attributes

double dia
 
double g
 
double L
 
double len
 
double maxG
 
double maxL
 
double maxP
 
double oldVal
 
double p
 
bool useOldVal
 
double x
 
double y
 
double z
 

Static Public Attributes

static const unsigned int numVal = 13
 

Detailed Description

Definition at line 24 of file Neuron.cpp.

Member Enumeration Documentation

Defines the order of arguments in the val array.

Enumerator
EXPR 
P 
G 
EL 
LEN 
DIA 
MAXP 
MAXG 
MAXL 
X 
Y 
Z 
OLDVAL 

Definition at line 62 of file Neuron.cpp.

Constructor & Destructor Documentation

nuParser::nuParser ( const string &  expr)
inline

Definition at line 27 of file Neuron.cpp.

References dia, g, H(), L, len, maxG, maxL, maxP, oldVal, p, useOldVal, x, y, and z.

27  :
28  mu::Parser(),
29  p(0.0), // geometrical path distance wound through dendrite
30  g(0.0), // geometrical path distance direct from soma.
31  L(0.0), // electrical distance arg
32  len(0.0), // Length of compt in metres
33  dia(0.0), // Diameter of compt in metres
34  maxP(0.0), // Maximum value of *p* for this neuron.
35  maxG(0.0), // Maximum value of *g* for this neuron.
36  maxL(0.0), // Maximum value of *L* for this neuron.
37  x(0.0), // X position of segment.
38  y(0.0), // Y position of segment.
39  z(0.0), // Z position of segment.
40  oldVal(0.0), // Original value of field, if needed.
41  useOldVal( false ) // is the 'orig' field needed?
42  {
43  DefineVar( "p", &p );
44  DefineVar( "g", &g );
45  DefineVar( "L", &L );
46  DefineVar( "len", &len );
47  DefineVar( "dia", &dia );
48  DefineVar( "maxP", &maxP );
49  DefineVar( "maxG", &maxG );
50  DefineVar( "maxL", &maxL );
51  DefineVar( "x", &x );
52  DefineVar( "y", &y );
53  DefineVar( "z", &z );
54  DefineVar( "oldVal", &oldVal );
55  DefineFun( "H", nuParser::H );
56  if ( expr.find( "oldVal" ) != string::npos )
57  useOldVal = true;
58  SetExpr( expr );
59  }
double maxL
Definition: Neuron.cpp:96
static double H(double arg)
Definition: Neuron.cpp:66
double y
Definition: Neuron.cpp:98
double dia
Definition: Neuron.cpp:93
double oldVal
Definition: Neuron.cpp:100
double x
Definition: Neuron.cpp:97
double p
Definition: Neuron.cpp:89
double maxP
Definition: Neuron.cpp:94
bool useOldVal
Definition: Neuron.cpp:101
double z
Definition: Neuron.cpp:99
double g
Definition: Neuron.cpp:90
double len
Definition: Neuron.cpp:92
double maxG
Definition: Neuron.cpp:95
double L
Definition: Neuron.cpp:91

+ Here is the call graph for this function:

Member Function Documentation

double nuParser::eval ( vector< double >::const_iterator  arg0)
inline

Definition at line 71 of file Neuron.cpp.

References DIA, dia, EL, G, g, L, LEN, len, MAXG, maxG, MAXL, maxL, MAXP, maxP, OLDVAL, oldVal, P, p, X, x, Y, y, Z, and z.

Referenced by Neuron::evalExprForElist(), makeAngleDistrib(), makeSizeDistrib(), Neuron::makeSpacingDistrib(), setCompartmentParams(), and setMechParams().

72  {
73  p = *(arg0 + nuParser::P );
74  g = *(arg0 + nuParser::G );
75  L = *(arg0 + nuParser::EL );
76  len = *(arg0 + nuParser::LEN );
77  dia = *(arg0 + nuParser::DIA );
78  maxP = *(arg0 + nuParser::MAXP );
79  maxG = *(arg0 + nuParser::MAXG );
80  maxL = *(arg0 + nuParser::MAXL );
81  x = *(arg0 + nuParser::X );
82  y = *(arg0 + nuParser::Y );
83  z = *(arg0 + nuParser::Z );
84  oldVal = *(arg0 + nuParser::OLDVAL );
85  return Eval();
86  }
double maxL
Definition: Neuron.cpp:96
double y
Definition: Neuron.cpp:98
double dia
Definition: Neuron.cpp:93
double oldVal
Definition: Neuron.cpp:100
double x
Definition: Neuron.cpp:97
double p
Definition: Neuron.cpp:89
double maxP
Definition: Neuron.cpp:94
double z
Definition: Neuron.cpp:99
double g
Definition: Neuron.cpp:90
double len
Definition: Neuron.cpp:92
double maxG
Definition: Neuron.cpp:95
double L
Definition: Neuron.cpp:91

+ Here is the caller graph for this function:

static double nuParser::H ( double  arg)
inlinestatic

Definition at line 66 of file Neuron.cpp.

Referenced by nuParser().

67  {
68  return ( arg > 0.0);
69  }

+ Here is the caller graph for this function:

Member Data Documentation

double nuParser::dia

Definition at line 93 of file Neuron.cpp.

Referenced by eval(), and nuParser().

double nuParser::g

Definition at line 90 of file Neuron.cpp.

Referenced by eval(), and nuParser().

double nuParser::L

Definition at line 91 of file Neuron.cpp.

Referenced by eval(), and nuParser().

double nuParser::len

Definition at line 92 of file Neuron.cpp.

Referenced by eval(), and nuParser().

double nuParser::maxG

Definition at line 95 of file Neuron.cpp.

Referenced by eval(), and nuParser().

double nuParser::maxL

Definition at line 96 of file Neuron.cpp.

Referenced by eval(), and nuParser().

double nuParser::maxP

Definition at line 94 of file Neuron.cpp.

Referenced by eval(), and nuParser().

double nuParser::oldVal

Definition at line 100 of file Neuron.cpp.

Referenced by eval(), and nuParser().

double nuParser::p

Definition at line 89 of file Neuron.cpp.

Referenced by eval(), and nuParser().

bool nuParser::useOldVal

Definition at line 101 of file Neuron.cpp.

Referenced by nuParser().

double nuParser::x

Definition at line 97 of file Neuron.cpp.

Referenced by eval(), and nuParser().

double nuParser::y

Definition at line 98 of file Neuron.cpp.

Referenced by eval(), and nuParser().

double nuParser::z

Definition at line 99 of file Neuron.cpp.

Referenced by eval(), and nuParser().


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