MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MarkovGslSolver.h
Go to the documentation of this file.
1 /**********************************************************************
2 ** This program is part of 'MOOSE', the
3 ** Messaging Object Oriented Simulation Environment.
4 ** Copyright (C) 2003-2011 Upinder S. Bhalla. and NCBS
5 ** It is made available under the terms of the
6 ** GNU Lesser General Public License version 2.1
7 ** See the file COPYING.LIB for the full notice.
8 **********************************************************************/
9 
10 #ifndef _MARKOVGSLSOLVER_H
11 #define _MARKOVGSLSOLVER_H
12 
14 // Class : MarkovGslSolver
15 // Author : Vishaka Datta S, 2011, NCBS.
16 //
17 // The GslIntegrator class in ksolve deals with a system whose coefficients stay
18 // constant. In the case of a Markov channel, the coefficients of the system
19 // vary with time.
20 //
21 // This makes it necessary for the system to keep track of changes in the system
22 // matrix, which is implemented by the message handler.
24 
26 {
27  public:
30 
32 // Field function definitions
34  bool getIsInitialized() const;
35  string getMethod() const;
36  void setMethod( string method );
37  double getRelativeAccuracy() const;
38  void setRelativeAccuracy( double value );
39  double getAbsoluteAccuracy() const;
40  void setAbsoluteAccuracy( double value );
41  double getInternalDt() const;
42  void setInternalDt( double value );
43 
45 // Dest function definitions
47 
48  void process( const Eref& e, ProcPtr info );
49  void reinit( const Eref& e, ProcPtr info );
50 
51  void init( vector< double > );
52  void handleQ( vector< vector< double > > );
53 
54  static const Cinfo* initCinfo();
55  private:
57  string method_;
58  double absAccuracy_;
59  double relAccuracy_;
61  double* stateGsl_;
62 
63  //The following four variables should be members of any solver class that
64  //will be implmented.
65  unsigned int nVars_;
66  vector< double > state_;
67  vector< double > initialState_;
68  vector< vector< double > > Q_;
69 
70  const gsl_odeiv_step_type* gslStepType_;
71  gsl_odeiv_step* gslStep_;
72  gsl_odeiv_control* gslControl_;
73  gsl_odeiv_evolve* gslEvolve_;
74  gsl_odeiv_system gslSys_;
75 
76  static int evalSystem( double, const double*, double*, void* );
77 };
78 #endif
uint32_t value
Definition: moosemodule.h:42
void setInternalDt(double value)
void reinit(const Eref &e, ProcPtr info)
static int evalSystem(double, const double *, double *, void *)
gsl_odeiv_step * gslStep_
vector< vector< double > > Q_
void setMethod(string method)
vector< double > state_
double internalStepSize_
gsl_odeiv_system gslSys_
gsl_odeiv_evolve * gslEvolve_
double getInternalDt() const
void init(vector< double >)
void process(const Eref &e, ProcPtr info)
void setRelativeAccuracy(double value)
const gsl_odeiv_step_type * gslStepType_
Definition: Eref.h:26
double getAbsoluteAccuracy() const
string getMethod() const
void handleQ(vector< vector< double > >)
bool getIsInitialized() const
void setAbsoluteAccuracy(double value)
gsl_odeiv_control * gslControl_
static const Cinfo * initCinfo()
unsigned int nVars_
Definition: Cinfo.h:18
vector< double > initialState_
double getRelativeAccuracy() const