SPEED
MAKE_GRID_NODES.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine make_grid_nodes (nb_node, nb_elem, con_matrix, node_wgt, nnz
 Makes pointer for connectivity of mesh nodes.
 

Function/Subroutine Documentation

◆ make_grid_nodes()

subroutine make_grid_nodes ( integer*4  nb_node,
integer*4  nb_elem,
integer*4, dimension(nb_elem,9)  con_matrix,
integer*4, dimension(nb_node)  node_wgt,
integer*4  nnz 
)

Makes pointer for connectivity of mesh nodes.

Author
Ilario Mazzieri
Date
September, 2013
Version
1.0
Parameters
[in]nb_nodegrid nodes
[in]nb_elemnumber of elements (hexes)
[in]con_matrixcon_matrix(i,1) -> element con_matrix(i,2),...,con_matrix(i,9) -> grid nodes of element con_matrix(i,1)
[in]node_wgtnode_wgt(i) contains the multiplicity of the grid node i (e.g. if the node node i is shared by 4 elements node_wgt(i) = 4
[in]nnznumber of grid nodes + number of grid nodes including repetitions + 1
[out]node_pointerpointer for mesh nodes connectivity

Definition at line 72 of file MAKE_GRID_NODES.f90.

73
74
75 implicit none
76
77 integer*4 :: nb_node,nb_elem,nnz
78 integer*4 :: i,j,ie
79
80 integer*4, dimension(:), allocatable :: i4count
81 integer*4, dimension(nb_node) :: node_wgt
82 integer*4, dimension(0:nnz) :: node_pointer
83
84 integer*4, dimension(nb_elem,9) :: con_matrix
85
86
87 allocate(i4count(nb_node))
88
89 node_pointer(0) = nb_node +1
90 do j = 1,nb_node
91 node_pointer(j) = node_pointer(j-1) + node_wgt(j)
92 enddo
93
94 do j = 1,nb_node
95 i4count(j) = node_pointer(j-1)
96 enddo
97
98
99 do ie = 1,nb_elem
100 do i = 1,8
101 j = con_matrix(ie,i +1)
102 node_pointer(i4count(j)) = ie
103 i4count(j) = i4count(j) +1
104 enddo
105 enddo
106
107 deallocate(i4count)
108
109 return
110