SPEED
MAKE_REN_LOC_NODE.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine make_ren_loc_node (nnz_loc, cs_loc, nn_loc, id, loc_n_nu
 Renumerates the grid nodes.
 

Function/Subroutine Documentation

◆ make_ren_loc_node()

subroutine make_ren_loc_node ( integer*4  nnz_loc,
integer*4, dimension(0:nnz_loc), intent(in)  cs_loc,
integer*4, intent(in)  nn_loc,
integer*4  id,
  loc_n_nu 
)

Renumerates the grid nodes.

Author
Ilario Mazzieri
Date
September, 2013
Version
1.0
Parameters
[in]nnz_locdimnsion for cs_loc
[in]cs_loclocal connectivity vector
[in]nn_locnumber of local unknowns
[in]idnumber of mpi process
[in,out]loc_n_numlocal node numbering (renumeration from local to global, loc_n_num(i) = global id for the i-th node)

Definition at line 31 of file MAKE_REN_LOC_NODE.f90.

32
33
35
36 implicit none
37
38 integer*4 :: nnz_loc
39 integer*4 :: ie, ne, i, j, ind_nd, id, ic
40
41 integer*4, intent(in) :: nn_loc
42
43 integer*4, dimension(0:nnz_loc), intent(in) :: cs_loc
44 integer*4, dimension(nn_loc), intent(inout) :: loc_n_num
45 integer*4, dimension(0:nnz_loc) :: cs_loc_copy
46
47
48
49 cs_loc_copy = cs_loc
50 ne = cs_loc_copy(0) - 1
51
52
53 do ie = 1,ne
54 cs_loc_copy(cs_loc_copy(ie-1)) = 0
55 enddo
56
57 !QUICKSORT FOR REORDING
58 !------------------------------------------------------------
59 do ie = 0, cs_loc_copy(0)
60 cs_loc_copy(ie) = 0
61 enddo
62
63 call qsortc(cs_loc_copy)
64
65
66 ic = 0
67 do i = 1, nnz_loc
68 if (cs_loc_copy(i) .ne. 0) then
69 if(cs_loc_copy(i) .ne. cs_loc_copy(i-1)) then
70 ic = ic + 1
71 loc_n_num(ic) = cs_loc_copy(i)
72 endif
73 endif
74 enddo
75
76
77
Quick-sort algorithm.
Definition MODULES.f90:612
recursive subroutine, public qsortc(a)
Definition MODULES.f90:621

References qsort_c_module::qsortc().

Here is the call graph for this function: