GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ddwnrm.f
Go to the documentation of this file.
1 C Work performed under the auspices of the U.S. Department of Energy
2 C by Lawrence Livermore National Laboratory under contract number
3 C W-7405-Eng-48.
4 C
5  DOUBLE PRECISION FUNCTION ddwnrm(NEQ,V,RWT,RPAR,IPAR)
6 C
7 C***BEGIN PROLOGUE DDWNRM
8 C***ROUTINES CALLED (NONE)
9 C***DATE WRITTEN 890101 (YYMMDD)
10 C***REVISION DATE 900926 (YYMMDD)
11 C***END PROLOGUE DDWNRM
12 C-----------------------------------------------------------------------
13 C This function routine computes the weighted
14 C root-mean-square norm of the vector of length
15 C NEQ contained in the array V, with reciprocal weights
16 C contained in the array RWT of length NEQ.
17 C DDWNRM=SQRT((1/NEQ)*SUM(V(I)*RWT(I))**2)
18 C-----------------------------------------------------------------------
19 C
20  IMPLICIT DOUBLE PRECISION(a-h,o-z)
21  dimension v(*),rwt(*)
22  dimension rpar(*),ipar(*)
23  ddwnrm = 0.0d0
24  vmax = 0.0d0
25  DO 10 i = 1,neq
26  IF(abs(v(i)*rwt(i)) .GT. vmax) vmax = abs(v(i)*rwt(i))
27 10 CONTINUE
28  IF(vmax .LE. 0.0d0) go to 30
29  sum = 0.0d0
30  DO 20 i = 1,neq
31 20 sum = sum + ((v(i)*rwt(i))/vmax)**2
32  ddwnrm = vmax*sqrt(sum/neq)
33 30 CONTINUE
34  RETURN
35 C
36 C------END OF FUNCTION DDWNRM-------------------------------------------
37  END
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
Definition: cellfun.cc:398
double h
Definition: graphics.cc:11205
may be zero for pure relative error test tem the relative tolerance must be greater than or equal to
Definition: Quad-opts.cc:233
OCTAVE_EXPORT octave_value_list etc The functions then dimension(columns)
OCTAVE_EXPORT octave_value_list return the value of the option it must match the dimension of the state and the relative tolerance must also be a vector of the same length tem it must match the dimension of the state and the absolute tolerance must also be a vector of the same length The local error test applied at each integration step is xample roup abs(local error in x(i))<
double precision function ddwnrm(NEQ, V, RWT, RPAR, IPAR)
Definition: ddwnrm.f:5
octave_value sqrt(void) const
Definition: ov.h:1388