22 subroutine fstr_write_result( hecMESH, fstrSOLID, fstrPARAM, istep, time, flag, fstrDYNAMIC)
33 integer(kind=kint) :: istep, flag
35 real(kind=
kreal) :: time
36 integer(kind=kint) :: n_lyr, ntot_lyr, tmp, is_33shell, is_33beam, cid
37 integer(kind=kint) :: i, j, k, ndof, mdof, id, nitem, nn, mm, ngauss, it
38 real(kind=
kreal),
pointer :: tnstrain(:), testrain(:), yield_ratio(:)
39 integer(kind=kint) :: idx
40 real(kind=
kreal),
allocatable :: work(:), unode(:), rnode(:)
41 character(len=HECMW_HEADER_LEN) :: header
42 character(len=HECMW_MSG_LEN) :: comment
43 character(len=HECMW_NAME_LEN) :: s, label, nameid, addfname, cnum
44 character(len=6),
allocatable :: clyr(:)
47 tnstrain => fstrsolid%TNSTRAIN
48 testrain => fstrsolid%TESTRAIN
49 yield_ratio => fstrsolid%YIELD_RATIO
51 is_dynamic =
present(fstrdynamic)
55 if( fstrdynamic%idx_eqa==1 .and. istep>0 ) idx = 2
60 if( hecmesh%n_elem > hecmesh%n_node ) mm = hecmesh%n_elem
61 if( ndof==2 ) mdof = 3
62 if( ndof==3 ) mdof = 6
63 if( ndof==4 ) mdof = 6
64 if( ndof==6 ) mdof = 6
66 ntot_lyr = fstrsolid%max_lyr
67 is_33shell = fstrsolid%is_33shell
68 is_33beam = fstrsolid%is_33beam
74 header =
'*fstrresult'
75 if(
present(fstrdynamic) )
then
76 comment =
'dynamic_result'
78 comment =
'static_result'
80 call hecmw_result_init( hecmesh, istep, header, comment )
86 call hecmw_result_add( id, 1, label, work )
89 if( fstrsolid%output_ctrl(3)%outinfo%on(1) )
then
92 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(1), ndof )
93 allocate( unode(hecmesh%n_node*ndof) )
96 unode(:) = fstrdynamic%DISP(:,idx)
98 unode(:) = fstrsolid%unode
100 label =
'DISPLACEMENT'
101 if(is_33beam == 1)
then
104 if(is_33shell == 1)
then
107 call hecmw_result_add( id, nitem, label, unode )
112 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(1), 3 )
113 allocate( unode(3*hecmesh%n_node) )
115 do i=1, hecmesh%n_node
117 unode((i-1)*3 + j) = fstrdynamic%DISP((i-1)*4 + j, idx)
121 call hecmw_result_add( id, nitem, label, unode )
124 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(1), 1 )
125 allocate( unode(hecmesh%n_node) )
127 do i=1, hecmesh%n_node
128 unode(i) = fstrdynamic%DISP(i*4, idx)
131 call hecmw_result_add( id, nitem, label, unode )
137 if (fstrsolid%output_ctrl(3)%outinfo%on(18))
then
138 if ( is_33shell == 1)
then
140 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(1), ndof )
142 allocate( rnode(hecmesh%n_node*ndof) )
145 call hecmw_result_add( id, nitem, label, rnode )
151 if( is_dynamic .and. fstrsolid%output_ctrl(3)%outinfo%on(15) )
then
153 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(15), ndof )
155 call hecmw_result_add( id, nitem, label, fstrdynamic%VEL(:,idx) )
159 if( is_dynamic .and. fstrsolid%output_ctrl(3)%outinfo%on(16) )
then
161 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(16), ndof )
162 label =
'ACCELERATION'
163 call hecmw_result_add( id, nitem, label, fstrdynamic%ACC(:,idx) )
167 if( fstrsolid%output_ctrl(3)%outinfo%on(2) )
then
169 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(2), ndof )
170 label =
'REACTION_FORCE'
171 call hecmw_result_add( id, nitem, label, fstrsolid%REACTION )
176 if(is_33shell == 1 .or. ndof == 6)
then
177 call fstr_write_result_main( hecmesh, fstrsolid, fstrsolid%SHELL,
" " )
179 call fstr_write_result_main( hecmesh, fstrsolid, fstrsolid%SOLID,
" " )
183 if(
associated(fstrsolid%SHELL) .and. fstrsolid%output_ctrl(3)%outinfo%on(27) )
then
184 allocate(clyr(2*ntot_lyr))
187 clyr(2*i-1)=
"_L"//trim(cnum)//
"+"
188 clyr(2*i )=
"_L"//trim(cnum)//
"-"
191 call fstr_write_result_main( hecmesh, fstrsolid, fstrsolid%SHELL%LAYER(i)%PLUS, clyr(2*i-1) )
192 call fstr_write_result_main( hecmesh, fstrsolid, fstrsolid%SHELL%LAYER(i)%MINUS, clyr(2*i ) )
199 if( fstrsolid%output_ctrl(3)%outinfo%on(9) .and. ndof/=6 )
then
201 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(9), ndof )
202 ngauss = fstrsolid%maxn_gauss
206 write(label,
'(a,a)')
'GaussSTRAIN',trim(adjustl(s))
207 label = adjustl(label)
208 do i = 1, hecmesh%n_elem
209 if(
associated(fstrsolid%elements(i)%gausses) )
then
210 if( k <=
size(fstrsolid%elements(i)%gausses) )
then
212 work(nitem*(i-1)+j) = fstrsolid%elements(i)%gausses(k)%strain_out(j)
217 call hecmw_result_add( id, nitem, label, work )
222 if( fstrsolid%output_ctrl(3)%outinfo%on(10) .and. ndof/=6 )
then
224 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(10), ndof )
225 ngauss = fstrsolid%maxn_gauss
229 write(label,
'(a,a)')
'GaussSTRESS',trim(adjustl(s))
230 label = adjustl(label)
231 do i = 1, hecmesh%n_elem
232 if(
associated(fstrsolid%elements(i)%gausses) )
then
233 if( k <=
size(fstrsolid%elements(i)%gausses) )
then
235 work(nitem*(i-1)+j) = fstrsolid%elements(i)%gausses(k)%stress_out(j)
240 call hecmw_result_add( id, nitem, label, work )
245 if( fstrsolid%output_ctrl(3)%outinfo%on(11) .and. fstrsolid%StaticType/=3 )
then
247 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(11), ndof )
248 ngauss = fstrsolid%maxn_gauss
251 write(label,
'(a,a)')
'PLASTIC_GaussSTRAIN',trim(adjustl(s))
252 label = adjustl(label)
253 do i = 1, hecmesh%n_elem
254 if( k >
size(fstrsolid%elements(i)%gausses) )
then
257 work(i) = fstrsolid%elements(i)%gausses(k)%plstrain
260 call hecmw_result_add( id, nitem, label, work )
265 if( fstrsolid%output_ctrl(3)%outinfo%on(12) .and.
associated(tnstrain) )
then
267 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(12), ndof )
268 label =
'THERMAL_NodalSTRAIN'
269 call hecmw_result_add( id, nitem, label, tnstrain )
273 if( fstrsolid%output_ctrl(3)%outinfo%on(13) .and.
associated(testrain) )
then
275 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(13), ndof )
276 label =
'THERMAL_ElementalSTRAIN'
277 call hecmw_result_add( id, nitem, label, testrain )
281 if( fstrsolid%output_ctrl(3)%outinfo%on(14) .and.
associated(testrain) )
then
283 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(14), ndof )
284 ngauss = fstrsolid%maxn_gauss
287 write(label,
'(a,a)')
'THERMAL_GaussSTRAIN',trim(adjustl(s))
288 label = adjustl(label)
289 do i = 1, hecmesh%n_elem
290 if( k > ngauss )
then
292 work(nitem*(i-1)+j) = 0.d0
300 call hecmw_result_add( id, nitem, label, work )
305 if( fstrsolid%output_ctrl(3)%outinfo%on(29) )
then
307 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(29), ndof )
308 label =
"YIELD_RATIO"
309 call hecmw_result_add( id, nitem, label, yield_ratio )
313 if( fstrsolid%output_ctrl(3)%outinfo%on(30) .and.
associated(fstrsolid%CONT_NFORCE) )
then
315 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(30), ndof )
316 label =
'CONTACT_NFORCE'
317 call hecmw_result_add( id, nitem, label, fstrsolid%CONT_NFORCE )
321 if( fstrsolid%output_ctrl(3)%outinfo%on(31) .and.
associated(fstrsolid%CONT_FRIC) )
then
323 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(31), ndof )
324 label =
'CONTACT_FRICTION'
325 call hecmw_result_add( id, nitem, label, fstrsolid%CONT_FRIC )
329 if( fstrsolid%output_ctrl(3)%outinfo%on(32) .and.
associated(fstrsolid%CONT_RELVEL) )
then
331 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(32), ndof )
332 label =
'CONTACT_RELVEL'
333 call hecmw_result_add( id, nitem, label, fstrsolid%CONT_RELVEL )
337 if( fstrsolid%output_ctrl(3)%outinfo%on(33) .and.
associated(fstrsolid%CONT_STATE) )
then
339 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(33), ndof )
340 label =
'CONTACT_STATE'
341 call hecmw_result_add( id, nitem, label, fstrsolid%CONT_STATE )
345 if( fstrsolid%output_ctrl(3)%outinfo%on(36) .and.
associated(fstrsolid%CONT_NTRAC) )
then
347 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(36), ndof )
348 label =
'CONTACT_NTRACTION'
349 call hecmw_result_add( id, nitem, label, fstrsolid%CONT_NTRAC )
353 if( fstrsolid%output_ctrl(3)%outinfo%on(37) .and.
associated(fstrsolid%CONT_FTRAC) )
then
355 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(37), ndof )
356 label =
'CONTACT_FTRACTION'
357 call hecmw_result_add( id, nitem, label, fstrsolid%CONT_FTRAC )
363 call hecmw_result_write_by_name( nameid )
366 call hecmw_result_write_by_addfname( nameid, addfname )
370 call hecmw_result_finalize
375 subroutine fstr_write_result_main( hecMESH, fstrSOLID, RES, clyr )
386 integer(kind=kint) :: istep, flag
387 integer(kind=kint) :: n_lyr, cid
389 character(len=HECMW_HEADER_LEN) :: header
390 character(len=HECMW_NAME_LEN) :: s, label, nameid, addfname
391 character(len=6) :: clyr
392 character(len=4) :: cnum
393 integer(kind=kint) :: i, j, k, ndof, mdof, id, nitem, nn, mm, ngauss, it
398 if (fstrsolid%output_ctrl(3)%outinfo%on(3))
then
400 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(3), ndof )
401 label =
'NodalSTRAIN'//trim(clyr)
402 call hecmw_result_add( id, nitem, label, res%STRAIN )
406 if( fstrsolid%output_ctrl(3)%outinfo%on(4) )
then
408 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(4), ndof )
409 label =
'NodalSTRESS'//trim(clyr)
410 call hecmw_result_add( id, nitem, label, res%STRESS )
414 if( fstrsolid%output_ctrl(3)%outinfo%on(5) )
then
416 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(5), ndof )
417 label =
'NodalMISES'//trim(clyr)
418 call hecmw_result_add( id, nitem, label, res%MISES )
422 if( fstrsolid%output_ctrl(3)%outinfo%on(19) )
then
424 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(19), ndof )
425 label =
'NodalPrincipalSTRESS'//trim(clyr)
426 call hecmw_result_add( id, nitem, label, res%PSTRESS )
430 if( fstrsolid%output_ctrl(3)%outinfo%on(21) )
then
432 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(21), ndof )
433 label =
'NodalPrincipalSTRAIN'//trim(clyr)
434 call hecmw_result_add( id, nitem, label, res%PSTRAIN )
438 if( fstrsolid%output_ctrl(3)%outinfo%on(23) )
then
442 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(23), ndof )
443 label =
'NodalPrincipalSTRESSVector'//trim(cnum)//trim(clyr)
444 call hecmw_result_add( id, nitem, label, res%PSTRESS_VECT(:,k) )
449 if( fstrsolid%output_ctrl(3)%outinfo%on(25) )
then
453 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(25), ndof )
454 label =
'NodalPrincipalSTRAINVector'//trim(cnum)//trim(clyr)
455 call hecmw_result_add( id, nitem, label, res%PSTRAIN_VECT(:,k) )
461 if( fstrsolid%output_ctrl(3)%outinfo%on(6) )
then
463 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(6), ndof )
464 label =
'ElementalSTRAIN'//trim(clyr)
465 call hecmw_result_add( id, nitem, label, res%ESTRAIN )
469 if( fstrsolid%output_ctrl(3)%outinfo%on(7) )
then
471 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(7), ndof )
472 label =
'ElementalSTRESS'//trim(clyr)
473 call hecmw_result_add( id, nitem, label, res%ESTRESS )
477 if( fstrsolid%output_ctrl(3)%outinfo%on(35) )
then
479 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(35), ndof )
480 label =
'ElementalNQM'//trim(clyr)
482 call hecmw_result_add( id, nitem, label, res%ENQM )
486 if( fstrsolid%output_ctrl(3)%outinfo%on(8))
then
488 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(8), ndof )
489 label =
'ElementalMISES'//trim(clyr)
490 call hecmw_result_add( id, nitem, label, res%EMISES )
494 if( fstrsolid%output_ctrl(3)%outinfo%on(20) )
then
496 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(20), ndof )
497 label =
'ElementalPrincipalSTRESS'//trim(clyr)
498 call hecmw_result_add( id, nitem, label, res%EPSTRESS )
502 if( fstrsolid%output_ctrl(3)%outinfo%on(22) )
then
504 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(22), ndof )
505 label =
'ElementalPrincipalSTRAIN'//trim(clyr)
506 call hecmw_result_add( id, nitem, label, res%EPSTRAIN )
510 if( fstrsolid%output_ctrl(3)%outinfo%on(24) )
then
514 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(24), ndof )
515 label =
'ElementalPrincipalSTRESSVector'//trim(cnum)//trim(clyr)
516 call hecmw_result_add( id, nitem, label, res%EPSTRESS_VECT(:,k) )
521 if( fstrsolid%output_ctrl(3)%outinfo%on(26) )
then
525 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(26), ndof )
526 label =
'ElementalPrincipalSTRAINVector'//trim(cnum)//trim(clyr)
527 call hecmw_result_add( id, nitem, label, res%EPSTRAIN_VECT(:,k) )
531 end subroutine fstr_write_result_main
543 type(hecmwst_result_data) :: fstrresult
544 integer(kind=kint) :: istep
545 real(kind=
kreal) :: time
547 integer(kind=kint) :: n_lyr, ntot_lyr, it, coef33, is_33shell, is_33beam
548 integer(kind=kint) :: i, j, k, ndof, mdof, gcomp, gitem, ncomp, nitem, iitem, ecomp, eitem, jitem, nn, mm
549 integer(kind=kint) :: idx
550 real(kind=
kreal),
pointer :: tnstrain(:), testrain(:)
551 real(kind=
kreal),
allocatable ::unode(:)
552 character(len=4) :: cnum
553 character(len=6),
allocatable :: clyr(:)
554 logical :: is_dynamic
556 is_dynamic =
present(fstrdynamic)
558 tnstrain => fstrsolid%TNSTRAIN
559 testrain => fstrsolid%TESTRAIN
561 ntot_lyr = fstrsolid%max_lyr
562 is_33shell = fstrsolid%is_33shell
563 is_33beam = fstrsolid%is_33beam
566 if( hecmesh%n_elem>hecmesh%n_node ) mm = hecmesh%n_elem
568 if( is_dynamic )
then
570 if( fstrdynamic%idx_eqa==1 .and. istep>0 ) idx = 2
574 if( ndof==2 ) mdof = 3
575 if( ndof==3 ) mdof = 6
576 if( ndof==4 ) mdof = 6
577 if( ndof==6 ) mdof = 6
579 if(is_33shell == 1 .and. fstrsolid%output_ctrl(4)%outinfo%on(27) )
then
580 coef33 = 1 + 2*ntot_lyr
585 call hecmw_nullify_result_data( fstrresult )
598 if( fstrsolid%output_ctrl(4)%outinfo%on(1) )
then
601 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(1), ndof )
604 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(1), 3 )
606 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(1), 1 )
610 if( is_dynamic .and. fstrsolid%output_ctrl(4)%outinfo%on(15) )
then
612 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(15), ndof )
615 if( is_dynamic .and. fstrsolid%output_ctrl(4)%outinfo%on(16) )
then
617 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(16), ndof )
620 if( fstrsolid%output_ctrl(4)%outinfo%on(18) .and. is_33shell == 1 )
then
622 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(18), ndof )
625 if( fstrsolid%output_ctrl(4)%outinfo%on(2) )
then
627 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(2), ndof )
630 if( fstrsolid%output_ctrl(4)%outinfo%on(3) )
then
631 ncomp = ncomp + 1*coef33
632 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(3), ndof )*coef33
635 if( fstrsolid%output_ctrl(4)%outinfo%on(4) )
then
636 ncomp = ncomp + 1*coef33
637 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(4), ndof )*coef33
640 if( fstrsolid%output_ctrl(4)%outinfo%on(5) )
then
641 ncomp = ncomp + 1*coef33
642 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(5), ndof )*coef33
645 if( fstrsolid%output_ctrl(4)%outinfo%on(19) )
then
646 ncomp = ncomp + 1*coef33
647 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(19), ndof )*coef33
650 if( fstrsolid%output_ctrl(4)%outinfo%on(21) )
then
651 ncomp = ncomp + 1*coef33
652 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(21), ndof )*coef33
655 if( fstrsolid%output_ctrl(4)%outinfo%on(23) )
then
656 ncomp = ncomp + 3*coef33
657 nitem = nitem + 3*n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(23), ndof )*coef33
660 if( fstrsolid%output_ctrl(4)%outinfo%on(25) )
then
661 ncomp = ncomp + 3*coef33
662 nitem = nitem + 3*n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(25), ndof )*coef33
665 if( fstrsolid%output_ctrl(4)%outinfo%on(12) .and.
associated(tnstrain) )
then
667 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(12), ndof )
670 if( fstrsolid%output_ctrl(4)%outinfo%on(30) .and.
associated(fstrsolid%CONT_NFORCE) )
then
672 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(30), ndof )
675 if( fstrsolid%output_ctrl(4)%outinfo%on(31) .and.
associated(fstrsolid%CONT_FRIC) )
then
677 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(31), ndof )
680 if( fstrsolid%output_ctrl(4)%outinfo%on(32) .and.
associated(fstrsolid%CONT_RELVEL) )
then
682 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(32), ndof )
685 if( fstrsolid%output_ctrl(4)%outinfo%on(33) .and.
associated(fstrsolid%CONT_STATE) )
then
687 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(33), ndof )
690 if( fstrsolid%output_ctrl(4)%outinfo%on(36) .and.
associated(fstrsolid%CONT_NTRAC) )
then
692 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(36), ndof )
695 if( fstrsolid%output_ctrl(4)%outinfo%on(37) .and.
associated(fstrsolid%CONT_FTRAC) )
then
697 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(37), ndof )
701 if( fstrsolid%output_ctrl(4)%outinfo%on(6) )
then
703 eitem = eitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(6), ndof )
706 if( fstrsolid%output_ctrl(4)%outinfo%on(7) )
then
708 eitem = eitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(7), ndof )
711 if( fstrsolid%output_ctrl(4)%outinfo%on(8) )
then
713 eitem = eitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(8), ndof )
716 if( fstrsolid%output_ctrl(4)%outinfo%on(20) )
then
718 eitem = eitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(20), ndof )
721 if( fstrsolid%output_ctrl(4)%outinfo%on(22) )
then
723 eitem = eitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(22), ndof )
726 if( fstrsolid%output_ctrl(4)%outinfo%on(24) )
then
728 eitem = eitem + 3*n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(24), ndof )
731 if( fstrsolid%output_ctrl(4)%outinfo%on(26) )
then
733 eitem = eitem + 3*n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(26), ndof )
736 if( fstrsolid%output_ctrl(4)%outinfo%on(34) )
then
738 eitem = eitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(34), ndof )
742 fstrresult%ng_component = gcomp
743 fstrresult%nn_component = ncomp
744 fstrresult%ne_component = ecomp
745 allocate( fstrresult%ng_dof(gcomp) )
746 allocate( fstrresult%global_label(gcomp) )
747 allocate( fstrresult%global_val_item(gitem) )
748 allocate( fstrresult%nn_dof(ncomp) )
749 allocate( fstrresult%node_label(ncomp) )
750 allocate( fstrresult%node_val_item(nitem*hecmesh%n_node) )
751 allocate( fstrresult%ne_dof(ecomp) )
752 allocate( fstrresult%elem_label(ecomp) )
753 allocate( fstrresult%elem_val_item(eitem*hecmesh%n_elem) )
760 fstrresult%ng_dof(1) = 1
761 fstrresult%global_label(1) =
"TOTALTIME"
762 fstrresult%global_val_item(1) = time
765 if (fstrsolid%output_ctrl(4)%outinfo%on(1) )
then
768 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(1), ndof )
769 fstrresult%nn_dof(ncomp) = nn
770 fstrresult%node_label(ncomp) =
'DISPLACEMENT'
771 allocate( unode(ndof*hecmesh%n_node) )
773 if( is_dynamic )
then
774 unode(:) = fstrdynamic%DISP(:,idx)
776 unode(:) = fstrsolid%unode(:)
778 if(is_33beam == 1)
then
781 if(is_33shell == 1)
then
784 do i = 1, hecmesh%n_node
786 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = unode(nn*(i-1)+j)
794 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(1), 3 )
795 fstrresult%nn_dof(ncomp) = nn
796 fstrresult%node_label(ncomp) =
'VELOCITY'
797 do i = 1, hecmesh%n_node
799 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrdynamic%DISP(4*(i-1)+j,idx)
805 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(1), 1 )
806 fstrresult%nn_dof(ncomp) = nn
807 fstrresult%node_label(ncomp) =
'PRESSURE'
808 do i = 1, hecmesh%n_node
809 fstrresult%node_val_item(nitem*(i-1)+1+iitem) = fstrdynamic%DISP(4*i,idx)
816 if( is_dynamic .and. fstrsolid%output_ctrl(4)%outinfo%on(15) )
then
818 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(15), ndof )
819 fstrresult%nn_dof(ncomp) = nn
820 fstrresult%node_label(ncomp) =
'VELOCITY'
821 do i = 1, hecmesh%n_node
823 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrdynamic%VEL(nn*(i-1)+j,idx)
830 if( is_dynamic .and. fstrsolid%output_ctrl(4)%outinfo%on(16) )
then
832 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(16), ndof )
833 fstrresult%nn_dof(ncomp) = nn
834 fstrresult%node_label(ncomp) =
'ACCELERATION'
835 do i = 1, hecmesh%n_node
837 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrdynamic%ACC(nn*(i-1)+j,idx)
844 if( fstrsolid%output_ctrl(4)%outinfo%on(18) .and. is_33shell == 1 )
then
846 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(1), ndof )
847 fstrresult%nn_dof(ncomp) = nn
848 fstrresult%node_label(ncomp) =
'ROTATION'
849 allocate( unode(ndof*hecmesh%n_node) )
852 do i = 1, hecmesh%n_node
854 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = unode(nn*(i-1)+j)
862 if( fstrsolid%output_ctrl(4)%outinfo%on(2) )
then
864 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(2), ndof )
865 fstrresult%nn_dof(ncomp) = nn
866 fstrresult%node_label(ncomp) =
'REACTION_FORCE'
867 do i = 1, hecmesh%n_node
869 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrsolid%REACTION(nn*(i-1)+j)
875 if(is_33shell == 1 .or. ndof == 6)
then
876 call fstr_make_result_main( hecmesh, fstrsolid, fstrresult, &
877 & fstrsolid%SHELL, nitem, iitem, ncomp, eitem, jitem, ecomp, 1,
" " )
879 call fstr_make_result_main( hecmesh, fstrsolid, fstrresult, &
880 & fstrsolid%SOLID, nitem, iitem, ncomp, eitem, jitem, ecomp, 1,
" " )
884 if(
associated(fstrsolid%SHELL) .and. fstrsolid%output_ctrl(4)%outinfo%on(27) .and. is_33shell == 1 )
then
885 allocate(clyr(2*ntot_lyr))
888 clyr(2*i-1)=
"_L"//trim(cnum)//
"+"
889 clyr(2*i )=
"_L"//trim(cnum)//
"-"
892 call fstr_make_result_main( hecmesh, fstrsolid, fstrresult, &
893 & fstrsolid%SHELL%LAYER(i)%PLUS, nitem, iitem, ncomp, eitem, jitem, ecomp, i+1, clyr(2*i-1) )
894 call fstr_make_result_main( hecmesh, fstrsolid, fstrresult, &
895 & fstrsolid%SHELL%LAYER(i)%MINUS, nitem, iitem, ncomp, eitem, jitem, ecomp, i+1, clyr(2*i ) )
901 if( fstrsolid%output_ctrl(4)%outinfo%on(12) .and.
associated(tnstrain) )
then
903 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(12), ndof )
904 fstrresult%nn_dof(ncomp) = nn
905 fstrresult%node_label(ncomp) =
'THERMAL_NodalSTRAIN'
906 do i = 1, hecmesh%n_node
908 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = tnstrain(nn*(i-1)+j)
915 if( fstrsolid%output_ctrl(4)%outinfo%on(30) .and.
associated(fstrsolid%CONT_NFORCE) )
then
917 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(30), ndof )
918 fstrresult%nn_dof(ncomp) = nn
919 fstrresult%node_label(ncomp) =
'CONTACT_NFORCE'
920 do i = 1, hecmesh%n_node
922 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrsolid%CONT_NFORCE(nn*(i-1)+j)
929 if( fstrsolid%output_ctrl(4)%outinfo%on(31) .and.
associated(fstrsolid%CONT_FRIC) )
then
931 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(31), ndof )
932 fstrresult%nn_dof(ncomp) = nn
933 fstrresult%node_label(ncomp) =
'CONTACT_FRICTION'
934 do i = 1, hecmesh%n_node
936 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrsolid%CONT_FRIC(nn*(i-1)+j)
943 if( fstrsolid%output_ctrl(4)%outinfo%on(32) .and.
associated(fstrsolid%CONT_RELVEL) )
then
945 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(32), ndof )
946 fstrresult%nn_dof(ncomp) = nn
947 fstrresult%node_label(ncomp) =
'CONTACT_RELVEL'
948 do i = 1, hecmesh%n_node
950 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrsolid%CONT_RELVEL(nn*(i-1)+j)
957 if( fstrsolid%output_ctrl(4)%outinfo%on(33) .and.
associated(fstrsolid%CONT_STATE) )
then
959 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(33), ndof )
960 fstrresult%nn_dof(ncomp) = nn
961 fstrresult%node_label(ncomp) =
'CONTACT_STATE'
962 do i = 1, hecmesh%n_node
964 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrsolid%CONT_STATE(nn*(i-1)+j)
971 if( fstrsolid%output_ctrl(4)%outinfo%on(36) .and.
associated(fstrsolid%CONT_NTRAC) )
then
973 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(36), ndof )
974 fstrresult%nn_dof(ncomp) = nn
975 fstrresult%node_label(ncomp) =
'CONTACT_NTRACTION'
976 do i = 1, hecmesh%n_node
978 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrsolid%CONT_NTRAC(nn*(i-1)+j)
985 if( fstrsolid%output_ctrl(4)%outinfo%on(37) .and.
associated(fstrsolid%CONT_FTRAC) )
then
987 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(37), ndof )
988 fstrresult%nn_dof(ncomp) = nn
989 fstrresult%node_label(ncomp) =
'CONTACT_FTRACTION'
990 do i = 1, hecmesh%n_node
992 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrsolid%CONT_FTRAC(nn*(i-1)+j)
999 if( fstrsolid%output_ctrl(4)%outinfo%on(6))
then
1000 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(6), ndof )
1002 fstrresult%ne_dof(ecomp) = nn
1003 fstrresult%elem_label(ecomp) =
'ElementalSTRAIN'
1004 do i = 1, hecmesh%n_elem
1006 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = fstrsolid%SOLID%ESTRAIN(nn*(i-1)+j)
1013 if(fstrsolid%output_ctrl(4)%outinfo%on(7))
then
1015 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(7), ndof )
1016 fstrresult%ne_dof(ecomp) = nn
1017 fstrresult%elem_label(ecomp) =
'ElementalSTRESS'
1018 do i = 1, hecmesh%n_elem
1020 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = fstrsolid%SOLID%ESTRESS((nn)*(i-1)+j)
1027 if(fstrsolid%output_ctrl(4)%outinfo%on(8))
then
1029 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(8), ndof )
1030 fstrresult%ne_dof(ecomp) = nn
1031 fstrresult%elem_label(ecomp) =
'ElementalMISES'
1032 do i = 1, hecmesh%n_elem
1033 fstrresult%elem_val_item(eitem*(i-1)+1+jitem) = fstrsolid%SOLID%EMISES(i)
1039 if(fstrsolid%output_ctrl(4)%outinfo%on(20))
then
1041 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(20), ndof )
1042 fstrresult%ne_dof(ecomp) = nn
1043 fstrresult%elem_label(ecomp) =
'ElementalPrincipalSTRESS'
1044 do i = 1, hecmesh%n_elem
1046 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = fstrsolid%SOLID%EPSTRESS((nn)*(i-1)+j)
1053 if(fstrsolid%output_ctrl(4)%outinfo%on(22))
then
1055 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(22), ndof )
1056 fstrresult%ne_dof(ecomp) = nn
1057 fstrresult%elem_label(ecomp) =
'ElementalPrincipalSTRAIN'
1058 do i = 1, hecmesh%n_elem
1060 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = fstrsolid%SOLID%EPSTRAIN((nn)*(i-1)+j)
1067 if(fstrsolid%output_ctrl(4)%outinfo%on(24))
then
1071 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(24), ndof )
1072 fstrresult%ne_dof(ecomp) = nn
1073 fstrresult%elem_label(ecomp) =
'ElementalPrincipalSTRESSVector'//trim(cnum)
1074 do i = 1, hecmesh%n_elem
1076 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = fstrsolid%SOLID%EPSTRESS_VECT((nn)*(i-1)+j,k)
1084 if(fstrsolid%output_ctrl(4)%outinfo%on(26))
then
1088 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(26), ndof )
1089 fstrresult%ne_dof(ecomp) = nn
1090 fstrresult%elem_label(ecomp) =
'ElementalPrincipalSTRAINVector'//trim(cnum)
1091 do i = 1, hecmesh%n_elem
1093 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = fstrsolid%SOLID%EPSTRAIN_VECT((nn)*(i-1)+j,k)
1101 if(fstrsolid%output_ctrl(4)%outinfo%on(34))
then
1103 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(34), ndof )
1104 fstrresult%ne_dof(ecomp) = nn
1105 fstrresult%elem_label(ecomp) =
'Material_ID'
1106 do i = 1, hecmesh%n_elem
1107 fstrresult%elem_val_item(eitem*(i-1)+1+jitem) = hecmesh%section_ID(i)
1114 subroutine fstr_make_result_main( hecMESH, fstrSOLID, fstrRESULT, RES, nitem, &
1115 & iitem, ncomp, eitem, jitem, ecomp, nlyr, clyr )
1125 type (hecmwst_result_data):: fstrresult
1127 integer(kind=kint) :: istep, flag
1128 integer(kind=kint) :: n_lyr, cid
1130 character(len=HECMW_HEADER_LEN) :: header
1131 character(len=HECMW_NAME_LEN) :: s, label, nameid, addfname
1132 character(len=6) :: clyr
1133 character(len=4) :: cnum
1134 integer(kind=kint) :: i, j, k, ndof, mdof, id, nitem, eitem, nn, mm, ngauss, it
1135 integer(kind=kint) :: iitem, ncomp, jitem, ecomp, nlyr
1137 ndof = hecmesh%n_dof
1140 if( fstrsolid%output_ctrl(4)%outinfo%on(3))
then
1141 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(3), ndof )
1143 fstrresult%nn_dof(ncomp) = nn
1144 fstrresult%node_label(ncomp) =
'NodalSTRAIN'//trim(clyr)
1145 do i = 1, hecmesh%n_node
1147 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = res%STRAIN(nn*(i-1)+j)
1154 if(fstrsolid%output_ctrl(4)%outinfo%on(4))
then
1156 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(4), ndof )
1157 fstrresult%nn_dof(ncomp) = nn
1158 fstrresult%node_label(ncomp) =
'NodalSTRESS'//trim(clyr)
1159 do i = 1, hecmesh%n_node
1161 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = res%STRESS((nn)*(i-1)+j)
1168 if(fstrsolid%output_ctrl(4)%outinfo%on(5))
then
1170 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(5), ndof )
1171 fstrresult%nn_dof(ncomp) = nn
1172 fstrresult%node_label(ncomp) =
'NodalMISES'//trim(clyr)
1173 do i = 1, hecmesh%n_node
1174 fstrresult%node_val_item(nitem*(i-1)+1+iitem) = res%MISES(i)
1180 if(fstrsolid%output_ctrl(4)%outinfo%on(19))
then
1182 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(19), ndof )
1183 fstrresult%nn_dof(ncomp) = nn
1184 fstrresult%node_label(ncomp) =
'NodalPrincipalSTRESS'//trim(clyr)
1185 do i = 1, hecmesh%n_node
1187 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = res%PSTRESS((nn)*(i-1)+j)
1194 if(fstrsolid%output_ctrl(4)%outinfo%on(23))
then
1196 write(cnum,
'(i0)') k
1198 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(23), ndof )
1199 fstrresult%nn_dof(ncomp) = nn
1200 fstrresult%node_label(ncomp) =
'NodalPrincipalSTRESSVector'//trim(cnum)//trim(clyr)
1201 do i = 1, hecmesh%n_node
1203 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = res%PSTRESS_VECT((nn)*(i-1)+j,k)
1211 if( fstrsolid%output_ctrl(4)%outinfo%on(21))
then
1212 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(21), ndof )
1214 fstrresult%nn_dof(ncomp) = nn
1215 fstrresult%node_label(ncomp) =
'NodalPrincipalSTRAIN'//trim(clyr)
1216 do i = 1, hecmesh%n_node
1218 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = res%PSTRAIN(nn*(i-1)+j)
1225 if( fstrsolid%output_ctrl(4)%outinfo%on(25))
then
1227 write(cnum,
'(i0)') k
1228 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(25), ndof )
1230 fstrresult%nn_dof(ncomp) = nn
1231 fstrresult%node_label(ncomp) =
'NodalPrincipalSTRAINVector'//trim(cnum)//trim(clyr)
1232 do i = 1, hecmesh%n_node
1234 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = res%PSTRAIN_VECT(nn*(i-1)+j,k)
1242 if( fstrsolid%output_ctrl(4)%outinfo%on(6))
then
1243 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(6), ndof )
1245 fstrresult%ne_dof(ecomp) = nn
1246 fstrresult%elem_label(ecomp) =
'ElementalSTRAIN'
1247 do i = 1, hecmesh%n_elem
1249 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = res%ESTRAIN(nn*(i-1)+j)
1256 if(fstrsolid%output_ctrl(4)%outinfo%on(7))
then
1258 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(7), ndof )
1259 fstrresult%ne_dof(ecomp) = nn
1260 fstrresult%elem_label(ecomp) =
'ElementalSTRESS'
1261 do i = 1, hecmesh%n_elem
1263 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = res%ESTRESS((nn)*(i-1)+j)
1270 if(fstrsolid%output_ctrl(4)%outinfo%on(8))
then
1272 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(8), ndof )
1273 fstrresult%ne_dof(ecomp) = nn
1274 fstrresult%elem_label(ecomp) =
'ElementalMISES'
1275 do i = 1, hecmesh%n_elem
1276 fstrresult%elem_val_item(eitem*(i-1)+1+jitem) = res%EMISES(i)
1282 if(fstrsolid%output_ctrl(4)%outinfo%on(20))
then
1284 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(20), ndof )
1285 fstrresult%ne_dof(ecomp) = nn
1286 fstrresult%elem_label(ecomp) =
'ElementalPrincipalSTRESS'
1287 do i = 1, hecmesh%n_elem
1289 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = res%EPSTRESS((nn)*(i-1)+j)
1296 if(fstrsolid%output_ctrl(4)%outinfo%on(22))
then
1298 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(22), ndof )
1299 fstrresult%ne_dof(ecomp) = nn
1300 fstrresult%elem_label(ecomp) =
'ElementalPrincipalSTRAIN'
1301 do i = 1, hecmesh%n_elem
1303 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = res%EPSTRAIN((nn)*(i-1)+j)
1310 if(fstrsolid%output_ctrl(4)%outinfo%on(24))
then
1314 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(24), ndof )
1315 fstrresult%ne_dof(ecomp) = nn
1316 fstrresult%elem_label(ecomp) =
'ElementalPrincipalSTRESSVector'//trim(cnum)
1317 do i = 1, hecmesh%n_elem
1319 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = res%EPSTRESS_VECT((nn)*(i-1)+j,k)
1327 if(fstrsolid%output_ctrl(4)%outinfo%on(26))
then
1331 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(26), ndof )
1332 fstrresult%ne_dof(ecomp) = nn
1333 fstrresult%elem_label(ecomp) =
'ElementalPrincipalSTRAINVector'//trim(cnum)
1334 do i = 1, hecmesh%n_elem
1336 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = res%EPSTRAIN_VECT((nn)*(i-1)+j,k)
1343 end subroutine fstr_make_result_main
1352 type (hecmwst_local_mesh) :: hecmesh
1353 integer(kind=kint) :: i, j, k, itype, is, ie, ic_type, js, icel
1354 integer(kind=kint) :: mm, n1, n2
1355 real(kind=kreal),
allocatable :: unode(:)
1357 do itype = 1, hecmesh%n_elem_type
1358 is = hecmesh%elem_type_index(itype-1) + 1
1359 ie = hecmesh%elem_type_index(itype )
1360 ic_type = hecmesh%elem_type_item(itype)
1361 if(ic_type == 781)
then
1363 js = hecmesh%elem_node_index(icel-1)
1365 n1 = hecmesh%elem_node_item(js+j )
1366 n2 = hecmesh%elem_node_item(js+j+4)
1367 unode(3*n2-2) = unode(3*n1-2)
1368 unode(3*n2-1) = unode(3*n1-1)
1369 unode(3*n2 ) = unode(3*n1 )
1372 elseif(ic_type == 761)
then
1374 js = hecmesh%elem_node_index(icel-1)
1376 n1 = hecmesh%elem_node_item(js+j )
1377 n2 = hecmesh%elem_node_item(js+j+3)
1378 unode(3*n2-2) = unode(3*n1-2)
1379 unode(3*n2-1) = unode(3*n1-1)
1380 unode(3*n2 ) = unode(3*n1 )
1395 type (hecmwst_local_mesh) :: hecmesh
1396 integer(kind=kint) :: i, j, k, itype, is, ie, ic_type, js, icel
1397 integer(kind=kint) :: mm, n1, n2
1398 real(kind=kreal),
allocatable :: unode(:)
1400 do itype = 1, hecmesh%n_elem_type
1401 is = hecmesh%elem_type_index(itype-1) + 1
1402 ie = hecmesh%elem_type_index(itype )
1403 ic_type = hecmesh%elem_type_item(itype)
1404 if(ic_type == 781)
then
1406 js = hecmesh%elem_node_index(icel-1)
1408 n1 = hecmesh%elem_node_item(js+j)
1409 n2 = hecmesh%elem_node_item(js+j+4)
1410 unode(3*n1-2) = fstrsolid%unode(3*n2-2)
1411 unode(3*n1-1) = fstrsolid%unode(3*n2-1)
1412 unode(3*n1 ) = fstrsolid%unode(3*n2 )
1413 unode(3*n2-2) = fstrsolid%unode(3*n2-2)
1414 unode(3*n2-1) = fstrsolid%unode(3*n2-1)
1415 unode(3*n2 ) = fstrsolid%unode(3*n2 )
1418 elseif(ic_type == 761)
then
1420 js = hecmesh%elem_node_index(icel-1)
1422 n1 = hecmesh%elem_node_item(js+j)
1423 n2 = hecmesh%elem_node_item(js+j+3)
1425 unode(3*n1-2) = fstrsolid%unode(3*n2-2)
1426 unode(3*n1-1) = fstrsolid%unode(3*n2-1)
1427 unode(3*n1 ) = fstrsolid%unode(3*n2 )
1428 unode(3*n2-2) = fstrsolid%unode(3*n2-2)
1429 unode(3*n2-1) = fstrsolid%unode(3*n2-1)
1430 unode(3*n2 ) = fstrsolid%unode(3*n2 )
1445 type (hecmwst_local_mesh) :: hecmesh
1446 integer(kind=kint) :: i, j, k, itype, is, ie, ic_type, js, icel
1447 integer(kind=kint) :: mm, a, b
1448 real(kind=kreal),
allocatable :: unode(:)
1450 do itype = 1, hecmesh%n_elem_type
1451 is = hecmesh%elem_type_index(itype-1) + 1
1452 ie = hecmesh%elem_type_index(itype )
1453 ic_type = hecmesh%elem_type_item(itype)
1454 if(ic_type == 641)
then
1456 js = hecmesh%elem_node_index(icel-1)
1458 a = hecmesh%elem_node_item(js+j)
1459 b = hecmesh%elem_node_item(js+j+2)
1460 unode(3*b-2) = unode(3*a-2)
1461 unode(3*b-1) = unode(3*a-1)
1462 unode(3*b ) = unode(3*a )
1476 type (
fstr_solid),
intent(inout) :: fstrsolid
1477 integer(kind=kint),
intent(in) :: phase
1479 integer(kind=kint),
parameter :: nval = 10
1480 logical,
save :: updated(nval) = .false.
1481 integer(kind=kint) :: ndof, i
1482 real(kind=
kreal) :: area
1484 ndof = hecmesh%n_dof
1486 if( phase == -1 )
then
1487 updated(1:nval) = .false.
1490 if( phase /= 3 .and. phase /= 4 )
return
1494 if( fstrsolid%output_ctrl(phase)%outinfo%on(30) .and.
associated(fstrsolid%CONT_NFORCE) )
then
1496 call fstr_setup_parancon_contactvalue(hecmesh,ndof,fstrsolid%CONT_NFORCE,1)
1502 if( fstrsolid%output_ctrl(phase)%outinfo%on(31) .and.
associated(fstrsolid%CONT_FRIC) )
then
1504 call fstr_setup_parancon_contactvalue(hecmesh,ndof,fstrsolid%CONT_FRIC,1)
1510 if( fstrsolid%output_ctrl(phase)%outinfo%on(32) .and.
associated(fstrsolid%CONT_RELVEL) )
then
1512 call fstr_setup_parancon_contactvalue(hecmesh,ndof,fstrsolid%CONT_RELVEL,1)
1518 if( fstrsolid%output_ctrl(phase)%outinfo%on(33) .and.
associated(fstrsolid%CONT_STATE) )
then
1520 call fstr_setup_parancon_contactvalue(hecmesh,1,fstrsolid%CONT_STATE,2)
1526 if( fstrsolid%output_ctrl(phase)%outinfo%on(36) .or. fstrsolid%output_ctrl(phase)%outinfo%on(37) )
then
1533 if( fstrsolid%output_ctrl(phase)%outinfo%on(36) .and.
associated(fstrsolid%CONT_NTRAC) )
then
1535 if( .not. updated(1))
call fstr_setup_parancon_contactvalue(hecmesh,ndof,fstrsolid%CONT_NFORCE,1)
1537 fstrsolid%CONT_NTRAC(:) = 0.d0
1538 do i=1,hecmesh%nn_internal
1539 area = fstrsolid%CONT_AREA(i)
1540 if( area < 1.d-16 ) cycle
1541 fstrsolid%CONT_NTRAC(3*i-2:3*i) = fstrsolid%CONT_NFORCE(3*i-2:3*i)/area
1547 if( fstrsolid%output_ctrl(phase)%outinfo%on(37) .and.
associated(fstrsolid%CONT_FTRAC) )
then
1549 if( .not. updated(1))
call fstr_setup_parancon_contactvalue(hecmesh,ndof,fstrsolid%CONT_FRIC,1)
1551 fstrsolid%CONT_FTRAC(:) = 0.d0
1552 do i=1,hecmesh%nn_internal
1553 area = fstrsolid%CONT_AREA(i)
1554 if( area < 1.d-16 ) cycle
1555 fstrsolid%CONT_FTRAC(3*i-2:3*i) = fstrsolid%CONT_FRIC(3*i-2:3*i)/area
1562 subroutine fstr_setup_parancon_contactvalue(hecMESH,ndof,vec,vtype)
1565 type(hecmwst_local_mesh),
intent(in) :: hecmesh
1566 integer(kind=kint),
intent(in) :: ndof
1567 real(kind=kreal),
pointer,
intent(inout) :: vec(:)
1568 integer(kind=kint),
intent(in) :: vtype
1570 real(kind=kreal) :: rhsb
1571 integer(kind=kint) :: i,j,n,i0,n_loc,nndof
1572 integer(kind=kint) :: offset, pid, lid
1573 integer(kind=kint),
allocatable :: displs(:)
1574 real(kind=kreal),
allocatable :: vec_all(:)
1577 n_loc = hecmesh%nn_internal
1578 allocate(displs(0:
nprocs))
1581 call hecmw_allreduce_i(hecmesh, displs,
nprocs+1, hecmw_sum)
1583 displs(i) = displs(i-1) + displs(i)
1588 allocate(vec_all(ndof*n))
1590 if( vtype == 1 )
then
1592 do i= hecmesh%nn_internal+1,hecmesh%n_node
1593 pid = hecmesh%node_ID(i*2)
1594 lid = hecmesh%node_ID(i*2-1)
1595 i0 = (displs(pid) + (lid-1))*ndof
1596 vec_all(i0+1:i0+ndof) = vec((i-1)*ndof+1:i*ndof)
1597 vec((i-1)*ndof+1:i*ndof) = 0.d0
1600 call hecmw_allreduce_r(hecmesh, vec_all, n*ndof, hecmw_sum)
1603 vec(i) = vec(i) + vec_all(offset*ndof+i)
1605 else if( vtype == 2 )
then
1606 vec_all(:) = -1000.d0
1607 do i= hecmesh%nn_internal+1,hecmesh%n_node
1608 if( vec(i) == 0.d0 ) cycle
1609 pid = hecmesh%node_ID(i*2)
1610 lid = hecmesh%node_ID(i*2-1)
1611 i0 = displs(pid) + lid
1612 vec_all(i0) = vec(i)
1615 call hecmw_allreduce_r(hecmesh, vec_all, n, hecmw_max)
1618 if( vec_all(offset+i) == -1000.d0 ) cycle
1619 if( vec(i) < vec_all(offset+i) ) vec(i) = vec_all(offset+i)
1623 deallocate(displs,vec_all)
integer(kind=4), parameter kreal
This module defined coomon data and basic structures for analysis.
integer(kind=kint) myrank
PARALLEL EXECUTION.
integer(kind=kint) nprocs
logical paracontactflag
PARALLEL CONTACT FLAG.
This module provide a function to prepare output of static analysis.
subroutine, public fstr_reorder_node_beam(fstrsolid, hecmesh, unode)
subroutine, public fstr_make_result(hecmesh, fstrsolid, fstrresult, istep, time, fstrdynamic)
MAKE RESULT for static and dynamic analysis (WITHOUT ELEMENTAL RESULTS) -----------------------------...
subroutine, public fstr_reorder_node_shell(fstrsolid, hecmesh, unode)
subroutine, public fstr_reorder_rot_shell(fstrsolid, hecmesh, unode)
subroutine, public setup_contact_output_variables(hecmesh, fstrsolid, phase)
subroutine, public fstr_write_result(hecmesh, fstrsolid, fstrparam, istep, time, flag, fstrdynamic)
OUTPUT result file for static and dynamic analysis.
This module manages step infomation.
integer function n_comp_valtype(vtype, ndim)
This modules just summarizes all modules used in static analysis.
This module summarizes all infomation of material properties.
Data for DYNAMIC ANSLYSIS (fstrDYNAMIC)
FSTR INNER CONTROL PARAMETERS (fstrPARAM)
Data for STATIC ANSLYSIS (fstrSOLID)