64 INTEGER,
DIMENSION(:),
POINTER :: rcvbuf
69 REAL(kind=wp) :: tempkval
70 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: amounttoreceive, amounttosend
71 REAL(kind=wp),
ALLOCATABLE,
DIMENSION(:) :: bufsnd
72 TYPE(int_buf),
ALLOCATABLE,
DIMENSION(:) :: ki, kj
76 IF(myid==0)
print*,
'CONSTRUCTING THE STIFFNESS MATRIX'
80 CALL
implicit_v3d8_me_k(global%MeshCoor, global%ElConnVol, global%ci_full, global%NumNp, 1, global%NumElVol, &
81 global%NumElVol, global%MatIdVol, global%NumMatVol, global%enhanced_map, global%mixed_map, &
83 ALLOCATE(rp_k(1:3*gnumnp+1))
84 ALLOCATE(cval_k(1:nnz_temp))
85 ALLOCATE(aval_k(1:nnz_temp))
90 DEALLOCATE(rp_temp,cval_temp,aval_temp)
94 CALL mpi_barrier(rocstar_communicator,ierr)
95 ALLOCATE(req_rcv(1:nprocs))
96 ALLOCATE(req_snd(1:nprocs))
97 ALLOCATE(stat_snd(1:mpi_status_size,1:nprocs))
98 ALLOCATE(stat_rcv(1:mpi_status_size,1:nprocs))
102 DO j = 1, mpi_status_size
107 ALLOCATE(amounttoreceive(1:numcommprocsfrom1))
108 DO i = 1, numcommprocsfrom1
109 CALL mpi_irecv(amounttoreceive(
i),1, &
110 mpi_integer,commprocsfrom1(
i),10,rocstar_communicator, &
113 ALLOCATE(amounttosend(1:numcommprocs1))
114 DO i = 1, numcommprocs1
116 DO j = 1, numcommnodes1(
i)
120 inode = local2global(commnodes1(
i,
j))
126 IF (tempkval /= 0.0)
THEN
127 counter = counter + 1
135 amounttosend(
i) = counter
138 CALL mpi_send(amounttosend(
i),1,mpi_integer, &
139 commprocs1(
i),10,rocstar_communicator,ierr)
143 CALL mpi_waitall(nprocs,req_rcv,stat_rcv,ierr)
148 CALL mpi_barrier(rocstar_communicator,ierr)
149 ALLOCATE(ki(1:numcommprocsfrom1))
150 DO i = 1, numcommprocsfrom1
151 ALLOCATE(ki(
i)%rcvbuf(1:amounttoreceive(
i)))
152 CALL mpi_irecv(ki(
i)%rcvbuf(1),amounttoreceive(
i), &
153 mpi_integer,commprocsfrom1(
i),10,rocstar_communicator, &
156 DO i = 1, numcommprocs1
157 ALLOCATE(bufsnd(1:amounttosend(
i)))
159 DO j = 1, numcommnodes1(
i)
163 inode = local2global(commnodes1(
i,
j))
169 IF (tempkval /= 0.0)
THEN
170 counter = counter + 1
171 bufsnd(counter) = local2global(commnodes1(
i,
j))*3-3+p
178 CALL mpi_send(int(bufsnd(:)),amounttosend(
i),mpi_integer, &
179 commprocs1(
i),10,rocstar_communicator,ierr)
182 CALL mpi_waitall(nprocs,req_rcv,stat_rcv,ierr)
186 CALL mpi_barrier(rocstar_communicator,ierr)
187 ALLOCATE(kj(1:numcommprocsfrom1))
188 DO i = 1, numcommprocsfrom1
189 ALLOCATE(kj(
i)%rcvbuf(1:amounttoreceive(
i)))
190 CALL mpi_irecv(kj(
i)%rcvbuf(1),amounttoreceive(
i), &
191 mpi_integer,commprocsfrom1(
i),10,rocstar_communicator, &
194 DO i = 1, numcommprocs1
195 ALLOCATE(bufsnd(1:amounttosend(
i)))
197 DO j = 1, numcommnodes1(
i)
201 inode = local2global(commnodes1(
i,
j))
207 IF (tempkval /= 0.0)
THEN
208 counter = counter + 1
216 CALL mpi_send(int(bufsnd(:)),amounttosend(
i),mpi_integer, &
217 commprocs1(
i),10,rocstar_communicator,ierr)
220 CALL mpi_waitall(nprocs,req_rcv,stat_rcv,ierr)
224 CALL mpi_barrier(rocstar_communicator,ierr)
225 ALLOCATE(frmproc(1:numcommprocsfrom1))
226 DO i = 1, numcommprocsfrom1
227 ALLOCATE(frmproc(
i)%rcvbuf(1:amounttoreceive(
i)))
228 CALL mpi_irecv(frmproc(
i)%rcvbuf(1),amounttoreceive(
i), &
229 mpi_double_precision,commprocsfrom1(
i),10,rocstar_communicator, &
232 DO i = 1, numcommprocs1
233 ALLOCATE(bufsnd(1:amounttosend(
i)))
235 DO j = 1, numcommnodes1(
i)
239 inode = local2global(commnodes1(
i,
j))
245 IF (tempkval /= 0.0)
THEN
246 counter = counter + 1
247 bufsnd(counter) = tempkval
254 CALL mpi_send(bufsnd,amounttosend(
i),mpi_double_precision, &
255 commprocs1(
i),10,rocstar_communicator,ierr)
258 CALL mpi_waitall(nprocs,req_rcv,stat_rcv,ierr)
268 CALL
comp_row_resize(3*gnumnp,3*gnumnp,nnz_k,1,rp_k,cval_k,aval_k,nstart_km,nrows_km)
269 DEALLOCATE(rp_k,cval_k,aval_k)
270 ALLOCATE(rp_k(1:nrows_km+1))
271 ALLOCATE(cval_k(1:nnz_temp))
272 ALLOCATE(aval_k(1:nnz_temp))
277 DEALLOCATE(rp_temp,cval_temp,aval_temp)
281 DO i = 1, numcommprocsfrom1
283 DO j = 1, amounttoreceive(
i)
284 CALL
comp_row_addval(3*gnumnp,nrows_km,nnz_k,nstart_km,rp_k,cval_k,aval_k, &
285 ki(
i)%rcvbuf(
j),kj(
i)%rcvbuf(
j),frmproc(
i)%rcvbuf(
j))
286 IF (nnz_temp /= nnz_k)
THEN
287 DEALLOCATE(cval_k,aval_k)
288 ALLOCATE(cval_k(nnz_temp),aval_k(nnz_temp))
294 DEALLOCATE(rp_temp,cval_temp,aval_temp)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE inode
subroutine createk(global)
subroutine comp_row_getval(ndim, nrows, nnz, nstart, rp, cval, aval, ipos, jpos, val)
subroutine comp_row_resize(ndim, nrows, nnz, nstart, rp, cval, aval, newnstart, newnrows)
subroutine implicit_v3d8_me_k(coor, ElConnVol, ci, numnp, nstart, nend, NumEL, MatType, NumMatType, enhanced_map, mixed_map, NumMatVol)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jnode
subroutine comp_row_addval(ndim, nrows, nnz, nstart, rp, cval, aval, ipos, jpos, val)