LILAC
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Typedefs | Functions | Variables
lsoda.cpp File Reference
#include <math.h>
#include "../utils/defs.h"
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for lsoda.cpp:

Go to the source code of this file.

Macros

#define max(a, b)   ( (a) > (b) ? (a) : (b) )
#define min(a, b)   ( (a) < (b) ? (a) : (b) )
#define ETA   2.2204460492503131e-16

Typedefs

typedef void(* _lsoda_f )(double, double *, double *, void *)

Functions

static int idamax (size_t n, double *dx, size_t incx)
void dscal (size_t n, double da, double *dx, size_t incx)
static double ddot (size_t n, double *dx, size_t incx, double *dy, size_t incy)
static void daxpy (size_t n, double da, double *restr dx, size_t incx, double *restr dy, size_t incy)
static void dgesl (double *restr *restr a, int n, int *ipvt, double *restr b, int job)
void dgefa (double **a, int n, int *ipvt, int *info)
static void stoda (int neq, double *y, _lsoda_f f, void *_data)
static void correction (int neq, double *y, _lsoda_f f, int *corflag, double pnorm, double *del, double *delp, double *told, int *ncf, double *rh, int *m, void *_data)
static void prja (int neq, double *y, _lsoda_f f, void *_data)
static void terminate (int *istate)
static void terminate2 (double *y, double *t)
static void successreturn (double *y, double *t, int itask, int ihit, double tcrit, int *istate)
static void freevectors (void)
static void _freevectors (void)
static void ewset (int itol, double *rtol, double *atol, double *ycur)
static void resetcoeff (void)
static void solsy (double *y)
static void endstoda (void)
static void orderswitch (double *rhup, double dsm, double *pdh, double *rh, int *orderflag)
static void intdy (double t, int k, double *dky, int *iflag)
static void corfailure (double *told, double *rh, int *ncf, int *corflag)
static void methodswitch (double dsm, double pnorm, double *pdh, double *rh)
static void cfode (int meth)
static void scaleh (double *rh, double *pdh)
static double fnorm (int n, double **a, double *w)
static double vmnorm (int n, double *v, double *w)
void lsoda (_lsoda_f f, int neq, double *y, double *t, double tout, int itol, double *rtol, double *atol, int itask, int *istate, int iopt, int jt, int iwork1, int iwork2, int iwork5, int iwork6, int iwork7, int iwork8, int iwork9, double rwork1, double rwork5, double rwork6, double rwork7, void *_data)
int n_lsoda (double y[], int n, double *x, double xout, double eps, const double yscal[], _lsoda_f devis, void *data)
void n_lsoda_terminate (void)

Variables

static int g_nyh = 0
static int g_lenyh = 0
static int ml
static int mu
static int imxer
static int mord [3] = {0, 12, 5}
static double sqrteta
static double * yp1
static double * yp2
static double sm1 [13] = {0., 0.5, 0.575, 0.55, 0.45, 0.35, 0.25, 0.2, 0.15, 0.1, 0.075, 0.05, 0.025}
static double ccmax
static double el0
static double h
static double hmin
static double hmxi
static double hu
static double rc
static double tn
static int illin = 0
static int init = 0
static int mxstep
static int mxhnil
static int nhnil
static int ntrep = 0
static int nslast
static int nyh
static int ierpj
static int iersl
static int jcur
static int jstart
static int kflag
static int l
static int meth
static int miter
static int maxord
static int maxcor
static int msbp
static int mxncf
static int n
static int nq
static int nst
static int nfe
static int nje
static int nqu
static double tsw
static double pdnorm
static int ixpr = 0
static int jtyp
static int mused
static int mxordn
static int mxords
static double conit
static double crate
static double el [14]
static double elco [13][14]
static double hold
static double rmax
static double tesco [13][4]
static int ialth
static int ipup
static int lmax
static int nslp
static double pdest
static double pdlast
static double ratio
static double cm1 [13]
static double cm2 [6]
static int icount
static int irflag
static double ** yh
static double ** wm
static double * ewt
static double * savf
static double * acor
static int * ipvt

Macro Definition Documentation

#define ETA   2.2204460492503131e-16

Definition at line 589 of file lsoda.cpp.

#define max (   a,
 
)    ( (a) > (b) ? (a) : (b) )

Definition at line 586 of file lsoda.cpp.

#define min (   a,
 
)    ( (a) < (b) ? (a) : (b) )

Definition at line 587 of file lsoda.cpp.

Typedef Documentation

typedef void(* _lsoda_f)(double, double *, double *, void *)

Definition at line 46 of file lsoda.cpp.

Function Documentation

static void _freevectors ( void  )
static

Definition at line 2738 of file lsoda.cpp.

Here is the caller graph for this function:

static void cfode ( int  meth)
static

Definition at line 1998 of file lsoda.cpp.

Here is the caller graph for this function:

static void corfailure ( double *  told,
double *  rh,
int *  ncf,
int *  corflag 
)
static

