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