MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FuncTerm.h
Go to the documentation of this file.
1 /**********************************************************************
2 ** This program is part of 'MOOSE', the
3 ** Messaging Object Oriented Simulation Environment,
4 ** also known as GENESIS 3 base code.
5 ** copyright (C) 2014 Upinder S. Bhalla. and NCBS
6 ** It is made available under the terms of the
7 ** GNU Lesser General Public License version 2.1
8 ** See the file COPYING.LIB for the full notice.
9 **********************************************************************/
10 #ifndef _FUNC_TERM_H
11 #define _FUNC_TERM_H
12 
13 #include "muParser.h"
14 
15 class FuncTerm
16 {
17  public:
18  FuncTerm();
19  ~FuncTerm();
24  double operator() ( const double* S, double t ) const;
25  const FuncTerm& operator=( const FuncTerm& other );
26 
27  void evalPool( double* s, double t ) const;
28 
34  void setReactantIndex( const vector< unsigned int >& mol );
35  const vector< unsigned int >& getReactantIndex() const;
36  const string& getExpr() const;
37  void setExpr( const string& e );
38  const unsigned int getTarget() const;
39  void setTarget( unsigned int tgt );
40  void setVolScale( double vs );
41  double getVolScale() const;
42  private:
43  double* args_;
44  // Look up reactants in the S vec.
45  vector< unsigned int > reactantIndex_;
46  mu::Parser parser_;
47  string expr_;
53  double volScale_;
54  unsigned int target_;
55 };
56 
57 #endif // _FUNC_TERM_H
void setExpr(const string &e)
Definition: FuncTerm.cpp:83
unsigned int target_
Definition: FuncTerm.h:54
double * args_
Definition: FuncTerm.h:43
double getVolScale() const
Definition: FuncTerm.cpp:115
string expr_
Definition: FuncTerm.h:47
const unsigned int getTarget() const
Definition: FuncTerm.cpp:105
~FuncTerm()
Definition: FuncTerm.cpp:40
void setVolScale(double vs)
Definition: FuncTerm.cpp:110
void setReactantIndex(const vector< unsigned int > &mol)
Definition: FuncTerm.cpp:47
double volScale_
Definition: FuncTerm.h:53
mu::Parser parser_
Definition: FuncTerm.h:46
double operator()(const double *S, double t) const
Definition: FuncTerm.cpp:135
FuncTerm()
Definition: FuncTerm.cpp:30
void evalPool(double *s, double t) const
Definition: FuncTerm.cpp:156
void setTarget(unsigned int tgt)
Definition: FuncTerm.cpp:100
const vector< unsigned int > & getReactantIndex() const
Definition: FuncTerm.cpp:67
const string & getExpr() const
Definition: FuncTerm.cpp:95
const FuncTerm & operator=(const FuncTerm &other)
Definition: FuncTerm.cpp:120
vector< unsigned int > reactantIndex_
Definition: FuncTerm.h:45