25 integer(kind=kint) :: N, NP, NDOF, NNDOF, NPNDOF
26 integer(kind=kint) :: iter, maxiter, nget, ierr
27 integer(kind=kint) :: i, j, k, in, jn, kn, ik, it
28 integer(kind=kint) :: ig, ig0, is0, ie0, its0, ite0
29 real(kind=
kreal) :: t1, t2, tolerance
30 real(kind=
kreal) :: alpha, beta, beta0
31 real(kind=
kreal),
allocatable :: s(:), t(:), p(:)
32 logical :: is_converge
40 allocate(fstreig%filter(npndof))
41 fstreig%filter = 1.0d0
42 fstreig%sigma = 0.01d0
45 do ig0 = 1, fstrsolid%BOUNDARY_ngrp_tot
46 ig = fstrsolid%BOUNDARY_ngrp_ID(ig0)
47 is0 = hecmesh%node_group%grp_index(ig-1) + 1
48 ie0 = hecmesh%node_group%grp_index(ig )
49 it = fstrsolid%BOUNDARY_ngrp_type(ig0)
50 its0 = (it - mod(it,10))/10
54 in = hecmesh%node_group%grp_item(ik)
55 if(ndof < ite0) ite0 = ndof
58 fstreig%filter((in-1)*ndof+i) = 0.0d0
63 do ig0 = 1, fstrsolid%SPRING_ngrp_tot
64 ig = fstrsolid%SPRING_ngrp_ID(ig0)
65 is0 = hecmesh%node_group%grp_index(ig-1) + 1
66 ie0 = hecmesh%node_group%grp_index(ig )
72 call hecmw_allreduce_i1(hecmesh, jn,
hecmw_sum)
74 fstreig%is_free = .true.
76 write(*,
"(a,1pe12.4)")
'** free modal analysis: shift factor =', fstreig%sigma
80 call hecmw_update_r(hecmesh, fstreig%filter, np, ndof)
84 if(fstreig%filter(i) == 1.0d0) in = in + 1
86 call hecmw_allreduce_i1(hecmesh, in,
hecmw_sum)
88 fstreig%maxiter = fstreig%maxiter + 1
89 if(in < fstreig%maxiter)
then
91 write(
imsg,*)
'** changed maxiter to system matrix size.'
96 if(in < fstreig%nget)
then
100 maxiter = fstreig%maxiter
102 allocate(q(0:maxiter))
103 allocate(q(0)%q(npndof))
104 allocate(q(1)%q(npndof))
105 allocate(fstreig%eigval(maxiter))
106 allocate(fstreig%eigvec(npndof, maxiter))
107 allocate(tri%alpha(maxiter))
108 allocate(tri%beta(maxiter))
113 fstreig%eigval = 0.0d0
114 fstreig%eigvec = 0.0d0
126 hecmat%Iarray(98) = 1
127 hecmat%Iarray(97) = 1
131 write(
imsg,*)
' ***** STAGE Begin Lanczos loop **'
134 do iter = 1, maxiter-1
140 call solve_lineq(hecmesh, hecmat)
142 allocate(q(iter+1)%q(npndof))
145 t(i) = hecmat%X(i) * fstreig%filter(i)
151 t(i) = t(i) - tri%beta(iter) * q(iter-1)%q(i)
156 alpha = alpha + p(i) * t(i)
158 call hecmw_allreduce_r1(hecmesh, alpha,
hecmw_sum)
159 tri%alpha(iter) = alpha
163 t(i) = t(i) - tri%alpha(iter) * q(iter)%q(i)
170 s(i) = fstreig%mass(i) * t(i)
176 t1 = t1 + q(j)%q(i) * s(i)
178 call hecmw_allreduce_r1(hecmesh, t1,
hecmw_sum)
180 t(i) = t(i) - t1 * q(j)%q(i)
186 s(i) = fstreig%mass(i) * t(i)
191 beta = beta + s(i) * t(i)
193 call hecmw_allreduce_r1(hecmesh, beta,
hecmw_sum)
194 tri%beta(iter+1) = dsqrt(beta)
198 beta = 1.0d0/tri%beta(iter+1)
201 q(iter+1)%q(i) = t(i) * beta
205 if(iter == 1) beta0 = tri%beta(iter+1)
207 call tridiag(hecmesh, hecmat, fstreig, q, tri, iter, is_converge)
213 if(
associated(q(i)%q))
deallocate(q(i)%q)
215 deallocate(tri%alpha)
225 write(
imsg,*)
' * STAGE Output and postprocessing **'
226 write(
idbg,
'(a,f10.2)')
'Lanczos loop (sec) :', t2 - t1