66 REAL(kind=wp) :: delt, t
67 REAL(kind=wp),
DIMENSION(1:3*global%NumNp) :: fext_in
70 INTEGER ::
i,
j,
k,
m,
n, p, counter, ii
71 INTEGER :: newnrows_meff, newnstart_meff, newndim
72 REAL(kind=wp) :: contol, alphaimp, deltaimp
73 REAL(kind=wp),
DIMENSION(1:3*LNumNp) :: pbar, fint, fext,
v,
a,
d
74 REAL(kind=wp),
ALLOCATABLE,
DIMENSION(:) :: newpbar, newa
75 REAL(kind=wp),
ALLOCATABLE,
DIMENSION(:) :: bufsnd, ftemp
76 REAL(wp) :: per1, delay
84 IF ( global%debug_state )
THEN
92 DO i = 1, global%NumNp
93 IF ( nodeproc(
i) == myid )
THEN
95 k = 3*local2global(
i) - nstart_km + 1 +
j - 3
97 fext(
k ) = fext_in(
m )
98 d(
k ) = global%Disp(
m )
99 v(
k ) = global%VeloHalf(
m )
100 a(
k ) = global%Accel(
m )
109 IF ( initaccel .EQV. .true. )
THEN
116 IF(myid==0)
print*,
'CALCULATING INITIAL ACCELERATION'
119 ALLOCATE(fext_imp(1:3*lnumnp))
123 DO i = 1, global%NumNp
124 IF (local2global(
i) ==
m)
THEN
126 IF (nodeproc(
i) == myid)
THEN
127 counter = counter + 1
128 IF(node_flag(
i,
j) == 7)
THEN
129 fext_imp(counter) = boundary_value(
i,
j)
139 CALL
get_fint(3*gnumnp,nrows_km,nnz_k,nstart_km,rp_k,cval_k,aval_k,
d,fint)
141 ALLOCATE(ftemp(1:3*lnumnp))
142 ftemp(1:3*lnumnp) = 0.0
146 ftemp(
i) = fext(
i) + fext_imp(
i) - fint(
i)
152 DO i = 1, global%NumNp
153 IF (local2global(
i) ==
m)
THEN
154 IF (nodeproc(
i) == myid)
THEN
156 counter = counter + 1
157 IF(node_flag(
i,
j) == 8)
THEN
158 DO n = rp_m(counter)+1,rp_m(counter+1)
159 IF (cval_m(
n)+1 /= counter+nstart_km-1)
THEN
173 DO i = 1, global%NumNp
174 IF (local2global(
i) ==
m)
THEN
175 IF (nodeproc(
i)==myid)
THEN
177 counter = counter + 1
178 IF(node_flag(
i,
j) == 8)
THEN
189 CALL bs95setup(3*gnumnp,nnz_m,nstart_km-1,nrows_km,rp_m,cval_m,aval_m,1,bs95debug)
190 CALL bs95solve(3*lnumnp,ftemp,
a,contol,bs95debug)
191 CALL bs95free(bs95debug)
198 IF(myid==0)
print*,
'FORMING EFFECTIVE MASS MATRIX'
199 CALL
comp_row_add(3*lnumnp,3*gnumnp,nrows_km,nrows_km,nnz_k,nnz_m,1, &
200 rp_k,cval_k,alphaimp*delt*delt*aval_k,1,rp_m,cval_m,aval_m)
201 ALLOCATE(rp_meff(nrows_km+1),cval_meff(nnz_temp),aval_meff(nnz_temp))
203 nstart_meff = nstart_km
204 nrows_meff = nrows_km
206 cval_meff = cval_temp
207 aval_meff = aval_temp
208 DEALLOCATE(rp_temp,cval_temp,aval_temp)
211 CALL
removebcs_meff(3*gnumnp,nrows_meff,nnz_meff,nstart_meff,rp_meff,cval_meff,aval_meff, &
212 newnrows_meff,newnstart_meff,newndim,global)
213 DEALLOCATE(rp_meff,cval_meff,aval_meff)
214 nrows_meff = newnrows_meff
215 nstart_meff = newnstart_meff
216 ALLOCATE(rp_meff(nrows_meff+1),cval_meff(nnz_temp),aval_meff(nnz_temp))
219 cval_meff = cval_temp
220 aval_meff = aval_temp
221 DEALLOCATE(rp_temp,cval_temp,aval_temp)
224 CALL bs95setup(newndim,nnz_meff,nstart_meff-1,nrows_meff,rp_meff,cval_meff,aval_meff,1, &
273 IF(myid==0)
print*,
'CALCULATING NEW DISPLACEMENT VECTOR'
287 d(
i) =
d(
i) + delt *
v(
i) + 0.5*delt*delt * (1.0 - 2.0*alphaimp) *
a(
i)
288 v(
i) =
v(
i) + delt * (1.0 - deltaimp) *
a(
i)
303 CALL
get_fint(3*gnumnp,nrows_km,nnz_k,nstart_km,rp_k,cval_k,aval_k,
d,fint)
311 print*,
'constructing load vector for YATES SOLID 1 model in flutter'
323 pbar(
i) = fext(
i) + fext_imp(
i) - fint(
i)
326 print*,myid,
'MAXIMUM FORCING TERM:',maxval(pbar(:) - fext(:) + fint(:))
329 ALLOCATE(newpbar(1:nrows_meff))
330 ALLOCATE(newa(1:nrows_meff))
346 CALL bs95solve(nrows_meff,newpbar,newa,contol,bs95debug)
367 d(
i) =
d(
i) + alphaimp*delt*delt*
a(
i)
368 v(
i) =
v(
i) + deltaimp*delt*
a(
i)
378 IF(myid==0)
print*,
'ASSEMBLING NEW DISPLACEMENT VECTOR'
385 DO i = 1, global%NumNp
386 IF ( nodeproc(
i) == myid )
THEN
388 k = 3*local2global(
i) - nstart_km + 1 +
j - 3
390 global%Disp(
m ) =
d(
k )
391 global%VeloHalf(
m ) =
v(
k )
392 global%Accel(
m ) =
a(
k )
405 CALL mpi_barrier(rocstar_communicator,ierr)
406 ALLOCATE(req_rcv(1:nprocs))
407 ALLOCATE(req_snd(1:nprocs))
408 ALLOCATE(stat_snd(1:mpi_status_size,1:nprocs))
409 ALLOCATE(stat_rcv(1:mpi_status_size,1:nprocs))
413 DO j = 1, mpi_status_size
420 CALL mpi_barrier(rocstar_communicator,ierr)
421 ALLOCATE(frmproc(1:numcommprocsfrom2))
422 DO i = 1, numcommprocsfrom2
423 ALLOCATE(frmproc(
i)%rcvbuf(1:10*numcommnodesfrom2(
i)))
424 CALL mpi_irecv(frmproc(
i)%rcvbuf(1),10*numcommnodesfrom2(
i), &
425 mpi_double_precision,commprocsfrom2(
i),10,rocstar_communicator, &
430 DO i = 1, numcommprocs2
431 ALLOCATE(bufsnd(1:10*numcommnodes2(
i)))
433 DO j = 1, numcommnodes2(
i)
434 counter = counter + 1
435 bufsnd(counter) = 1.0 * commnodes2(
i,
j)
436 k = global2local(commnodes2(
i,
j))
438 counter = counter + 1
439 bufsnd(counter) = global%Disp(
k * 3 - 3 + p )
442 counter = counter + 1
443 bufsnd(counter) = global%VeloHalf(
k * 3 - 3 + p )
446 counter = counter + 1
447 bufsnd(counter) = global%Accel(
k * 3 - 3 + p )
450 CALL mpi_send(bufsnd(:),10*numcommnodes2(
i),mpi_double_precision, &
451 commprocs2(
i),10,rocstar_communicator,ierr)
454 CALL mpi_waitall(nprocs,req_rcv,stat_rcv,ierr)
463 DO i = 1, numcommprocsfrom2
465 DO j = 1, numcommnodesfrom2(
i)
466 counter = counter + 1
467 k = global2local( int( frmproc(
i)%rcvbuf(counter) ) )
469 counter = counter + 1
470 global%Disp( 3*
k - 3 + p ) = frmproc(
i)%rcvbuf(counter)
473 counter = counter + 1
474 global%VeloHalf( 3*
k - 3 + p ) = frmproc(
i)%rcvbuf(counter)
477 counter = counter + 1
478 global%Accel( 3*
k - 3 + p ) = frmproc(
i)%rcvbuf(counter)
subroutine removebcs_newa(nstart, ndim, a, newndim, newa)
subroutine comp_row_add(ndim, gndim, nrows1, nrows2, nnz1, nnz2, nstart1, rp1, cval1, aval1, nstart2, rp2, cval2, aval2)
subroutine removebcs_meff(ndim, nrows, nnz, nstart, rp1, cval, aval, newnrows, newnstart, newndim, global)
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS 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 v
subroutine implicit_soln(delt, t, fext_in, global)
subroutine implicit_bc_enforce(NumNp, LocNumNp, disp, v, a, node_flag, boundary_value, t, myid)
subroutine get_fint(ndim, nrows, nnz, nstart, rp_k, cval_k, aval_k, dispin, fint)
subroutine removebcs_pbar(nstart, ndim, pbar, newndim, newpbar)