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