13.01.2013 Views

sundialsTB, a Matlab Interface to SUNDIALS - Site Index Page ...

sundialsTB, a Matlab Interface to SUNDIALS - Site Index Page ...

sundialsTB, a Matlab Interface to SUNDIALS - Site Index Page ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

o cntr [ true | false ]<br />

If true, CVodeMoni<strong>to</strong>r reports the evolution of the following counters:<br />

nst, nfe, nni, netf, ncfn (see CVodeGetStats)<br />

o sol [ true | false ]<br />

If true, CvodeMoni<strong>to</strong>r plots all solution components (graphical mode only).<br />

o grph [ true | false ]<br />

If true, CvodeMoni<strong>to</strong>r plots the evolutions of the above quantities.<br />

Otherwise, it prints <strong>to</strong> the screen.<br />

o updt [ integer | 50 ]<br />

CvodeMoni<strong>to</strong>r update frequency.<br />

o select [ array of integers ]<br />

To plot only particular solution components, specify their indeces in<br />

the field select. If defined, it au<strong>to</strong>matically sets sol=true. If not defined,<br />

but sol=true, CVodeMoni<strong>to</strong>r plots all components (graphical mode only).<br />

o xaxis [ linear | log ]<br />

Type of the time axis for the stepsize, order, and counter plots<br />

(graphical mode only).<br />

o dir [ 1 | -1 ]<br />

Specifies forward or backward integration.<br />

See also CVodeSetOptions, CVMoni<strong>to</strong>rFn<br />

Source Code<br />

1 f u n c t i o n [ ] = CVodeMoni<strong>to</strong>r ( c a l l , time , s o l , v a r a r g i n )<br />

39<br />

40 % Radu Serban <br />

41 % Copyright ( c ) 2005 , The Regents o f the U n i v e r s i t y o f C a l i f o r n i a .<br />

42 % $Revision$Date$<br />

43<br />

44 p e r s i s t e n t data<br />

45 p e r s i s t e n t f i r s t<br />

46 p e r s i s t e n t hf1 hf2 npl<br />

47 p e r s i s t e n t i<br />

48 p e r s i s t e n t t y h q nst nfe nni n e t f ncfn<br />

49<br />

50 i f c a l l == 0<br />

51<br />

52 i f nargin > 3<br />

53 data = v a r a r g i n {1};<br />

54 end<br />

55<br />

56 data = i n i t i a l i z e d a t a ( data , l e n g t h ( s o l ) ) ;<br />

57<br />

58 f i r s t = true ;<br />

59 i f data . grph<br />

60 npl = 0 ;<br />

61 i f data . s t a t s<br />

62 npl = npl + 2 ;<br />

63 end<br />

64 i f data . cntr<br />

65 npl = npl + 1 ;<br />

66 end<br />

67 i f npl ˜= 0<br />

68 hf1 = f i g u r e ;<br />

17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!