FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
m_fstr.f90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
2 ! Copyright (c) 2019 FrontISTR Commons
3 ! This software is released under the MIT License, see LICENSE.txt
4 !-------------------------------------------------------------------------------
5 ! If new header is supported, change according to following method. !
6 ! 1) Increase FSTR_CTRL_HEADER_NUMBER !
7 ! 2) Add new header name to fstr_ctrl_header_names !
8 ! 3) Describe new function to get parameters from control file !
9 ! in fstr_ctrl.f90 !
10 ! 4) Describe new subroutine to set values of the parameter !
11 ! in fstr_setup.f90 !
12 ! 5) If initial values are necessary, set the value !
13 ! in subroutine fstr_setup_init in fstr_setup.f90 !
15 module m_fstr
16  use hecmw
17  use m_common_struct
18  use m_step
19  use m_out
20  use m_timepoint
21  use mmechgauss
22  use mcontactdef
23 
24  implicit none
25 
26  public
27 
30  integer(kind=kint), parameter :: kyes = 1
31  integer(kind=kint), parameter :: kno = 0
32  integer(kind=kint), parameter :: kon = 1
33  integer(kind=kint), parameter :: koff = 0
34 
36  integer(kind=kint), parameter :: kstprecheck = 0
37  integer(kind=kint), parameter :: kststatic = 1
38  integer(kind=kint), parameter :: ksteigen = 2
39  integer(kind=kint), parameter :: kstheat = 3
40  integer(kind=kint), parameter :: kstdynamic = 4
41  !integer(kind=kint), parameter :: kstNLSTATIC = 5
42  integer(kind=kint), parameter :: kststaticeigen = 6
43  integer(kind=kint), parameter :: kstnzprof = 7
44 
46  integer(kind=kint), parameter :: ksmcg = 1
47  integer(kind=kint), parameter :: ksmbicgstab = 2
48  integer(kind=kint), parameter :: ksmgmres = 3
49  integer(kind=kint), parameter :: ksmgpbicg = 4
50  integer(kind=kint), parameter :: ksmgmresr = 5
51  integer(kind=kint), parameter :: ksmgmresren = 6
52  integer(kind=kint), parameter :: ksmdirect = 101
53 
55  integer(kind=kint), parameter :: knsmnewton = 1
56  integer(kind=kint), parameter :: knsmquasinewton = 2
57 
59  integer(kind=kint), parameter :: kcaslagrange = 1
60  integer(kind=kint), parameter :: kcaalagrange = 2
61 
63  integer(kind=kint), parameter :: kbcffstr = 0 ! BC described in fstr control file (default)
64  integer(kind=kint), parameter :: kbcfnastran = 1 ! nastran file
65 
66  integer(kind=kint), parameter :: kbcinitial = 1
67  integer(kind=kint), parameter :: kbctransit = 2
68 
70  integer(kind=kint), parameter :: restart_outlast = 1
71  integer(kind=kint), parameter :: restart_outall = 2
72 
74  integer(kind=kint), parameter :: kel341fi = 1
75  integer(kind=kint), parameter :: kel341sesns = 2
76 
77  integer(kind=kint), parameter :: kel361fi = 1
78  integer(kind=kint), parameter :: kel361bbar = 2
79  integer(kind=kint), parameter :: kel361ic = 3
80  integer(kind=kint), parameter :: kel361fbar = 4
81 
82  integer(kind=kint), parameter :: kfloadtype_node = 1
83  integer(kind=kint), parameter :: kfloadtype_surf = 2
84 
85  integer(kind=kint), parameter :: kfloadcase_re = 1
86  integer(kind=kint), parameter :: kfloadcase_im = 2
87 
89  integer(kind=kint), parameter :: kitrcontinue = 0
90  integer(kind=kint), parameter :: kitrconverged = 1
91  integer(kind=kint), parameter :: kitrdiverged = 2
92  integer(kind=kint), parameter :: kitrfloatingerror = 3
93 
94 
96  integer(kind = kint) :: myrank
97  integer(kind = kint) :: nprocs
98 
100  logical :: paracontactflag = .false.
101 
103  character(len=HECMW_FILENAME_LEN) :: cntfilname
104  character(len=HECMW_FILENAME_LEN) :: restartfilname
105 
107  integer(kind=kint), parameter :: ilog = 16 ! log
108  integer(kind=kint), parameter :: ista = 17 ! status
109  integer(kind=kint), parameter :: iutb = 18 ! utable
110  integer(kind=kint), parameter :: imsg = 51 ! message (myrank == 0 only)
111  integer(kind=kint), parameter :: idbg = 52 ! debug
112  integer(kind=kint), parameter :: ifvs = 53 ! visual.ini file
113  integer(kind=kint), parameter :: ineu = 54 ! neutral file (heat)
114  integer(kind=kint), parameter :: iresout = 100 ! ~110, keeping for result output file
115 
117  integer(kind=kint) :: sviarray(100)
118  real(kind=kreal) :: svrarray(100)
119 
121  integer(kind=kint), pointer :: iecho
122  integer(kind=kint), pointer :: iresult
123  integer(kind=kint), pointer :: ivisual
124  integer(kind=kint), pointer :: ineutral ! flag for femap neutral file
125  integer(kind=kint), pointer :: irres ! flag for restart, read
126  integer(kind=kint), pointer :: iwres ! flag for restart, write
127  integer(kind=kint), pointer :: nrres ! position of restart read
128  integer(kind=kint), pointer :: nprint ! interval of write
129 
130  integer(kind=kint), parameter :: kopss_solution = 1
131  integer(kind=kint), parameter :: kopss_material = 2
132  integer(kind=kint) :: opsstype = kopss_solution ! output stress/strain type
133 
134 
136  real(kind=kreal), pointer :: ref_temp
137 
139  real(kind=kreal) :: dt ! /=fstr_param%dtime
140  real(kind=kreal) :: etime ! /=fstr_param%etime
141  integer(kind=kint) :: itmax
142  real(kind=kreal) :: eps ! /=fstr_param%eps
143 
145  character(len=HECMW_FILENAME_LEN) :: cond_name
146  integer :: node_elem
147  integer :: grpid
148  integer, pointer :: intval(:) => null()
149  real(kind=kreal), pointer :: realval(:) => null()
150  end type
151  type( tinitialcondition ), pointer, save :: g_initialcnd(:) => null()
152 
155  integer(kind=kint) :: solution_type
156  integer(kind=kint) :: solver_method
157  integer(kind=kint) :: nlsolver_method
158  logical :: nlgeom
159 
161  integer(kind=kint) :: analysis_n
162  real(kind=kreal), pointer :: dtime(:)
163  real(kind=kreal), pointer :: etime(:)
164  real(kind=kreal), pointer :: dtmin(:)
165  real(kind=kreal), pointer :: delmax(:)
166  integer(kind=kint), pointer:: itmax(:)
167  real(kind=kreal), pointer :: eps(:)
168  real(kind=kreal) :: ref_temp
169  integer(kind=kint) :: timepoint_id
170 
172  integer(kind=kint) :: fg_echo
173  integer(kind=kint) :: fg_result
174  integer(kind=kint) :: fg_visual
175 
177  integer(kind=kint) :: fg_neutral
178  integer(kind=kint) :: fg_irres
179  integer(kind=kint) :: fg_iwres
180  integer(kind=kint) :: nrres
181  integer(kind=kint) :: nprint
182 
184  integer(kind=kint) :: n_node
185  integer(kind=kint) :: nn_internal
186  integer(kind=kint), pointer :: global_local_id(:,:)
187 
189  integer( kind=kint ) :: fg_couple
190  integer( kind=kint ) :: fg_couple_type
191  integer( kind=kint ) :: fg_couple_first
192  integer( kind=kint ) :: fg_couple_window
193 
195  integer( kind=kint ) :: restart_out_type
196  integer( kind=kint ) :: restart_version
197 
199  integer( kind=kint ) :: contact_algo
200  type(tcontactparam), pointer :: contactparam(:)
201 
203  type(tparamautoinc), pointer :: ainc(:)
204  type(time_points), pointer :: timepoints(:)
205  end type fstr_param
206 
208  type( fstr_param ),target :: fstrpr
209 
212  real(kind=kreal), pointer :: stress(:) => null()
213  real(kind=kreal), pointer :: strain(:) => null()
214  real(kind=kreal), pointer :: mises(:) => null()
215 
216  real(kind=kreal), pointer :: pstress(:) => null()
217  real(kind=kreal), pointer :: pstrain(:) => null()
218  real(kind=kreal), pointer :: pstress_vect(:,:) => null()
219  real(kind=kreal), pointer :: pstrain_vect(:,:) => null()
220 
221  real(kind=kreal), pointer :: estress(:) => null()
222  real(kind=kreal), pointer :: estrain(:) => null()
223  real(kind=kreal), pointer :: emises(:) => null()
224  real(kind=kreal), pointer :: eplstrain(:) => null()
225 
226  real(kind=kreal), pointer :: epstress(:) => null()
227  real(kind=kreal), pointer :: epstrain(:) => null()
228  real(kind=kreal), pointer :: epstress_vect(:,:) => null()
229  real(kind=kreal), pointer :: epstrain_vect(:,:) => null()
230  real(kind=kreal), pointer :: enqm(:) => null()
231 
232 
233  type(fstr_solid_physic_val), pointer :: layer(:) => null()
234  type(fstr_solid_physic_val), pointer :: plus => null()
235  type(fstr_solid_physic_val), pointer :: minus => null()
236  end type fstr_solid_physic_val
237 
239  integer(kind=kint) :: file_type ! kbcfFSTR or kbcfNASTRAN
240  integer(kind=kint) :: statictype ! 1:Total, 2:Updated, 3:Infinitesimal
241  integer(kind=kint) :: nstep_tot
242 
243  type(step_info), pointer :: step_ctrl(:) =>null()
244  type(t_output_ctrl), pointer :: output_ctrl(:)=>null()
245 
247  integer(kind=kint) :: boundary_ngrp_tot
248  integer(kind=kint), pointer :: boundary_ngrp_grpid (:) =>null()
249  integer(kind=kint), pointer :: boundary_ngrp_id (:) =>null()
250  integer(kind=kint), pointer :: boundary_ngrp_type (:) =>null()
251  integer(kind=kint), pointer :: boundary_ngrp_amp (:) =>null()
252  real(kind=kreal), pointer :: boundary_ngrp_val(:) =>null()
253  integer(kind=kint), pointer :: boundary_ngrp_istot (:) =>null()
254  integer(kind=kint) :: boundary_ngrp_rot
255  integer(kind=kint), pointer :: boundary_ngrp_rotid (:) =>null()
256  integer(kind=kint), pointer :: boundary_ngrp_centerid (:) =>null()
257 
259  integer(kind=kint) :: velocity_type
260  integer(kind=kint) :: velocity_ngrp_tot
261  integer(kind=kint), pointer :: velocity_ngrp_grpid (:) =>null()
262  integer(kind=kint), pointer :: velocity_ngrp_id (:) =>null()
263  integer(kind=kint), pointer :: velocity_ngrp_type (:) =>null()
264  integer(kind=kint), pointer :: velocity_ngrp_amp (:) =>null()
265  real(kind=kreal), pointer :: velocity_ngrp_val(:) =>null()
266 
268  integer(kind=kint) :: acceleration_type
269  integer(kind=kint) :: acceleration_ngrp_tot
270  integer(kind=kint), pointer :: acceleration_ngrp_grpid (:) =>null()
271  integer(kind=kint), pointer :: acceleration_ngrp_id (:) =>null()
272  integer(kind=kint), pointer :: acceleration_ngrp_type (:) =>null()
273  integer(kind=kint), pointer :: acceleration_ngrp_amp (:) =>null()
274  real(kind=kreal), pointer :: acceleration_ngrp_val(:) =>null()
275 
277  integer(kind=kint) :: cload_ngrp_tot
278  integer(kind=kint), pointer :: cload_ngrp_grpid (:) =>null()
279  integer(kind=kint), pointer :: cload_ngrp_id (:)
280  integer(kind=kint), pointer :: cload_ngrp_dof (:)
281  integer(kind=kint), pointer :: cload_ngrp_amp (:)
282  real(kind=kreal), pointer :: cload_ngrp_val(:)
283  integer(kind=kint) :: cload_ngrp_rot
284  integer(kind=kint), pointer :: cload_ngrp_rotid (:) =>null()
285  integer(kind=kint), pointer :: cload_ngrp_centerid (:) =>null()
286 
288  integer(kind=kint) :: dload_ngrp_tot
289  integer(kind=kint) :: dload_follow
290  integer(kind=kint), pointer :: dload_ngrp_grpid (:) =>null()
291  integer(kind=kint), pointer :: dload_ngrp_id (:)
292  integer(kind=kint), pointer :: dload_ngrp_lid (:)
293  integer(kind=kint), pointer :: dload_ngrp_amp (:)
294  real(kind=kreal), pointer :: dload_ngrp_params(:,:)
295 
297  integer(kind=kint) :: temp_ngrp_tot
298  integer(kind=kint) :: temp_irres
299  integer(kind=kint) :: temp_tstep
300  integer(kind=kint) :: temp_interval
301  integer(kind=kint) :: temp_rtype ! type of reading result; 1: step-based; 2: time-based
302  real(kind=kreal) :: temp_factor
303  integer(kind=kint), pointer :: temp_ngrp_grpid (:) =>null()
304  integer(kind=kint), pointer :: temp_ngrp_id (:)
305  real(kind=kreal), pointer :: temp_ngrp_val(:)
306 
308  integer(kind=kint) :: spring_ngrp_tot
309  integer(kind=kint), pointer :: spring_ngrp_grpid (:) =>null()
310  integer(kind=kint), pointer :: spring_ngrp_id (:)
311  integer(kind=kint), pointer :: spring_ngrp_dof (:)
312  integer(kind=kint), pointer :: spring_ngrp_amp (:)
313  real(kind=kreal), pointer :: spring_ngrp_val(:)
314 
316  integer( kind=kint ) :: couple_ngrp_tot
317  integer( kind=kint ),pointer :: couple_ngrp_id(:)
318 
320  integer(kind=kint) :: maxn_gauss
321 
322  real(kind=kreal), pointer :: stress(:)
323  real(kind=kreal), pointer :: strain(:)
324  real(kind=kreal), pointer :: mises(:)
325 
326  real(kind=kreal), pointer :: pstress(:)
327  real(kind=kreal), pointer :: pstrain(:)
328  real(kind=kreal), pointer :: pstress_vect(:,:)
329  real(kind=kreal), pointer :: pstrain_vect(:,:)
330 
331  real(kind=kreal), pointer :: estress(:)
332  real(kind=kreal), pointer :: estrain(:)
333  real(kind=kreal), pointer :: emises(:)
334 
335  real(kind=kreal), pointer :: epstress(:)
336  real(kind=kreal), pointer :: epstrain(:)
337  real(kind=kreal), pointer :: epstress_vect(:,:)
338  real(kind=kreal), pointer :: epstrain_vect(:,:)
339 
340  real(kind=kreal), pointer :: tnstrain(:)
341  real(kind=kreal), pointer :: testrain(:)
342 
343  real(kind=kreal), pointer :: yield_ratio(:)
344 
345  real(kind=kreal), pointer :: enqm(:)
346  real(kind=kreal), pointer :: reaction(:)
347 
348  real(kind=kreal), pointer :: cont_nforce(:)
349  real(kind=kreal), pointer :: cont_fric(:)
350  real(kind=kreal), pointer :: cont_relvel(:)
351  real(kind=kreal), pointer :: cont_state(:)
352  integer(kind=kint), pointer :: cont_sgrp_id(:)
353  real(kind=kreal), pointer :: cont_area(:)
354  real(kind=kreal), pointer :: cont_ntrac(:)
355  real(kind=kreal), pointer :: cont_ftrac(:)
356  real(kind=kreal), pointer :: embed_nforce(:)
357 
358  type(fstr_solid_physic_val), pointer :: solid=>null()
359  type(fstr_solid_physic_val), pointer :: shell=>null()
360  type(fstr_solid_physic_val), pointer :: beam =>null()
361 
363  integer(kind=kint) :: restart_nout
366  integer(kind=kint) :: restart_nin
367  type(step_info) :: step_ctrl_restart
368 
369  integer(kind=kint) :: max_lyr
370  integer(kind=kint) :: is_33shell
371  integer(kind=kint) :: is_33beam
372  integer(kind=kint) :: is_heat
373  integer(kind=kint) :: max_ncon_stf
374  integer(kind=kint) :: max_ncon
375  integer(kind=kint), pointer :: is_rot(:) => null()
376  integer(kind=kint) :: elemopt361
377  logical :: is_smoothing_active
378  real(kind=kreal) :: factor(2)
381  integer(kind=kint) :: nrstat_i(10)
382  real(kind=kreal) :: nrstat_r(10)
383  integer(kind=kint) :: autoinc_stat
384  integer(kind=kint) :: cutback_stat
385 
386  real(kind=kreal), pointer :: gl(:)
387  real(kind=kreal), pointer :: gl0(:)
388  real(kind=kreal), pointer :: eforce(:)
389  real(kind=kreal), pointer :: qforce(:)
390  real(kind=kreal), pointer :: qforce_bak(:)
391  real(kind=kreal), pointer :: unode(:) => null()
392  real(kind=kreal), pointer :: unode_bak(:) => null()
393  real(kind=kreal), pointer :: dunode(:) => null()
394  real(kind=kreal), pointer :: ddunode(:) => null()
395  real(kind=kreal), pointer :: temperature(:)=> null()
396  real(kind=kreal), pointer :: temp_bak(:) => null()
397  real(kind=kreal), pointer :: last_temp(:) => null()
398 
399  type( telement ), pointer :: elements(:) =>null()
400  type( tmaterial ),pointer :: materials(:) =>null()
401  integer :: n_contacts
402  type( tcontact ), pointer :: contacts(:) =>null()
403  integer :: n_embeds
404  type( tcontact ), pointer :: embeds(:) =>null()
405  integer :: n_fix_mpc
406  real(kind=kreal), pointer :: mpc_const(:) =>null()
407  type(tsection), pointer :: sections(:) =>null()
408 
409  ! for cutback
410  ! ####################### Notice #######################
411  ! # If you add new variables to store analysis status, #
412  ! # - backup variables with postfix "_bkup" here #
413  ! # - backup process to module m_fstr_Cutback #
414  ! # must be added if necessary. #
415  ! ######################################################
416  real(kind=kreal), pointer :: unode_bkup(:) => null()
417  real(kind=kreal), pointer :: qforce_bkup(:) => null()
418  real(kind=kreal), pointer :: last_temp_bkup(:) => null()
419  type( telement ), pointer :: elements_bkup(:) =>null()
420  type( tcontact ), pointer :: contacts_bkup(:) =>null()
421  type( tcontact ), pointer :: embeds_bkup(:) =>null()
422  end type fstr_solid
423 
427  integer(kind=kint) :: is_steady
428  real(kind=kreal) :: beta
429  logical :: is_iter_max_limit
430 
432  integer(kind=kint) :: steptot
433  integer(kind=kint) :: restart_nout
434  real(kind=kreal), pointer :: step_dltime(:), step_eetime(:)
435  real(kind=kreal), pointer :: step_delmin(:), step_delmax(:)
436  integer(kind=kint) :: timepoint_id
437 
439  integer(kind=kint) :: materialtot
440  integer(kind=kint), pointer :: rhotab(:), cptab(:), condtab(:)
441  real(kind=kreal), pointer :: rho(:,:), rhotemp(:,:)
442  real(kind=kreal), pointer :: cp(:,:), cptemp(:,:)
443  real(kind=kreal), pointer :: cond(:,:),condtemp(:,:)
444 
445  real(kind=kreal), pointer :: rhofunca(:,:), rhofuncb(:,:)
446  real(kind=kreal), pointer :: cpfunca(:,:), cpfuncb(:,:)
447  real(kind=kreal), pointer :: condfunca(:,:),condfuncb(:,:)
448 
450  integer(kind=kint) :: amplitudetot
451  integer(kind=kint), pointer :: ampltab(:)
452  real(kind=kreal), pointer :: ampl(:,:), ampltime(:,:)
453  real(kind=kreal), pointer :: amplfunca(:,:), amplfuncb(:,:)
454 
456  real(kind=kreal), pointer :: temp0(:)
457  real(kind=kreal), pointer :: tempc(:)
458  real(kind=kreal), pointer :: temp(:)
459 
461  integer(kind=kint) :: t_fix_tot
462  integer(kind=kint), pointer :: t_fix_node(:)
463  integer(kind=kint), pointer :: t_fix_ampl(:)
464  real(kind=kreal), pointer :: t_fix_val(:)
465 
467  integer(kind=kint) :: q_nod_tot
468  integer(kind=kint), pointer :: q_nod_node(:)
469  integer(kind=kint), pointer :: q_nod_ampl(:)
470  real(kind=kreal), pointer :: q_nod_val(:)
471 
473  integer(kind=kint) :: q_vol_tot
474  integer(kind=kint), pointer :: q_vol_elem(:)
475  integer(kind=kint), pointer :: q_vol_ampl(:)
476  real(kind=kreal), pointer :: q_vol_val(:)
477 
479  integer(kind=kint) :: q_suf_tot
480  integer(kind=kint), pointer :: q_suf_elem(:)
481  integer(kind=kint), pointer :: q_suf_ampl(:)
482  integer(kind=kint), pointer :: q_suf_surf(:)
483  real(kind=kreal), pointer :: q_suf_val(:)
484 
486  integer(kind=kint) :: r_suf_tot
487  integer(kind=kint), pointer :: r_suf_elem(:)
488  integer(kind=kint), pointer :: r_suf_ampl(:,:)
489  integer(kind=kint), pointer :: r_suf_surf(:)
490  real(kind=kreal), pointer :: r_suf_val(:,:)
491 
493  integer(kind=kint) :: h_suf_tot
494  integer(kind=kint), pointer :: h_suf_elem(:)
495  integer(kind=kint), pointer :: h_suf_ampl(:,:)
496  integer(kind=kint), pointer :: h_suf_surf(:)
497  real(kind=kreal), pointer :: h_suf_val(:,:)
498 
499  integer(kind=kint) :: wl_tot
500  type(tweldline), pointer :: weldline(:) => null()
501  end type fstr_heat
502 
506  integer(kind=kint) :: idx_eqa ! implicit or explicit
507  integer(kind=kint) :: idx_resp ! time history or steady-state harmonic response analysis
508 
510  integer(kind=kint) :: n_step ! total step number of analysis
511  real(kind=kreal) :: t_start ! start time of analysis
512  real(kind=kreal) :: t_curr ! current time of analysis
513  real(kind=kreal) :: t_end ! end time of analysis
514  real(kind=kreal) :: t_delta ! time increment
515  integer(kind=kint) :: restart_nout ! output interval of restart file
516  ! (if .gt.0) restart file write
517  ! (if .lt.0) restart file read and write
518  integer(kind=kint) :: restart_nin !input number of restart file
519 
521  real(kind=kreal) :: ganma ! Newmark-beta parameter ganma
522  real(kind=kreal) :: beta ! Newmark-beta parameter beta
523 
525  integer(kind=kint) :: idx_mas ! mass matrix type
526 
528  integer(kind=kint) :: idx_dmp ! damping type
529  real(kind=kreal) :: ray_m ! Rayleigh damping parameter Rm
530  real(kind=kreal) :: ray_k ! Rayleigh damping parameter Rk
531 
533  logical :: varinitialize ! initialization flag
534 
536  integer(kind=kint) :: nout ! output interval of result
537  integer(kind=kint) :: ngrp_monit ! node of monitoring result
538  integer(kind=kint) :: nout_monit ! output interval of result monitoring
539  integer(kind=kint) :: i_step ! step number
540  integer(kind=kint) :: iout_list(6) ! 0:not output 1:output
541  ! iout_list(1): displacement
542  ! iout_list(2): velocity
543  ! iout_list(3): acceleration
544  ! iout_list(4): reaction force
545  ! iout_list(5): strain
546  ! iout_list(6): stress
547 
549  real(kind=kreal), pointer :: disp(:,:)
550  real(kind=kreal), pointer :: vel(:,:)
551  real(kind=kreal), pointer :: acc(:,:)
552 
553  real(kind=kreal) :: kineticenergy
554  real(kind=kreal) :: strainenergy
555  real(kind=kreal) :: totalenergy
556 
558  real(kind=kreal), pointer :: vec1(:)
559  real(kind=kreal), pointer :: vec2(:)
560  real(kind=kreal), pointer :: vec3(:)
561 
562  integer(kind=kint) :: dynamic_iw4 = 204
563  integer(kind=kint) :: dynamic_iw5 = 205
564  integer(kind=kint) :: dynamic_iw6 = 206
565  integer(kind=kint) :: dynamic_iw7 = 207
566  integer(kind=kint) :: dynamic_iw8 = 208
567  integer(kind=kint) :: dynamic_iw9 = 209
568  integer(kind=kint) :: dynamic_iw10 = 210
569  end type fstr_dynamic
570 
572  integer(kind=kint) :: fload_ngrp_tot
573  integer(kind=kint), pointer :: fload_ngrp_grpid(:) => null()
574  integer(kind=kint), pointer :: fload_ngrp_id(:) => null()
575  integer(kind=kint), pointer :: fload_ngrp_type(:) => null()
576  integer(kind=kint), pointer :: fload_ngrp_dof(:) => null()
577  real(kind=kreal), pointer :: fload_ngrp_valre(:) => null()
578  real(kind=kreal), pointer :: fload_ngrp_valim(:) => null()
579  character(len=HECMW_FILENAME_LEN) :: eigenlog_filename
580  integer(kind=kint) :: start_mode
581  integer(kind=kint) :: end_mode
582  end type fstr_freqanalysis
583 
585  integer(kind=kint) :: nummode
586  integer(kind=kint) :: numnodedof
587  real(kind=kreal), pointer :: eigomega(:) => null()
588  real(kind=kreal), pointer :: eigvector(:,:) => null()
589  real(kind=kreal) :: rayalpha, raybeta
590  end type fstr_freqanalysis_data
591 
595  integer(kind=kint) :: nget ! Solved eigen value number (default:5)
596  integer(kind=kint) :: maxiter ! Max. Lcz iterations (default:60)
597  integer(kind=kint) :: iter ! Max. Lcz iterations (default:60)
598  real (kind=kreal) :: sigma ! 0.0
599  real (kind=kreal) :: tolerance ! Lcz tolerance (default:1.0e-8)
600  real (kind=kreal) :: totalmass
601  real (kind=kreal), pointer :: eigval(:)
602  real (kind=kreal), pointer :: eigvec(:,:)
603  real (kind=kreal), pointer :: filter(:)
604  real (kind=kreal), pointer :: mass(:)
605  real (kind=kreal), pointer :: effmass(:)
606  real (kind=kreal), pointer :: partfactor(:)
607  logical :: is_free = .false.
608  end type fstr_eigen
609 
613  integer( kind=kint ) :: dof ! == 3
614  integer( kind=kint ) :: ndof ! total dof (coupled_node_n*dof)
615  integer( kind=kint ) :: coupled_node_n
617  integer, pointer :: coupled_node(:) ! local node id sent from revocap
618  real( kind=8 ),pointer :: trac(:) ! input (x,y,z,x,y,z ... )
619  real( kind=8 ),pointer :: disp(:) ! output (x,y,z,x,y,z ... )
620  real( kind=8 ),pointer :: velo(:) ! output (x,y,z,x,y,z ... )
621  real( kind=8 ),pointer :: accel(:) ! output (x,y,z,x,y,z ... )
623  integer( kind=kint ),pointer :: index(:) ! size:total node num.
625  end type fstr_couple
626 
629  integer(kind=kint) :: egrpid
630  real( kind=kreal ) :: i
631  real( kind=kreal ) :: u
632  real( kind=kreal ) :: coe
633  real( kind=kreal ) :: v
634  integer(kind=kint) :: xyz
635  real(kind=kreal) :: n1, n2
636  real(kind=kreal) :: distol
637  real(kind=kreal) :: tstart
638  end type tweldline
639 
641  type tsection
642  !integer :: mat_ID
643  !integer :: iset
644  !integer :: orien_ID
645  !real(kind=kreal) :: thickness
646  integer :: elemopt341
647  !integer :: elemopt342
648  !integer :: elemopt351
649  !integer :: elemopt352
650  integer :: elemopt361
651  !integer :: elemopt362
652  end type tsection
653 
654 contains
655 
657  subroutine fstr_nullify_fstr_param( P )
658  implicit none
659  type( fstr_param ) :: P
660 
661  nullify( p%dtime )
662  nullify( p%etime )
663  nullify( p%dtmin )
664  nullify( p%delmax )
665  nullify( p%itmax )
666  nullify( p%eps )
667  nullify( p%global_local_ID)
668  nullify( p%timepoints )
669  end subroutine fstr_nullify_fstr_param
670 
671  subroutine fstr_nullify_fstr_solid( S )
672  implicit none
673  type( fstr_solid ) :: S
674 
675  nullify( s%BOUNDARY_ngrp_ID )
676  nullify( s%BOUNDARY_ngrp_type )
677  nullify( s%BOUNDARY_ngrp_amp )
678  nullify( s%BOUNDARY_ngrp_val)
679  nullify( s%BOUNDARY_ngrp_rotID )
680  nullify( s%BOUNDARY_ngrp_centerID )
681  nullify( s%CLOAD_ngrp_ID )
682  nullify( s%CLOAD_ngrp_DOF )
683  nullify( s%CLOAD_ngrp_amp )
684  nullify( s%CLOAD_ngrp_rotID )
685  nullify( s%CLOAD_ngrp_centerID )
686  nullify( s%CLOAD_ngrp_val )
687  nullify( s%DLOAD_ngrp_ID )
688  nullify( s%DLOAD_ngrp_LID )
689  nullify( s%DLOAD_ngrp_amp )
690  nullify( s%DLOAD_ngrp_params )
691  nullify( s%TEMP_ngrp_ID )
692  nullify( s%TEMP_ngrp_val )
693  nullify( s%SPRING_ngrp_ID )
694  nullify( s%SPRING_ngrp_DOF )
695  nullify( s%SPRING_ngrp_amp )
696  nullify( s%SPRING_ngrp_val )
697  nullify( s%STRESS )
698  nullify( s%STRAIN )
699  nullify( s%MISES )
700  nullify( s%PSTRESS )
701  nullify( s%PSTRAIN )
702  nullify( s%PSTRESS_VECT )
703  nullify( s%PSTRAIN_VECT )
704  nullify( s%REACTION )
705  nullify( s%ESTRESS )
706  nullify( s%ESTRAIN )
707  nullify( s%EMISES )
708  nullify( s%EPSTRESS )
709  nullify( s%EPSTRAIN )
710  nullify( s%EPSTRESS_VECT )
711  nullify( s%EPSTRAIN_VECT )
712  nullify( s%ENQM )
713  nullify( s%GL )
714  nullify( s%GL0 )
715  nullify( s%QFORCE )
716  nullify( s%VELOCITY_ngrp_ID )
717  nullify( s%VELOCITY_ngrp_type )
718  nullify( s%VELOCITY_ngrp_amp )
719  nullify( s%VELOCITY_ngrp_val )
720  nullify( s%ACCELERATION_ngrp_ID )
721  nullify( s%ACCELERATION_ngrp_type )
722  nullify( s%ACCELERATION_ngrp_amp )
723  nullify( s%ACCELERATION_ngrp_val )
724  nullify( s%COUPLE_ngrp_ID )
725  end subroutine fstr_nullify_fstr_solid
726 
727  subroutine fstr_nullify_fstr_heat( H )
728  implicit none
729  type( fstr_heat ) :: H
730 
731  nullify( h%STEP_DLTIME )
732  nullify( h%STEP_EETIME )
733  nullify( h%STEP_DELMIN )
734  nullify( h%STEP_DELMAX )
735  nullify( h%RHO )
736  nullify( h%RHOtemp )
737  nullify( h%CP )
738  nullify( h%CPtemp )
739  nullify( h%COND )
740  nullify( h%CONDtemp )
741  nullify( h%RHOtab )
742  nullify( h%CPtab )
743  nullify( h%CONDtab )
744  nullify( h%RHOfuncA )
745  nullify( h%RHOfuncB )
746  nullify( h%CPfuncA )
747  nullify( h%CPfuncB )
748  nullify( h%CONDfuncA )
749  nullify( h%CONDfuncB )
750  nullify( h%AMPL )
751  nullify( h%AMPLtime )
752  nullify( h%AMPLtab )
753  nullify( h%AMPLfuncA )
754  nullify( h%AMPLfuncB )
755  nullify( h%TEMP0 )
756  nullify( h%TEMPC )
757  nullify( h%TEMP )
758  nullify( h%T_FIX_node )
759  nullify( h%T_FIX_ampl )
760  nullify( h%T_FIX_val )
761  nullify( h%Q_NOD_node )
762  nullify( h%Q_NOD_ampl )
763  nullify( h%Q_NOD_val )
764  nullify( h%Q_VOL_elem )
765  nullify( h%Q_VOL_ampl )
766  nullify( h%Q_VOL_val )
767  nullify( h%Q_SUF_elem )
768  nullify( h%Q_SUF_ampl )
769  nullify( h%Q_SUF_surf )
770  nullify( h%Q_SUF_val )
771  nullify( h%R_SUF_elem )
772  nullify( h%R_SUF_ampl )
773  nullify( h%R_SUF_surf )
774  nullify( h%R_SUF_val )
775  nullify( h%H_SUF_elem )
776  nullify( h%H_SUF_ampl )
777  nullify( h%H_SUF_surf )
778  nullify( h%H_SUF_val )
779  end subroutine fstr_nullify_fstr_heat
780 
781  subroutine fstr_nullify_fstr_dynamic( DY )
782  implicit none
783  type( fstr_dynamic ) :: DY
784 
785  nullify( dy%DISP )
786  nullify( dy%VEL )
787  nullify( dy%ACC )
788  nullify( dy%VEC1 )
789  nullify( dy%VEC2 )
790  nullify( dy%VEC3 )
791  end subroutine fstr_nullify_fstr_dynamic
792 
793  subroutine fstr_nullify_fstr_freqanalysis( f )
794  implicit none
795  type( fstr_freqanalysis ), intent(inout) :: f
796 
797  f%FLOAD_ngrp_tot = 0
798  nullify( f%FLOAD_ngrp_GRPID )
799  nullify( f%FLOAD_ngrp_ID )
800  nullify( f%FLOAD_ngrp_TYPE )
801  nullify( f%FLOAD_ngrp_DOF )
802  nullify( f%FLOAD_ngrp_valre )
803  nullify( f%FLOAD_ngrp_valim )
804  end subroutine fstr_nullify_fstr_freqanalysis
805 
806  subroutine fstr_nullify_fstr_eigen( E )
807  implicit none
808  type( fstr_eigen ) :: E
809 
810  nullify( e%mass )
811  end subroutine fstr_nullify_fstr_eigen
812 
813  subroutine fstr_nullify_fstr_couple( C )
814  implicit none
815  type( fstr_couple ) :: C
816 
817  nullify( c%coupled_node )
818  nullify( c%trac )
819  nullify( c%velo )
820  nullify( c%index )
821  end subroutine fstr_nullify_fstr_couple
822 
824  subroutine fstr_mat_init( hecMAT )
825  implicit none
826  type(hecmwst_matrix) :: hecMAT
827 
828  hecmat%Iarray(1) = 100 ! = nier
829  hecmat%Iarray(2) = 1 ! = method
830  hecmat%Iarray(3) = 1 ! = precond
831  hecmat%Iarray(4) = 0 ! = nset
832  hecmat%Iarray(5) = 1 ! = iterpremax
833  hecmat%Iarray(6) = 10 ! = nrest
834  hecmat%Iarray(7) = 0 ! = scaling
835  hecmat%Iarray(21)= kno ! = iterlog
836  hecmat%Iarray(22)= kno ! = timelog
837  hecmat%Iarray(31)= 0 ! = dumptype
838  hecmat%Iarray(32)= 0 ! = dumpexit
839  hecmat%Iarray(33)= 0 ! = usejad
840  hecmat%Iarray(34)= 10 ! = ncolor_in
841  hecmat%Iarray(13)= 0 ! = mpc_method
842  hecmat%Iarray(14)= 0 ! = estcond
843  hecmat%Iarray(35)= 3 ! = maxrecycle_precond
844  hecmat%Iarray(41)= 0 ! = solver_opt1
845  hecmat%Iarray(42)= 0 ! = solver_opt2
846  hecmat%Iarray(43)= 0 ! = solver_opt3
847  hecmat%Iarray(44)= 0 ! = solver_opt4
848  hecmat%Iarray(45)= 0 ! = solver_opt5
849  hecmat%Iarray(46)= 0 ! = solver_opt6
850 
851  hecmat%Rarray(1) = 1.0e-8 ! = resid
852  hecmat%Rarray(2) = 1.0 ! = sigma_diag
853  hecmat%Rarray(3) = 0.0 ! = sigma
854  hecmat%Rarray(4) = 0.1 ! = thresh
855  hecmat%Rarray(5) = 0.1 ! = filter
856  hecmat%Rarray(11)= 1.0e+4 ! = penalty
857 
858  hecmat%Iarray(96) = 0 ! nrecycle_precond
859  hecmat%Iarray(97) = kyes ! flag_numfact
860  hecmat%Iarray(98) = kyes ! flag_symbfact
861  hecmat%Iarray(99) = kyes ! indirect method
862  end subroutine fstr_mat_init
863 
864  subroutine hecmat_init( hecMAT )
865  implicit none
866  type( hecmwst_matrix ) :: hecMAT
867  integer :: ndof, nn, ierror
868  ndof = hecmat%NDOF
869  nn = ndof*ndof
870  allocate (hecmat%AL(nn*hecmat%NPL) ,stat=ierror )
871  if( ierror /= 0 ) then
872  write(*,*) "##ERROR : not enough memory"
873  write(idbg,*) 'stop due to allocation error'
874  call flush(idbg)
875  call hecmw_abort( hecmw_comm_get_comm() )
876  end if
877  allocate (hecmat%AU(nn*hecmat%NPU) ,stat=ierror )
878  if( ierror /= 0 ) then
879  write(*,*) "##ERROR : not enough memory"
880  write(idbg,*) 'stop due to allocation error'
881  call flush(idbg)
882  call hecmw_abort( hecmw_comm_get_comm() )
883  end if
884  allocate (hecmat%B(ndof*hecmat%NP) ,stat=ierror )
885  if( ierror /= 0 ) then
886  write(*,*) "##ERROR : not enough memory"
887  write(idbg,*) 'stop due to allocation error'
888  call flush(idbg)
889  call hecmw_abort( hecmw_comm_get_comm() )
890  end if
891  hecmat%B(:)=0.d0
892  allocate (hecmat%D(nn*hecmat%NP) ,stat=ierror )
893  if( ierror /= 0 ) then
894  write(*,*) "##ERROR : not enough memory"
895  write(idbg,*) 'stop due to allocation error'
896  call flush(idbg)
897  call hecmw_abort( hecmw_comm_get_comm() )
898  end if
899  allocate (hecmat%X(ndof*hecmat%NP) ,stat=ierror )
900  if( ierror /= 0 ) then
901  write(*,*) "##ERROR : not enough memory"
902  write(idbg,*) 'stop due to allocation error'
903  call flush(idbg)
904  call hecmw_abort( hecmw_comm_get_comm() )
905  end if
906  allocate (hecmat%ALU(nn*hecmat%N) ,stat=ierror )
907  if( ierror /= 0 ) then
908  write(*,*) "##ERROR : not enough memory"
909  write(idbg,*) 'stop due to allocation error'
910  call flush(idbg)
911  call hecmw_abort( hecmw_comm_get_comm() )
912  endif
913  hecmat%D = 0.0d0
914  hecmat%AL = 0.0d0
915  hecmat%AU = 0.0d0
916  hecmat%B = 0.0d0
917  hecmat%X = 0.0d0
918  hecmat%ALU = 0.0d0
919  end subroutine hecmat_init
920 
921  subroutine hecmat_finalize( hecMAT )
922  implicit none
923  type( hecmwst_matrix ) :: hecMAT
924  integer :: ndof, nn, ierror
925  ndof = hecmat%NDOF
926  nn = ndof*ndof
927  if( associated(hecmat%AL) ) then
928  deallocate(hecmat%AL ,stat=ierror)
929  if( ierror /= 0 ) then
930  write(idbg,*) 'stop due to deallocation error'
931  call flush(idbg)
932  call hecmw_abort( hecmw_comm_get_comm())
933  end if
934  endif
935  if( associated(hecmat%AU) ) then
936  deallocate(hecmat%AU ,stat=ierror)
937  if( ierror /= 0 ) then
938  write(idbg,*) 'stop due to deallocation error'
939  call flush(idbg)
940  call hecmw_abort( hecmw_comm_get_comm())
941  end if
942  endif
943  if( associated(hecmat%B) ) then
944  deallocate(hecmat%B ,stat=ierror)
945  if( ierror /= 0 ) then
946  write(idbg,*) 'stop due to deallocation error'
947  call flush(idbg)
948  call hecmw_abort( hecmw_comm_get_comm())
949  end if
950  endif
951  if( associated(hecmat%D) ) then
952  deallocate(hecmat%D ,stat=ierror)
953  if( ierror /= 0 ) then
954  write(idbg,*) 'stop due to deallocation error'
955  call flush(idbg)
956  call hecmw_abort( hecmw_comm_get_comm())
957  end if
958  endif
959  if( associated(hecmat%X) ) then
960  deallocate(hecmat%X ,stat=ierror)
961  if( ierror /= 0 ) then
962  write(idbg,*) 'stop due to deallocation error'
963  call flush(idbg)
964  call hecmw_abort( hecmw_comm_get_comm())
965  end if
966  endif
967  if( associated(hecmat%ALU) ) then
968  deallocate(hecmat%ALU ,stat=ierror)
969  if( ierror /= 0 ) then
970  write(idbg,*) 'stop due to deallocation error'
971  call flush(idbg)
972  call hecmw_abort( hecmw_comm_get_comm())
973  end if
974  endif
975  end subroutine hecmat_finalize
976 
978  subroutine fstr_param_init( fstrPARAM, hecMESH )
979  implicit none
980  type(fstr_param) :: fstrPARAM
981  type(hecmwst_local_mesh) :: hecMESH
982  integer(kind=kint) :: i
983  external fstr_sort_index
984 
985  fstrparam%solution_type = kststatic
986  fstrparam%nlgeom = .false.
987  fstrparam%solver_method = ksmcg
988  fstrparam%nlsolver_method = knsmnewton
989 
990  !!STATIC !HEAT
991  fstrparam%analysis_n = 0
992  fstrparam%ref_temp = 0
993 
994  ! output control
995  fstrparam%fg_echo = koff
996  fstrparam%fg_result = koff
997  fstrparam%fg_visual = koff
998 
999  ! for heat ...
1000  fstrparam%fg_neutral = koff
1001  fstrparam%fg_irres = kno
1002  fstrparam%fg_iwres = kno
1003  fstrparam%nrres = 1
1004  fstrparam%nprint = 1
1005 
1006  ! for couple
1007  fstrparam%fg_couple = 0
1008  fstrparam%fg_couple_type = 0
1009  fstrparam%fg_couple_first= 0
1010  fstrparam%fg_couple_window= 0
1011 
1012  ! for restart control
1013  fstrparam%restart_version = 5
1014 
1015  ! index table for global node ID sorting
1016 
1017  fstrparam%n_node = hecmesh%n_node;
1018  fstrparam%nn_internal = hecmesh%nn_internal;
1019  allocate( fstrparam%global_local_ID(2,hecmesh%nn_internal))
1020  do i = 1, hecmesh%nn_internal
1021  fstrparam%global_local_ID(1,i) = hecmesh%global_node_ID(i)
1022  fstrparam%global_local_ID(2,i) = i
1023  end do
1024  call fstr_sort_index( fstrparam%global_local_ID, hecmesh%nn_internal )
1025  end subroutine fstr_param_init
1026 
1027  logical function fstr_isboundaryactive( fstrSOLID, nbc, cstep )
1028  type(fstr_solid) :: fstrsolid
1029  integer, intent(in) :: nbc
1030  integer, intent(in) :: cstep
1031  fstr_isboundaryactive = .true.
1032  if( .not. associated(fstrsolid%step_ctrl) ) return
1033  if( cstep>fstrsolid%nstep_tot ) return
1034  fstr_isboundaryactive = isboundaryactive( nbc, fstrsolid%step_ctrl(cstep) )
1035  end function
1036 
1037  logical function fstr_isloadactive( fstrSOLID, nbc, cstep )
1038  type(fstr_solid) :: fstrsolid
1039  integer, intent(in) :: nbc
1040  integer, intent(in) :: cstep
1041  fstr_isloadactive = .true.
1042  if( cstep > 0 ) then
1043  if( .not. associated(fstrsolid%step_ctrl) ) return
1044  if( cstep>fstrsolid%nstep_tot ) return
1045  fstr_isloadactive = isloadactive( nbc, fstrsolid%step_ctrl(cstep) )
1046  else
1047  fstr_isloadactive = isloadactive( nbc, fstrsolid%step_ctrl_restart )
1048  endif
1049  end function
1050 
1051  logical function fstr_iscontactactive( fstrSOLID, nbc, cstep )
1052  type(fstr_solid) :: fstrsolid
1053  integer, intent(in) :: nbc
1054  integer, intent(in) :: cstep
1055  fstr_iscontactactive = .true.
1056  if( .not. associated(fstrsolid%step_ctrl) ) return
1057  if( cstep>fstrsolid%nstep_tot ) return
1058  fstr_iscontactactive = iscontactactive( nbc, fstrsolid%step_ctrl(cstep) )
1059  end function
1060 
1061  logical function fstr_isembedactive( fstrSOLID, nbc, cstep )
1062  type(fstr_solid) :: fstrsolid
1063  integer, intent(in) :: nbc
1064  integer, intent(in) :: cstep
1065  fstr_isembedactive = .true.
1066  if( .not. associated(fstrsolid%step_ctrl) ) return
1067  if( cstep>fstrsolid%nstep_tot ) return
1068  fstr_isembedactive = iscontactactive( nbc, fstrsolid%step_ctrl(cstep) )
1069  end function
1070 
1072  subroutine get_coordsys( cdsys_ID, hecMESH, fstrSOLID, coords )
1073  integer, intent(in) :: cdsys_ID
1074  type(hecmwst_local_mesh) :: hecMESH
1075  type(fstr_solid), intent(inout) :: fstrSOLID
1076  real(kind=kreal), intent(out) :: coords(3,3)
1077  integer :: ik
1078 
1079  coords = 0.d0
1080  if( cdsys_id>0 ) then
1081  if( iscoordneeds(g_localcoordsys(cdsys_id)) ) then
1082  coords=g_localcoordsys(cdsys_id)%CoordSys
1083  else
1084  ik=g_localcoordsys(cdsys_id)%node_ID(1)
1085  coords(1,:)= hecmesh%node(3*ik-2:3*ik)+fstrsolid%unode(3*ik-2:3*ik) &
1086  + fstrsolid%dunode(3*ik-2:3*ik)
1087  ik=g_localcoordsys(cdsys_id)%node_ID(2)
1088  coords(2,:)= hecmesh%node(3*ik-2:3*ik)+fstrsolid%unode(3*ik-2:3*ik) &
1089  + fstrsolid%dunode(3*ik-2:3*ik)
1090  ik=g_localcoordsys(cdsys_id)%node_ID(3)
1091  if(ik>0) coords(3,:)= hecmesh%node(3*ik-2:3*ik)+fstrsolid%unode(3*ik-2:3*ik) &
1092  + fstrsolid%dunode(3*ik-2:3*ik)
1093  endif
1094  endif
1095  end subroutine get_coordsys
1096 
1097  subroutine fstr_set_current_config_to_mesh(hecMESH,fstrSOLID,coord)
1098  implicit none
1099  type(hecmwst_local_mesh), intent(inout) :: hecMESH
1100  type (fstr_solid), intent(in) :: fstrSOLID
1101  real(kind=kreal), intent(out) :: coord(:)
1102  integer(kind=kint) :: i
1103  if(hecmesh%n_dof == 4) return
1104  do i = 1, hecmesh%nn_internal*min(hecmesh%n_dof,3)
1105  coord(i) = hecmesh%node(i)
1106  hecmesh%node(i) = coord(i)+fstrsolid%unode(i)+fstrsolid%dunode(i)
1107  enddo
1108  end subroutine fstr_set_current_config_to_mesh
1109 
1110  subroutine fstr_recover_initial_config_to_mesh(hecMESH,fstrSOLID,coord)
1111  implicit none
1112  type(hecmwst_local_mesh), intent(inout) :: hecMESH
1113  type (fstr_solid), intent(in) :: fstrSOLID
1114  real(kind=kreal), intent(in) :: coord(:)
1115  integer(kind=kint) :: i
1116  if(hecmesh%n_dof == 4) return
1117  do i = 1, hecmesh%nn_internal*min(hecmesh%n_dof,3)
1118  hecmesh%node(i) = coord(i)
1119  enddo
1121 
1122  subroutine fstr_solid_phys_zero(phys)
1123  implicit none
1124  type(fstr_solid_physic_val), pointer :: phys
1125  phys%STRAIN = 0.0d0
1126  phys%STRESS = 0.0d0
1127  phys%MISES = 0.0d0
1128  phys%ESTRAIN = 0.0d0
1129  phys%ESTRESS = 0.0d0
1130  phys%EMISES = 0.0d0
1131  phys%ENQM = 0.0d0
1132  end subroutine fstr_solid_phys_zero
1133 
1134  subroutine fstr_solid_phys_clear(fstrSOLID)
1135  implicit none
1136  type (fstr_solid) :: fstrSOLID
1137  integer(kind=kint) :: i
1138 
1139  if (associated(fstrsolid%SOLID)) then
1140  call fstr_solid_phys_zero(fstrsolid%SOLID)
1141  end if
1142  if (associated(fstrsolid%SHELL)) then
1143  call fstr_solid_phys_zero(fstrsolid%SHELL)
1144  do i=1,fstrsolid%max_lyr
1145  call fstr_solid_phys_zero(fstrsolid%SHELL%LAYER(i)%PLUS)
1146  call fstr_solid_phys_zero(fstrsolid%SHELL%LAYER(i)%MINUS)
1147  end do
1148  end if
1149  if (associated(fstrsolid%BEAM)) then
1150  call fstr_solid_phys_zero(fstrsolid%BEAM)
1151  end if
1152  end subroutine fstr_solid_phys_clear
1153 
1154  subroutine table_amp(hecMESH, fstrSOLID, cstep, jj_n_amp, time, f_t)
1155  type ( hecmwST_local_mesh ), intent(in) :: hecMESH
1156  type ( fstr_solid ), intent(in) :: fstrSOLID
1157  integer(kind=kint), intent(in) :: cstep
1158  integer(kind=kint), intent(in) :: jj_n_amp
1159  real(kind=kreal), intent(in) :: time
1160  real(kind=kreal), intent(out) :: f_t
1161 
1162  integer(kind=kint) :: i
1163  integer(kind=kint) :: jj1, jj2
1164  integer(kind=kint) :: s1, s2, flag
1165  real(kind=kreal) :: t_1, t_2, t_t, f_1, f_2, tincre
1166 
1167  s1 = 0; s2 = 0
1168 
1169  if( jj_n_amp <= 0 ) then ! Amplitude not defined
1170  if(myrank == 0) then
1171  write(imsg,*) 'internal error: amplitude table not defined'
1172  endif
1173  call hecmw_abort( hecmw_comm_get_comm() )
1174  endif
1175 
1176  tincre = fstrsolid%step_ctrl( cstep )%initdt
1177  jj1 = hecmesh%amp%amp_index(jj_n_amp - 1)
1178  jj2 = hecmesh%amp%amp_index(jj_n_amp)
1179 
1180  jj1 = jj1 + 2
1181  t_t = time-fstrsolid%step_ctrl(cstep)%starttime
1182 
1183  ! if(jj2 .eq. 0) then
1184  ! f_t = 1.0
1185  if(t_t .gt. hecmesh%amp%amp_table(jj2)) then
1186  f_t = hecmesh%amp%amp_val(jj2)
1187  else if(t_t .le. hecmesh%amp%amp_table(jj2)) then
1188  flag=0
1189  do i = jj1, jj2
1190  if(t_t .le. hecmesh%amp%amp_table(i)) then
1191  s2 = i
1192  s1 = i - 1
1193  flag = 1
1194  endif
1195  if( flag == 1 ) exit
1196  end do
1197 
1198  t_2 = hecmesh%amp%amp_table(s2)
1199  t_1 = hecmesh%amp%amp_table(s1)
1200  f_2 = hecmesh%amp%amp_val(s2)
1201  f_1 = hecmesh%amp%amp_val(s1)
1202  if( t_2-t_1 .lt. 1.0e-20) then
1203  if(myrank == 0) then
1204  write(imsg,*) 'stop due to t_2-t_1 <= 0'
1205  endif
1206  call hecmw_abort( hecmw_comm_get_comm())
1207  endif
1208  f_t = ((t_2*f_1 - t_1*f_2) + (f_2 - f_1)*t_t) / (t_2 - t_1)
1209  endif
1210 
1211  end subroutine table_amp
1212 
1213 end module m_fstr
m_fstr::ksmbicgstab
integer(kind=kint), parameter ksmbicgstab
Definition: m_fstr.f90:47
m_fstr::cntfilname
character(len=hecmw_filename_len) cntfilname
FILE NAME.
Definition: m_fstr.f90:103
m_fstr::kitrfloatingerror
integer(kind=kint), parameter kitrfloatingerror
Definition: m_fstr.f90:92
m_fstr::iecho
integer(kind=kint), pointer iecho
FLAG for ECHO/RESULT/POST.
Definition: m_fstr.f90:121
m_out
This module manages step information.
Definition: m_out.f90:6
m_fstr::restart_outlast
integer(kind=kint), parameter restart_outlast
restart type
Definition: m_fstr.f90:70
m_fstr::restartfilname
character(len=hecmw_filename_len) restartfilname
Definition: m_fstr.f90:104
m_step::iscontactactive
logical function iscontactactive(bnd, stepinfo)
Is contact condition in this step active.
Definition: m_step.f90:118
mcontactdef::tcontact
Structure to includes all info needed by contact calculation.
Definition: fstr_contact_def.F90:26
m_fstr::kon
integer(kind=kint), parameter kon
Definition: m_fstr.f90:32
m_fstr::kopss_material
integer(kind=kint), parameter kopss_material
Definition: m_fstr.f90:131
m_fstr::fstr_mat_init
subroutine fstr_mat_init(hecMAT)
Initializer of structure hecmwST_matrix.
Definition: m_fstr.f90:825
m_fstr::fstr_isloadactive
logical function fstr_isloadactive(fstrSOLID, nbc, cstep)
Definition: m_fstr.f90:1038
m_step::tparamautoinc
Definition: m_step.f90:51
m_fstr::kel361fi
integer(kind=kint), parameter kel361fi
Definition: m_fstr.f90:77
m_fstr::ksmgmres
integer(kind=kint), parameter ksmgmres
Definition: m_fstr.f90:48
m_fstr::ineutral
integer(kind=kint), pointer ineutral
Definition: m_fstr.f90:124
m_fstr::myrank
integer(kind=kint) myrank
PARALLEL EXECUTION.
Definition: m_fstr.f90:96
m_fstr::tsection
Data for section control.
Definition: m_fstr.f90:641
m_timepoint::time_points
Time points storage for output etc.
Definition: m_timepoint.f90:14
m_fstr::fstr_eigen
Package of data used by Lanczos eigenvalue solver.
Definition: m_fstr.f90:593
m_fstr::kststaticeigen
integer(kind=kint), parameter kststaticeigen
Definition: m_fstr.f90:42
m_fstr::itmax
integer(kind=kint) itmax
Definition: m_fstr.f90:141
m_common_struct::iscoordneeds
logical function iscoordneeds(coordsys)
if need to fetch global nodes' coordinate
Definition: m_common_struct.f90:62
mcontactdef
This module manages the data structure for contact calculation.
Definition: fstr_contact_def.F90:12
m_fstr::ksmcg
integer(kind=kint), parameter ksmcg
solver method (sm) !CAUTION : (<=100):indirect, (>100):direct
Definition: m_fstr.f90:46
m_fstr::fstr_freqanalysis_data
Definition: m_fstr.f90:584
m_fstr::fstr_heat
Data for HEAT ANSLYSIS (fstrHEAT)
Definition: m_fstr.f90:425
m_fstr::fstr_param_init
subroutine fstr_param_init(fstrPARAM, hecMESH)
Initializer of structure fstr_param.
Definition: m_fstr.f90:979
m_fstr::kel361bbar
integer(kind=kint), parameter kel361bbar
Definition: m_fstr.f90:78
m_fstr::ksmgpbicg
integer(kind=kint), parameter ksmgpbicg
Definition: m_fstr.f90:49
m_fstr::kbcinitial
integer(kind=kint), parameter kbcinitial
Definition: m_fstr.f90:66
m_fstr::kbctransit
integer(kind=kint), parameter kbctransit
Definition: m_fstr.f90:67
m_fstr::kbcfnastran
integer(kind=kint), parameter kbcfnastran
Definition: m_fstr.f90:64
m_fstr::kno
integer(kind=kint), parameter kno
Definition: m_fstr.f90:31
m_out::t_output_ctrl
output control such as output filename, output frequency etc.
Definition: m_out.f90:29
m_fstr::fstr_nullify_fstr_dynamic
subroutine fstr_nullify_fstr_dynamic(DY)
Definition: m_fstr.f90:782
m_fstr::fstr_solid
Definition: m_fstr.f90:238
m_common_struct::g_localcoordsys
type(tlocalcoordsys), dimension(:), pointer, save g_localcoordsys
Definition: m_common_struct.f90:19
m_fstr::fstr_dynamic
Data for DYNAMIC ANSLYSIS (fstrDYNAMIC)
Definition: m_fstr.f90:504
m_fstr::fstr_iscontactactive
logical function fstr_iscontactactive(fstrSOLID, nbc, cstep)
Definition: m_fstr.f90:1052
m_fstr::fstr_nullify_fstr_heat
subroutine fstr_nullify_fstr_heat(H)
Definition: m_fstr.f90:728
m_fstr::idbg
integer(kind=kint), parameter idbg
Definition: m_fstr.f90:111
m_fstr::fstr_param
FSTR INNER CONTROL PARAMETERS (fstrPARAM)
Definition: m_fstr.f90:154
m_fstr::fstr_nullify_fstr_eigen
subroutine fstr_nullify_fstr_eigen(E)
Definition: m_fstr.f90:807
m_fstr::kel341fi
integer(kind=kint), parameter kel341fi
section control
Definition: m_fstr.f90:74
m_fstr::opsstype
integer(kind=kint) opsstype
Definition: m_fstr.f90:132
m_fstr::knsmquasinewton
integer(kind=kint), parameter knsmquasinewton
Definition: m_fstr.f90:56
m_common_struct
This modules defines common structures for fem analysis.
Definition: m_common_struct.f90:6
m_fstr::kyes
integer(kind=kint), parameter kyes
CONSTANTS general.
Definition: m_fstr.f90:30
m_fstr::fstrpr
type(fstr_param), target fstrpr
GLOBAL VARIABLE INITIALIZED IN FSTR_SETUP.
Definition: m_fstr.f90:208
m_fstr::kitrcontinue
integer(kind=kint), parameter kitrcontinue
iteration control
Definition: m_fstr.f90:89
m_fstr::kitrconverged
integer(kind=kint), parameter kitrconverged
Definition: m_fstr.f90:90
m_fstr::tweldline
-1:not relation, >1:index of coupled_node
Definition: m_fstr.f90:628
m_fstr::eps
real(kind=kreal) eps
Definition: m_fstr.f90:142
mmechgauss
This modules defines a structure to record history dependent parameter in static analysis.
Definition: mechgauss.f90:6
m_fstr::kopss_solution
integer(kind=kint), parameter kopss_solution
Definition: m_fstr.f90:130
m_fstr::fstr_freqanalysis
Definition: m_fstr.f90:571
m_fstr::kel341sesns
integer(kind=kint), parameter kel341sesns
Definition: m_fstr.f90:75
m_fstr::kcaalagrange
integer(kind=kint), parameter kcaalagrange
Definition: m_fstr.f90:60
m_fstr::dt
real(kind=kreal) dt
ANALYSIS CONTROL for NLGEOM and HEAT.
Definition: m_fstr.f90:139
m_fstr::ifvs
integer(kind=kint), parameter ifvs
Definition: m_fstr.f90:112
m_fstr::fstr_isboundaryactive
logical function fstr_isboundaryactive(fstrSOLID, nbc, cstep)
Definition: m_fstr.f90:1028
fstr_sort_index
void fstr_sort_index(int *index_data, int *n)
Definition: fstr_sort_index.c:30
m_fstr::kcaslagrange
integer(kind=kint), parameter kcaslagrange
contact analysis algorithm
Definition: m_fstr.f90:59
m_fstr::kststatic
integer(kind=kint), parameter kststatic
Definition: m_fstr.f90:37
m_fstr::knsmnewton
integer(kind=kint), parameter knsmnewton
nonlinear solver method (nsm)
Definition: m_fstr.f90:55
m_fstr::iresout
integer(kind=kint), parameter iresout
Definition: m_fstr.f90:114
m_timepoint
This module manages timepoint information.
Definition: m_timepoint.f90:6
m_fstr
This module defines common data and basic structures for analysis.
Definition: m_fstr.f90:15
m_fstr::tinitialcondition
Definition: m_fstr.f90:144
m_fstr::nprocs
integer(kind=kint) nprocs
Definition: m_fstr.f90:97
m_fstr::ineu
integer(kind=kint), parameter ineu
Definition: m_fstr.f90:113
m_fstr::ivisual
integer(kind=kint), pointer ivisual
Definition: m_fstr.f90:123
m_fstr::ksmgmresr
integer(kind=kint), parameter ksmgmresr
Definition: m_fstr.f90:50
m_fstr::ref_temp
real(kind=kreal), pointer ref_temp
REFTEMP.
Definition: m_fstr.f90:136
m_fstr::g_initialcnd
type(tinitialcondition), dimension(:), pointer, save g_initialcnd
Definition: m_fstr.f90:151
m_fstr::fstr_couple
Data for coupling analysis.
Definition: m_fstr.f90:611
m_fstr::fstr_nullify_fstr_couple
subroutine fstr_nullify_fstr_couple(C)
Definition: m_fstr.f90:814
m_fstr::koff
integer(kind=kint), parameter koff
Definition: m_fstr.f90:33
m_fstr::kfloadtype_surf
integer(kind=kint), parameter kfloadtype_surf
Definition: m_fstr.f90:83
m_fstr::kfloadcase_re
integer(kind=kint), parameter kfloadcase_re
Definition: m_fstr.f90:85
m_fstr::fstr_solid_physic_val
Data for STATIC ANSLYSIS (fstrSOLID)
Definition: m_fstr.f90:211
m_fstr::fstr_nullify_fstr_freqanalysis
subroutine fstr_nullify_fstr_freqanalysis(f)
Definition: m_fstr.f90:794
m_fstr::kstheat
integer(kind=kint), parameter kstheat
Definition: m_fstr.f90:39
m_fstr::iresult
integer(kind=kint), pointer iresult
Definition: m_fstr.f90:122
m_fstr::restart_outall
integer(kind=kint), parameter restart_outall
Definition: m_fstr.f90:71
m_fstr::ksteigen
integer(kind=kint), parameter ksteigen
Definition: m_fstr.f90:38
m_fstr::ksmdirect
integer(kind=kint), parameter ksmdirect
Definition: m_fstr.f90:52
m_fstr::table_amp
subroutine table_amp(hecMESH, fstrSOLID, cstep, jj_n_amp, time, f_t)
Definition: m_fstr.f90:1155
m_fstr::fstr_nullify_fstr_param
subroutine fstr_nullify_fstr_param(P)
NULL POINTER SETTING TO AVOID RUNTIME ERROR.
Definition: m_fstr.f90:658
m_step::isboundaryactive
logical function isboundaryactive(bnd, stepinfo)
Is boundary condition in this step active.
Definition: m_step.f90:100
m_fstr::fstr_set_current_config_to_mesh
subroutine fstr_set_current_config_to_mesh(hecMESH, fstrSOLID, coord)
Definition: m_fstr.f90:1098
m_fstr::get_coordsys
subroutine get_coordsys(cdsys_ID, hecMESH, fstrSOLID, coords)
This subroutine fetch coords defined by local coordinate system.
Definition: m_fstr.f90:1073
hecmw
Definition: hecmw.f90:6
m_step::step_info
Step control such as active boundary condition, convergent condition etc.
Definition: m_step.f90:24
m_fstr::iwres
integer(kind=kint), pointer iwres
Definition: m_fstr.f90:126
m_fstr::ista
integer(kind=kint), parameter ista
Definition: m_fstr.f90:108
m_fstr::kstprecheck
integer(kind=kint), parameter kstprecheck
solution type (st)
Definition: m_fstr.f90:36
m_fstr::kfloadcase_im
integer(kind=kint), parameter kfloadcase_im
Definition: m_fstr.f90:86
m_fstr::kitrdiverged
integer(kind=kint), parameter kitrdiverged
Definition: m_fstr.f90:91
m_fstr::kel361fbar
integer(kind=kint), parameter kel361fbar
Definition: m_fstr.f90:80
m_fstr::kel361ic
integer(kind=kint), parameter kel361ic
Definition: m_fstr.f90:79
m_fstr::kfloadtype_node
integer(kind=kint), parameter kfloadtype_node
Definition: m_fstr.f90:82
m_fstr::kbcffstr
integer(kind=kint), parameter kbcffstr
boundary condition file type (bcf)
Definition: m_fstr.f90:63
m_fstr::hecmat_init
subroutine hecmat_init(hecMAT)
Definition: m_fstr.f90:865
m_fstr::iutb
integer(kind=kint), parameter iutb
Definition: m_fstr.f90:109
m_fstr::irres
integer(kind=kint), pointer irres
Definition: m_fstr.f90:125
m_fstr::nrres
integer(kind=kint), pointer nrres
Definition: m_fstr.f90:127
m_fstr::fstr_nullify_fstr_solid
subroutine fstr_nullify_fstr_solid(S)
Definition: m_fstr.f90:672
m_fstr::fstr_solid_phys_zero
subroutine fstr_solid_phys_zero(phys)
Definition: m_fstr.f90:1123
m_fstr::paracontactflag
logical paracontactflag
PARALLEL CONTACT FLAG.
Definition: m_fstr.f90:100
m_step::isloadactive
logical function isloadactive(bnd, stepinfo)
Is external load in this step active.
Definition: m_step.f90:109
m_fstr::sviarray
integer(kind=kint), dimension(100) sviarray
SOLVER CONTROL.
Definition: m_fstr.f90:117
m_fstr::etime
real(kind=kreal) etime
Definition: m_fstr.f90:140
m_fstr::ilog
integer(kind=kint), parameter ilog
FILE HANDLER.
Definition: m_fstr.f90:107
m_fstr::nprint
integer(kind=kint), pointer nprint
Definition: m_fstr.f90:128
m_fstr::svrarray
real(kind=kreal), dimension(100) svrarray
Definition: m_fstr.f90:118
mmechgauss::telement
All data should be recorded in every elements.
Definition: mechgauss.f90:32
m_fstr::hecmat_finalize
subroutine hecmat_finalize(hecMAT)
Definition: m_fstr.f90:922
m_step
This module manages step information.
Definition: m_step.f90:6
m_fstr::fstr_isembedactive
logical function fstr_isembedactive(fstrSOLID, nbc, cstep)
Definition: m_fstr.f90:1062
m_fstr::ksmgmresren
integer(kind=kint), parameter ksmgmresren
Definition: m_fstr.f90:51
m_fstr::fstr_recover_initial_config_to_mesh
subroutine fstr_recover_initial_config_to_mesh(hecMESH, fstrSOLID, coord)
Definition: m_fstr.f90:1111
m_fstr::fstr_solid_phys_clear
subroutine fstr_solid_phys_clear(fstrSOLID)
Definition: m_fstr.f90:1135
m_fstr::kstdynamic
integer(kind=kint), parameter kstdynamic
Definition: m_fstr.f90:40
m_fstr::kstnzprof
integer(kind=kint), parameter kstnzprof
Definition: m_fstr.f90:43
m_fstr::imsg
integer(kind=kint), parameter imsg
Definition: m_fstr.f90:110