Civil Engineering Reference
In-Depth Information
num = g_num_pp(:,i)
DO k = 1,nod;WRITE(11,'(A,I8,3E12.4)')
&
" Node",num(k),p_g_co_pp(k,:,i); END DO
END DO
WRITE(11,'(A,3(I8,A))') "There are ",nn," nodes",nr," restrained and",&
neq," equations"
WRITE(11,*) "Time after setup is :" , elap_time( ) - timest(1)
END IF
CALL sample(element,points,weights) ; globma_tmp = .0_iwp
ALLOCATE(loads_pp(neq_pp),newlo_pp(neq_pp),globma_pp(neq_pp))
loads_pp=.0_iwp; newlo_pp=.0_iwp; globma_pp=.0_iwp
!------------ loop the elements for integration and invert mass -----------
elements_1: DO iel = 1 , nels_pp
coord = p_g_co_pp(:,:,iel); kc=0.0_iwp ; pm=0.0_iwp
gauss_pts: DO i =1 , nip
CALL shape_der (der,points,i); CALL shape_fun(fun,points,i)
funny(1,:)=fun(:) ; jac = MATMUL(der,coord)
det=determinant(jac); CALL invert(jac); deriv = MATMUL(jac,der)
kc=kc+MATMUL(MATMUL(TRANSPOSE(deriv),kay),deriv)*det*weights(i)
pm = pm + MATMUL(TRANSPOSE(funny),funny)*det*weights(i)
END DO gauss_pts
DO i=1,ntot; mass(i) = sum(pm(i,:)); END DO
pm = .0_iwp ; DO i = 1 , ntot; pm(i,i) = mass(i); END DO
store_pm_pp(:,:,iel) = pm - kc*dtim
DO i=1,ntot; globma_tmp(i,iel)=globma_tmp(i,iel)+mass(i); END DO
END DO elements_1
IF(numpe==it) &
WRITE(11,*) "Time after element integration is :",elap_time( )-timest(1)
CALL scatter(globma_pp,globma_tmp)
globma_pp = 1._iwp/globma_pp ; loads_pp = val0 ; DEALLOCATE(globma_tmp)
!-------------------time stepping recursion--------------------------------
IF(numpe==it) THEN
WRITE(11,'(A)') "
Time
Pressure"
END IF
timesteps: DO j=1,nstep
real_time=j*dtim
!--------------- go round the elements ----------------------------------
pmul_pp = .0_iwp ; CALL gather(loads_pp,pmul_pp) ; utemp_pp = .0_iwp
elements_2 : DO iel = 1 , nels_pp
pm = store_pm_pp(: , : , iel)
utemp_pp(:,iel)=utemp_pp(:,iel)+MATMUL(pm,pmul_pp(:,iel))
END DO elements_2
CALL scatter(newlo_pp,utemp_pp) ; loads_pp = newlo_pp * globma_pp
newlo_pp = .0_iwp
IF(j/npri*npri==j .AND. numpe==it)
&
WRITE(11,'(2E12.4)')real_time,loads_pp(is)
END DO timesteps
IF(numpe==it) WRITE(11,*)"This analysis took :", elap_time( )-timest(1)
CALL shutdown( )
END PROGRAM p125
New dynamic real arrays:
globma_pp distributed global mass matrix
globma_tmp temporary storage mass vector
mass element lumped mass
newlo_pp distributed new loads
store_pm_pp distributed pm matrices
Search WWH ::




Custom Search