Civil Engineering Reference
In-Depth Information
r_pp(j) = diag_precon_pp(j) * val_f(no_index_start + i - 1)
store_pp(j) = diag_precon_pp(j)
END DO
END IF
diag_precon_pp=1._iwp/diag_precon_pp;d_pp=diag_precon_pp*r_pp;p_pp=d_pp
!--------------------preconditioned c. g. iterations-----------------------
iters = 0
iterations : DO
iters = iters + 1
;
u_pp = 0._iwp ; pmul_pp = .0_iwp
CALL gather(p_pp,pmul_pp)
elements_2 : DO iel = 1, nels_pp
utemp_pp(:,iel) = MATMUL(kc,pmul_pp(:,iel))
END DO elements_2 ;
CALL scatter(u_pp,utemp_pp)
IF(fixed_freedoms>0) THEN
DO i = 1 , num_no; j = no_local(i)-ieq_start+1
u_pp(j)=p_pp(j) * store_pp(j)
END DO
END IF
!--------------------------pcg equation solution---------------------------
up=DOT_PRODUCT_P(r_pp,d_pp); alpha= up/ DOT_PRODUCT_P(p_pp,u_pp)
xnew_pp = x_pp + p_pp* alpha ; r_pp=r_pp - u_pp*alpha
d_pp = diag_precon_pp*r_pp ; beta=DOT_PRODUCT_P(r_pp,d_pp)/up
p_pp=d_pp+p_pp*beta
CALL checon_par(xnew_pp,x_pp,tol,converged,neq_pp)
IF(converged .OR. iters==limit) EXIT
END DO iterations
IF(numpe==it)THEN
WRITE(11,'(A,I5)')"The number of iterations to convergence was ", &
iters
WRITE(11,'(A)')
"The potentials are
:"
WRITE(11,'(A)') "
Freedom
Potential"
DOi=1,4
WRITE(11,'(I5,A,E12.4)') nres+i-1, "
", xnew_pp(is+i-1)
END DO
END IF
IF(numpe==it) WRITE(11,*)"This analysis took
", elap_time( )-timest(1)
CALL shutdown( )
END PROGRAM p123
New scalar integers:
fixed freedoms
number of fixed freedoms
location of desired output freedom
is
processor on which desired output resides
it
number of output freedom
nres
New scalar reals:
kx
conductivity in
x
-direction
conductivity in
y
-direction
ky
conductivity in
z
-direction
kz
value of penalty restraint
penalty
New dynamic integer arrays:
no f vector of fixed freedom numbers
no local temp f temporary vector
Search WWH ::




Custom Search