00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _HSOLVE_PASSIVE_H
00011 #define _HSOLVE_PASSIVE_H
00012 #include "../basecode/header.h"
00013 #include "../biophysics/CompartmentBase.h"
00014 #include "../biophysics/Compartment.h"
00015 using namespace moose;
00016 #include "HSolveUtils.h"
00017 #include "HSolveStruct.h"
00018 #include "HinesMatrix.h"
00019
00020 class HSolvePassive: public HinesMatrix
00021 {
00022 #ifdef DO_UNIT_TESTS
00023 friend void testHSolvePassive();
00024 #endif
00025
00026 public:
00027 void setup( Id seed, double dt );
00028 void solve();
00029
00030 protected:
00031
00032 void updateMatrix();
00033 void forwardEliminate();
00034 void backwardSubstitute();
00035
00036 vector< CompartmentStruct > compartment_;
00037 vector< Id > compartmentId_;
00038 vector< double > V_;
00041 vector< TreeNodeStruct > tree_;
00045 map< unsigned int, InjectStruct > inject_;
00049 private:
00050
00051 void clear();
00052 void walkTree( Id seed );
00053 void initialize();
00054 void storeTree();
00055
00056
00057 double getV( unsigned int row ) const;
00058 };
00059
00060 #endif // _HSOLVE_PASSIVE_H