/[ascend]/trunk/solvers/ida/ida.c
ViewVC logotype

Diff of /trunk/solvers/ida/ida.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2096 by jpye, Wed Sep 30 07:21:01 2009 UTC revision 2097 by jpye, Tue Dec 1 10:18:17 2009 UTC
# Line 377  static IntegratorIdaData *integrator_ida Line 377  static IntegratorIdaData *integrator_ida
377    PARAMETERS FOR IDA    PARAMETERS FOR IDA
378  */  */
379    
380  static enum ida_parameters{  enum ida_parameters{
381      IDA_PARAM_LINSOLVER      IDA_PARAM_LINSOLVER
382      ,IDA_PARAM_MAXL      ,IDA_PARAM_MAXL
383      ,IDA_PARAM_MAXORD      ,IDA_PARAM_MAXORD
# Line 1058  static int integrator_ida_solve( Line 1058  static int integrator_ida_solve(
1058    
1059  #if SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR>=4  #if SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR>=4
1060                      IDAReInit(ida_mem, tret, yret, ypret);                      IDAReInit(ida_mem, tret, yret, ypret);
1061  #elif SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR==3  #elif SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR<3
1062                        /* TODO find out what version needs the following line... not sure. */
1063                      IDAReInit(ida_mem, &integrator_ida_fex, tret, yret, ypret);                      IDAReInit(ida_mem, &integrator_ida_fex, tret, yret, ypret);
1064  #else  #else
1065                      /* allocate internal memory */                      /* allocate internal memory */
# Line 1538  static int integrator_ida_jvex(realtype Line 1539  static int integrator_ida_jvex(realtype
1539      IntegratorSystem *sys;      IntegratorSystem *sys;
1540      IntegratorIdaData *enginedata;      IntegratorIdaData *enginedata;
1541      int i, j, is_error=0;      int i, j, is_error=0;
1542      struct rel_relation** relptr;      struct rel_relation** relptr = 0;
1543      char *relname;      char *relname;
1544      int status;      int status;
1545      double Jv_i;      double Jv_i;
# Line 1800  static int integrator_ida_psetup_jacobia Line 1801  static int integrator_ida_psetup_jacobia
1801      IntegratorIdaPrecDataJacobian *precdata;      IntegratorIdaPrecDataJacobian *precdata;
1802      linsolqr_system_t L;      linsolqr_system_t L;
1803      mtx_matrix_t P;      mtx_matrix_t P;
   
     L = precdata->L;  
     P = linsolqr_get_matrix(L);  
     mtx_clear(P);  
   
1804      struct rel_relation **relptr;      struct rel_relation **relptr;
1805    
1806      sys = (IntegratorSystem *)p_data;      sys = (IntegratorSystem *)p_data;
# Line 1816  static int integrator_ida_psetup_jacobia Line 1812  static int integrator_ida_psetup_jacobia
1812      char *relname;      char *relname;
1813      mtx_coord_t C;      mtx_coord_t C;
1814    
1815        L = precdata->L;
1816        P = linsolqr_get_matrix(L);
1817        mtx_clear(P);
1818    
1819      CONSOLE_DEBUG("Setting up Jacobian preconditioner");      CONSOLE_DEBUG("Setting up Jacobian preconditioner");
1820    
1821      variables = ASC_NEW_ARRAY(struct var_variable*, NV_LENGTH_S(yy) * 2);      variables = ASC_NEW_ARRAY(struct var_variable*, NV_LENGTH_S(yy) * 2);

Legend:
Removed from v.2096  
changed lines
  Added in v.2097

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22