Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals

odeModel.h

Go to the documentation of this file.
00001 /*
00002   Last changed Time-stamp: <2005-12-15 20:50:29 raim>
00003   $Id: odeModel.h,v 1.17 2005/12/15 19:54:06 raimc Exp $ 
00004 */
00005 /* 
00006  *
00007  * This library is free software; you can redistribute it and/or modify it
00008  * under the terms of the GNU Lesser General Public License as published
00009  * by the Free Software Foundation; either version 2.1 of the License, or
00010  * any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
00014  * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
00015  * documentation provided hereunder is on an "as is" basis, and the
00016  * authors have no obligations to provide maintenance, support,
00017  * updates, enhancements or modifications.  In no event shall the
00018  * authors be liable to any party for direct, indirect, special,
00019  * incidental or consequential damages, including lost profits, arising
00020  * out of the use of this software and its documentation, even if the
00021  * authors have been advised of the possibility of such damage.  See
00022  * the GNU Lesser General Public License for more details.
00023  *
00024  * You should have received a copy of the GNU Lesser General Public License
00025  * along with this library; if not, write to the Free Software Foundation,
00026  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
00027  *
00028  * The original code contained here was initially developed by:
00029  *
00030  *     Andrew Finney
00031  *
00032  * Contributor(s):
00033  *     Rainer Machne     
00034  */
00035 
00036 #ifndef _ODEMODEL_H_
00037 #define _ODEMODEL_H_
00038 
00039 #include <sbml/SBMLTypes.h>
00040 
00041 #include "sbmlsolver/odemodeldatatype.h"
00042 #include "sbmlsolver/exportdefs.h"
00043 
00048 struct odeModel
00049 {
00050   SBMLDocument_t *d; 
00052   Model_t *m;        
00053   Model_t *simple;   
00057   char **names; 
00058 
00059   int neq;    
00060   int nalg;   
00061   int nass;   
00062   int nconst; 
00066   ASTNode_t **assignment;
00067 
00069   ASTNode_t **algebraic;
00070   
00072   ASTNode_t **ode; 
00073 
00076   ASTNode_t ***jacob;
00078   int jacobian;
00079 
00080   /* forward sensitivity analysis structure
00081       neq x num_param */
00082   int nsens;               
00083   int *index_sens;         
00085   ASTNode_t ***jacob_sens; 
00086   int sensitivity;         
00088   /* adjoint */
00089 
00090 };
00091 
00092 #ifdef __cplusplus
00093 extern "C" {
00094 #endif
00095 
00096   typedef struct variableIndex variableIndex_t;
00097 
00098   SBML_ODESOLVER_API odeModel_t *ODEModel_createFromFile(char *);
00099   SBML_ODESOLVER_API odeModel_t *ODEModel_createFromSBML2(SBMLDocument_t *);
00100   SBML_ODESOLVER_API odeModel_t *ODEModel_create(Model_t *);
00101   SBML_ODESOLVER_API void ODEModel_free(odeModel_t *);
00102   
00103   SBML_ODESOLVER_API int ODEModel_hasVariable(odeModel_t *, const char *);
00104   SBML_ODESOLVER_API variableIndex_t *ODEModel_getVariableIndexByNum(odeModel_t *, int);
00105   SBML_ODESOLVER_API variableIndex_t *ODEModel_getOdeVariableIndex(odeModel_t *, int);
00106   SBML_ODESOLVER_API variableIndex_t *ODEModel_getAssignedVariableIndex(odeModel_t *, int);
00107   SBML_ODESOLVER_API variableIndex_t *ODEModel_getConstantIndex(odeModel_t *, int);
00108   SBML_ODESOLVER_API variableIndex_t *ODEModel_getSensParamIndexByNum(odeModel_t *, int);
00109   SBML_ODESOLVER_API variableIndex_t *ODEModel_getVariableIndex(odeModel_t *, const char *);
00110   SBML_ODESOLVER_API const char *ODEModel_getVariableName(odeModel_t *, variableIndex_t *);
00111   SBML_ODESOLVER_API const ASTNode_t *ODEModel_getOde(odeModel_t *, variableIndex_t *);
00112   SBML_ODESOLVER_API const ASTNode_t *ODEModel_getAssignment(odeModel_t *, variableIndex_t *);
00113   SBML_ODESOLVER_API const ASTNode_t *ODEModel_getJacobianIJEntry(odeModel_t *, int i, int j);
00114   SBML_ODESOLVER_API const ASTNode_t *ODEModel_getJacobianEntry(odeModel_t *, variableIndex_t *, variableIndex_t *);
00115   SBML_ODESOLVER_API const ASTNode_t *ODEModel_getSensIJEntry(odeModel_t *, int i, int j);
00116   SBML_ODESOLVER_API const ASTNode_t *ODEModel_getSensEntry(odeModel_t *, variableIndex_t *, variableIndex_t *);
00117   SBML_ODESOLVER_API void VariableIndex_free(variableIndex_t *);
00118   SBML_ODESOLVER_API int ODEModel_getNeq(odeModel_t *);
00119   SBML_ODESOLVER_API int ODEModel_getNalg(odeModel_t *);
00120   SBML_ODESOLVER_API int ODEModel_getNsens(odeModel_t *);
00121   SBML_ODESOLVER_API int ODEModel_getNumAssignments(odeModel_t *);
00122   SBML_ODESOLVER_API int ODEModel_getNumConstants(odeModel_t *);
00123   SBML_ODESOLVER_API int ODEModel_getNumValues(odeModel_t *);
00124   SBML_ODESOLVER_API const Model_t *ODEModel_getModel(odeModel_t *);
00125   SBML_ODESOLVER_API void ODEModel_dumpNames(odeModel_t *);  
00126   SBML_ODESOLVER_API int ODEModel_constructJacobian(odeModel_t *);
00127   SBML_ODESOLVER_API int ODEModel_constructSensitivity(odeModel_t *);
00128   SBML_ODESOLVER_API void ODEModel_freeSensitivity(odeModel_t *);
00129   SBML_ODESOLVER_API ASTNode_t *ODEModel_constructDeterminant(odeModel_t *);
00130  
00131 #ifdef __cplusplus
00132 }
00133 #endif
00134 
00135 
00136 #endif

Generated on Wed Dec 21 18:10:07 2005 for SBML ODE Solver Library API by  doxygen 1.4.4