V3FIT
LIBSTELL
Sources
Optimization
enorm.f
1
FUNCTION
enorm (n, x)
2
USE
stel_kinds
3
IMPLICIT NONE
4
!-----------------------------------------------
5
! D u m m y A r g u m e n t s
6
!-----------------------------------------------
7
INTEGER
n
8
REAL
(rprec),
DIMENSION(n)
:: x
9
REAL
(rprec) :: enorm
10
!-----------------------------------------------
11
!
12
! FUNCTION enorm
13
!
14
! given an n-vector x, this FUNCTION calculates the
15
! euclidean norm of x.
16
!
17
!
18
! the FUNCTION statement is
19
!
20
! FUNCTION enorm(n,x)
21
!
22
! WHERE
23
!
24
! n is a positive INTEGER input variable.
25
!
26
! x is an input array of length n.
27
!
28
enorm = sqrt(sum(x(:n)*x(:n)))
29
30
END FUNCTION
enorm
Generated on Thu Mar 5 2020 15:49:24 for V3FIT by
1.8.17