Definition at line 2425 of file lsoda.cpp.

Here is the caller graph for this function:

static void correction ( int  neq,
double *  y,
_lsoda_f  f,
int *  corflag,
double  pnorm,
double *  del,
double *  delp,
double *  told,
int *  ncf,
double *  rh,
int *  m,
void *  _data 
)
static

Definition at line 2274 of file lsoda.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void daxpy ( size_t  n,
double  da,
double *restr  dx,
size_t  incx,
double *restr  dy,
size_t  incy 
)
static

Definition at line 277 of file lsoda.cpp.

Here is the caller graph for this function:

static double ddot ( size_t  n,
double *  dx,
size_t  incx,
double *  dy,
size_t  incy 
)
static

Definition at line 187 of file lsoda.cpp.

Here is the caller graph for this function:

void dgefa ( double **  a,
int  n,
int *  ipvt,
int *  info 
)

Definition at line 461 of file lsoda.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void dgesl ( double *restr *restr  a,
int  n,
int *  ipvt,
double *restr  b,
int  job 
)
static

Definition at line 362 of file lsoda.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dscal ( size_t  n,
double  da,
double *  dx,
size_t  incx 
)

Definition at line 122 of file lsoda.cpp.

Here is the caller graph for this function:

static void endstoda ( void  )
static

Definition at line 2593 of file lsoda.cpp.

Here is the caller graph for this function:

static void ewset ( int  itol,
double *  rtol,
double *  atol,
double *  ycur 
)
static

Definition at line 1906 of file lsoda.cpp.

Here is the caller graph for this function:

static double fnorm ( int  n,
double **  a,
double *  w 
)
static

Definition at line 2248 of file lsoda.cpp.

Here is the caller graph for this function:

static void freevectors ( void  )
static

Definition at line 2734 of file lsoda.cpp.

Here is the caller graph for this function:

static int idamax ( size_t  n,
double *  dx,
size_t  incx 
)
static

Definition at line 55 of file lsoda.cpp.

Here is the caller graph for this function:

static void intdy ( double  t,
int  k,
double *  dky,
int *  iflag 
)
static

Definition at line 1931 of file lsoda.cpp.

Here is the caller graph for this function:

void lsoda ( _lsoda_f  f,
int  neq,
double *  y,
double *  t,
double  tout,
int  itol,
double *  rtol,
double *  atol,
int  itask,
int *  istate,
int  iopt,
int  jt,
int  iwork1,
int  iwork2,
int  iwork5,
int  iwork6,
int  iwork7,
int  iwork8,
int  iwork9,
double  rwork1,
double  rwork5,
double  rwork6,
double  rwork7,
void *  _data 
)

Definition at line 831 of file lsoda.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void methodswitch ( double  dsm,
double  pnorm,
double *  pdh,
double *  rh 
)
static

Definition at line 2473 of file lsoda.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int n_lsoda ( double  y[],
int  n,
double *  x,
double  xout,
double  eps,
const double  yscal[],
_lsoda_f  devis,
void *  data 
)

Definition at line 2753 of file lsoda.cpp.

Here is the call graph for this function:

void n_lsoda_terminate ( void  )

Definition at line 2772 of file lsoda.cpp.

Here is the call graph for this function:

static void orderswitch ( double *  rhup,
double  dsm,
double *  pdh,
double *  rh,
int *  orderflag 
)
static

Definition at line 2606 of file lsoda.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void prja ( int  neq,
double *  y,
_lsoda_f  f,
void *  _data 
)
static

Definition at line 2166 of file lsoda.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void resetcoeff ( void  )
static

Definition at line 2715 of file lsoda.cpp.

Here is the caller graph for this function:

static void scaleh ( double *  rh,
double *  pdh 
)
static

Definition at line 2127 of file lsoda.cpp.

Here is the caller graph for this function:

static void solsy ( double *  y)
static

Definition at line 2449 of file lsoda.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void stoda ( int  neq,
double *  y,
_lsoda_f  f,
void *  _data 
)
static

Definition at line 1565 of file lsoda.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void successreturn ( double *  y,
double *  t,
int  itask,
int  ihit,
double  tcrit,
int *  istate 
)
static

Definition at line 696 of file lsoda.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void terminate ( int *  istate)
static

Definition at line 664 of file lsoda.cpp.

Here is the caller graph for this function:

static void terminate2 ( double *  y,
double *  t 
)
static

Definition at line 676 of file lsoda.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static double vmnorm ( int  n,
double *  v,
double *  w 
)
static

Definition at line 2227 of file lsoda.cpp.

Here is the caller graph for this function:

Variable Documentation

double * acor
static

Definition at line 641 of file lsoda.cpp.

double ccmax
static

Definition at line 624 of file lsoda.cpp.

double cm1[13]
static

Definition at line 636 of file lsoda.cpp.

double cm2[6]
static

Definition at line 636 of file lsoda.cpp.

double conit
static

Definition at line 634 of file lsoda.cpp.

double crate
static

Definition at line 634 of file lsoda.cpp.

