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