SPEED
GET_MONITOR_VALUE.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine get_monitor_value (nb_nod, xq, val, xref, yref, zref, re
 Computes the mean value.
 

Function/Subroutine Documentation

◆ get_monitor_value()

subroutine get_monitor_value ( integer*4  nb_nod,
real*8, dimension(nb_nod)  xq,
real*8, dimension(nb_nod,nb_nod,nb_nod)  val,
real*8  xref,
real*8  yref,
real*8  zref,
  re 
)

Computes the mean value.

Author
Ilario Mazzieri
Date
September, 2013
Version
1.0
Parameters
[in]nb_nodnumber of 1D GLL nodes
[in]xqcoor GLL node
[in]valvalue in each GLL node
[in]xrefx-coordinate of the monitor
[in]yrefy-coordinate of the monitor
[in]zrefz-coordinate of the monitor
[out]resmean value (interpolation)

Definition at line 32 of file GET_MONITOR_VALUE.f90.

33
34 implicit none
35
36 integer*4 :: nb_nod
37 integer*4 :: i,j,k,h
38
39 real*8 :: xref,yref,zref,res
40 real*8 :: fx,fy,fz
41
42 real*8, dimension(nb_nod) :: xq
43
44 real*8, dimension(nb_nod,nb_nod,nb_nod) :: val
45
46 res = 0.0d0
47
48 do k = 1,nb_nod
49 fz = 1.0d0
50 do h = 1,nb_nod
51 if (h.ne.k) fz = fz * (zref - xq(h)) / (xq(k) - xq(h))
52 enddo
53
54 do j = 1,nb_nod
55 fy = 1.0d0
56 do h = 1,nb_nod
57 if (h.ne.j) fy = fy * (yref - xq(h)) / (xq(j) - xq(h))
58 enddo
59
60 do i = 1,nb_nod
61 fx = 1.0d0
62 do h = 1,nb_nod
63 if (h.ne.i) fx = fx * (xref - xq(h)) / (xq(i) - xq(h))
64 enddo
65
66 res = res + val(i,j,k) * fx * fy * fz
67 enddo
68 enddo
69 enddo
70

Referenced by compute_sdof_input(), get_max_values(), and write_output().

Here is the caller graph for this function: