/[ascend]/trunk/base/generic/integrator/ida.c
ViewVC logotype

Diff of /trunk/base/generic/integrator/ida.c

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

revision 1386 by jpye, Sat Mar 10 13:57:01 2007 UTC revision 1387 by jpye, Sat Apr 7 14:43:31 2007 UTC
# Line 1930  int integrator_ida_debug(const Integrato Line 1930  int integrator_ida_debug(const Integrato
1930      struct rel_relation **rlist, *rel;      struct rel_relation **rlist, *rel;
1931      long vlen, rlen;      long vlen, rlen;
1932      long i;      long i;
1933        long di;
1934    
1935      fprintf(fp,"THERE ARE %d VARIABLES IN THE INTEGRATION SYSTEM\n\n",sys->n_y);      fprintf(fp,"THERE ARE %d VARIABLES IN THE INTEGRATION SYSTEM\n\n",sys->n_y);
1936    
# Line 1937  int integrator_ida_debug(const Integrato Line 1938  int integrator_ida_debug(const Integrato
1938    
1939      if(sys->y && sys->ydot){      if(sys->y && sys->ydot){
1940          fprintf(fp,"CONTENTS OF THE 'Y' AND 'YDOT' LISTS\n\n");          fprintf(fp,"CONTENTS OF THE 'Y' AND 'YDOT' LISTS\n\n");
1941          fprintf(fp,"index\ty\tydot\n");          fprintf(fp,"index\t%-15s\tydot\n","y");
1942          fprintf(fp,"-----\t-----\t-----\n");          fprintf(fp,"-----\t%-15s\t-----\n","-----");
1943          for(i=0;i<sys->n_y;++i){          for(i=0;i<sys->n_y;++i){
1944              varname = var_make_name(sys->system, sys->y[i]);              varname = var_make_name(sys->system, sys->y[i]);
1945              fprintf(fp,"%ld\t%s\t",i,varname);              fprintf(fp,"%ld\t%-15s\t",i,varname);
1946              if(sys->ydot[i]){              if(sys->ydot[i]){
1947                  ASC_FREE(varname);                  ASC_FREE(varname);
1948                  varname = var_make_name(sys->system, sys->ydot[i]);                  varname = var_make_name(sys->system, sys->ydot[i]);
# Line 1983  int integrator_ida_debug(const Integrato Line 1984  int integrator_ida_debug(const Integrato
1984          }else{          }else{
1985              if(var_deriv(var)){              if(var_deriv(var)){
1986                  if(sys->y_id){                  if(sys->y_id){
1987                      ASC_FREE(varname);                      di = integrator_ida_diffindex1(sys,var);
1988                      varname = var_make_name(sys->system,vlist[integrator_ida_diffindex(sys,var)]);                      if(di>=0){
1989                      fprintf(fp,".\tdiff(%d='%s')\n",integrator_ida_diffindex(sys,var),varname);                          ASC_FREE(varname);
1990                            varname = var_make_name(sys->system,vlist[di]);
1991                            fprintf(fp,".\tdiff(%ld='%s')\n",di,varname);
1992                        }else{
1993                            fprintf(fp,".\tdiff(???,err=%ld)\n",di);
1994                        }
1995                  }else{                  }else{
1996                      fprintf(fp,".\tderiv... of??\n");                      fprintf(fp,".\tderiv... of??\n");
1997                  }                  }

Legend:
Removed from v.1386  
changed lines
  Added in v.1387

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