14 integer(kind=kint) :: NU, NL
15 integer(kind=kint),
pointer :: INL(:), INU(:)
16 integer(kind=kint),
pointer :: IAL(:,:), IAU(:,:)
32 call hecmw_mat_con0 (hecmesh, hecmat)
33 call hecmw_mat_con1 ( hecmat)
42 subroutine hecmw_mat_con0 ( hecMESH, hecMAT )
48 integer(kind=kint) ierr,itype,is,ie,ic_type,nn,icel,j,k,inod
51 integer(kind=kint) nid(20)
53 integer(kind=kint),
dimension(2048) :: ncol1, ncol2
59 hecmat%NP= hecmesh%n_node
60 hecmat%N = hecmesh%nn_internal
65 allocate (inl(hecmat%NP), ial(hecmat%NP,nl))
66 allocate (inu(hecmat%NP), iau(hecmat%NP,nu))
80 do itype= 1, hecmesh%n_elem_type
81 is= hecmesh%elem_type_index(itype-1) + 1
82 ie= hecmesh%elem_type_index(itype )
83 ic_type= hecmesh%elem_type_item(itype)
89 is= hecmesh%elem_node_index(icel-1)
91 nid(j)= hecmesh%elem_node_item (is+j)
96 call hecmw_find_node( hecmat,nid(j),nid(k), ierr )
117 do inod= 1, hecmat%NP
120 ncol1(k)= ial(inod,k)
122 call hecmw_msort (ncol1, ncol2, nn)
124 ial(inod,nn-k+1)= ncol1(ncol2(k))
128 ncol1(k)= iau(inod,k)
130 call hecmw_msort (ncol1, ncol2, nn)
132 iau(inod,nn-k+1)= ncol1(ncol2(k))
143 integer(kind=kint) IERR
145 deallocate (inl, ial, inu, iau)
147 if (ierr.eq.1) nl= nl + 5
148 if (ierr.eq.2) nu= nu + 5
149 allocate (inl(hecmat%NP),ial(hecmat%NP,nl))
150 allocate (inu(hecmat%NP),iau(hecmat%NP,nu))
158 end subroutine hecmw_mat_con0
164 subroutine hecmw_find_node ( hecMAT, ip1,ip2, IERR )
169 integer(kind=kint) ip1,ip2,IERR
170 integer(kind=kint) kk,icou
171 type (hecmwST_matrix) :: hecMAT
175 if (ip2.eq.ial(ip1,kk))
return
189 if (ip2.eq.iau(ip1,kk))
return
201 end subroutine hecmw_find_node
207 subroutine hecmw_msort (STEM,INUM,NN)
211 integer(kind=kint) NN
212 integer(kind=kint) STEM(NN), INUM(NN)
213 integer(kind=kint) ii,jj,ITEM
220 if (stem(inum(jj)) .lt. stem(inum(jj+1)))
then
228 end subroutine hecmw_msort
234 subroutine hecmw_mat_con1 (hecMAT)
239 integer(kind=kint) i,k,kk
240 type (hecmwST_matrix ) :: hecMAT
242 allocate (hecmat%indexL(0:hecmat%NP), hecmat%indexU(0:hecmat%NP))
247 hecmat%indexL(i) = hecmat%indexL(i-1) + inl(i)
248 hecmat%indexU(i) = hecmat%indexU(i-1) + inu(i)
251 hecmat%NPL = hecmat%indexL(hecmat%NP)
252 hecmat%NPU = hecmat%indexU(hecmat%NP)
254 allocate (hecmat%itemL(hecmat%NPL), hecmat%itemU(hecmat%NPU))
258 kk = k + hecmat%indexL(i-1)
259 hecmat%itemL(kk) = ial(i,k)
262 kk = k + hecmat%indexU(i-1)
263 hecmat%itemU(kk) = iau(i,k)
267 deallocate (inl, inu, ial, iau)
269 end subroutine hecmw_mat_con1
subroutine hecmw_mat_con0_clear(ierr)
logical function hecmw_is_etype_patch(etype)
integer(kind=kint) function hecmw_get_max_node(etype)
subroutine, public hecmw_mat_con(hecmesh, hecmat)