00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef _CVODEDATA_H_
00038 #define _CVODEDATA_H_
00039
00040
00041 #include "nvector_serial.h"
00042
00043 #include <stdio.h>
00044 #include <sbml/SBMLTypes.h>
00045
00046 #include "sbmlsolver/cvodedatatype.h"
00047 #include "sbmlsolver/odemodeldatatype.h"
00048 #include "sbmlsolver/integratorSettings.h"
00049 #include "sbmlsolver/exportdefs.h"
00050 #include "sbmlsolver/odeModel.h"
00051
00052
00055 struct cvodeResults {
00056 int nout;
00060 double *time;
00063 int nvalues;
00066 double **value;
00067
00068
00069 int neq;
00071 int nsens;
00073 double ***sensitivity;
00074
00075 } ;
00076
00090 struct cvodeData {
00091
00092 odeModel_t *model;
00093
00094
00095
00096 int neq;
00097 ASTNode_t **ode;
00100 int nvalues;
00104 double *value;
00105
00107 float currenttime;
00108
00109
00110 int nsens;
00111 double **sensitivity;
00114 realtype *p;
00115
00118 cvodeSettings_t *opt;
00119
00122 int *trigger;
00124 int steadystate;
00125
00128 cvodeResults_t *results;
00129
00131 int run;
00132
00133 } ;
00134
00135 #ifdef __cplusplus
00136 extern "C" {
00137 #endif
00138
00139 SBML_ODESOLVER_API cvodeData_t *CvodeData_create(odeModel_t *);
00140 SBML_ODESOLVER_API void CvodeData_initializeValues(cvodeData_t *);
00141 SBML_ODESOLVER_API void CvodeData_free(cvodeData_t *);
00142
00143 SBML_ODESOLVER_API double CvodeResults_getTime(cvodeResults_t *, int);
00144 SBML_ODESOLVER_API double CvodeResults_getValue(cvodeResults_t *, variableIndex_t *, int);
00145 SBML_ODESOLVER_API int CvodeResults_getNout(cvodeResults_t *);
00146 SBML_ODESOLVER_API void CvodeData_free(cvodeData_t *);
00147 SBML_ODESOLVER_API cvodeData_t *CvodeData_create(odeModel_t *);
00148 SBML_ODESOLVER_API double CvodeResults_getSensitivityByNum(cvodeResults_t *, int value, int parameter, int timestep);
00149 SBML_ODESOLVER_API double CvodeResults_getSensitivity(cvodeResults_t *, variableIndex_t *y, variableIndex_t *p, int timestep);
00150 SBML_ODESOLVER_API void CvodeResults_free(cvodeResults_t *);
00151 #ifdef __cplusplus
00152 }
00153 #endif
00154
00155
00156
00157 int CvodeData_initialize(cvodeData_t *, cvodeSettings_t *, odeModel_t *);
00158 cvodeResults_t *CvodeResults_create(cvodeData_t *, int);
00159 int CvodeResults_allocateSens(cvodeResults_t *, int neq, int nsens, int nout);
00160
00161
00162 #endif
00163
00164