23 subroutine fstr_write_result( hecMESH, fstrSOLID, fstrPARAM, istep, time, flag, fstrDYNAMIC)
31 integer(kind=kint) :: istep, flag
33 real(kind=
kreal) :: time
34 integer(kind=kint) :: id
35 real(kind=
kreal) :: work(1)
36 character(len=HECMW_HEADER_LEN) :: header
37 character(len=HECMW_MSG_LEN) :: comment
38 character(len=HECMW_NAME_LEN) :: label, nameid, addfname
41 header =
'*fstrresult'
42 if(
present(fstrdynamic) )
then
43 comment =
'dynamic_result'
45 comment =
'static_result'
47 call hecmw_result_init( hecmesh, istep, header, comment )
50 id = hecmw_result_dtype_global
53 call hecmw_result_add( id, 1, label, work )
55 if(
present(fstrdynamic) )
then
64 call hecmw_result_write_by_name( nameid )
67 call hecmw_result_write_by_addfname( nameid, addfname )
71 call hecmw_result_finalize
89 integer(kind=kint) :: istep
90 character(len=*) :: label_suffix
92 integer(kind=kint) :: n_lyr, ntot_lyr, tmp, is_33shell, is_33beam, cid
93 integer(kind=kint) :: i, j, k, ndof, mdof, id, nitem, nn, mm, ngauss, it
94 real(kind=
kreal),
pointer :: tnstrain(:), testrain(:), yield_ratio(:)
95 integer(kind=kint) :: idx
96 real(kind=
kreal),
allocatable :: work(:), unode(:), rnode(:)
97 character(len=HECMW_NAME_LEN) :: s, label, cnum
98 character(len=16),
allocatable :: clyr(:)
101 tnstrain => fstrsolid%TNSTRAIN
102 testrain => fstrsolid%TESTRAIN
103 yield_ratio => fstrsolid%YIELD_RATIO
105 is_dynamic =
present(fstrdynamic)
107 if( is_dynamic )
then
109 if( fstrdynamic%idx_eqa==1 .and. istep>0 ) idx = 2
114 if( hecmesh%n_elem > hecmesh%n_node ) mm = hecmesh%n_elem
115 if( ndof==2 ) mdof = 3
116 if( ndof==3 ) mdof = 6
117 if( ndof==4 ) mdof = 6
118 if( ndof==6 ) mdof = 6
120 ntot_lyr = fstrsolid%max_lyr
121 is_33shell = fstrsolid%is_33shell
122 is_33beam = fstrsolid%is_33beam
128 if( fstrsolid%output_ctrl(3)%outinfo%on(1) )
then
130 id = hecmw_result_dtype_node
132 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(1), 3 )
133 allocate( unode(3*hecmesh%n_node) )
135 do i=1, hecmesh%n_node
137 unode((i-1)*3 + j) = fstrdynamic%DISP((i-1)*4 + j, idx)
141 call result_add( id, nitem, label, label_suffix, unode )
144 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(1), 1 )
145 allocate( unode(hecmesh%n_node) )
147 do i=1, hecmesh%n_node
148 unode(i) = fstrdynamic%DISP(i*4, idx)
151 call result_add( id, nitem, label, label_suffix, unode )
153 else if(ndof == 6)
then
154 id = hecmw_result_dtype_node
155 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(1), 3 )
156 allocate( unode(hecmesh%n_node*3) )
158 if( is_dynamic )
then
159 do i=1, hecmesh%n_node
160 unode((i-1)*3+1:(i-1)*3+3) = fstrdynamic%DISP((i-1)*ndof+1:(i-1)*ndof+3, idx)
163 do i=1, hecmesh%n_node
164 unode((i-1)*3+1:(i-1)*3+3) = fstrsolid%unode((i-1)*ndof+1:(i-1)*ndof+3)
167 label =
'DISPLACEMENT'
168 call result_add( id, nitem, label, label_suffix, unode )
171 id = hecmw_result_dtype_node
172 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(1), ndof )
173 allocate( unode(hecmesh%n_node*ndof) )
175 if( is_dynamic )
then
176 unode(:) = fstrdynamic%DISP(:,idx)
178 unode(:) = fstrsolid%unode
180 label =
'DISPLACEMENT'
181 if(is_33beam == 1)
then
184 if(is_33shell == 1)
then
187 call result_add( id, nitem, label, label_suffix, unode )
193 if (fstrsolid%output_ctrl(3)%outinfo%on(18))
then
195 id = hecmw_result_dtype_node
196 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(1), 3 )
198 allocate( rnode(hecmesh%n_node*3) )
200 if( is_dynamic )
then
201 do i=1, hecmesh%n_node
202 rnode((i-1)*3+1:(i-1)*3+3) = fstrdynamic%DISP((i-1)*ndof+4:(i-1)*ndof+6, idx)
205 do i=1, hecmesh%n_node
206 rnode((i-1)*3+1:(i-1)*3+3) = fstrsolid%unode((i-1)*ndof+4:(i-1)*ndof+6)
209 call result_add( id, nitem, label, label_suffix, rnode )
212 if ( is_33shell == 1)
then
213 id = hecmw_result_dtype_node
214 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(1), ndof )
216 allocate( rnode(hecmesh%n_node*ndof) )
219 call result_add( id, nitem, label, label_suffix, rnode )
226 if( is_dynamic .and. fstrsolid%output_ctrl(3)%outinfo%on(15) )
then
227 id = hecmw_result_dtype_node
228 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(15), ndof )
230 call result_add( id, nitem, label, label_suffix, fstrdynamic%VEL(:,idx) )
234 if( is_dynamic .and. fstrsolid%output_ctrl(3)%outinfo%on(16) )
then
235 id = hecmw_result_dtype_node
236 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(16), ndof )
237 label =
'ACCELERATION'
238 call result_add( id, nitem, label, label_suffix, fstrdynamic%ACC(:,idx) )
242 if( fstrsolid%output_ctrl(3)%outinfo%on(2) )
then
243 id = hecmw_result_dtype_node
244 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(2), ndof )
245 label =
'REACTION_FORCE'
246 call result_add( id, nitem, label, label_suffix, fstrsolid%REACTION )
251 if(is_33shell == 1 .or. ndof == 6)
then
258 if(
associated(fstrsolid%SHELL) .and. fstrsolid%output_ctrl(3)%outinfo%on(27) )
then
259 allocate(clyr(2*ntot_lyr))
262 clyr(2*i-1)=
"_L"//trim(cnum)//
"+"
263 clyr(2*i )=
"_L"//trim(cnum)//
"-"
266 call fstr_write_result_main( hecmesh, fstrsolid, fstrsolid%SHELL%LAYER(i)%PLUS, clyr(2*i-1), label_suffix )
267 call fstr_write_result_main( hecmesh, fstrsolid, fstrsolid%SHELL%LAYER(i)%MINUS, clyr(2*i ), label_suffix )
274 if( fstrsolid%output_ctrl(3)%outinfo%on(9) .and. ndof/=6 )
then
275 id = hecmw_result_dtype_elem
276 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(9), ndof )
277 ngauss = fstrsolid%maxn_gauss
281 write(label,
'(a,a)')
'GaussSTRAIN',trim(adjustl(s))
282 label = adjustl(label)
283 do i = 1, hecmesh%n_elem
284 if(
associated(fstrsolid%elements(i)%gausses) )
then
285 if( k <=
size(fstrsolid%elements(i)%gausses) )
then
287 work(nitem*(i-1)+j) = fstrsolid%elements(i)%gausses(k)%strain_out(j)
292 call result_add( id, nitem, label, label_suffix, work )
297 if( fstrsolid%output_ctrl(3)%outinfo%on(10) .and. ndof/=6 )
then
298 id = hecmw_result_dtype_elem
299 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(10), ndof )
300 ngauss = fstrsolid%maxn_gauss
304 write(label,
'(a,a)')
'GaussSTRESS',trim(adjustl(s))
305 label = adjustl(label)
306 do i = 1, hecmesh%n_elem
307 if(
associated(fstrsolid%elements(i)%gausses) )
then
308 if( k <=
size(fstrsolid%elements(i)%gausses) )
then
310 work(nitem*(i-1)+j) = fstrsolid%elements(i)%gausses(k)%stress_out(j)
315 call result_add( id, nitem, label, label_suffix, work )
320 if( fstrsolid%output_ctrl(3)%outinfo%on(11) .and. fstrsolid%StaticType/=3 )
then
321 id = hecmw_result_dtype_elem
322 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(11), ndof )
323 ngauss = fstrsolid%maxn_gauss
327 write(label,
'(a,a)')
'PLASTIC_GaussSTRAIN',trim(adjustl(s))
328 label = adjustl(label)
329 do i = 1, hecmesh%n_elem
330 if(
associated(fstrsolid%elements(i)%gausses) )
then
331 if( k <=
size(fstrsolid%elements(i)%gausses) )
then
332 work(i) = fstrsolid%elements(i)%gausses(k)%plstrain
336 call result_add( id, nitem, label, label_suffix, work )
341 if( fstrsolid%output_ctrl(3)%outinfo%on(12) .and.
associated(tnstrain) )
then
342 id = hecmw_result_dtype_node
343 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(12), ndof )
344 label =
'THERMAL_NodalSTRAIN'
345 call result_add( id, nitem, label, label_suffix, tnstrain )
349 if( fstrsolid%output_ctrl(3)%outinfo%on(13) .and.
associated(testrain) )
then
350 id = hecmw_result_dtype_elem
351 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(13), ndof )
352 label =
'THERMAL_ElementalSTRAIN'
353 call result_add( id, nitem, label, label_suffix, testrain )
357 if( fstrsolid%output_ctrl(3)%outinfo%on(14) .and.
associated(testrain) )
then
358 id = hecmw_result_dtype_elem
359 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(14), ndof )
360 ngauss = fstrsolid%maxn_gauss
363 write(label,
'(a,a)')
'THERMAL_GaussSTRAIN',trim(adjustl(s))
364 label = adjustl(label)
365 do i = 1, hecmesh%n_elem
366 if( k > ngauss )
then
368 work(nitem*(i-1)+j) = 0.d0
376 call result_add( id, nitem, label, label_suffix, work )
381 if( fstrsolid%output_ctrl(3)%outinfo%on(29) )
then
382 id = hecmw_result_dtype_elem
383 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(29), ndof )
384 label =
"YIELD_RATIO"
385 call result_add( id, nitem, label, label_suffix, yield_ratio )
389 if( fstrsolid%output_ctrl(3)%outinfo%on(30) .and.
associated(fstrsolid%CONT_NFORCE) )
then
390 id = hecmw_result_dtype_node
391 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(30), ndof )
392 label =
'CONTACT_NFORCE'
393 call result_add( id, nitem, label, label_suffix, fstrsolid%CONT_NFORCE )
397 if( fstrsolid%output_ctrl(3)%outinfo%on(31) .and.
associated(fstrsolid%CONT_FRIC) )
then
398 id = hecmw_result_dtype_node
399 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(31), ndof )
400 label =
'CONTACT_FRICTION'
401 call result_add( id, nitem, label, label_suffix, fstrsolid%CONT_FRIC )
405 if( fstrsolid%output_ctrl(3)%outinfo%on(32) .and.
associated(fstrsolid%CONT_RELVEL) )
then
406 id = hecmw_result_dtype_node
407 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(32), ndof )
408 label =
'CONTACT_RELVEL'
409 call result_add( id, nitem, label, label_suffix, fstrsolid%CONT_RELVEL )
413 if( fstrsolid%output_ctrl(3)%outinfo%on(33) .and.
associated(fstrsolid%CONT_STATE) )
then
414 id = hecmw_result_dtype_node
415 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(33), ndof )
416 label =
'CONTACT_STATE'
417 call result_add( id, nitem, label, label_suffix, fstrsolid%CONT_STATE )
421 if( fstrsolid%output_ctrl(3)%outinfo%on(36) .and.
associated(fstrsolid%CONT_NTRAC) )
then
422 id = hecmw_result_dtype_node
423 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(36), ndof )
424 label =
'CONTACT_NTRACTION'
425 call result_add( id, nitem, label, label_suffix, fstrsolid%CONT_NTRAC )
429 if( fstrsolid%output_ctrl(3)%outinfo%on(37) .and.
associated(fstrsolid%CONT_FTRAC) )
then
430 id = hecmw_result_dtype_node
431 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(37), ndof )
432 label =
'CONTACT_FTRACTION'
433 call result_add( id, nitem, label, label_suffix, fstrsolid%CONT_FTRAC )
453 if( fstrsolid%output_ctrl(3)%outinfo%on(44) )
then
454 id = hecmw_result_dtype_elem
455 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(44), ndof )
458 do i = 1, hecmesh%n_elem
459 if( fstrsolid%elements(i)%elemact_flag /= kelact_inactive ) work(i) = 1.d0
461 call result_add( id, nitem, label, label_suffix, work )
467 subroutine result_add( dtype, n_dof, label, label_suffix, data )
472 integer(kind=kint),
intent(in) :: dtype
473 integer(kind=kint),
intent(in) :: n_dof
474 character(len=*),
intent(in) :: label
475 character(len=*),
intent(in) :: label_suffix
476 real(kind=
kreal) ::
data(:)
477 character(len=HECMW_NAME_LEN) :: name
479 name = trim(label)//trim(label_suffix)
480 call hecmw_result_add( dtype, n_dof, name,
data )
491 type (hecmwST_local_mesh) :: hecMESH
492 type (fstr_solid) :: fstrSOLID
493 type (fstr_solid_physic_val) :: RES
494 integer(kind=kint) :: istep, flag
495 integer(kind=kint) :: n_lyr, cid
497 character(len=HECMW_HEADER_LEN) :: header
498 character(len=HECMW_NAME_LEN) :: s, label, nameID, addfname
499 character(len=16) :: clyr
500 character(len=*) :: label_suffix
501 character(len=12) :: cnum
502 integer(kind=kint) :: i, j, k, ndof, mdof, id, nitem, nn, mm, ngauss, it
503 real(kind=
kreal),
allocatable :: work(:)
506 allocate( work(hecmesh%n_elem) )
509 if (fstrsolid%output_ctrl(3)%outinfo%on(3))
then
510 id = hecmw_result_dtype_node
511 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(3), ndof )
512 label =
'NodalSTRAIN'//trim(clyr)
513 call result_add( id, nitem, label, label_suffix, res%STRAIN )
517 if( fstrsolid%output_ctrl(3)%outinfo%on(4) )
then
518 id = hecmw_result_dtype_node
519 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(4), ndof )
520 label =
'NodalSTRESS'//trim(clyr)
521 call result_add( id, nitem, label, label_suffix, res%STRESS )
525 if( fstrsolid%output_ctrl(3)%outinfo%on(5) )
then
526 id = hecmw_result_dtype_node
527 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(5), ndof )
528 label =
'NodalMISES'//trim(clyr)
529 call result_add( id, nitem, label, label_suffix, res%MISES )
533 if( fstrsolid%output_ctrl(3)%outinfo%on(19) )
then
534 id = hecmw_result_dtype_node
535 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(19), ndof )
536 label =
'NodalPrincipalSTRESS'//trim(clyr)
537 call result_add( id, nitem, label, label_suffix, res%PSTRESS )
541 if( fstrsolid%output_ctrl(3)%outinfo%on(21) )
then
542 id = hecmw_result_dtype_node
543 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(21), ndof )
544 label =
'NodalPrincipalSTRAIN'//trim(clyr)
545 call result_add( id, nitem, label, label_suffix, res%PSTRAIN )
549 if( fstrsolid%output_ctrl(3)%outinfo%on(23) )
then
550 id = hecmw_result_dtype_node
553 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(23), ndof )
554 label =
'NodalPrincipalSTRESSVector'//trim(cnum)//trim(clyr)
555 call result_add( id, nitem, label, label_suffix, res%PSTRESS_VECT(:,k) )
560 if( fstrsolid%output_ctrl(3)%outinfo%on(25) )
then
561 id = hecmw_result_dtype_node
564 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(25), ndof )
565 label =
'NodalPrincipalSTRAINVector'//trim(cnum)//trim(clyr)
566 call result_add( id, nitem, label, label_suffix, res%PSTRAIN_VECT(:,k) )
572 if( fstrsolid%output_ctrl(3)%outinfo%on(6) )
then
573 id = hecmw_result_dtype_elem
574 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(6), ndof )
575 label =
'ElementalSTRAIN'//trim(clyr)
576 call result_add( id, nitem, label, label_suffix, res%ESTRAIN )
580 if( fstrsolid%output_ctrl(3)%outinfo%on(7) )
then
581 id = hecmw_result_dtype_elem
582 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(7), ndof )
583 label =
'ElementalSTRESS'//trim(clyr)
584 call result_add( id, nitem, label, label_suffix, res%ESTRESS )
588 if( fstrsolid%output_ctrl(3)%outinfo%on(35) )
then
589 id = hecmw_result_dtype_elem
590 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(35), ndof )
591 label =
'ElementalNQM'//trim(clyr)
592 call result_add( id, nitem, label, label_suffix, res%ENQM )
596 if( fstrsolid%output_ctrl(3)%outinfo%on(8))
then
597 id = hecmw_result_dtype_elem
598 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(8), ndof )
599 label =
'ElementalMISES'//trim(clyr)
600 call result_add( id, nitem, label, label_suffix, res%EMISES )
604 if( fstrsolid%output_ctrl(3)%outinfo%on(20) )
then
605 id = hecmw_result_dtype_elem
606 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(20), ndof )
607 label =
'ElementalPrincipalSTRESS'//trim(clyr)
608 call result_add( id, nitem, label, label_suffix, res%EPSTRESS )
612 if( fstrsolid%output_ctrl(3)%outinfo%on(22) )
then
613 id = hecmw_result_dtype_elem
614 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(22), ndof )
615 label =
'ElementalPrincipalSTRAIN'//trim(clyr)
616 call result_add( id, nitem, label, label_suffix, res%EPSTRAIN )
620 if( fstrsolid%output_ctrl(3)%outinfo%on(24) )
then
621 id = hecmw_result_dtype_elem
624 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(24), ndof )
625 label =
'ElementalPrincipalSTRESSVector'//trim(cnum)//trim(clyr)
626 call result_add( id, nitem, label, label_suffix, res%EPSTRESS_VECT(:,k) )
631 if( fstrsolid%output_ctrl(3)%outinfo%on(26) )
then
632 id = hecmw_result_dtype_elem
635 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(26), ndof )
636 label =
'ElementalPrincipalSTRAINVector'//trim(cnum)//trim(clyr)
637 call result_add( id, nitem, label, label_suffix, res%EPSTRAIN_VECT(:,k) )
642 if( fstrsolid%output_ctrl(3)%outinfo%on(43) )
then
643 id = hecmw_result_dtype_elem
644 nitem =
n_comp_valtype( fstrsolid%output_ctrl(3)%outinfo%vtype(43), ndof )
645 label =
'ElementalPLSTRAIN'//trim(clyr)
646 call result_add( id, nitem, label, label_suffix, res%EPLSTRAIN )
655 subroutine fstr_make_result( hecMESH, fstrSOLID, fstrRESULT, istep, time, fstrDYNAMIC, label_suffix )
660 character(len=*),
intent(in),
optional :: label_suffix
663 type(hecmwst_result_data) :: fstrresult
664 integer(kind=kint) :: istep
665 real(kind=
kreal) :: time, coords(3,3)
667 integer(kind=kint) :: n_lyr, ntot_lyr, it, coef33, is_33shell, is_33beam
668 integer(kind=kint) :: i, j, k, ndof, mdof, gcomp, gitem, ncomp, nitem, iitem, ecomp, eitem, jitem, nn, mm
669 integer(kind=kint) :: idx
670 real(kind=
kreal),
pointer :: tnstrain(:), testrain(:)
671 real(kind=
kreal),
allocatable ::unode(:)
672 character(len=12) :: cnum
673 character(len=16),
allocatable :: clyr(:)
674 logical :: is_dynamic
676 is_dynamic =
present(fstrdynamic)
678 tnstrain => fstrsolid%TNSTRAIN
679 testrain => fstrsolid%TESTRAIN
681 ntot_lyr = fstrsolid%max_lyr
682 is_33shell = fstrsolid%is_33shell
683 is_33beam = fstrsolid%is_33beam
686 if( hecmesh%n_elem>hecmesh%n_node ) mm = hecmesh%n_elem
688 if( is_dynamic )
then
690 if( fstrdynamic%idx_eqa==1 .and. istep>0 ) idx = 2
694 if( ndof==2 ) mdof = 3
695 if( ndof==3 ) mdof = 6
696 if( ndof==4 ) mdof = 6
697 if( ndof==6 ) mdof = 6
699 if(is_33shell == 1 .and. fstrsolid%output_ctrl(4)%outinfo%on(27) )
then
700 coef33 = 1 + 2*ntot_lyr
705 call hecmw_nullify_result_data( fstrresult )
718 if( fstrsolid%output_ctrl(4)%outinfo%on(1) )
then
721 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(1), 3 )
723 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(1), 1 )
724 else if(ndof == 6)
then
726 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(1), 3 )
729 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(1), ndof )
733 if( is_dynamic .and. fstrsolid%output_ctrl(4)%outinfo%on(15) )
then
735 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(15), ndof )
738 if( is_dynamic .and. fstrsolid%output_ctrl(4)%outinfo%on(16) )
then
740 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(16), ndof )
743 if( fstrsolid%output_ctrl(4)%outinfo%on(17) .and.
associated(fstrsolid%temperature) )
then
745 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(17), ndof )
748 if( fstrsolid%output_ctrl(4)%outinfo%on(18) )
then
751 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(18), 3 )
753 if( is_33shell == 1 )
then
755 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(18), ndof )
760 if( fstrsolid%output_ctrl(4)%outinfo%on(2) )
then
762 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(2), ndof )
765 if( fstrsolid%output_ctrl(4)%outinfo%on(3) )
then
766 ncomp = ncomp + 1*coef33
767 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(3), ndof )*coef33
770 if( fstrsolid%output_ctrl(4)%outinfo%on(4) )
then
771 ncomp = ncomp + 1*coef33
772 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(4), ndof )*coef33
775 if( fstrsolid%output_ctrl(4)%outinfo%on(5) )
then
776 ncomp = ncomp + 1*coef33
777 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(5), ndof )*coef33
780 if( fstrsolid%output_ctrl(4)%outinfo%on(19) )
then
781 ncomp = ncomp + 1*coef33
782 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(19), ndof )*coef33
785 if( fstrsolid%output_ctrl(4)%outinfo%on(21) )
then
786 ncomp = ncomp + 1*coef33
787 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(21), ndof )*coef33
790 if( fstrsolid%output_ctrl(4)%outinfo%on(23) )
then
791 ncomp = ncomp + 3*coef33
792 nitem = nitem + 3*n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(23), ndof )*coef33
795 if( fstrsolid%output_ctrl(4)%outinfo%on(25) )
then
796 ncomp = ncomp + 3*coef33
797 nitem = nitem + 3*n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(25), ndof )*coef33
800 if( fstrsolid%output_ctrl(4)%outinfo%on(12) .and.
associated(tnstrain) )
then
802 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(12), ndof )
805 if( fstrsolid%output_ctrl(4)%outinfo%on(30) .and.
associated(fstrsolid%CONT_NFORCE) )
then
807 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(30), ndof )
810 if( fstrsolid%output_ctrl(4)%outinfo%on(31) .and.
associated(fstrsolid%CONT_FRIC) )
then
812 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(31), ndof )
815 if( fstrsolid%output_ctrl(4)%outinfo%on(32) .and.
associated(fstrsolid%CONT_RELVEL) )
then
817 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(32), ndof )
820 if( fstrsolid%output_ctrl(4)%outinfo%on(33) .and.
associated(fstrsolid%CONT_STATE) )
then
822 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(33), ndof )
825 if( fstrsolid%output_ctrl(4)%outinfo%on(36) .and.
associated(fstrsolid%CONT_NTRAC) )
then
827 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(36), ndof )
830 if( fstrsolid%output_ctrl(4)%outinfo%on(37) .and.
associated(fstrsolid%CONT_FTRAC) )
then
832 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(37), ndof )
835 if( fstrsolid%output_ctrl(4)%outinfo%on(38) )
then
837 nitem = nitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(38), ndof )
846 if( fstrsolid%output_ctrl(4)%outinfo%on(6) )
then
848 eitem = eitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(6), ndof )
851 if( fstrsolid%output_ctrl(4)%outinfo%on(7) )
then
853 eitem = eitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(7), ndof )
856 if( fstrsolid%output_ctrl(4)%outinfo%on(8) )
then
858 eitem = eitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(8), ndof )
861 if( fstrsolid%output_ctrl(4)%outinfo%on(20) )
then
863 eitem = eitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(20), ndof )
866 if( fstrsolid%output_ctrl(4)%outinfo%on(22) )
then
868 eitem = eitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(22), ndof )
871 if( fstrsolid%output_ctrl(4)%outinfo%on(24) )
then
873 eitem = eitem + 3*n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(24), ndof )
876 if( fstrsolid%output_ctrl(4)%outinfo%on(26) )
then
878 eitem = eitem + 3*n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(26), ndof )
881 if( fstrsolid%output_ctrl(4)%outinfo%on(43) )
then
883 eitem = eitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(43), ndof )
886 if( fstrsolid%output_ctrl(4)%outinfo%on(34) )
then
888 eitem = eitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(34), ndof )
891 if( fstrsolid%output_ctrl(4)%outinfo%on(42) )
then
892 ecomp = ecomp + 3*coef33
893 eitem = eitem + 3*n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(42), ndof )*coef33
896 if( fstrsolid%output_ctrl(4)%outinfo%on(39) )
then
898 eitem = eitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(39), ndof )
901 if( fstrsolid%output_ctrl(4)%outinfo%on(40) )
then
903 eitem = eitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(40), ndof )
906 if( fstrsolid%output_ctrl(4)%outinfo%on(44) )
then
908 eitem = eitem + n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(44), ndof )
912 fstrresult%ng_component = gcomp
913 fstrresult%nn_component = ncomp
914 fstrresult%ne_component = ecomp
915 allocate( fstrresult%ng_dof(gcomp) )
916 allocate( fstrresult%global_label(gcomp) )
917 allocate( fstrresult%global_val_item(gitem) )
918 allocate( fstrresult%nn_dof(ncomp) )
919 allocate( fstrresult%node_label(ncomp) )
920 allocate( fstrresult%node_val_item(nitem*hecmesh%n_node) )
921 allocate( fstrresult%ne_dof(ecomp) )
922 allocate( fstrresult%elem_label(ecomp) )
923 allocate( fstrresult%elem_val_item(eitem*hecmesh%n_elem) )
930 fstrresult%ng_dof(1) = 1
931 fstrresult%global_label(1) =
"TOTALTIME"
932 fstrresult%global_val_item(1) = time
935 if (fstrsolid%output_ctrl(4)%outinfo%on(1) )
then
939 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(1), 3 )
940 fstrresult%nn_dof(ncomp) = nn
941 fstrresult%node_label(ncomp) =
'VELOCITY'
942 do i = 1, hecmesh%n_node
944 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrdynamic%DISP(4*(i-1)+j,idx)
950 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(1), 1 )
951 fstrresult%nn_dof(ncomp) = nn
952 fstrresult%node_label(ncomp) =
'PRESSURE'
953 do i = 1, hecmesh%n_node
954 fstrresult%node_val_item(nitem*(i-1)+1+iitem) = fstrdynamic%DISP(4*i,idx)
957 else if(ndof == 6)
then
959 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(1), 3 )
960 fstrresult%nn_dof(ncomp) = nn
961 fstrresult%node_label(ncomp) =
'DISPLACEMENT'
962 allocate( unode(3*hecmesh%n_node) )
964 if( is_dynamic )
then
965 do i=1, hecmesh%n_node
966 unode((i-1)*3+1:(i-1)*3+3) = fstrdynamic%DISP((i-1)*ndof+1:(i-1)*ndof+3, idx)
969 do i=1, hecmesh%n_node
970 unode((i-1)*3+1:(i-1)*3+3) = fstrsolid%unode((i-1)*ndof+1:(i-1)*ndof+3)
973 do i = 1, hecmesh%n_node
975 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = unode(nn*(i-1)+j)
983 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(1), ndof )
984 fstrresult%nn_dof(ncomp) = nn
985 fstrresult%node_label(ncomp) =
'DISPLACEMENT'
986 allocate( unode(ndof*hecmesh%n_node) )
988 if( is_dynamic )
then
989 unode(:) = fstrdynamic%DISP(:,idx)
991 unode(:) = fstrsolid%unode(:)
993 if(is_33beam == 1)
then
996 if(is_33shell == 1)
then
999 do i = 1, hecmesh%n_node
1001 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = unode(nn*(i-1)+j)
1010 if( is_dynamic .and. fstrsolid%output_ctrl(4)%outinfo%on(15) )
then
1012 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(15), ndof )
1013 fstrresult%nn_dof(ncomp) = nn
1014 fstrresult%node_label(ncomp) =
'VELOCITY'
1015 do i = 1, hecmesh%n_node
1017 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrdynamic%VEL(nn*(i-1)+j,idx)
1024 if( is_dynamic .and. fstrsolid%output_ctrl(4)%outinfo%on(16) )
then
1026 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(16), ndof )
1027 fstrresult%nn_dof(ncomp) = nn
1028 fstrresult%node_label(ncomp) =
'ACCELERATION'
1029 do i = 1, hecmesh%n_node
1031 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrdynamic%ACC(nn*(i-1)+j,idx)
1038 if( fstrsolid%output_ctrl(4)%outinfo%on(17) .and.
associated(fstrsolid%temperature))
then
1040 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(17), ndof )
1041 fstrresult%nn_dof(ncomp) = nn
1042 fstrresult%node_label(ncomp) =
'TEMPERATURE'
1043 do i = 1, hecmesh%n_node
1045 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrsolid%temperature(nn*(i-1)+j)
1052 if( fstrsolid%output_ctrl(4)%outinfo%on(18) )
then
1056 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(1), 3 )
1057 fstrresult%nn_dof(ncomp) = nn
1058 fstrresult%node_label(ncomp) =
'ROTATION'
1059 allocate( unode(3*hecmesh%n_node) )
1061 if( is_dynamic )
then
1062 do i=1, hecmesh%n_node
1063 unode((i-1)*3+1:(i-1)*3+3) = fstrdynamic%DISP((i-1)*ndof+4:(i-1)*ndof+6, idx)
1066 do i=1, hecmesh%n_node
1067 unode((i-1)*3+1:(i-1)*3+3) = fstrsolid%unode((i-1)*ndof+4:(i-1)*ndof+6)
1070 do i = 1, hecmesh%n_node
1072 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = unode(nn*(i-1)+j)
1078 if ( is_33shell == 1)
then
1080 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(1), ndof )
1081 fstrresult%nn_dof(ncomp) = nn
1082 fstrresult%node_label(ncomp) =
'ROTATION'
1083 allocate( unode(ndof*hecmesh%n_node) )
1086 do i = 1, hecmesh%n_node
1088 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = unode(nn*(i-1)+j)
1098 if( fstrsolid%output_ctrl(4)%outinfo%on(2) )
then
1100 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(2), ndof )
1101 fstrresult%nn_dof(ncomp) = nn
1102 fstrresult%node_label(ncomp) =
'REACTION_FORCE'
1103 do i = 1, hecmesh%n_node
1105 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrsolid%REACTION(nn*(i-1)+j)
1111 if(is_33shell == 1 .or. ndof == 6)
then
1113 & fstrsolid%SHELL, nitem, iitem, ncomp, eitem, jitem, ecomp, 1,
" " )
1116 & fstrsolid%SOLID, nitem, iitem, ncomp, eitem, jitem, ecomp, 1,
" " )
1120 if(
associated(fstrsolid%SHELL) .and. fstrsolid%output_ctrl(4)%outinfo%on(27) .and. is_33shell == 1 )
then
1121 allocate(clyr(2*ntot_lyr))
1124 clyr(2*i-1)=
"_L"//trim(cnum)//
"+"
1125 clyr(2*i )=
"_L"//trim(cnum)//
"-"
1129 & fstrsolid%SHELL%LAYER(i)%PLUS, nitem, iitem, ncomp, eitem, jitem, ecomp, i+1, clyr(2*i-1) )
1131 & fstrsolid%SHELL%LAYER(i)%MINUS, nitem, iitem, ncomp, eitem, jitem, ecomp, i+1, clyr(2*i ) )
1137 if( fstrsolid%output_ctrl(4)%outinfo%on(12) .and.
associated(tnstrain) )
then
1139 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(12), ndof )
1140 fstrresult%nn_dof(ncomp) = nn
1141 fstrresult%node_label(ncomp) =
'THERMAL_NodalSTRAIN'
1142 do i = 1, hecmesh%n_node
1144 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = tnstrain(nn*(i-1)+j)
1151 if( fstrsolid%output_ctrl(4)%outinfo%on(30) .and.
associated(fstrsolid%CONT_NFORCE) )
then
1153 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(30), ndof )
1154 fstrresult%nn_dof(ncomp) = nn
1155 fstrresult%node_label(ncomp) =
'CONTACT_NFORCE'
1156 do i = 1, hecmesh%n_node
1158 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrsolid%CONT_NFORCE(nn*(i-1)+j)
1165 if( fstrsolid%output_ctrl(4)%outinfo%on(31) .and.
associated(fstrsolid%CONT_FRIC) )
then
1167 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(31), ndof )
1168 fstrresult%nn_dof(ncomp) = nn
1169 fstrresult%node_label(ncomp) =
'CONTACT_FRICTION'
1170 do i = 1, hecmesh%n_node
1172 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrsolid%CONT_FRIC(nn*(i-1)+j)
1179 if( fstrsolid%output_ctrl(4)%outinfo%on(32) .and.
associated(fstrsolid%CONT_RELVEL) )
then
1181 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(32), ndof )
1182 fstrresult%nn_dof(ncomp) = nn
1183 fstrresult%node_label(ncomp) =
'CONTACT_RELVEL'
1184 do i = 1, hecmesh%n_node
1186 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrsolid%CONT_RELVEL(nn*(i-1)+j)
1193 if( fstrsolid%output_ctrl(4)%outinfo%on(33) .and.
associated(fstrsolid%CONT_STATE) )
then
1195 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(33), ndof )
1196 fstrresult%nn_dof(ncomp) = nn
1197 fstrresult%node_label(ncomp) =
'CONTACT_STATE'
1198 do i = 1, hecmesh%n_node
1200 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrsolid%CONT_STATE(nn*(i-1)+j)
1207 if( fstrsolid%output_ctrl(4)%outinfo%on(36) .and.
associated(fstrsolid%CONT_NTRAC) )
then
1209 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(36), ndof )
1210 fstrresult%nn_dof(ncomp) = nn
1211 fstrresult%node_label(ncomp) =
'CONTACT_NTRACTION'
1212 do i = 1, hecmesh%n_node
1214 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrsolid%CONT_NTRAC(nn*(i-1)+j)
1221 if( fstrsolid%output_ctrl(4)%outinfo%on(37) .and.
associated(fstrsolid%CONT_FTRAC) )
then
1223 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(37), ndof )
1224 fstrresult%nn_dof(ncomp) = nn
1225 fstrresult%node_label(ncomp) =
'CONTACT_FTRACTION'
1226 do i = 1, hecmesh%n_node
1228 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = fstrsolid%CONT_FTRAC(nn*(i-1)+j)
1235 if( fstrsolid%output_ctrl(4)%outinfo%on(38) )
then
1237 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(38), ndof )
1238 fstrresult%nn_dof(ncomp) = nn
1239 fstrresult%node_label(ncomp) =
'NODE_ID'
1240 do i = 1, hecmesh%n_node
1241 fstrresult%node_val_item(nitem*(i-1)+1+iitem) = hecmesh%global_node_ID(i)
1260 if(fstrsolid%output_ctrl(4)%outinfo%on(34))
then
1262 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(34), ndof )
1263 fstrresult%ne_dof(ecomp) = nn
1264 fstrresult%elem_label(ecomp) =
'MATERIAL_ID'
1267 do i = 1, hecmesh%n_elem
1268 j = hecmesh%section_ID(i)
1269 if( j >= 1 .and. j <= hecmesh%section%n_sect )
then
1270 fstrresult%elem_val_item(eitem*(i-1)+1+jitem) = hecmesh%section%sect_mat_ID_item(j)
1272 fstrresult%elem_val_item(eitem*(i-1)+1+jitem) = 0.d0
1279 if(fstrsolid%output_ctrl(4)%outinfo%on(39))
then
1281 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(39), ndof )
1282 fstrresult%ne_dof(ecomp) = nn
1283 fstrresult%elem_label(ecomp) =
'ELEM_ID'
1284 do i = 1, hecmesh%n_elem
1285 fstrresult%elem_val_item(eitem*(i-1)+1+jitem) = hecmesh%global_elem_ID(i)
1291 if(fstrsolid%output_ctrl(4)%outinfo%on(40))
then
1293 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(40), ndof )
1294 fstrresult%ne_dof(ecomp) = nn
1295 fstrresult%elem_label(ecomp) =
'SECTION_ID'
1296 do i = 1, hecmesh%n_elem
1297 fstrresult%elem_val_item(eitem*(i-1)+1+jitem) = hecmesh%section_ID(i)
1303 if( fstrsolid%output_ctrl(4)%outinfo%on(44) )
then
1305 nn = n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(44), ndof )
1306 fstrresult%ne_dof(ecomp) = nn
1307 fstrresult%elem_label(ecomp) =
'ELEMACT'
1308 do i = 1, hecmesh%n_elem
1309 if( fstrsolid%elements(i)%elemact_flag /= kelact_inactive )
then
1310 fstrresult%elem_val_item(eitem*(i-1)+1+jitem) = 1.d0
1312 fstrresult%elem_val_item(eitem*(i-1)+1+jitem) = 0.d0
1318 if(
present(label_suffix) )
then
1319 do i = 1, fstrresult%nn_component
1320 fstrresult%node_label(i) = trim(fstrresult%node_label(i))//trim(label_suffix)
1322 do i = 1, fstrresult%ne_component
1323 fstrresult%elem_label(i) = trim(fstrresult%elem_label(i))//trim(label_suffix)
1340 type (hecmwst_result_data) :: fstrresult
1341 type (hecmwst_result_data) :: fstrresult_add
1343 type (hecmwst_result_data) :: res
1344 integer(kind=kint) :: i, j, gitem, nitem, eitem, nitem_a, eitem_a
1346 gitem = sum( fstrresult%ng_dof(1:fstrresult%ng_component) )
1347 nitem = sum( fstrresult%nn_dof(1:fstrresult%nn_component) )
1348 eitem = sum( fstrresult%ne_dof(1:fstrresult%ne_component) )
1349 nitem_a = sum( fstrresult_add%nn_dof(1:fstrresult_add%nn_component) )
1350 eitem_a = sum( fstrresult_add%ne_dof(1:fstrresult_add%ne_component) )
1352 call hecmw_nullify_result_data( res )
1353 res%ng_component = fstrresult%ng_component
1354 res%nn_component = fstrresult%nn_component + fstrresult_add%nn_component
1355 res%ne_component = fstrresult%ne_component + fstrresult_add%ne_component
1356 allocate( res%ng_dof(res%ng_component), res%global_label(res%ng_component) )
1357 allocate( res%nn_dof(res%nn_component), res%node_label(res%nn_component) )
1358 allocate( res%ne_dof(res%ne_component), res%elem_label(res%ne_component) )
1359 allocate( res%global_val_item(gitem) )
1360 allocate( res%node_val_item((nitem+nitem_a)*hecmesh%n_node) )
1361 allocate( res%elem_val_item((eitem+eitem_a)*hecmesh%n_elem) )
1363 res%ng_dof(1:res%ng_component) = fstrresult%ng_dof(1:res%ng_component)
1364 res%global_label(1:res%ng_component) = fstrresult%global_label(1:res%ng_component)
1365 res%global_val_item(1:gitem) = fstrresult%global_val_item(1:gitem)
1367 res%nn_dof(1:fstrresult%nn_component) = fstrresult%nn_dof(1:fstrresult%nn_component)
1368 res%nn_dof(fstrresult%nn_component+1:) = fstrresult_add%nn_dof(1:fstrresult_add%nn_component)
1369 res%node_label(1:fstrresult%nn_component) = fstrresult%node_label(1:fstrresult%nn_component)
1370 res%node_label(fstrresult%nn_component+1:) = fstrresult_add%node_label(1:fstrresult_add%nn_component)
1371 do i = 1, hecmesh%n_node
1373 res%node_val_item((nitem+nitem_a)*(i-1)+j) = fstrresult%node_val_item(nitem*(i-1)+j)
1376 res%node_val_item((nitem+nitem_a)*(i-1)+nitem+j) = fstrresult_add%node_val_item(nitem_a*(i-1)+j)
1380 res%ne_dof(1:fstrresult%ne_component) = fstrresult%ne_dof(1:fstrresult%ne_component)
1381 res%ne_dof(fstrresult%ne_component+1:) = fstrresult_add%ne_dof(1:fstrresult_add%ne_component)
1382 res%elem_label(1:fstrresult%ne_component) = fstrresult%elem_label(1:fstrresult%ne_component)
1383 res%elem_label(fstrresult%ne_component+1:) = fstrresult_add%elem_label(1:fstrresult_add%ne_component)
1384 do i = 1, hecmesh%n_elem
1386 res%elem_val_item((eitem+eitem_a)*(i-1)+j) = fstrresult%elem_val_item(eitem*(i-1)+j)
1389 res%elem_val_item((eitem+eitem_a)*(i-1)+eitem+j) = fstrresult_add%elem_val_item(eitem_a*(i-1)+j)
1393 call hecmw_result_free( fstrresult )
1398 & iitem, ncomp, eitem, jitem, ecomp, nlyr, clyr )
1406 type (hecmwST_local_mesh) :: hecMESH
1407 type (fstr_solid) :: fstrSOLID
1408 type (hecmwST_result_data):: fstrRESULT
1409 type (fstr_solid_physic_val) :: RES
1410 integer(kind=kint) :: istep, flag
1411 integer(kind=kint) :: n_lyr, cid
1413 character(len=HECMW_HEADER_LEN) :: header
1414 character(len=HECMW_NAME_LEN) :: s, label, nameID, addfname
1415 character(len=16) :: clyr
1416 character(len=12) :: cnum
1417 integer(kind=kint) :: i, j, k, ndof, mdof, id, nitem, eitem, nn, mm, ngauss, it
1418 integer(kind=kint) :: iitem, ncomp, jitem, ecomp, nlyr
1419 integer(kind=kint) :: isect, cdsys_ID, serr
1420 real(kind=
kreal) :: coords(3,3), coordsys(3, 3)
1421 ndof = hecmesh%n_dof
1424 if( fstrsolid%output_ctrl(4)%outinfo%on(3))
then
1425 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(3), ndof )
1427 fstrresult%nn_dof(ncomp) = nn
1428 fstrresult%node_label(ncomp) =
'NodalSTRAIN'//trim(clyr)
1429 do i = 1, hecmesh%n_node
1431 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = res%STRAIN(nn*(i-1)+j)
1438 if(fstrsolid%output_ctrl(4)%outinfo%on(4))
then
1440 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(4), ndof )
1441 fstrresult%nn_dof(ncomp) = nn
1442 fstrresult%node_label(ncomp) =
'NodalSTRESS'//trim(clyr)
1443 do i = 1, hecmesh%n_node
1445 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = res%STRESS((nn)*(i-1)+j)
1452 if(fstrsolid%output_ctrl(4)%outinfo%on(5))
then
1454 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(5), ndof )
1455 fstrresult%nn_dof(ncomp) = nn
1456 fstrresult%node_label(ncomp) =
'NodalMISES'//trim(clyr)
1457 do i = 1, hecmesh%n_node
1458 fstrresult%node_val_item(nitem*(i-1)+1+iitem) = res%MISES(i)
1464 if(fstrsolid%output_ctrl(4)%outinfo%on(19))
then
1466 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(19), ndof )
1467 fstrresult%nn_dof(ncomp) = nn
1468 fstrresult%node_label(ncomp) =
'NodalPrincipalSTRESS'//trim(clyr)
1469 do i = 1, hecmesh%n_node
1471 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = res%PSTRESS((nn)*(i-1)+j)
1478 if(fstrsolid%output_ctrl(4)%outinfo%on(23))
then
1480 write(cnum,
'(i0)') k
1482 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(23), ndof )
1483 fstrresult%nn_dof(ncomp) = nn
1484 fstrresult%node_label(ncomp) =
'NodalPrincipalSTRESSVector'//trim(cnum)//trim(clyr)
1485 do i = 1, hecmesh%n_node
1487 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = res%PSTRESS_VECT((nn)*(i-1)+j,k)
1495 if( fstrsolid%output_ctrl(4)%outinfo%on(21))
then
1496 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(21), ndof )
1498 fstrresult%nn_dof(ncomp) = nn
1499 fstrresult%node_label(ncomp) =
'NodalPrincipalSTRAIN'//trim(clyr)
1500 do i = 1, hecmesh%n_node
1502 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = res%PSTRAIN(nn*(i-1)+j)
1509 if( fstrsolid%output_ctrl(4)%outinfo%on(25))
then
1511 write(cnum,
'(i0)') k
1512 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(25), ndof )
1514 fstrresult%nn_dof(ncomp) = nn
1515 fstrresult%node_label(ncomp) =
'NodalPrincipalSTRAINVector'//trim(cnum)//trim(clyr)
1516 do i = 1, hecmesh%n_node
1518 fstrresult%node_val_item(nitem*(i-1)+j+iitem) = res%PSTRAIN_VECT(nn*(i-1)+j,k)
1526 if( fstrsolid%output_ctrl(4)%outinfo%on(6))
then
1527 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(6), ndof )
1529 fstrresult%ne_dof(ecomp) = nn
1530 fstrresult%elem_label(ecomp) =
'ElementalSTRAIN'
1531 do i = 1, hecmesh%n_elem
1533 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = res%ESTRAIN(nn*(i-1)+j)
1540 if(fstrsolid%output_ctrl(4)%outinfo%on(7))
then
1542 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(7), ndof )
1543 fstrresult%ne_dof(ecomp) = nn
1544 fstrresult%elem_label(ecomp) =
'ElementalSTRESS'
1545 do i = 1, hecmesh%n_elem
1547 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = res%ESTRESS((nn)*(i-1)+j)
1554 if(fstrsolid%output_ctrl(4)%outinfo%on(8))
then
1556 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(8), ndof )
1557 fstrresult%ne_dof(ecomp) = nn
1558 fstrresult%elem_label(ecomp) =
'ElementalMISES'
1559 do i = 1, hecmesh%n_elem
1560 fstrresult%elem_val_item(eitem*(i-1)+1+jitem) = res%EMISES(i)
1566 if(fstrsolid%output_ctrl(4)%outinfo%on(20))
then
1568 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(20), ndof )
1569 fstrresult%ne_dof(ecomp) = nn
1570 fstrresult%elem_label(ecomp) =
'ElementalPrincipalSTRESS'
1571 do i = 1, hecmesh%n_elem
1573 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = res%EPSTRESS((nn)*(i-1)+j)
1580 if(fstrsolid%output_ctrl(4)%outinfo%on(22))
then
1582 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(22), ndof )
1583 fstrresult%ne_dof(ecomp) = nn
1584 fstrresult%elem_label(ecomp) =
'ElementalPrincipalSTRAIN'
1585 do i = 1, hecmesh%n_elem
1587 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = res%EPSTRAIN((nn)*(i-1)+j)
1594 if(fstrsolid%output_ctrl(4)%outinfo%on(24))
then
1598 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(24), ndof )
1599 fstrresult%ne_dof(ecomp) = nn
1600 fstrresult%elem_label(ecomp) =
'ElementalPrincipalSTRESSVector'//trim(cnum)
1601 do i = 1, hecmesh%n_elem
1603 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = res%EPSTRESS_VECT((nn)*(i-1)+j,k)
1611 if(fstrsolid%output_ctrl(4)%outinfo%on(26))
then
1615 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(26), ndof )
1616 fstrresult%ne_dof(ecomp) = nn
1617 fstrresult%elem_label(ecomp) =
'ElementalPrincipalSTRAINVector'//trim(cnum)
1618 do i = 1, hecmesh%n_elem
1620 fstrresult%elem_val_item(eitem*(i-1)+j+jitem) = res%EPSTRAIN_VECT((nn)*(i-1)+j,k)
1628 if(fstrsolid%output_ctrl(4)%outinfo%on(43))
then
1630 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(43), ndof )
1631 fstrresult%ne_dof(ecomp) = nn
1632 fstrresult%elem_label(ecomp) =
'ElementalPLSTRAIN'
1633 do i = 1, hecmesh%n_elem
1634 res%EPLSTRAIN(i) = 0.d0
1635 do j = 1,
size(fstrsolid%elements(i)%gausses)
1636 res%EPLSTRAIN(i) = res%EPLSTRAIN(i) + fstrsolid%elements(i)%gausses(j)%plstrain
1638 res%EPLSTRAIN(i) = res%EPLSTRAIN(i) /
size(fstrsolid%elements(i)%gausses)
1639 fstrresult%elem_val_item(eitem*(i-1)+1+jitem) = res%EPLSTRAIN(i)
1645 if(fstrsolid%output_ctrl(4)%outinfo%on(42))
then
1649 nn =
n_comp_valtype( fstrsolid%output_ctrl(4)%outinfo%vtype(42), ndof )
1650 fstrresult%ne_dof(ecomp) = nn
1651 fstrresult%elem_label(ecomp) =
'ORIENTATION'//trim(cnum)
1655 do i = 1, hecmesh%n_elem
1656 isect = hecmesh%section_ID(i)
1657 if( isect >= 1 .and. isect <= hecmesh%section%n_sect )
then
1658 cdsys_id = hecmesh%section%sect_orien_ID(isect)
1662 if(cdsys_id == -1)
then
1663 coordsys(:,:) = 0.0d0
1665 call get_coordsys(cdsys_id, hecmesh, fstrsolid, coords, i)
1666 call set_localcoordsys( coords, g_localcoordsys(cdsys_id), coordsys(:, :), serr )
1670 fstrresult%elem_val_item(eitem*(i-1)+jitem+nn*(j-1)+k) = coordsys(j,k)
1674 jitem = jitem + 3*nn
1686 type (hecmwst_local_mesh) :: hecmesh
1687 integer(kind=kint) :: i, j, k, itype, is, ie, ic_type, js, icel
1688 integer(kind=kint) :: mm, n1, n2
1689 real(kind=kreal),
allocatable :: unode(:)
1691 do itype = 1, hecmesh%n_elem_type
1692 is = hecmesh%elem_type_index(itype-1) + 1
1693 ie = hecmesh%elem_type_index(itype )
1694 ic_type = hecmesh%elem_type_item(itype)
1695 if(ic_type == 781)
then
1697 js = hecmesh%elem_node_index(icel-1)
1699 n1 = hecmesh%elem_node_item(js+j )
1700 n2 = hecmesh%elem_node_item(js+j+4)
1701 unode(3*n2-2) = unode(3*n1-2)
1702 unode(3*n2-1) = unode(3*n1-1)
1703 unode(3*n2 ) = unode(3*n1 )
1706 elseif(ic_type == 761)
then
1708 js = hecmesh%elem_node_index(icel-1)
1710 n1 = hecmesh%elem_node_item(js+j )
1711 n2 = hecmesh%elem_node_item(js+j+3)
1712 unode(3*n2-2) = unode(3*n1-2)
1713 unode(3*n2-1) = unode(3*n1-1)
1714 unode(3*n2 ) = unode(3*n1 )
1729 type (hecmwst_local_mesh) :: hecmesh
1730 integer(kind=kint) :: i, j, k, itype, is, ie, ic_type, js, icel
1731 integer(kind=kint) :: mm, n1, n2
1732 real(kind=kreal),
allocatable :: unode(:)
1734 do itype = 1, hecmesh%n_elem_type
1735 is = hecmesh%elem_type_index(itype-1) + 1
1736 ie = hecmesh%elem_type_index(itype )
1737 ic_type = hecmesh%elem_type_item(itype)
1738 if(ic_type == 781)
then
1740 js = hecmesh%elem_node_index(icel-1)
1742 n1 = hecmesh%elem_node_item(js+j)
1743 n2 = hecmesh%elem_node_item(js+j+4)
1744 unode(3*n1-2) = fstrsolid%unode(3*n2-2)
1745 unode(3*n1-1) = fstrsolid%unode(3*n2-1)
1746 unode(3*n1 ) = fstrsolid%unode(3*n2 )
1747 unode(3*n2-2) = fstrsolid%unode(3*n2-2)
1748 unode(3*n2-1) = fstrsolid%unode(3*n2-1)
1749 unode(3*n2 ) = fstrsolid%unode(3*n2 )
1752 elseif(ic_type == 761)
then
1754 js = hecmesh%elem_node_index(icel-1)
1756 n1 = hecmesh%elem_node_item(js+j)
1757 n2 = hecmesh%elem_node_item(js+j+3)
1759 unode(3*n1-2) = fstrsolid%unode(3*n2-2)
1760 unode(3*n1-1) = fstrsolid%unode(3*n2-1)
1761 unode(3*n1 ) = fstrsolid%unode(3*n2 )
1762 unode(3*n2-2) = fstrsolid%unode(3*n2-2)
1763 unode(3*n2-1) = fstrsolid%unode(3*n2-1)
1764 unode(3*n2 ) = fstrsolid%unode(3*n2 )
1779 type (hecmwst_local_mesh) :: hecmesh
1780 integer(kind=kint) :: i, j, k, itype, is, ie, ic_type, js, icel
1781 integer(kind=kint) :: mm, a, b
1782 real(kind=kreal),
allocatable :: unode(:)
1784 do itype = 1, hecmesh%n_elem_type
1785 is = hecmesh%elem_type_index(itype-1) + 1
1786 ie = hecmesh%elem_type_index(itype )
1787 ic_type = hecmesh%elem_type_item(itype)
1788 if(ic_type == 641)
then
1790 js = hecmesh%elem_node_index(icel-1)
1792 a = hecmesh%elem_node_item(js+j)
1793 b = hecmesh%elem_node_item(js+j+2)
1794 unode(3*b-2) = unode(3*a-2)
1795 unode(3*b-1) = unode(3*a-1)
1796 unode(3*b ) = unode(3*a )
1810 type (
fstr_solid),
intent(inout) :: fstrsolid
1811 integer(kind=kint),
intent(in) :: phase
1812 real(kind=
kreal),
optional,
intent(in) :: dtime
1813 logical,
optional,
intent(in) :: expflag
1815 integer(kind=kint),
parameter :: nval = 10
1816 logical,
save :: updated(nval) = .false.
1817 integer(kind=kint) :: ndof, i
1818 real(kind=
kreal) :: area, dt_use
1820 ndof = hecmesh%n_dof
1822 if( phase == -1 )
then
1823 updated(1:nval) = .false.
1826 if( phase /= 3 .and. phase /= 4 )
return
1830 if(
present(dtime) .and. dtime > 0.d0 )
then
1835 if( .not. updated(3) .and. .not. updated(4) )
then
1840 if( fstrsolid%output_ctrl(phase)%outinfo%on(30) .and.
associated(fstrsolid%CONT_NFORCE) )
then
1841 if( .not. updated(1) )
then
1846 if(
present(expflag) .and. expflag )
then
1850 call fstr_setup_parancon_contactvalue(hecmesh,ndof,fstrsolid%CONT_NFORCE,1)
1857 if( fstrsolid%output_ctrl(phase)%outinfo%on(31) .and.
associated(fstrsolid%CONT_FRIC) )
then
1859 call fstr_setup_parancon_contactvalue(hecmesh,ndof,fstrsolid%CONT_FRIC,1)
1865 if( fstrsolid%output_ctrl(phase)%outinfo%on(32) .and.
associated(fstrsolid%CONT_RELVEL) )
then
1867 call fstr_setup_parancon_contactvalue(hecmesh,ndof,fstrsolid%CONT_RELVEL,1)
1873 if( fstrsolid%output_ctrl(phase)%outinfo%on(33) .and.
associated(fstrsolid%CONT_STATE) )
then
1875 call fstr_setup_parancon_contactvalue(hecmesh,1,fstrsolid%CONT_STATE,2)
1881 if( fstrsolid%output_ctrl(phase)%outinfo%on(36) .or. fstrsolid%output_ctrl(phase)%outinfo%on(37) )
then
1882 if( .not. updated(5))
call calc_contact_area( hecmesh, fstrsolid, 0 )
1888 if( fstrsolid%output_ctrl(phase)%outinfo%on(36) .and.
associated(fstrsolid%CONT_NTRAC) )
then
1890 if( .not. updated(1))
call fstr_setup_parancon_contactvalue(hecmesh,ndof,fstrsolid%CONT_NFORCE,1)
1892 fstrsolid%CONT_NTRAC(:) = 0.d0
1893 do i=1,hecmesh%nn_internal
1894 area = fstrsolid%CONT_AREA(i)
1895 if( area < 1.d-16 ) cycle
1896 fstrsolid%CONT_NTRAC(3*i-2:3*i) = fstrsolid%CONT_NFORCE(3*i-2:3*i)/area
1902 if( fstrsolid%output_ctrl(phase)%outinfo%on(37) .and.
associated(fstrsolid%CONT_FTRAC) )
then
1904 if( .not. updated(1))
call fstr_setup_parancon_contactvalue(hecmesh,ndof,fstrsolid%CONT_FRIC,1)
1906 fstrsolid%CONT_FTRAC(:) = 0.d0
1907 do i=1,hecmesh%nn_internal
1908 area = fstrsolid%CONT_AREA(i)
1909 if( area < 1.d-16 ) cycle
1910 fstrsolid%CONT_FTRAC(3*i-2:3*i) = fstrsolid%CONT_FRIC(3*i-2:3*i)/area
integer(kind=4), parameter kreal
This module defines common data and basic structures for analysis.
subroutine get_coordsys(cdsys_ID, hecMESH, fstrSOLID, coords, icel)
This subroutine fetch coords defined by local coordinate system.
logical paracontactflag
PARALLEL CONTACT FLAG.
This module provide a function to prepare output of static analysis.
subroutine, public fstr_merge_result(hecMESH, fstrRESULT, fstrRESULT_add)
MERGE the node and the element components of two result data into one, so that plural sets of the sam...
subroutine fstr_write_result_main(hecMESH, fstrSOLID, RES, clyr, label_suffix)
subroutine, public fstr_reorder_node_shell(fstrSOLID, hecMESH, unode)
subroutine result_add(dtype, n_dof, label, label_suffix, data)
subroutine, public fstr_reorder_node_beam(fstrSOLID, hecMESH, unode)
subroutine fstr_make_result_main(hecMESH, fstrSOLID, fstrRESULT, RES, nitem, iitem, ncomp, eitem, jitem, ecomp, nlyr, clyr)
subroutine, public fstr_write_result_add(hecMESH, fstrSOLID, istep, label_suffix, fstrDYNAMIC)
ADD result items of static and dynamic analysis to the result file being written. label_suffix is app...
subroutine, public setup_contact_output_variables(hecMESH, fstrSOLID, phase, dtime, expflag)
subroutine, public fstr_reorder_rot_shell(fstrSOLID, hecMESH, unode)
subroutine, public fstr_write_result(hecMESH, fstrSOLID, fstrPARAM, istep, time, flag, fstrDYNAMIC)
OUTPUT result file for static and dynamic analysis.
subroutine, public fstr_make_result(hecMESH, fstrSOLID, fstrRESULT, istep, time, fstrDYNAMIC, label_suffix)
MAKE RESULT for static and dynamic analysis (WITHOUT ELEMENTAL RESULTS) -----------------------------...
This module manages step information.
integer function n_comp_valtype(vtype, ndim)
This modules just summarizes all modules used in static analysis.
This module summarizes all information of material properties.
Data for DYNAMIC ANSLYSIS (fstrDYNAMIC)
FSTR INNER CONTROL PARAMETERS (fstrPARAM)