All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
pxaddv.f
Go to the documentation of this file.
1 CDECK ID>, PXADDV.
2  SUBROUTINE pxaddv (ISIZ,VEC1,VEC2,VECO)
3 *.*********************************************************
4 *. ------
5 *. PXADDV
6 *. ------
7 *. SOURCE: J.W.Gary
8 *. Add two vectors of arbitrary length
9 *. Usage :
10 *.
11 *. INTEGER ISIZ,NDIM
12 *. PARAMETER (NDIM=1.or.more)
13 *. REAL VEC1 (NDIM.or.more),
14 *. + VEC2 (NDIM.or.more),
15 *. + VECO (NDIM.or.more)
16 *.
17 *. ISIZ = 1.to.NDIM
18 *. CALL PXADDV (ISIZ,VEC1,VEC2,VECO)
19 *.
20 *. INPUT : ISIZ The length of the vectors
21 *. INPUT : VEC1 The first vector
22 *. INPUT : VEC2 The second vector
23 *. OUTPUT : VECO The vector sum of VEC1 and VEC2
24 *. (elements 1 to ISIZ)
25 *.
26 *.*********************************************************
27  IMPLICIT NONE
28  INTEGER isiz,ix
29  REAL vec1 (*),vec2 (*),veco (*)
30  DOUBLE PRECISION ax
31  DO 120 ix = 1,isiz
32  ax = vec1(ix) + vec2(ix)
33  veco(ix) = ax
34  120 CONTINUE
35  RETURN
36  END
subroutine pxaddv(ISIZ, VEC1, VEC2, VECO)
Definition: pxaddv.f:2