SPEED
MAKE_SPX_CON_LOC.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
30
31 subroutine make_spx_con_loc(nel_loc, nel, el_dom, &
32 nnz, cs, nnz_loc, cs_loc, &
33 nm, tag_mat, sdeg_mat, mpi_id)
34
35
36 implicit none
37
38 integer*4 :: j,k,ie,nm, nn
39 integer*4 :: nel_loc, nel, nnz, mpi_id
40 integer*4 :: nnz_loc
41
42 integer*4, dimension(0:nnz) :: cs
43 integer*4, dimension(nel) :: el_dom
44 integer*4, dimension(nm) :: tag_mat, sdeg_mat
45 integer*4, dimension(0:nnz_loc) :: cs_loc
46
47
48 cs_loc = 0
49 cs_loc(0) = nel_loc+1
50 k = 0
51 do ie = 1, nel
52 do j = 1, nm
53 if (( tag_mat(j).eq. cs(cs(ie-1)) ) .and. (el_dom(ie) .eq. mpi_id)) then
54 nn = sdeg_mat(j) +1
55 k = k + 1
56 cs_loc(k) = cs_loc(k-1) + nn*nn*nn +1
57 cs_loc(cs_loc(k-1)) = tag_mat(j)
58 cs_loc(cs_loc(k-1) + 1 : cs_loc(k)-1) = cs(cs(ie-1)+1 : cs(ie)-1)
59 endif
60 enddo
61 enddo
62
63
64 end subroutine make_spx_con_loc
65
subroutine make_spx_con_loc(nel_loc, nel, el_dom, nnz, cs, nnz_loc, cs_loc, nm, tag_mat, sdeg_mat, mpi_id)
Makes local connectivity vector.