SPEED
MAKE_SPX_NODES.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 subroutine make_spx_nodes(nb_node,spx_con_nnz,spx_con,node_wgt,nnz,node_pointer)
31
32
33
34 implicit none
35
36 integer*4 :: nb_node,spx_con_nnz,nnz
37 integer*4 :: i,j,ie,nb_elem,nn3
38
39 integer*4, dimension(:), allocatable :: i4count
40 integer*4, dimension(0:spx_con_nnz) :: spx_con
41 integer*4, dimension(nb_node) :: node_wgt
42 integer*4, dimension(0:nnz) :: node_pointer
43
44 allocate(i4count(nb_node))
45
46 node_pointer(0) = nb_node + 1
47 do j = 1, nb_node
48 node_pointer(j) = node_pointer(j -1) + node_wgt(j)
49 enddo
50
51 do j = 1, nb_node
52 i4count(j) = node_pointer(j -1)
53 enddo
54
55 nb_elem = spx_con(0) - 1
56 do ie = 1, nb_elem
57
58 nn3 = spx_con(ie) - spx_con(ie -1) -1
59 do i = 1, nn3
60
61 j = spx_con(spx_con(ie -1) +i)
62 node_pointer(i4count(j)) = ie
63 i4count(j) = i4count(j) + 1
64 enddo
65 enddo
66
67 deallocate(i4count)
68
69 return
70
71 end subroutine make_spx_nodes
72
subroutine make_spx_nodes(nb_node, spx_con_nnz, spx_con, node_wgt, nnz
Makes a pointer for spectral connectivity vector.