double el[14]
static

Definition at line 634 of file lsoda.cpp.

double el0
static

Definition at line 624 of file lsoda.cpp.

double elco[13][14]
static

Definition at line 634 of file lsoda.cpp.

double * ewt
static

Definition at line 641 of file lsoda.cpp.

int g_lenyh = 0
static

Definition at line 613 of file lsoda.cpp.

int g_nyh = 0
static

Definition at line 613 of file lsoda.cpp.

double h
static

Definition at line 624 of file lsoda.cpp.

double hmin
static

Definition at line 624 of file lsoda.cpp.

double hmxi
static

Definition at line 624 of file lsoda.cpp.

double hold
static

Definition at line 634 of file lsoda.cpp.

double hu
static

Definition at line 624 of file lsoda.cpp.

int ialth
static

Definition at line 635 of file lsoda.cpp.

int icount
static

Definition at line 637 of file lsoda.cpp.

int ierpj
static

Definition at line 625 of file lsoda.cpp.

int iersl
static

Definition at line 625 of file lsoda.cpp.

int illin = 0
static

Definition at line 625 of file lsoda.cpp.

int imxer
static

Definition at line 617 of file lsoda.cpp.

int init = 0
static

Definition at line 625 of file lsoda.cpp.

int ipup
static

Definition at line 635 of file lsoda.cpp.

int* ipvt
static

Definition at line 642 of file lsoda.cpp.

int irflag
static

Definition at line 637 of file lsoda.cpp.

int ixpr = 0
static

Definition at line 629 of file lsoda.cpp.

int jcur
static

Definition at line 625 of file lsoda.cpp.

int jstart
static

Definition at line 625 of file lsoda.cpp.

int jtyp
static

Definition at line 629 of file lsoda.cpp.

int kflag
static

Definition at line 625 of file lsoda.cpp.

int l
static

Definition at line 625 of file lsoda.cpp.

int lmax
static

Definition at line 635 of file lsoda.cpp.

int maxcor
static

Definition at line 625 of file lsoda.cpp.

int maxord
static

Definition at line 625 of file lsoda.cpp.

int meth
static

Definition at line 625 of file lsoda.cpp.

int miter
static

Definition at line 625 of file lsoda.cpp.

int ml
static

Definition at line 617 of file lsoda.cpp.

int mord[3] = {0, 12, 5}
static

Definition at line 618 of file lsoda.cpp.

int msbp
static

Definition at line 625 of file lsoda.cpp.

int mu
static

Definition at line 617 of file lsoda.cpp.

int mused
static

Definition at line 629 of file lsoda.cpp.

int mxhnil
static

Definition at line 625 of file lsoda.cpp.

int mxncf
static

Definition at line 625 of file lsoda.cpp.

int mxordn
static

Definition at line 629 of file lsoda.cpp.

int mxords
static

Definition at line 629 of file lsoda.cpp.

int mxstep
static

Definition at line 625 of file lsoda.cpp.

int n
static

Definition at line 625 of file lsoda.cpp.

int nfe
static

Definition at line 625 of file lsoda.cpp.

int nhnil
static

Definition at line 625 of file lsoda.cpp.

int nje
static

Definition at line 625 of file lsoda.cpp.

int nq
static

Definition at line 625 of file lsoda.cpp.

int nqu
static

Definition at line 625 of file lsoda.cpp.

int nslast
static

Definition at line 625 of file lsoda.cpp.

int nslp
static

Definition at line 635 of file lsoda.cpp.

int nst
static

Definition at line 625 of file lsoda.cpp.

int ntrep = 0
static

Definition at line 625 of file lsoda.cpp.

int nyh
static

Definition at line 625 of file lsoda.cpp.

double pdest
static

Definition at line 636 of file lsoda.cpp.

double pdlast
static

Definition at line 636 of file lsoda.cpp.

double pdnorm
static

Definition at line 628 of file lsoda.cpp.

double ratio
static

Definition at line 636 of file lsoda.cpp.

double rc
static

Definition at line 624 of file lsoda.cpp.

double rmax
static

Definition at line 634 of file lsoda.cpp.

double * savf
static

Definition at line 641 of file lsoda.cpp.

double sm1[13] = {0., 0.5, 0.575, 0.55, 0.45, 0.35, 0.25, 0.2, 0.15, 0.1, 0.075, 0.05, 0.025}
static

Definition at line 620 of file lsoda.cpp.

double sqrteta
static

Definition at line 619 of file lsoda.cpp.

double tesco[13][4]
static

Definition at line 634 of file lsoda.cpp.

double tn
static

Definition at line 624 of file lsoda.cpp.

double tsw
static

Definition at line 628 of file lsoda.cpp.

double ** wm
static

Definition at line 641 of file lsoda.cpp.

double** yh
static

Definition at line 641 of file lsoda.cpp.

double * yp1
static

Definition at line 619 of file lsoda.cpp.

double * yp2
static

Definition at line 619 of file lsoda.cpp.