COPASI API  4.16.103
CILDMModifiedMethod.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/tssanalysis/CILDMModifiedMethod.h,v $
3 // $Revision: 1.11 $
4 // $Name: $
5 // $Author: nsimus $
6 // $Date: 2012/06/04 11:08:57 $
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_CILDModMethod
24 #define COPASI_CILDModMethod
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 //class CLSODA;
40 
42 {
43  friend CTSSAMethod *
45 
46  // Operations
47 private:
48  /**
49  * Default constructor.
50  * @param const CCopasiContainer * pParent (default: NULL)
51  */
52  CILDMModifiedMethod(const CCopasiContainer * pParent = NULL);
53 
54 public:
55  /**
56  * Copy constructor.
57  * @param "const CILDMMethod &" src
58  * @param const CCopasiContainer * pParent (default: NULL)
59  */
61  const CCopasiContainer * pParent = NULL);
62 
63  /**
64  * Destructor.
65  */
67 
68  /**
69  * Initialize the method parameter
70  */
71  virtual void initializeParameter();
72 
73  /**
74  * This instructs the method to calculate a time step of deltaT
75  * starting with the current state, i.e., the result of the previous
76  * step.
77  * The new state (after deltaT) is expected in the current state.
78  * The return value is the actual timestep taken.
79  * @param "const double &" deltaT
80  */
81  virtual void step(const double & deltaT);
82 
83  /**
84  * This instructs the method to prepare for integration
85  * starting with the initialState given.
86  * @param "const CState *" initialState
87  */
88  virtual void start(const CState * initialState);
89 
90  void deuflhard_metab(C_INT & slow, C_INT & info);
91 
92  void newton_new(C_INT *index_metab, C_INT & slow, C_INT & info);
93 
94  void newton_for_timestep(C_INT metabolite_number, C_FLOAT64 &y_consistent, C_INT & info);
95 
96  void evalsort(C_FLOAT64 * reval, C_INT * index, const C_INT & dim_x);
97 
98  /**
99  *vectors contain whole data for all calculationsteps
100  **/
101  std::vector< CMatrix<C_FLOAT64> > mVec_mVslow;
102  std::vector< CMatrix<C_FLOAT64> > mVec_mVslowMetab;
103  std::vector< CVector<C_FLOAT64> > mVec_mVslowSpace;
104  std::vector< CVector<C_FLOAT64> > mVec_mVfastSpace;
105 
106  /**
107  *CArraAnnotations for every ILDM-tab in the CQTSSAResultSubWidget
108  **/
109 
110  /*
111  std::map< std::string, CArrayAnnotation* > mapTableToName;
112  std::vector<std::string> tableNames;
113  */
114 
119 
120  /**
121  *required for creation of above listed CArrayAnnotation
122  **/
127 
128  /**
129  *input for every CArraAnnotations
130  *contain data for single stepcalculation
131  **/
136 
137  /**
138  * return CArrayAnnotation for visualization in ILDM-tab
139  * in the CQTSSAResultSubWidget
140  **/
141 
142  /*
143  const std::vector<std::string> getTableName() const
144  {return tableNames;}
145 
146  const CArrayAnnotation* getTable(std::string name)
147  {return mapTableToName[name];}
148  */
149 
150 
152  {return pVslowPrintAnn;}
154  {return pVslowSpacePrintAnn;}
156  {return pVfastSpacePrintAnn;}
158  {return pVslowMetabPrintAnn;}
159 
160  /**
161  * upgrade all vectors with values from actually calculalion for current step
162  **/
163  void setVectors(int slowMode);
164 
165  /**
166  * empty every vector to be able to fill them with new values for a
167  * new calculation also nullify the step counter
168  **/
169  void emptyVectors();
170 
171  /**
172  * create the CArraAnnotations for every ILDM-tab in the CQTSSAResultSubWidget
173  * input for each CArraAnnotations is a seperate CMatrix
174  **/
175  void createAnnotationsM();
176 
177  /**
178  * set the every CArrayAnnotation for the requested step
179  * set the desription of CArayAnnotation for both dimensions
180  **/
181  //void setAnnotationM(int step);
182  virtual bool setAnnotationM(size_t step);
183 
184  /**
185  * print of the standart report sequence for ILDM Method
186  * @param std::ostream * ostream
187  **/
188  void printResult(std::ostream * ostream) const;
189 };
190 #endif // COPASI_CILDMMethod
std::vector< CMatrix< C_FLOAT64 > > mVec_mVslowMetab
#define C_INT
Definition: copasi.h:115
CArrayAnnotation * pTmp4
CArrayAnnotation * pTmp2
CMatrix< C_FLOAT64 > mVslowPrint
void evalsort(C_FLOAT64 *reval, C_INT *index, const C_INT &dim_x)
static CTSSAMethod * createMethod(CCopasiMethod::SubType subType=CCopasiMethod::unset)
Definition: CTSSAMethod.cpp:44
Definition: CState.h:305
const CArrayAnnotation * getVslowSpacePrintAnn() const
CArrayAnnotation * pVslowPrintAnn
void deuflhard_metab(C_INT &slow, C_INT &info)
std::vector< CMatrix< C_FLOAT64 > > mVec_mVslow
virtual void step(const double &deltaT)
virtual void initializeParameter()
CMatrix< C_FLOAT64 > mVfastSpacePrint
CArrayAnnotation * pVslowMetabPrintAnn
CArrayAnnotation * pTmp1
CArrayAnnotation * pVslowSpacePrintAnn
virtual bool setAnnotationM(size_t step)
void setVectors(int slowMode)
const CArrayAnnotation * getVfastSpacePrintAnn() const
CMatrix< C_FLOAT64 > mVslowMetabPrint
void newton_new(C_INT *index_metab, C_INT &slow, C_INT &info)
virtual void start(const CState *initialState)
void newton_for_timestep(C_INT metabolite_number, C_FLOAT64 &y_consistent, C_INT &info)
const CArrayAnnotation * getVslowMetabPrintAnn() const
#define C_FLOAT64
Definition: copasi.h:92
std::vector< CVector< C_FLOAT64 > > mVec_mVslowSpace
void printResult(std::ostream *ostream) const
CILDMModifiedMethod(const CCopasiContainer *pParent=NULL)
CMatrix< C_FLOAT64 > mVslowSpacePrint
Definition: CModel.h:50
const CArrayAnnotation * getVslowPrintAnn() const
std::vector< CVector< C_FLOAT64 > > mVec_mVfastSpace
CArrayAnnotation * pTmp3
CArrayAnnotation * pVfastSpacePrintAnn