SPEED
MAKE_DG_LOC_NUMERATION.f90
Go to the documentation of this file.
1! Copyright (C) 2012 The SPEED FOUNDATION
2! Author: Ilario Mazzieri
3!
4! This file is part of SPEED.
5!
6! SPEED is free software; you can redistribute it and/or modify it
7! under the terms of the GNU Affero General Public License as
8! published by the Free Software Foundation, either version 3 of the
9! License, or (at your option) any later version.
10!
11! SPEED is distributed in the hope that it will be useful, but
12! WITHOUT ANY WARRANTY; without even the implied warranty of
13! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14! Affero General Public License for more details.
15!
16! You should have received a copy of the GNU Affero General Public License
17! along with SPEED. If not, see <http://www.gnu.org/licenses/>.
18
29
30
31 subroutine make_dg_loc_numeration(nnloc, loc_n_num, &
32 cs_nnz, cs_loc, neloc, loc_el_num, mpi_id)
33
34 implicit none
35
36 integer*4 :: ne_loc, ieloc, neloc
37 integer*4 :: ie, j, iglo, iloc
38 integer*4 :: cs_nnz, nnloc, mpi_id
39
40 integer*4, dimension(0:cs_nnz), intent(inout) :: cs_loc
41 integer*4, dimension(nnloc), intent(inout) :: loc_n_num
42 integer*4, dimension(neloc), intent(inout) :: loc_el_num
43
44
45 ne_loc = cs_loc(0) - 1
46
47
48 do ie = 1, ne_loc
49
50 call get_indloc_from_indglo(loc_el_num, neloc, cs_loc(cs_loc(ie-1)), ieloc)
51
52 if(ieloc .ne. 0) then
53
54 cs_loc(cs_loc(ie-1)) = 0
55 do j = cs_loc(ie -1) + 1, cs_loc(ie) - 1
56 cs_loc(j) = 0
57 enddo
58
59 else
60
61 do j = cs_loc(ie -1) + 1, cs_loc(ie) - 1
62 iglo = cs_loc(j)
63 call get_indloc_from_indglo(loc_n_num, nnloc, iglo, iloc)
64 cs_loc(j) = iloc
65 enddo
66
67 endif
68
69 enddo
70
71
72
73 end subroutine make_dg_loc_numeration
subroutine get_indloc_from_indglo(local_el, nel_loc, ie, ic)
Returns local id from global id.
subroutine make_dg_loc_numeration(nnloc, loc_n_num, cs_nnz, cs_loc, neloc, loc_el_num, mpi_
Local numeration for DG elements.