14 type(hecmwst_local_mesh) :: hecMESH
15 type(hecmwst_matrix) :: hecMAT
18 integer(kind=kint) :: NNDOF, NPNDOF, i, j
19 real(kind=kreal) :: chk, shift
20 real(kind=kreal),
allocatable :: t(:), u(:)
22 nndof = hecmat%N *hecmat%NDOF
23 npndof = hecmat%NP*hecmat%NDOF
25 allocate(fstreig%resid(fstreig%nget))
31 if(fstreig%is_free) shift = fstreig%sigma
33 do j = 1, fstreig%nget
36 u(i) = fstreig%eigvec(i,j)
42 chk = chk + (t(i) - (fstreig%eigval(j) + shift)*fstreig%mass(i)*u(i))**2
44 call hecmw_allreduce_r1(hecmesh, chk, hecmw_sum)
45 fstreig%resid(j) = dsqrt(chk)
56 type(hecmwst_local_mesh) :: hecmesh
57 type(hecmwst_matrix) :: hecMAT
60 integer(kind=kint) :: N, NDOF
61 integer(kind=kint) :: i, j, k, in, nget
62 real(kind=kreal) :: gm
63 real(kind=kreal),
allocatable :: r(:)
64 real(kind=kreal),
pointer :: mass(:), eigval(:), eigvec(:,:)
71 eigval => fstreig%eigval
72 eigvec => fstreig%eigvec
74 allocate(fstreig%effmass(ndof*nget))
75 allocate(fstreig%partfactor(ndof*nget))
77 fstreig%effmass = 0.0d0
78 fstreig%partfactor = 0.0d0
86 r(k) = r(k) + mass(in)*eigvec(in,i)
87 gm = gm + mass(in)*eigvec(in,i)*eigvec(in,i)
91 call hecmw_allreduce_r(hecmesh, r, ndof, hecmw_sum)
92 call hecmw_allreduce_r1(hecmesh, gm, hecmw_sum)
97 fstreig%partfactor(in) = gm*r(j)
98 fstreig%effmass(in) = gm*r(j)*r(j)
102 call eglist(hecmesh, hecmat, fstreig)
106 write(
imsg,*)
'*----------------------------------------------*'
107 write(
imsg,*)
'*--E I G E N V A L U E C O N V E R G E N C E--*'
108 write(
imsg,*)
'Absolute residual = |(||Kx - lambda*Mx||)|'
109 write(
imsg,*)
' Iter.# Eigenvalue Abs. Residual '
110 write(
ilog,*)
' Iter.# Eigenvalue Abs. Residual '
111 write(
imsg,*)
' *-----* *---------* *--------------*'
114 do j = 1, fstreig%nget
116 write(
imsg,
'(2x,i5,2x,1p5e15.6)') j, eigval(j), fstreig%resid(j)
117 write(
ilog,
'(i5,1p5e12.4)') j, eigval(j), fstreig%resid(j)
122 write(
imsg,*)
'* ---END Eigenvalue listing--- *'
135 type(hecmwst_result_data) :: fstrRESULT
136 integer(kind=kint) :: istep, i
138 integer(kind=kint) :: NP, NDOF, NPNDOF
139 real(kind=
kreal),
pointer :: eigvec(:,:)
140 real(kind=
kreal),
allocatable :: x(:)
146 eigvec => fstreig%eigvec
151 x(i) = eigvec(i,istep)
153 call hecmw_update_r(hecmesh, x, np, ndof)
155 fstrresult%ng_component = 1
156 fstrresult%ne_component = 0
157 allocate(fstrresult%ng_dof(1))
158 allocate(fstrresult%global_label(1))
159 allocate(fstrresult%global_val_item(1))
160 fstrresult%ng_dof(1) = 1
161 fstrresult%global_label(1) =
'EIGENVALUE'
162 fstrresult%global_val_item(1) = fstreig%eigval(istep)
165 fstrresult%nn_component = 2
166 allocate(fstrresult%nn_dof(2))
167 allocate(fstrresult%node_label(2))
168 allocate(fstrresult%node_val_item(6*np))
169 fstrresult%nn_dof(1) = 3
170 fstrresult%nn_dof(2) = 3
171 fstrresult%node_label(1) =
'DISPLACEMENT'
172 fstrresult%node_label(2) =
'ROTATION'
174 fstrresult%node_val_item((i-1)*6+1:(i-1)*6+3) = x((i-1)*ndof+1:(i-1)*ndof+3)
175 fstrresult%node_val_item((i-1)*6+4:(i-1)*6+6) = x((i-1)*ndof+4:(i-1)*ndof+6)
178 fstrresult%nn_component = 1
179 allocate(fstrresult%nn_dof(1))
180 allocate(fstrresult%node_label(1))
181 allocate(fstrresult%node_val_item(ndof*np))
182 fstrresult%nn_dof(1) = ndof
183 fstrresult%node_label(1) =
'DISPLACEMENT'
184 fstrresult%node_val_item = x
197 type(hecmwst_result_data) :: fstrRESULT
198 integer(kind=kint) :: istep, nget
201 call hecmw_nullify_result_data(fstrresult)
204 call hecmw_visualize_init
205 call hecmw_visualize( hecmesh, fstrresult, istep )
206 call hecmw_visualize_finalize
208 call hecmw_result_free(fstrresult)
220 integer(kind=kint) :: NP, NDOF, NPNDOF, istep, nget, i
221 character(len=HECMW_HEADER_LEN) :: header
222 character(len=HECMW_MSG_LEN) :: comment
223 character(len=HECMW_NAME_LEN) :: label
224 character(len=HECMW_NAME_LEN) :: nameID
226 real(kind=
kreal),
pointer :: eigvec(:,:)
227 real(kind=
kreal),
allocatable :: x(:), egval(:)
228 real(kind=
kreal),
allocatable :: disp3(:), rot3(:)
235 eigvec => fstreig%eigvec
241 egval(1) = fstreig%eigval(istep)
243 x(i) = eigvec(i,istep)
245 call hecmw_update_r(hecmesh, x, np, ndof)
247 header =
"*fstrresult"
248 comment =
"eigen_result"
249 call hecmw_result_init(hecmesh,istep,header,comment)
251 call hecmw_result_add(hecmw_result_dtype_global,1,label,egval)
253 allocate(disp3(np*3))
258 disp3((i-1)*3+1:(i-1)*3+3) = x((i-1)*ndof+1:(i-1)*ndof+3)
259 rot3((i-1)*3+1:(i-1)*3+3) = x((i-1)*ndof+4:(i-1)*ndof+6)
261 label =
"DISPLACEMENT"
262 call hecmw_result_add(hecmw_result_dtype_node,3,label,disp3)
264 call hecmw_result_add(hecmw_result_dtype_node,3,label,rot3)
268 label =
"DISPLACEMENT"
269 call hecmw_result_add(hecmw_result_dtype_node,ndof,label,x)
272 call hecmw_result_write_by_name(nameid)
273 call hecmw_result_finalize
280 subroutine eglist(hecMESH, hecMAT, fstrEIG)
289 integer(kind=kint) :: NDOF
290 integer(kind=kint) :: i, j, in, iter ,nget
291 real(kind=
kreal) :: pi, angle, freq, pf(3), em(3)
292 real(kind=
kreal),
pointer :: eigval(:)
297 pi = 4.0d0 * datan(1.0d0)
298 eigval => fstreig%eigval
302 write(
ilog,
"(a)")
"********************************"
303 write(
ilog,
"(a)")
"*RESULT OF EIGEN VALUE ANALYSIS*"
304 write(
ilog,
"(a)")
"********************************"
306 write(
ilog,
"(a,i8)")
"NUMBER OF ITERATIONS = ",iter
307 write(
ilog,
"(a,1pe12.4)")
"TOTAL MASS = ",fstreig%totalmass
309 write(
ilog,
"(3a)")
" ANGLE FREQUENCY ",&
310 "PARTICIPATION FACTOR EFFECTIVE MASS"
311 write(
ilog,
"(3a)")
" NO. EIGENVALUE FREQUENCY (HZ) ",&
313 write(
ilog,
"(3a)")
" --- ---------- ---------- ---------- ",&
314 "---------- ---------- ---------- ---------- ---------- ----------"
316 write(*,
"(a)")
"#----------------------------------#"
317 write(*,
"(a)")
"# RESULT OF EIGEN VALUE ANALYSIS #"
318 write(*,
"(a)")
"#----------------------------------#"
320 write(*,
"(a,i8)")
"### NUMBER OF ITERATIONS = ",iter
321 write(*,
"(a,1pe12.4)")
"### TOTAL MASS = ",fstreig%totalmass
323 write(*,
"(3a)")
" PERIOD FREQUENCY ",&
324 "PARTICIPATION FACTOR EFFECTIVE MASS"
325 write(*,
"(3a)")
" NO. [Sec] [HZ] ",&
327 write(*,
"(3a)")
" --- --------- --------- ",&
328 "--------- --------- --------- --------- --------- ---------"
333 if(eigval(i) < 0.0d0) eigval(i) = 0.0d0
334 angle = dsqrt(eigval(i))
335 freq = angle*0.5d0/pi
339 do j = 1, min(ndof, 3)
340 pf(j) = fstreig%partfactor(ndof*(i-1) + j)
341 em(j) = fstreig%effmass(ndof*(i-1) + j)
344 write(
ilog,
'(I5,1P9E12.4)') in, eigval(i), angle, freq, pf(1), pf(2), pf(3), em(1), em(2), em(3)
345 write(* ,
'(I5,1P8E11.3)') in, 1.0d0/freq, freq, pf(1), pf(2), pf(3), em(1), em(2), em(3)
subroutine, public hecmw_matvec(hecMESH, hecMAT, X, Y, COMMtime)
integer(kind=4), parameter kreal
subroutine fstr_eigen_output(hecMESH, hecMAT, fstrEIG)
subroutine fstr_eigen_make_result_step(hecMESH, fstrEIG, fstrRESULT, istep)
subroutine fstr_eigen_residual(hecMESH, hecMAT, fstrEIG)
residual of the eigenproblem as solved, i.e. in the reduced space of the MPC elimination
subroutine fstr_eigen_output_result(hecMESH, fstrEIG)
subroutine eglist(hecMESH, hecMAT, fstrEIG)
Output eigenvalues and vectors.
subroutine fstr_eigen_output_visual(hecMESH, fstrEIG, fstrRESULT)
This module defines common data and basic structures for analysis.
integer(kind=kint) myrank
PARALLEL EXECUTION.
integer(kind=kint), parameter imsg
integer(kind=kint), parameter ilog
FILE HANDLER.
HECMW to FSTR Mesh Data Converter. Converting Connectivity of Element Type 232, 342 and 352.
subroutine fstr2hecmw_mesh_conv(hecMESH)
subroutine hecmw2fstr_mesh_conv(hecMESH)
Package of data used by Lanczos eigenvalue solver.