00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _ZOMBIE_POOL_INTERFACE_H
00011 #define _ZOMBIE_POOL_INTERFACE_H
00012
00019 class ZombiePoolInterface
00020 {
00021 public:
00022 ZombiePoolInterface();
00023
00025 virtual void setNinit( const Eref& e, double val ) = 0;
00027 virtual double getNinit( const Eref& e ) const = 0;
00028
00030 virtual void setN( const Eref& e, double val ) = 0;
00032 virtual double getN( const Eref& e ) const = 0;
00033
00035 virtual void setDiffConst( const Eref& e, double val ) = 0;
00037 virtual double getDiffConst( const Eref& e ) const = 0;
00038
00041 virtual void setMotorConst( const Eref& e, double val )
00042 {;}
00043
00045 virtual void setNumPools( unsigned int num ) = 0;
00047 virtual unsigned int getNumPools() const = 0;
00048
00050 virtual void setNumAllVoxels( unsigned int numVoxels ) = 0;
00052 virtual unsigned int getNumLocalVoxels() const = 0;
00054 virtual VoxelPoolsBase* pools( unsigned int i ) = 0;
00055
00057 virtual double volume( unsigned int i ) const = 0;
00058
00074 virtual void getBlock( vector< double >& values ) const = 0;
00075
00082 virtual void setBlock( const vector< double >& values ) = 0;
00083
00090 virtual void setStoich( Id stoich ) = 0;
00091
00093 virtual void setDsolve( Id dsolve ) = 0;
00094
00096 virtual void setCompartment( Id compartment );
00097 Id getCompartment() const;
00098
00100 void setupCrossSolverReacs(
00101 const map< Id, vector< Id > >& xr,
00102 Id otherStoich );
00103 void setupCrossSolverReacVols(
00104 const vector< vector< Id > >& subCompts,
00105 const vector< vector< Id > >& prdCompts );
00106
00107 void filterCrossRateTerms( const vector< Id >& xreacs,
00108 const vector< pair< Id, Id > >& xrt );
00115 virtual void updateRateTerms( unsigned int index = ~0U ) = 0;
00116
00118 virtual unsigned int getPoolIndex( const Eref& er ) const = 0;
00120
00122 void xComptIn( const Eref& e, Id srcZombiePoolInterface,
00123 vector< double > values );
00124
00125 void assignXferVoxels( unsigned int xferCompt );
00126 void assignXferIndex( unsigned int numProxyMols,
00127 unsigned int xferCompt,
00128 const vector< vector< unsigned int > >& voxy );
00129 void setupXfer( Id myZombiePoolInterface,
00130 Id otherZombiePoolInterface,
00131 unsigned int numProxyMols, const vector< VoxelJunction >& vj );
00132 unsigned int assignProxyPools( const map< Id, vector< Id > >& xr,
00133 Id myZombiePoolInterface, Id otherZombiePoolInterface,
00134 Id otherComptId );
00135 void matchJunctionVols( vector< double >& vols, Id otherComptId )
00136 const;
00137
00139 protected:
00144 Id stoich_;
00145
00147 Id compartment_;
00148
00153 vector< XferInfo > xfer_;
00154
00156 bool isBuilt_;
00157 };
00158
00159 #endif // _ZOMBIE_POOL_INTERFACE_H