/[ascend]/trunk/base/generic/solver/lsode.c
ViewVC logotype

Diff of /trunk/base/generic/solver/lsode.c

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

revision 941 by johnpye, Fri Nov 24 06:09:46 2006 UTC revision 942 by johnpye, Sat Nov 25 05:26:47 2006 UTC
# Line 267  void integrator_lsode_free(void *engined Line 267  void integrator_lsode_free(void *engined
267      d.n_eqns = 0L;      d.n_eqns = 0L;
268  }  }
269    
270    /*------------------------------------------------------------------------------
271        PARAMETERS
272    */
273    
274    enum ida_parameters{
275        LSODE_PARAM_TIMING
276        ,LSODE_PARAMS_SIZE
277    };
278    
279    /**
280        Here the full set of parameters is defined, along with upper/lower bounds,
281        etc. The values are stuck into the blsys->params structure.
282    
283        @return 0 on success
284    */
285    int integrator_lsode_params_default(IntegratorSystem *blsys){
286    
287        asc_assert(blsys!=NULL);
288        asc_assert(blsys->engine==INTEG_IDA);
289        slv_parameters_t *p;
290        p = &(blsys->params);
291    
292        slv_destroy_parms(p);
293    
294        if(p->parms==NULL){
295            CONSOLE_DEBUG("params NULL");
296            p->parms = ASC_NEW_ARRAY(struct slv_parameter, LSODE_PARAMS_SIZE);
297            if(p->parms==NULL)return -1;
298            p->dynamic_parms = 1;
299        }else{
300            asc_assert(p->num_parms == LSODE_PARAMS_SIZE);
301            CONSOLE_DEBUG("reusing parm memory");
302        }
303    
304        /* reset the number of parameters to zero so that we can check it at the end */
305        p->num_parms = 0;
306    
307        slv_param_bool(p,LSODE_PARAM_TIMING
308                ,(SlvParameterInitBool){{"timing"
309                ,"Output timing statistics?",1,NULL
310            }, TRUE}
311        );
312    
313        asc_assert(p->num_parms == LSODE_PARAMS_SIZE);
314    
315        CONSOLE_DEBUG("Created %d params", p->num_parms);
316    
317        return 0;
318    }  
319    
320  /*---------------------------------------------------------  /*---------------------------------------------------------
321    Couple of matrix methods...?    Couple of matrix methods...?
322  */  */

Legend:
Removed from v.941  
changed lines
  Added in v.942

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