00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _GSOLVE_H
00011 #define _GSOLVE_H
00012
00013 class Stoich;
00014 class Gsolve: public ZombiePoolInterface
00015 {
00016 public:
00017 Gsolve();
00018 ~Gsolve();
00019
00021
00023 Id getStoich() const;
00024 void setStoich( Id stoich );
00025 Id getCompartment() const;
00026 void setCompartment( Id compt );
00027
00028 unsigned int getNumLocalVoxels() const;
00029 unsigned int getNumAllVoxels() const;
00034 void setNumAllVoxels( unsigned int num );
00035
00040 void setNumPools( unsigned int num );
00041 unsigned int getNumPools() const;
00042 VoxelPoolsBase* pools( unsigned int i );
00043 double volume( unsigned int i ) const;
00044
00046 vector< double > getNvec( unsigned int voxel) const;
00047 void setNvec( unsigned int voxel, vector< double > vec );
00049
00051 void process( const Eref& e, ProcPtr p );
00052 void reinit( const Eref& e, ProcPtr p );
00053 void initProc( const Eref& e, ProcPtr p );
00054 void initReinit( const Eref& e, ProcPtr p );
00055
00061 void updateVoxelVol( vector< double > vols );
00062
00064
00066 void rebuildGssaSystem();
00067 void fillMmEnzDep();
00068 void fillMathDep();
00069 void insertMathDepReacs( unsigned int mathDepIndex,
00070 unsigned int firedReac );
00071 void makeReacDepsUnique();
00072
00074
00076 unsigned int getPoolIndex( const Eref& e ) const;
00077 unsigned int getVoxelIndex( const Eref& e ) const;
00078
00084 void setDsolve( Id dsolve );
00085
00087
00089
00090 void setN( const Eref& e, double v );
00091 double getN( const Eref& e ) const;
00092 void setNinit( const Eref& e, double v );
00093 double getNinit( const Eref& e ) const;
00094 void setDiffConst( const Eref& e, double v );
00095 double getDiffConst( const Eref& e ) const;
00096
00097 void getBlock( vector< double >& values ) const;
00098 void setBlock( const vector< double >& values );
00099
00104 void updateRateTerms( unsigned int index );
00105
00106
00109 bool getRandInit() const;
00111 void setRandInit( bool val );
00112
00114 static SrcFinfo2< Id, vector< double > >* xComptOut();
00115 static const Cinfo* initCinfo();
00116 private:
00117 GssaSystem sys_;
00125 vector< GssaVoxelPools > pools_;
00126
00128 unsigned int startVoxel_;
00129
00131 Stoich* stoichPtr_;
00132
00136 Id dsolve_;
00137
00139 ZombiePoolInterface* dsolvePtr_;
00140 };
00141
00142 #endif // _GSOLVE_H