SPEED
GET_MINVALUES.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine get_minvalues (i_glo, v_glo, n_glo, i_loc, n_loc, np)
 Computes positions of minimum values.
 

Function/Subroutine Documentation

◆ get_minvalues()

subroutine get_minvalues ( integer*4, dimension(n_glo)  i_glo,
real*8, dimension(n_glo)  v_glo,
integer*4  n_glo,
integer*4, dimension(n_loc)  i_loc,
integer*4  n_loc,
integer*4  np 
)

Computes positions of minimum values.

Author
Ilario Mazzieri
Date
September, 2013
Version
1.0
Parameters
[in]n_glonumber of global indices
[in]i_glovector conteining global indices
[in]v_glovector conteining global values
[in]npnumber of MPI processors
[in]n_locnumber of local indices
[out]i_locvector containing local indices corresponding to global minimal values

Definition at line 31 of file GET_MINVALUES.f90.

32
33
34
35 implicit none
36
37 integer*4 :: n_glo, n_loc, np
38 integer*4 :: i,j
39
40 integer*4, dimension(1) :: pos
41 integer*4, dimension(np) :: ind
42 integer*4, dimension(np) :: pos_glo
43 integer*4, dimension(n_glo) :: i_glo
44 integer*4, dimension(n_loc) :: i_loc
45
46 real*8, dimension(n_glo) :: v_glo
47 real*8, dimension(n_loc) :: v_loc
48 real*8, dimension(np) :: val
49
50 ! write(*,*) v_glo
51 ! read(*,*)
52 ! write(*,*) i_glo
53 ! read(*,*)
54
55
56 do i = 1, n_loc
57 do j = 1, np
58
59 pos_glo(j) = n_loc*(j-1) + i
60 ind(j) = i_glo(n_loc*(j-1) + i)
61 val(j) = v_glo(n_loc*(j-1) + i)
62
63 ! write(*,*) j, val(j), ind(j)
64 ! read(*,*)
65 enddo
66
67 pos = minloc(val)
68 ! write(*,*) i, val
69 ! write(*,*) pos(1),pos_glo(pos(1))
70 ! write(*,*) '====================='
71 !i_loc(i) = ind(pos(1))
72 i_loc(i) = pos_glo(pos(1))
73
74 enddo
75

Referenced by find_monitor_position(), make_extint_forces(), make_system_position_lglnodes(), and read_system_position().

Here is the caller graph for this function: