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 ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
N_VL1Norm returns the L1 norm of x<br />
Usage: RET = N_VL1Norm ( X [, COMM] )<br />
If COMM is not present, N_VL1Norm returns the L1 norm of<br />
the local portion of X. Otherwise, it returns the global<br />
L1 norm..<br />
Source Code<br />
1 f u n c t i o n r e t = N VL1Norm( x ,comm)<br />
9<br />
10 % Radu Serban <br />
11 % 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 />
12 % $Revision$Date$<br />
13<br />
14 i f nargin == 1<br />
15<br />
16 r e t = norm ( x , 1 ) ;<br />
17<br />
18 e l s e<br />
19<br />
20 lnrm = norm ( x , 1 ) ;<br />
21 gnrm = 0 . 0 ;<br />
22 MPI Allreduce ( lnrm , gnrm , ’MAX’ ,comm ) ;<br />
23 r e t = gnrm ;<br />
24<br />
25 end<br />
Purpose<br />
N_VMax returns the largest element of x<br />
Synopsis<br />
function ret = N_VMax(x,comm)<br />
Description<br />
N_VMax returns the largest element of x<br />
Usage: RET = N_VMax ( X [, COMM] )<br />
N_VMax<br />
If COMM is not present, N_VMax returns the maximum value of<br />
the local portion of X. Otherwise, it returns the global<br />
maximum value.<br />
Source Code<br />
1 f u n c t i o n r e t = N VMax( x ,comm)<br />
9<br />
10 % Radu Serban <br />
11 % 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 />
12 % $Revision$Date$<br />
52