• Main Page
  • Data Structures
  • Files
  • File List
  • Globals

ne_sim_cvode.h

00001 /*===========================================================================
00002  NetEvo Foundation Library
00003  Copyright (C) 2009, 2010 Thomas E. Gorochowski <tgorochowski@me.com>
00004  Bristol Centre for Complexity Sciences, University of Bristol, Bristol, UK
00005  ---------------------------------------------------------------------------- 
00006  NetEvo is a computing framework designed to allow researchers to investigate 
00007  evolutionary aspects of dynamical complex networks. By providing tools to 
00008  easily integrate each of these factors in a coherent way, it is hoped a 
00009  greater understanding can be gained of key attributes and features displayed 
00010  by complex systems.
00011  
00012  NetEvo is open-source software released under the Open Source Initiative 
00013  (OSI) approved Non-Profit Open Software License ("Non-Profit OSL") 3.0. 
00014  Detailed information about this licence can be found in the COPYING file 
00015  included as part of the source distribution.
00016  
00017  This library is distributed in the hope that it will be useful, but
00018  WITHOUT ANY WARRANTY; without even the implied warranty of
00019  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00020  ============================================================================*/
00021 
00022 #ifndef NE_SIM_CVODE
00023 #define NE_SIM_CVODE
00024 
00025 
00026 #include "ne_common.h"
00027 #include "ne_system.h"
00028 #include "ne_vec_dyn.h"
00029 #include <cvode/cvode.h>             /* prototypes for CVODE fcts., consts. */
00030 #include <nvector/nvector_serial.h>  /* serial N_Vector types, fcts., macros */
00031 #include <cvode/cvode_dense.h>       /* prototype for CVDense */
00032 #include <sundials/sundials_dense.h> /* definitions DlsMat DENSE_ELEM */
00033 #include <sundials/sundials_types.h> /* definition of type realtype */
00034 
00035 
00036 typedef struct {
00037    double absTol;
00038    double relTol;
00039    double step;
00040    ne_bool_t stiff;
00041 } ne_sim_cvode_params_t;
00042 
00043 
00044 /* Simulates the system using given parameters */
00045 ne_vec_dyn_t *ne_sim_cvode_run (ne_system_t *system, void *params, double length, double *iy, 
00046                                 FILE *file);
00047 
00048 /* Function to build RHS of dy/dt equation */
00049 int ne_sim_cvode_fn (realtype t, N_Vector y, N_Vector ydot, void *params);
00050 
00051 //static void PrintFinalStats(void *cvode_mem);
00052 static int check_flag(void *flagvalue, char *funcname, int opt);
00053 
00054 
00055 #endif /* NE_SIM_CVODE */

Generated on Thu Aug 26 2010 11:04:24 for NetEvo by  doxygen 1.7.1