53 nmat, tag_mat, ne_loc, cs_nnz_loc, cs_loc, &
54 xs_loc, ys_loc, zs_loc, &
56 node_nhe_flag, mpi_id, mpi_comm, mpi_file)
62 integer*4 :: nn_loc, mpi_id , nmat_nhe, nmat
63 integer*4,
dimension(nmat_nhe) :: val_nhe
64 integer*4,
dimension(nmat) :: tag_mat
67 integer*4 :: ne_loc, cs_nnz_loc
68 integer*4,
dimension(0:cs_nnz_loc) :: cs_loc
70 real*8,
dimension(nn_loc) :: xs_loc, ys_loc, zs_loc
71 integer*4,
intent(inout) :: count
72 integer*4,
dimension(nn_loc),
intent(inout) :: node_nhe_flag
73 real(kdkind),
dimension(:),
allocatable :: xs_loc_nhe, ys_loc_nhe, zs_loc_nhe
75 real*8 :: t0, t1, time_elapsed
76 integer*4 :: i, j, ipt, inode, ie
77 integer*4 :: im, istart, iend, mpi_ierr, mpi_comm, unit_mpi
79 character*70 :: file_nhe_proc, file_nhe_new, mpi_file
89 im = cs_loc(cs_loc(ie -1))
90 istart = cs_loc(ie-1) + 1
96 if (val_nhe(i) .eq. tag_mat(im))
then
99 node_nhe_flag(cs_loc(j)) = 999
101 if (node_nhe_flag(cs_loc(j)).ne.999) node_nhe_flag(cs_loc(j)) = im
113 if ((node_nhe_flag(inode).eq.999)) count = count + 1
117 allocate(xs_loc_nhe(count),ys_loc_nhe(count),zs_loc_nhe(count))
122 if ((node_nhe_flag(inode).eq.999))
then
124 xs_loc_nhe(count) = xs_loc(inode)
125 ys_loc_nhe(count) = ys_loc(inode)
126 zs_loc_nhe(count) = zs_loc(inode)
130 call mpi_barrier(mpi_comm, mpi_ierr)
132 file_nhe_proc =
'nhexyz000000.mpi'
133 unit_mpi = 1500 + mpi_id
134 if (mpi_id.lt. 10)
then
135 write(file_nhe_proc(12:12),
'(i1)') mpi_id
136 else if (mpi_id .lt. 100)
then
137 write(file_nhe_proc(11:12),
'(i2)') mpi_id
138 else if (mpi_id .lt. 1000)
then
139 write(file_nhe_proc(10:12),
'(i3)') mpi_id
140 else if (mpi_id .lt. 10000)
then
141 write(file_nhe_proc(9:12),
'(i4)') mpi_id
142 else if (mpi_id .lt. 100000)
then
143 write(file_nhe_proc(8:12),
'(i5)') mpi_id
144 else if (mpi_id .lt. 1000000)
then
145 write(file_nhe_proc(7:12),
'(i6)') mpi_id
148 if(len_trim(mpi_file) .ne. 70)
then
149 file_nhe_new = mpi_file(1:len_trim(mpi_file)) //
'/' // file_nhe_proc
151 file_nhe_new = file_nhe_proc
154 open(unit_mpi,file=file_nhe_new)
155 write(unit_mpi,*) count
158 write(unit_mpi,*) xs_loc_nhe(i), ys_loc_nhe(i), zs_loc_nhe(i)
160 deallocate(xs_loc_nhe, ys_loc_nhe, zs_loc_nhe)
164 call mpi_barrier(mpi_comm, mpi_ierr)
subroutine make_nh_enhanced_initialise(nn_loc, nmat_nhe, val_nhe, nmat, tag_mat, ne_loc, cs_nnz_loc, cs_loc, xs_loc, ys_loc, zs_loc, count, node_nhe_flag, mpi_id, mpi_comm, mpi_file)
...Not-Honoring Enhanced (NHE) Implementation