COPASI API  4.16.103
CILDMMethod.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/tssanalysis/CILDMMethod.h,v $
3 // $Revision: 1.15 $
4 // $Name: $
5 // $Author: nsimus $
6 // $Date: 2012/06/04 11:07:58 $
7 // End CVS Header
8 
9 // Copyright (C) 2012 - 2010 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
16 // and The University of Manchester.
17 // All rights reserved.
18 
19 // Copyright (C) 2001 - 2007 by Pedro Mendes, Virginia Tech Intellectual
20 // Properties, Inc. and EML Research, gGmbH.
21 // All rights reserved.
22 
23 #ifndef COPASI_CILDMMethod
24 #define COPASI_CILDMMethod
25 
26 #include <sstream>
27 #include "utilities/CVector.h"
28 #include "utilities/CMatrix.h"
29 
30 #include "CTSSAMethod.h"
31 
32 //#include "odepack++/CLSODA.h"
33 
34 //#include "utilities/CMatrix.h"
35 //#include "utilities/CAnnotatedMatrix.h"
36 
37 class CModel;
38 class CState;
39 
40 class CILDMMethod : public CTSSAMethod
41 {
42  friend CTSSAMethod *
44 
45  // Operations
46 private:
47  /**
48  * Default constructor.
49  * @param const CCopasiContainer * pParent (default: NULL)
50  */
51  CILDMMethod(const CCopasiContainer * pParent = NULL);
52 
53 public:
54  /**
55  * Copy constructor.
56  * @param "const CILDMMethod &" src
57  * @param const CCopasiContainer * pParent (default: NULL)
58  */
59  CILDMMethod(const CILDMMethod & src,
60  const CCopasiContainer * pParent = NULL);
61 
62  /**
63  * Destructor.
64  */
65  ~CILDMMethod();
66 
67  /**
68  * Intialize the method parameter
69  */
70  virtual void initializeParameter();
71 
72  /**
73  * This instructs the method to calculate a time step of deltaT
74  * starting with the current state, i.e., the result of the previous
75  * step.
76  * The new state (after deltaT) is expected in the current state.
77  * The return value is the actual timestep taken.
78  * @param "const double &" deltaT
79  */
80  virtual void step(const double & deltaT);
81 
82  /**
83  * This instructs the method to prepare for integration
84  * starting with the initialState given.
85  * @param "const CState *" initialState
86  */
87  virtual void start(const CState * initialState);
88 
89  /**
90  *
91  **/
92  void newton(C_FLOAT64 *ys, C_INT & slow, C_INT & info);
93 
94  /**
95  *
96  **/
97 
98  void transformation_norm(C_INT & slow, C_INT & info);
99 
100  void deuflhard(C_INT & slow, C_INT & info);
101 
102  /**
103  *vectors contain whole data for all calculation steps
104  **/
105 
107 
108  /* temporary tabs */
109 
113 
114  std::vector< CMatrix<C_FLOAT64> > mVec_mVslow;
115  std::vector< CMatrix<C_FLOAT64> > mVec_mVslowMetab;
116  std::vector< CVector<C_FLOAT64> > mVec_mVslowSpace;
117  std::vector< CVector<C_FLOAT64> > mVec_mVfastSpace;
118  std::vector< CVector<C_FLOAT64> > mVec_mReacSlowSpace;
119 
120  /* temporary tabs */
121  std::vector< CMatrix<C_FLOAT64> > mVec_mTMP1;
122  std::vector< CMatrix<C_FLOAT64> > mVec_mTMP2;
123  std::vector< CMatrix<C_FLOAT64> > mVec_mTMP3;
124 
125  /**
126  *CArraAnnotations for every ILDM-tab in the CQTSSAResultSubWidget
127  **/
128 
129  /*
130  std::map< std::string, CArrayAnnotation* > mapTableToName;
131  std::vector<std::string> tableNames;
132  */
133 
134 
140 
141  /* temporary tabs */
142 
146 
147  /**
148  *required for creation of above listed CArrayAnnotation
149  **/
155 
156  /* temporary tabs */
157 
161 
162  /**
163  *input for every CArraAnnotations
164  *contain data for single stepcalculation
165  **/
171 
172  /* temporary tabs */
173 
177 
178  /**
179  * return CArrayAnnotation for visualization in ILDM-tab
180  * in the CQTSSAResultSubWidget
181  **/
182 
183  /*
184  const std::vector<std::string> getTableName() const
185  {return tableNames;}
186 
187  const CArrayAnnotation* getTable(std::string name)
188  {return mapTableToName[name];}
189  */
190 
191 
193  {return pVslowPrintAnn;}
195  {return pVslowSpacePrintAnn;}
197  {return pVfastSpacePrintAnn;}
199  {return pVslowMetabPrintAnn;}
201  {return pReacSlowSpacePrintAnn;}
202 
203  /* temporary tabs */
205  {return pTMP1PrintAnn;}
207  {return pTMP2PrintAnn;}
209  {return pTMP3PrintAnn;}
210 
211  /* temporary tabs */
212 
213  /**
214  * upgrade all vectors with values from actually calculalion for current step
215  **/
216  void setVectors(int slowMode);
217 
218  /**
219  * empty every vector to be able to fill them with new values for a
220  * new calculation also nullify the step counter
221  **/
222  void emptyVectors();
223 
224  /**
225  * create the CArraAnnotations for every ILDM-tab in the CQTSSAResultSubWidget
226  * input for each CArraAnnotations is a seperate CMatrix
227  **/
228  void createAnnotationsM();
229 
230  /**
231  * set the every CArrayAnnotation for the requested step
232  * set the desription of CArayAnnotation for both dimensions
233  **/
234  //void setAnnotationM(int step);
235  virtual bool setAnnotationM(size_t step);
236 
237  /**
238  * print of the standart report sequence for ILDM Method
239  * @param std::ostream * ostream
240  **/
241  void printResult(std::ostream * ostream) const;
242 };
243 #endif // COPASI_CILDMMethod
CArrayAnnotation * pTMP3
Definition: CILDMMethod.h:160
void deuflhard(C_INT &slow, C_INT &info)
#define C_INT
Definition: copasi.h:115
virtual void start(const CState *initialState)
const CArrayAnnotation * getTMP1PrintAnn() const
Definition: CILDMMethod.h:204
CMatrix< C_FLOAT64 > mVslowPrint
Definition: CILDMMethod.h:166
void emptyVectors()
const CArrayAnnotation * getTMP2PrintAnn() const
Definition: CILDMMethod.h:206
CMatrix< C_FLOAT64 > mVslowSpacePrint
Definition: CILDMMethod.h:167
std::vector< CVector< C_FLOAT64 > > mVec_mVfastSpace
Definition: CILDMMethod.h:117
void newton(C_FLOAT64 *ys, C_INT &slow, C_INT &info)
CMatrix< C_FLOAT64 > mTMP3
Definition: CILDMMethod.h:112
std::vector< CMatrix< C_FLOAT64 > > mVec_mVslow
Definition: CILDMMethod.h:114
CArrayAnnotation * pTMP2
Definition: CILDMMethod.h:159
CArrayAnnotation * pVslowSpacePrintAnn
Definition: CILDMMethod.h:137
const CArrayAnnotation * getVslowSpacePrintAnn() const
Definition: CILDMMethod.h:194
CMatrix< C_FLOAT64 > mVfastSpacePrint
Definition: CILDMMethod.h:168
static CTSSAMethod * createMethod(CCopasiMethod::SubType subType=CCopasiMethod::unset)
Definition: CTSSAMethod.cpp:44
Definition: CState.h:305
CMatrix< C_FLOAT64 > mVslowMetabPrint
Definition: CILDMMethod.h:169
std::vector< CMatrix< C_FLOAT64 > > mVec_mTMP2
Definition: CILDMMethod.h:122
virtual bool setAnnotationM(size_t step)
const CArrayAnnotation * getVfastSpacePrintAnn() const
Definition: CILDMMethod.h:196
CArrayAnnotation * pVfastSpacePrintAnn
Definition: CILDMMethod.h:138
CArrayAnnotation * pTmp1
Definition: CILDMMethod.h:150
virtual void step(const double &deltaT)
Definition: CILDMMethod.cpp:83
CArrayAnnotation * pTMP3PrintAnn
Definition: CILDMMethod.h:145
std::vector< CVector< C_FLOAT64 > > mVec_mReacSlowSpace
Definition: CILDMMethod.h:118
CArrayAnnotation * pTMP2PrintAnn
Definition: CILDMMethod.h:144
CArrayAnnotation * pTMP1
Definition: CILDMMethod.h:158
std::vector< CMatrix< C_FLOAT64 > > mVec_mTMP1
Definition: CILDMMethod.h:121
CVector< C_FLOAT64 > mReacSlowSpace
Definition: CILDMMethod.h:106
std::vector< CVector< C_FLOAT64 > > mVec_mVslowSpace
Definition: CILDMMethod.h:116
CArrayAnnotation * pReacSlowSpacePrintAnn
Definition: CILDMMethod.h:139
CArrayAnnotation * pTmp2
Definition: CILDMMethod.h:151
CILDMMethod(const CCopasiContainer *pParent=NULL)
Definition: CILDMMethod.cpp:36
CArrayAnnotation * pVslowPrintAnn
Definition: CILDMMethod.h:135
void createAnnotationsM()
const CArrayAnnotation * getTMP3PrintAnn() const
Definition: CILDMMethod.h:208
void printResult(std::ostream *ostream) const
virtual void initializeParameter()
Definition: CILDMMethod.cpp:67
CMatrix< C_FLOAT64 > mTMP1
Definition: CILDMMethod.h:110
CArrayAnnotation * pVslowMetabPrintAnn
Definition: CILDMMethod.h:136
CMatrix< C_FLOAT64 > mTMP2
Definition: CILDMMethod.h:111
#define C_FLOAT64
Definition: copasi.h:92
std::vector< CMatrix< C_FLOAT64 > > mVec_mTMP3
Definition: CILDMMethod.h:123
CMatrix< C_FLOAT64 > mTMP2Print
Definition: CILDMMethod.h:175
Definition: CModel.h:50
const CArrayAnnotation * getVslowMetabPrintAnn() const
Definition: CILDMMethod.h:198
CMatrix< C_FLOAT64 > mReacSlowSpacePrint
Definition: CILDMMethod.h:170
const CArrayAnnotation * getVslowPrintAnn() const
Definition: CILDMMethod.h:192
CArrayAnnotation * pTMP1PrintAnn
Definition: CILDMMethod.h:143
CArrayAnnotation * pTmp3
Definition: CILDMMethod.h:152
void transformation_norm(C_INT &slow, C_INT &info)
CArrayAnnotation * pTmp5
Definition: CILDMMethod.h:154
const CArrayAnnotation * getReacSlowSpacePrintAnn() const
Definition: CILDMMethod.h:200
void setVectors(int slowMode)
CArrayAnnotation * pTmp4
Definition: CILDMMethod.h:153
CMatrix< C_FLOAT64 > mTMP3Print
Definition: CILDMMethod.h:176
std::vector< CMatrix< C_FLOAT64 > > mVec_mVslowMetab
Definition: CILDMMethod.h:115
CMatrix< C_FLOAT64 > mTMP1Print
Definition: CILDMMethod.h:174