FrontISTR  5.9.0
Large-scale structural analysis program with finit element method
fstr_setup.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 !-------------------------------------------------------------------------------
8  use m_fstr
12  use fstr_ctrl_heat
13  use fstr_ctrl_eigen
16  use mcontact
17  use mcontactparam
19  use m_out
20  use m_step
21  use m_utilities
23  implicit none
24 
27  type(hecmwst_local_mesh), pointer :: mesh
28  type(fstr_param), pointer :: param
29  type(fstr_solid), pointer :: solid
30  type(fstr_heat), pointer :: heat
31  type(fstr_eigen), pointer :: eigen
32  type(fstr_dynamic), pointer :: dyn
33  type(fstr_couple), pointer :: cpl
34  type(fstr_freqanalysis), pointer :: freq
35  end type fstr_param_pack
36 
37 contains
38 
39  !=============================================================================!
41  !=============================================================================!
42  subroutine fstr_setup( cntl_filename, hecMESH, fstrPARAM, &
43  fstrSOLID, fstrEIG, fstrHEAT, fstrDYNAMIC, fstrCPL, fstrFREQ )
44  use mmaterial
45  character(len=HECMW_FILENAME_LEN) :: cntl_filename, input_filename
46  type(hecmwst_local_mesh),target :: hecMESH
47  type(fstr_param),target :: fstrPARAM
48  type(fstr_solid),target :: fstrSOLID
49  type(fstr_eigen),target :: fstrEIG
50  type(fstr_heat),target :: fstrHEAT
51  type(fstr_dynamic),target :: fstrDYNAMIC
52  type(fstr_couple),target :: fstrCPL
53  type(fstr_freqanalysis), target :: fstrFREQ
54 
55  integer(kind=kint) :: ctrl, ctrl_list(20), ictrl
56  type(fstr_param_pack) :: P
57 
58  integer, parameter :: MAXOUTFILE = 10
59  double precision, parameter :: dpi = 3.14159265358979323846d0
60 
61  integer(kind=kint) :: version, result, visual, femap, n_totlyr
62  integer(kind=kint) :: rcode, n, i, j, cid, nout, nin, ierror, cparam_id
63  character(len=HECMW_NAME_LEN) :: header_name, fname(MAXOUTFILE)
64  real(kind=kreal) :: ee, pp, rho, alpha, thick, alpha_over_mu
65  real(kind=kreal) :: beam_radius, &
66  beam_angle1, beam_angle2, beam_angle3,&
67  beam_angle4, beam_angle5, beam_angle6
68  logical :: isOK
69  type(t_output_ctrl) :: outctrl
70  type(tshellmat),pointer :: shmat(:)
71  character(len=HECMW_FILENAME_LEN) :: logfileNAME, mName, mName2
72 
73  ! counters
74  integer(kind=kint) :: c_solution, c_solver, c_nlsolver, c_step, c_write, c_echo, c_amplitude
75  integer(kind=kint) :: c_static, c_boundary, c_cload, c_dload, c_temperature, c_reftemp, c_spring, c_elemact
76  integer(kind=kint) :: c_heat, c_fixtemp, c_cflux, c_dflux, c_sflux, c_film, c_sfilm, c_radiate, c_sradiate
77  integer(kind=kint) :: c_eigen, c_contact, c_contactparam, c_embed, c_contact_if
78  integer(kind=kint) :: c_dynamic, c_velocity, c_acceleration
79  integer(kind=kint) :: c_fload, c_eigenread
80  integer(kind=kint) :: c_couple, c_material
81  integer(kind=kint) :: c_mpc, c_weldline, c_initial
82  integer(kind=kint) :: c_istep, c_localcoord, c_section
83  integer(kind=kint) :: c_elemopt, c_aincparam, c_timepoints
84  integer(kind=kint) :: c_output, islog
85  integer(kind=kint) :: k
86  integer(kind=kint) :: cache = 1
87 
88  write( logfilename, '(i5,''.log'')' ) myrank
89 
90  ! packaging
91  p%MESH => hecmesh
92  p%PARAM => fstrparam
93  p%SOLID => fstrsolid
94  p%EIGEN => fstreig
95  p%HEAT => fstrheat
96  p%DYN => fstrdynamic
97  p%CPL => fstrcpl
98  p%FREQ => fstrfreq
99 
100  fstrparam%contact_algo = kcaalagrange
101 
102  c_solution = 0; c_solver = 0; c_nlsolver = 0; c_step = 0; c_output = 0; c_echo = 0; c_amplitude = 0
103  c_static = 0; c_boundary = 0; c_cload = 0; c_dload = 0; c_temperature = 0; c_reftemp = 0; c_spring = 0;
104  c_elemact = 0;
105  c_heat = 0; c_fixtemp = 0; c_cflux = 0; c_dflux = 0; c_sflux = 0
106  c_film = 0; c_sfilm = 0; c_radiate= 0; c_sradiate = 0
107  c_eigen = 0; c_contact = 0; c_contactparam = 0; c_embed = 0; c_contact_if = 0
108  c_dynamic = 0; c_velocity = 0; c_acceleration = 0
109  c_couple = 0; c_material = 0; c_section =0
110  c_mpc = 0; c_weldline = 0; c_initial = 0
111  c_istep = 0; c_localcoord = 0
112  c_fload = 0; c_eigenread = 0
113  c_elemopt = 0;
114  c_aincparam= 0; c_timepoints = 0
115 
116  ctrl_list = 0
117  ictrl = 1
118  ctrl = fstr_ctrl_open( cntl_filename )
119  if( ctrl < 0 ) then
120  write(*,*) '### Error: Cannot open FSTR control file : ', cntl_filename
121  write(ilog,*) '### Error: Cannot open FSTR control file : ', cntl_filename
122  stop
123  end if
124 
125  version =0
126  do
127  rcode = fstr_ctrl_get_c_h_name( ctrl, header_name, hecmw_name_len )
128  if( header_name == '!VERSION' ) then
129  rcode = fstr_ctrl_get_data_ex( ctrl, 1, 'i ', version )
130  else if( header_name == '!SOLUTION' ) then
131  c_solution = c_solution + 1
132  call fstr_setup_solution( ctrl, c_solution, p )
133  else if( header_name == '!NONLINEAR_SOLVER' ) then
134  c_nlsolver = c_nlsolver + 1
135  call fstr_setup_nonlinear_solver( ctrl, c_nlsolver, p )
136  else if( header_name == '!SOLVER' ) then
137  c_solver = c_solver + 1
138  call fstr_setup_solver( ctrl, c_solver, p )
139  else if( header_name == '!ISTEP' ) then
140  c_istep = c_istep + 1
141  else if( header_name == '!STEP' ) then
142  if( version==0 ) then
143  c_step = c_step + 1
144  call fstr_setup_step( ctrl, c_step, p )
145  else
146  c_istep = c_istep + 1
147  endif
148  else if( header_name == '!WRITE' ) then
149  call fstr_ctrl_get_output( ctrl, outctrl, islog, result, visual, femap )
150  if( visual==1 ) p%PARAM%fg_visual= 1
151  if( result==1 ) p%PARAM%fg_result = 1
152  c_output = c_output+1
153  else if( header_name == '!ECHO' ) then
154  c_echo = c_echo + 1
155  call fstr_setup_echo( ctrl, c_echo, p )
156  else if( header_name == '!RESTART' ) then
157  call fstr_setup_restart( ctrl, nout, p%PARAM%restart_version )
158  fstrsolid%restart_nout= nout
159  fstrdynamic%restart_nout= nout
160  fstrheat%restart_nout= nout
161  else if( header_name == '!ORIENTATION' ) then
162  c_localcoord = c_localcoord + 1
163  else if( header_name == '!AUTOINC_PARAM' ) then
164  c_aincparam = c_aincparam + 1
165  else if( header_name == '!TIME_POINTS' ) then
166  c_timepoints = c_timepoints + 1
167  else if( header_name == '!OUTPUT_SSTYPE' ) then
168  call fstr_setup_output_sstype( ctrl, p )
169  else if( header_name == '!INITIAL_CONDITION' ) then
170  c_initial = c_initial + 1
171  else if( header_name == '!AMPLITUDE' ) then
172  c_amplitude = c_amplitude + 1
173  call fstr_setup_amplitude( ctrl, p )
174  else if( header_name == '!ELEMENT_ACTIVATION' ) then
175  c_elemact = c_elemact + 1
176  call fstr_setup_element_activation( ctrl, c_elemact, p )
177 
178  !--------------- for static -------------------------
179 
180  else if( header_name == '!STATIC' ) then
181  c_static = c_static + 1
182  call fstr_setup_static( ctrl, c_static, p )
183  else if( header_name == '!BOUNDARY' ) then
184  c_boundary = c_boundary + 1
185  call fstr_setup_boundary( ctrl, c_boundary, p )
186  else if( header_name == '!CLOAD' ) then
187  c_cload = c_cload + 1
188  call fstr_setup_cload( ctrl, c_cload, p )
189  n = fstr_ctrl_get_data_line_n( ctrl )
190  else if( header_name == '!DLOAD' ) then
191  c_dload = c_dload + 1
192  call fstr_setup_dload( ctrl, c_dload, p )
193  else if( header_name == '!CONTACT_ALGO' ) then
194  call fstr_setup_contactalgo( ctrl, p )
195  else if( header_name == '!CONTACT' ) then
196  n = fstr_ctrl_get_data_line_n( ctrl )
197  c_contact = c_contact + n
198  else if( header_name == '!EMBED' ) then
199  n = fstr_ctrl_get_data_line_n( ctrl )
200  c_embed = c_embed + n
201  else if( header_name == '!CONTACT_PARAM' ) then
202  c_contactparam = c_contactparam + 1
203  else if( header_name == '!CONTACT_INTERFERENCE' ) then
204  n = fstr_ctrl_get_data_line_n( ctrl )
205  c_contact_if = c_contact_if + n
206  else if( header_name == '!MATERIAL' ) then
207  c_material = c_material + 1
208  else if( header_name == '!TEMPERATURE' ) then
209  c_temperature = c_temperature + 1
210  call fstr_setup_temperature( ctrl, c_temperature, p )
211  else if( header_name == '!SPRING' ) then
212  c_spring = c_spring + 1
213  call fstr_setup_spring( ctrl, c_spring, p )
214  else if( header_name == '!REFTEMP' ) then
215  c_reftemp = c_reftemp + 1
216  call fstr_setup_reftemp( ctrl, c_reftemp, p )
217 
218  !--------------- for heat -------------------------
219 
220  else if( header_name == '!HEAT' ) then
221  c_heat = c_heat + 1
222  else if( header_name == '!FIXTEMP' ) then
223  c_fixtemp = c_fixtemp + 1
224  call fstr_setup_fixtemp( ctrl, c_fixtemp, p )
225  else if( header_name == '!CFLUX' ) then
226  c_cflux = c_cflux + 1
227  call fstr_setup_cflux( ctrl, c_cflux, p )
228  else if( header_name == '!DFLUX' ) then
229  c_dflux = c_dflux + 1
230  call fstr_setup_dflux( ctrl, c_dflux, p )
231  else if( header_name == '!SFLUX' ) then
232  c_sflux = c_sflux + 1
233  call fstr_setup_sflux( ctrl, c_sflux, p )
234  else if( header_name == '!FILM' ) then
235  c_film = c_film + 1
236  call fstr_setup_film( ctrl, c_film, p )
237  else if( header_name == '!SFILM' ) then
238  c_sfilm = c_sfilm + 1
239  call fstr_setup_sfilm( ctrl, c_sfilm, p )
240  else if( header_name == '!RADIATE' ) then
241  c_radiate = c_radiate + 1
242  call fstr_setup_radiate( ctrl, c_radiate, p )
243  else if( header_name == '!SRADIATE' ) then
244  c_sradiate = c_sradiate + 1
245  call fstr_setup_sradiate( ctrl, c_sradiate, p )
246  else if( header_name == '!WELD_LINE' ) then
247  c_weldline = c_weldline + 1
248 
249  !--------------- for eigen -------------------------
250 
251  else if( header_name == '!EIGEN' ) then
252  c_eigen = c_eigen + 1
253  call fstr_setup_eigen( ctrl, c_eigen, p )
254 
255  !--------------- for dynamic -------------------------
256 
257  else if( header_name == '!DYNAMIC' ) then
258  c_dynamic = c_dynamic + 1
259  call fstr_setup_dynamic( ctrl, c_eigen, p )
260  else if( header_name == '!VELOCITY' ) then
261  c_velocity = c_velocity + 1
262  call fstr_setup_velocity( ctrl, c_eigen, p )
263  else if( header_name == '!ACCELERATION' ) then
264  c_acceleration = c_acceleration + 1
265  call fstr_setup_acceleration( ctrl, c_eigen, p )
266  else if( header_name == '!FLOAD' ) then
267  c_fload = c_fload + 1
268  call fstr_setup_fload( ctrl , c_fload, p )
269  else if( header_name == '!EIGENREAD' ) then
270  c_eigenread = c_eigenread + 1
271  call fstr_setup_eigenread( ctrl, c_eigenread, p )
272 
273  !--------------- for couple -------------------------
274 
275  else if( header_name == '!COUPLE' ) then
276  c_couple = c_couple + 1
277  call fstr_setup_couple( ctrl, c_couple, p )
278 
279  !--------------- for mpc -------------------------
280 
281  else if( header_name == '!MPC' ) then
282  c_mpc = c_mpc + 1
283  call fstr_setup_mpc( ctrl, c_mpc, p )
284 
285  !--------------------- for input -------------------------
286 
287  else if( header_name == '!INCLUDE' ) then
288  ctrl_list(ictrl) = ctrl
289  input_filename = ""
290  ierror = fstr_ctrl_get_param_ex( ctrl, 'INPUT ', '# ', 0, 'S', input_filename )
291  ctrl = fstr_ctrl_open( input_filename )
292  if( ctrl < 0 ) then
293  write(*,*) '### Error: Cannot open FSTR control file : ', input_filename
294  write(ilog,*) '### Error: Cannot open FSTR control file : ', input_filename
295  stop
296  end if
297  ictrl = ictrl + 1
298  cycle
299 
300  !--------------------- END -------------------------
301 
302  else if( header_name == '!END' ) then
303  exit
304  end if
305 
306  ! next
307  if( fstr_ctrl_seek_next_header(ctrl) == 0 )then
308  if( ictrl == 1 )then
309  exit
310  else
311  ierror= fstr_ctrl_close( ctrl )
312  ictrl = ictrl - 1
313  ctrl = ctrl_list(ictrl)
314  if( fstr_ctrl_seek_next_header(ctrl) == 0 ) exit
315  endif
316  endif
317  end do
318 
319  ! -----
320  fstrsolid%n_contacts = c_contact
321  if( c_contact>0 ) then
322  allocate( fstrsolid%contacts( c_contact ) )
323  ! convert SURF_SURF contact to NODE_SURF contact
324  call fstr_convert_contact_type( p%MESH )
325  endif
326  fstrsolid%n_embeds = c_embed
327  if( c_embed>0 ) allocate( fstrsolid%embeds( c_embed ) )
328  if( c_weldline>0 ) allocate( fstrheat%weldline( c_weldline ) )
329  if( c_initial>0 ) allocate( g_initialcnd( c_initial ) )
330  if( c_istep>0 ) then
331  allocate( fstrsolid%step_ctrl( c_istep ) )
332  do i=1, c_istep
333  call init_stepinfo( fstrsolid%step_ctrl(i) )
334  if( p%PARAM%solution_type==kstdynamic ) then
335  fstrsolid%step_ctrl(i)%num_substep = fstrdynamic%n_step
336  fstrsolid%step_ctrl(i)%initdt = fstrdynamic%t_delta
337  fstrsolid%step_ctrl(i)%elapsetime = dble(fstrdynamic%n_step) * fstrdynamic%t_delta
338  fstrsolid%step_ctrl(i)%mindt = fstrdynamic%t_delta
339  fstrsolid%step_ctrl(i)%maxdt = fstrdynamic%t_delta
340  endif
341  end do
342  endif
343  if( c_localcoord>0 ) allocate( g_localcoordsys(c_localcoord) )
344  allocate( fstrparam%ainc(0:c_aincparam) )
345  do i=0,c_aincparam
346  call init_aincparam( fstrparam%ainc(i) )
347  end do
348  if( c_timepoints>0 ) allocate( fstrparam%timepoints(c_timepoints) )
349  allocate( fstrparam%contactparam(0:c_contactparam) )
350  do i=0,c_contactparam
351  call init_contactparam( fstrparam%contactparam(i) )
352  end do
353  if( c_contact_if>0 )then
354  allocate( fstrparam%contact_if( c_contact_if ) )
355  do i=1,c_contact_if
356  call init_contact_if( fstrparam%contact_if(i) )
357  end do
358  end if
359 
360  p%SOLID%is_33shell = 0
361  p%SOLID%is_33beam = 0
362 
363  do i=1,hecmesh%n_elem_type
364  n = hecmesh%elem_type_item(i)
365  if (n == 781 .or. n == 761)then
366  p%SOLID%is_33shell = 1
367  elseif (n == 641)then
368  p%SOLID%is_33beam = 1
369  endif
370  enddo
371 
372  n = c_material
373  if( hecmesh%material%n_mat>n ) n= hecmesh%material%n_mat
374  if( n==0 ) stop "material property not defined!"
375  allocate( fstrsolid%materials( n ) )
376  do i = 1, n
377  call initmaterial(fstrsolid%materials(i))
378  enddo
379  if( hecmesh%section%n_sect >0 ) then
380  do i=1,hecmesh%section%n_sect
381  if( hecmesh%section%sect_type(i) == 4 ) cycle
382  cid = hecmesh%section%sect_mat_ID_item(i)
383  if( cid>n ) stop "Error in material property definition!"
384  if( fstrparam%nlgeom .or. fstrparam%solution_type==kststaticeigen ) &
385  fstrsolid%materials(cid)%nlgeom_flag = 1
386  nullify(shmat)
387  call fstr_get_prop(hecmesh,shmat,i,ee,pp,rho,alpha,thick,&
388  n_totlyr,alpha_over_mu, &
389  beam_radius,beam_angle1,beam_angle2,beam_angle3, &
390  beam_angle4,beam_angle5,beam_angle6)
391  fstrsolid%materials(cid)%name = hecmesh%material%mat_name(cid)
392  fstrsolid%materials(cid)%variables(m_youngs)=ee
393  fstrsolid%materials(cid)%variables(m_poisson)=pp
394  fstrsolid%materials(cid)%variables(m_density)=rho
395  fstrsolid%materials(cid)%variables(m_exapnsion)=alpha
396  fstrsolid%materials(cid)%variables(m_thick)=thick
397  fstrsolid%materials(cid)%variables(m_alpha_over_mu)= alpha_over_mu
398  fstrsolid%materials(cid)%variables(m_beam_radius)=beam_radius
399  fstrsolid%materials(cid)%variables(m_beam_angle1)=beam_angle1
400  fstrsolid%materials(cid)%variables(m_beam_angle2)=beam_angle2
401  fstrsolid%materials(cid)%variables(m_beam_angle3)=beam_angle3
402  fstrsolid%materials(cid)%variables(m_beam_angle4)=beam_angle4
403  fstrsolid%materials(cid)%variables(m_beam_angle5)=beam_angle5
404  fstrsolid%materials(cid)%variables(m_beam_angle6)=beam_angle6
405  fstrsolid%materials(cid)%mtype = elastic
406  if( hecmesh%section%sect_type(i) == 2 ) then
407  fstrsolid%materials(cid)%totallyr = n_totlyr
408  fstrsolid%materials(cid)%shell_var => shmat
409  endif
410  enddo
411  endif
412 
413  ! for section control
414  allocate( fstrsolid%sections(hecmesh%section%n_sect) )
415  do i=1,hecmesh%section%n_sect
416  ! set default 361 element formulation
417  if( p%PARAM%solution_type==kststatic .or. p%PARAM%solution_type==kstdynamic ) then
418  if( p%PARAM%nlgeom ) then
419  fstrsolid%sections(i)%elemopt361 = kel361fbar
420  else
421  fstrsolid%sections(i)%elemopt361 = kel361ic
422  end if
423  else if( p%PARAM%solution_type==ksteigen ) then
424  fstrsolid%sections(i)%elemopt361 = kel361ic
425  else if( p%PARAM%solution_type==kststaticeigen ) then
426  fstrsolid%sections(i)%elemopt361 = kel361fbar
427  else
428  fstrsolid%sections(i)%elemopt361 = kel361fi
429  end if
430  fstrsolid%sections(i)%elemopt341 = kel341fi
431  enddo
432 
433  allocate( fstrsolid%output_ctrl( 4 ) )
434  call fstr_init_outctrl(fstrsolid%output_ctrl(1))
435  fstrsolid%output_ctrl( 1 )%filename = trim(logfilename)
436  fstrsolid%output_ctrl( 1 )%filenum = ilog
437  call fstr_init_outctrl(fstrsolid%output_ctrl(2))
438  call fstr_init_outctrl(fstrsolid%output_ctrl(3))
439  call fstr_init_outctrl(fstrsolid%output_ctrl(4))
440 
441  ! -----
442  rcode = fstr_ctrl_rewind( ctrl )
443 
444  c_istep = 0
445  c_heat = 0
446  c_material = 0
447  c_output = 0
448  c_contact = 0
449  c_contactparam = 0
450  c_contact_if = 0
451  c_embed = 0
452  c_initial = 0
453  c_localcoord = 0
454  c_section = 0
455  fstrheat%WL_tot = 0
456  c_elemopt = 0
457  c_aincparam = 0
458  c_timepoints = 0
459  fstrsolid%elemopt361 = 0
460  fstrsolid%AutoINC_stat = 0
461  fstrsolid%CutBack_stat = 0
462  fstrsolid%NRstat_i(:) = 0
463  fstrsolid%NRstat_r(:) = 0.d0
464  ictrl = 1
465  do
466  rcode = fstr_ctrl_get_c_h_name( ctrl, header_name, hecmw_name_len )
467 
468  if( header_name == '!ORIENTATION' ) then
469  c_localcoord = c_localcoord + 1
470  if( fstr_setup_orientation( ctrl, hecmesh, c_localcoord, g_localcoordsys(c_localcoord) )/=0 ) then
471  write(*,*) '### Error: Fail in read in ORIENTATION definition : ', c_localcoord
472  write(ilog,*) '### Error: Fail in read in ORIENTATION definition : ', c_localcoord
473  stop
474  endif
475 
476  ! ----- CONTACT condition setting
477  elseif( header_name == '!CONTACT' ) then
478  n = fstr_ctrl_get_data_line_n( ctrl )
479  if( .not. fstr_ctrl_get_contact( ctrl, n, fstrsolid%contacts(c_contact+1:c_contact+n) &
480  ,ee, pp, rho, alpha, p%PARAM%contact_algo, mname, k ) ) then
481  write(*,*) '### Error: Fail in read in contact condition : ', c_contact
482  write(ilog,*) '### Error: Fail in read in contact condition : ', c_contact
483  stop
484  endif
485  cparam_id = 0
486  do i=1,size(fstrparam%contactparam)-1
487  if( fstr_streqr( fstrparam%contactparam(i)%name, mname ) ) then
488  cparam_id = i; exit
489  endif
490  enddo
491  ! initialize contact condition (cdotp and mut are now obsolete - penalty is in tContact)
492  if( rho>0.d0 ) cgn = rho
493  if( alpha>0.d0 ) cgt = alpha
494  do i=1,n
495  fstrsolid%contacts(c_contact+i)%smoothing = k
496  if( .not. fstr_contact_check( fstrsolid%contacts(c_contact+i), p%MESH ) ) then
497  write(*,*) '### Error: Inconsistence in contact and surface definition : ' , i+c_contact
498  write(ilog,*) '### Error: Inconsistence in contact and surface definition : ', i+c_contact
499  stop
500  else
501  if(paracontactflag) then
502  isok = fstr_contact_init( fstrsolid%contacts(c_contact+i), p%MESH, fstrparam%contactparam(cparam_id), myrank)
503  else
504  isok = fstr_contact_init( fstrsolid%contacts(c_contact+i), p%MESH, fstrparam%contactparam(cparam_id))
505  endif
506  ! call fstr_write_contact( 6, fstrSOLID%contacts(c_contact+i) )
507  endif
508  enddo
509  c_contact = c_contact+n
510 
511  ! ----- EMBED condition setting
512  elseif( header_name == '!EMBED' ) then
513  n = fstr_ctrl_get_data_line_n( ctrl )
514  if( .not. fstr_ctrl_get_embed( ctrl, n, fstrsolid%embeds(c_embed+1:c_embed+n), mname, k ) ) then
515  write(*,*) '### Error: Fail in read in embed condition : ', c_embed
516  write(ilog,*) '### Error: Fail in read in embed condition : ', c_embed
517  stop
518  endif
519  cparam_id = 0
520  do i=1,size(fstrparam%contactparam)-1
521  if( fstr_streqr( fstrparam%contactparam(i)%name, mname ) ) then
522  cparam_id = i; exit
523  endif
524  enddo
525  do i=1,n
526  fstrsolid%embeds(c_embed+i)%smoothing = k
527  if( .not. fstr_contact_check( fstrsolid%embeds(c_embed+i), p%MESH ) ) then
528  write(*,*) '### Error: Inconsistence in contact and surface definition : ' , i+c_embed
529  write(ilog,*) '### Error: Inconsistence in contact and surface definition : ', i+c_embed
530  stop
531  else
532  if(paracontactflag) then
533  isok = fstr_embed_init( fstrsolid%embeds(c_embed+i), p%MESH, fstrparam%contactparam(cparam_id), myrank)
534  else
535  isok = fstr_embed_init( fstrsolid%embeds(c_embed+i), p%MESH, fstrparam%contactparam(cparam_id))
536  endif
537  endif
538  enddo
539  c_embed = c_embed+n
540 
541  else if( header_name == '!ISTEP' ) then
542  c_istep = c_istep+1
543  if( .not. fstr_ctrl_get_istep( ctrl, hecmesh, fstrsolid%step_ctrl(c_istep), mname, mname2 ) ) then
544  write(*,*) '### Error: Fail in read in step definition : ' , c_istep
545  write(ilog,*) '### Error: Fail in read in step definition : ', c_istep
546  stop
547  endif
548  if( associated(fstrparam%timepoints) ) then
549  do i=1,size(fstrparam%timepoints)
550  if( fstr_streqr( fstrparam%timepoints(i)%name, mname ) ) then
551  fstrsolid%step_ctrl(c_istep)%timepoint_id = i; exit
552  endif
553  enddo
554  endif
555  if( associated(fstrparam%ainc) ) then
556  do i=1,size(fstrparam%ainc)
557  if( fstr_streqr( fstrparam%ainc(i)%name, mname2 ) ) then
558  fstrsolid%step_ctrl(c_istep)%AincParam_id = i; exit
559  endif
560  enddo
561  endif
562  else if( header_name == '!STEP' .and. version>=1 ) then
563  c_istep = c_istep+1
564  if( .not. fstr_ctrl_get_istep( ctrl, hecmesh, fstrsolid%step_ctrl(c_istep), mname, mname2 ) ) then
565  write(*,*) '### Error: Fail in read in step definition : ' , c_istep
566  write(ilog,*) '### Error: Fail in read in step definition : ', c_istep
567  stop
568  endif
569  ! For DYNAMIC fixed-increment: keep the !DYNAMIC time increment while preserving !STEP duration.
570  ! fstr_ctrl_get_ISTEP unconditionally sets initdt=1/num_substep which is wrong for DYNAMIC.
571  ! Only override initdt/mindt/maxdt; keep elapsetime and num_substep as-is.
572  if( p%PARAM%solution_type==kstdynamic .and. &
573  & fstrsolid%step_ctrl(c_istep)%inc_type == stepfixedinc ) then
574  fstrsolid%step_ctrl(c_istep)%initdt = fstrdynamic%t_delta
575  fstrsolid%step_ctrl(c_istep)%mindt = fstrdynamic%t_delta
576  fstrsolid%step_ctrl(c_istep)%maxdt = fstrdynamic%t_delta
577  endif
578  if( associated(fstrparam%timepoints) ) then
579  do i=1,size(fstrparam%timepoints)
580  if( fstr_streqr( fstrparam%timepoints(i)%name, mname ) ) then
581  fstrsolid%step_ctrl(c_istep)%timepoint_id = i; exit
582  endif
583  enddo
584  endif
585  if( associated(fstrparam%ainc) ) then
586  do i=1,size(fstrparam%ainc)-1
587  if( fstr_streqr( fstrparam%ainc(i)%name, mname2 ) ) then
588  fstrsolid%step_ctrl(c_istep)%AincParam_id = i; exit
589  endif
590  enddo
591  endif
592 
593  else if( header_name == '!HEAT' ) then
594  c_heat = c_heat + 1
595  call fstr_setup_heat( ctrl, c_heat, p )
596 
597  else if( header_name == '!WELD_LINE' ) then
598  fstrheat%WL_tot = fstrheat%WL_tot+1
599  if( fstr_ctrl_get_weldline( ctrl, hecmesh, hecmw_name_len, fstrheat%weldline(fstrheat%WL_tot) )/=0 ) then
600  write(*,*) '### Error: Fail in read in Weld Line definition : ' , fstrheat%WL_tot
601  write(ilog,*) '### Error: Fail in read in Weld Line definition : ', fstrheat%WL_tot
602  stop
603  endif
604 
605  else if( header_name == '!INITIAL_CONDITION' .or. header_name == '!INITIAL CONDITION' ) then
606  c_initial = c_initial+1
607  if( fstr_setup_initial( ctrl, g_initialcnd(c_initial), p%MESH )/=0 ) then
608  write(*,*) '### Error: Fail in read in INITIAL CONDITION definition : ' ,c_initial
609  write(ilog,*) '### Error: Fail in read in INITIAL CONDITION definition : ', c_initial
610  stop
611  endif
612 
613  else if( header_name == '!SECTION' ) then
614  c_section = c_section+1
615  if( fstr_ctrl_get_section( ctrl, hecmesh, fstrsolid%sections )/=0 ) then
616  write(*,*) '### Error: Fail in read in SECTION definition : ' , c_section
617  write(ilog,*) '### Error: Fail in read in SECTION definition : ', c_section
618  stop
619  endif
620 
621  else if( header_name == '!ELEMOPT' ) then
622  c_elemopt = c_elemopt+1
623  if( fstr_ctrl_get_elemopt( ctrl, fstrsolid%elemopt361 )/=0 ) then
624  write(*,*) '### Error: Fail in read in ELEMOPT definition : ' , c_elemopt
625  write(ilog,*) '### Error: Fail in read in ELEMOPT definition : ', c_elemopt
626  stop
627  endif
628 
629  !== following material properties ==
630  else if( header_name == '!MATERIAL' ) then
631  c_material = c_material+1
632  if( fstr_ctrl_get_material( ctrl, mname )/=0 ) then
633  write(*,*) '### Error: Fail in read in material definition : ' , c_material
634  write(ilog,*) '### Error: Fail in read in material definition : ', c_material
635  stop
636  endif
637  cid = 0
638  if(cache < hecmesh%material%n_mat) then
639  if(fstr_streqr( hecmesh%material%mat_name(cache), mname ))then
640  cid = cache
641  cache = cache + 1
642  endif
643  endif
644  if(cid == 0)then
645  do i=1,hecmesh%material%n_mat
646  if( fstr_streqr( hecmesh%material%mat_name(i), mname ) ) then
647  cid = i
648  cache = i + 1
649  exit
650  endif
651  enddo
652  endif
653  if(cid == 0)then
654  write(*,*) '### Error: Fail in read in material definition : ' , c_material
655  write(ilog,*) '### Error: Fail in read in material definition : ', c_material
656  stop
657  endif
658  fstrsolid%materials(cid)%name = mname
659  if(c_material>hecmesh%material%n_mat) call initmaterial( fstrsolid%materials(cid) )
660 
661  else if( header_name == '!ELASTIC' ) then
662  if( c_material >0 ) then
663  if( fstr_ctrl_get_elasticity( ctrl, &
664  fstrsolid%materials(cid)%mtype, &
665  fstrsolid%materials(cid)%nlgeom_flag, &
666  fstrsolid%materials(cid)%variables, &
667  fstrsolid%materials(cid)%dict)/=0 ) then
668  write(*,*) '### Error: Fail in read in elasticity definition : ' , cid
669  write(ilog,*) '### Error: Fail in read in elasticity definition : ', cid
670  stop
671  endif
672  endif
673  else if( header_name == '!PLASTIC' ) then
674  if( cid >0 ) then
675  if( fstr_ctrl_get_plasticity( ctrl, &
676  fstrsolid%materials(cid)%mtype, &
677  fstrsolid%materials(cid)%nlgeom_flag, &
678  fstrsolid%materials(cid)%variables, &
679  fstrsolid%materials(cid)%table, &
680  fstrsolid%materials(cid)%dict)/=0 ) then
681  write(*,*) '### Error: Fail in read in plasticity definition : ' , cid
682  write(ilog,*) '### Error: Fail in read in plasticity definition : ', cid
683  stop
684  endif
685  endif
686  else if( header_name == '!HYPERELASTIC' ) then
687  if( cid >0 ) then
688  if( fstr_ctrl_get_hyperelastic( ctrl, &
689  fstrsolid%materials(cid)%mtype, &
690  fstrsolid%materials(cid)%nlgeom_flag, &
691  fstrsolid%materials(cid)%variables )/=0 ) then
692  write(*,*) '### Error: Fail in read in elasticity definition : ' , cid
693  write(ilog,*) '### Error: Fail in read in elasticity definition : ', cid
694  stop
695  endif
696  endif
697  else if( header_name == '!VISCOELASTIC' ) then
698  if( cid >0 ) then
699  if( fstr_ctrl_get_viscoelasticity( ctrl, &
700  fstrsolid%materials(cid)%mtype, &
701  fstrsolid%materials(cid)%nlgeom_flag, &
702  fstrsolid%materials(cid)%dict)/=0 ) then
703  write(*,*) '### Error: Fail in read in plasticity definition : ' , cid
704  write(ilog,*) '### Error: Fail in read in plasticity definition : ', cid
705  stop
706  endif
707  endif
708  else if( header_name == '!TRS' ) then
709  if( cid >0 ) then
710  if( fstrsolid%materials(cid)%mtype/=viscoelastic ) then
711  write(*,*) '### WARNING: TRS can only be defined for viscoelastic material! It is ignored! '
712  write(ilog,*) '### WARNING: TRS can only be defined for viscoelastic material! It is ignored! '
713  else
714  if( fstr_ctrl_get_trs( ctrl, fstrsolid%materials(cid)%mtype, fstrsolid%materials(cid)%variables)/=0 ) then
715  write(*,*) '### Error: Fail in read in TRS definition : ' , cid
716  write(ilog,*) '### Error: Fail in read in TRS definition : ', cid
717  stop
718  endif
719  endif
720  endif
721  else if( header_name == '!CREEP' ) then
722  if( cid >0 ) then
723  if( fstr_ctrl_get_viscoplasticity( ctrl, &
724  fstrsolid%materials(cid)%mtype, &
725  fstrsolid%materials(cid)%nlgeom_flag, &
726  fstrsolid%materials(cid)%dict)/=0 ) then
727  write(*,*) '### Error: Fail in read in plasticity definition : ' , cid
728  write(ilog,*) '### Error: Fail in read in plasticity definition : ', cid
729  stop
730  endif
731  endif
732  else if( header_name == '!DENSITY' ) then
733  if( cid >0 ) then
734  if( fstr_ctrl_get_density( ctrl, fstrsolid%materials(cid)%variables )/=0 ) then
735  write(*,*) '### Error: Fail in read in density definition : ' , cid
736  write(ilog,*) '### Error: Fail in read in density definition : ', cid
737  stop
738  endif
739  endif
740  else if( header_name == '!EXPANSION_COEF' .or. header_name == '!EXPANSION_COEFF' .or. &
741  header_name == '!EXPANSION') then
742  if( cid >0 ) then
743  if( fstr_ctrl_get_expansion_coeff( ctrl, fstrsolid%materials(cid)%variables, &
744  fstrsolid%materials(cid)%dict)/=0 ) then
745  write(*,*) '### Error: Fail in read in expansion coefficient definition : ' , cid
746  write(ilog,*) '### Error: Fail in read in expansion coefficient definition : ', cid
747  stop
748  endif
749  endif
750  else if( header_name == '!DAMPING') then
751  if( cid >0 ) then
752  if( fstr_ctrl_get_rayleigh_damping( ctrl, fstrsolid%materials(cid)%variables, &
753  fstrsolid%materials(cid)%is_elem_Rayleigh_damping)/=0 ) then
754  write(*,*) '### Error: Fail in read in damping definition : ' , cid
755  write(ilog,*) '### Error: Fail in read in damping definition : ', cid
756  stop
757  endif
758  endif
759  else if( header_name == '!FLUID' ) then
760  if( c_material >0 ) then
761  if( fstr_ctrl_get_fluid( ctrl, &
762  fstrsolid%materials(cid)%mtype, &
763  fstrsolid%materials(cid)%nlgeom_flag, &
764  fstrsolid%materials(cid)%variables, &
765  fstrsolid%materials(cid)%dict)/=0 ) then
766  write(*,*) '### Error: Fail in read in fluid definition : ' , cid
767  write(ilog,*) '### Error: Fail in read in fluid definition : ', cid
768  stop
769  endif
770  endif
771  else if( header_name == '!SPRING_D' ) then
772  if( c_material >0 ) then
773  if( fstr_ctrl_get_spring_d( ctrl, &
774  fstrsolid%materials(cid)%mtype, &
775  fstrsolid%materials(cid)%nlgeom_flag, &
776  fstrsolid%materials(cid)%variables_i, &
777  fstrsolid%materials(cid)%dict)/=0 ) then
778  write(*,*) '### Error: Fail in read in spring_d definition : ' , cid
779  write(ilog,*) '### Error: Fail in read in spring_d definition : ', cid
780  stop
781  endif
782  endif
783  else if( header_name == '!SPRING_A' ) then
784  if( c_material >0 ) then
785  if( fstr_ctrl_get_spring_a( ctrl, &
786  fstrsolid%materials(cid)%mtype, &
787  fstrsolid%materials(cid)%nlgeom_flag, &
788  fstrsolid%materials(cid)%variables_i, &
789  fstrsolid%materials(cid)%dict)/=0 ) then
790  write(*,*) '### Error: Fail in read in spring_a definition : ' , cid
791  write(ilog,*) '### Error: Fail in read in spring_a definition : ', cid
792  stop
793  endif
794  endif
795  else if( header_name == '!DASHPOT_D' ) then
796  if( c_material >0 ) then
797  if( fstr_ctrl_get_dashpot_d( ctrl, &
798  fstrsolid%materials(cid)%mtype, &
799  fstrsolid%materials(cid)%nlgeom_flag, &
800  fstrsolid%materials(cid)%variables_i, &
801  fstrsolid%materials(cid)%dict)/=0 ) then
802  write(*,*) '### Error: Fail in read in spring_d definition : ' , cid
803  write(ilog,*) '### Error: Fail in read in spring_d definition : ', cid
804  stop
805  endif
806  endif
807  else if( header_name == '!DASHPOT_A' ) then
808  if( c_material >0 ) then
809  if( fstr_ctrl_get_dashpot_a( ctrl, &
810  fstrsolid%materials(cid)%mtype, &
811  fstrsolid%materials(cid)%nlgeom_flag, &
812  fstrsolid%materials(cid)%variables_i, &
813  fstrsolid%materials(cid)%dict)/=0 ) then
814  write(*,*) '### Error: Fail in read in spring_a definition : ' , cid
815  write(ilog,*) '### Error: Fail in read in spring_a definition : ', cid
816  stop
817  endif
818  endif
819  else if( header_name == '!USER_MATERIAL' ) then
820  if( cid >0 ) then
821  if( fstr_ctrl_get_usermaterial( ctrl, fstrsolid%materials(cid)%mtype, &
822  fstrsolid%materials(cid)%nlgeom_flag, fstrsolid%materials(cid)%nfstatus, &
823  fstrsolid%materials(cid)%variables(101:) )/=0 ) then
824  write(*,*) '### Error: Fail in read in user defined material : ' , cid
825  write(ilog,*) '### Error: Fail in read in user defined material : ', cid
826  stop
827  endif
828  endif
829 
830 
831  ! == Following output control ==
832  else if( header_name == '!WRITE' ) then
833  call fstr_ctrl_get_output( ctrl, outctrl, islog, result, visual, femap )
834  if( islog == 1 ) then
835  c_output=1
836  outctrl%filename = trim(logfilename)
837  outctrl%filenum = ilog
838  call fstr_copy_outctrl(fstrsolid%output_ctrl(c_output), outctrl)
839  endif
840  if( femap == 1 ) then
841  c_output=2
842  write( outctrl%filename, '(a,i0,a)') 'utable.',myrank,'.dat'
843  outctrl%filenum = iutb
844  call fstr_copy_outctrl(fstrsolid%output_ctrl(c_output), outctrl)
845  open( unit=outctrl%filenum, file=outctrl%filename, status='REPLACE', iostat=ierror )
846  if( ierror /= 0 ) then
847  write(*,*) 'Warning: cannot open output file: ', trim(outctrl%filename)
848  endif
849  fstrsolid%output_ctrl(c_output)%outinfo%grp_id = 1
850  endif
851  if( result == 1 ) then
852  c_output=3
853  call fstr_copy_outctrl(fstrsolid%output_ctrl(c_output), outctrl)
854  endif
855  if( visual == 1 ) then
856  c_output=4
857  call fstr_copy_outctrl(fstrsolid%output_ctrl(c_output), outctrl)
858  endif
859 
860  else if( header_name == '!OUTPUT_RES' ) then
861  c_output=3
862  if( .not. fstr_ctrl_get_outitem( ctrl, hecmesh, fstrsolid%output_ctrl(c_output)%outinfo ) ) then
863  write(*,*) '### Error: Fail in read in node output definition : ' , c_output
864  write(ilog,*) '### Error: Fail in read in node output definition : ', c_output
865  stop
866  endif
867  if( fstrsolid%output_ctrl(c_output)%outinfo%grp_id_name /= 'ALL' ) then
868  c_output=2
869  do i=1,hecmesh%node_group%n_grp
870  if( fstrsolid%output_ctrl(c_output)%outinfo%grp_id_name == hecmesh%node_group%grp_name(i) ) then
871  fstrsolid%output_ctrl(c_output)%outinfo%grp_id = i; exit
872  endif
873  enddo
874  endif
875  else if( header_name == '!OUTPUT_VIS' ) then
876  c_output=4
877  if( .not. fstr_ctrl_get_outitem( ctrl, hecmesh, fstrsolid%output_ctrl(c_output)%outinfo ) ) then
878  write(*,*) '### Error: Fail in read in element output definition : ' , c_output
879  write(ilog,*) '### Error: Fail in read in element output definition : ', c_output
880  stop
881  endif
882  if( fstrsolid%output_ctrl(c_output)%outinfo%grp_id_name /= 'ALL' ) then
883  c_output=2
884  do i=1,hecmesh%node_group%n_grp
885  if( fstrsolid%output_ctrl(c_output)%outinfo%grp_id_name == hecmesh%node_group%grp_name(i) ) then
886  fstrsolid%output_ctrl(c_output)%outinfo%grp_id = i; exit
887  endif
888  enddo
889  endif
890  else if( header_name == '!AUTOINC_PARAM' ) then
891  c_aincparam = c_aincparam + 1
892  if( fstr_get_autoinc( ctrl, fstrparam%ainc(c_aincparam) ) /=0 ) then
893  write(*,*) '### Error: Fail in read in AUTOINC_PARAM definition : ' , c_aincparam
894  write(ilog,*) '### Error: Fail in read in AUTOINC_PARAM definition : ', c_aincparam
895  stop
896  endif
897  else if( header_name == '!TIME_POINTS' ) then
898  c_timepoints = c_timepoints + 1
899  if( fstr_ctrl_get_timepoints( ctrl, fstrparam%timepoints(c_timepoints) )/=0 ) then
900  write(*,*) '### Error: Fail in read in TIME_POINTS definition : ' , c_timepoints
901  write(ilog,*) '### Error: Fail in read in TIME_POINTS definition : ', c_timepoints
902  stop
903  endif
904  else if( header_name == '!CONTACT_PARAM' ) then
905  c_contactparam = c_contactparam + 1
906  if( fstr_ctrl_get_contactparam( ctrl, fstrparam%contactparam(c_contactparam) ) /=0 ) then
907  write(*,*) '### Error: Fail in read in CONTACT_PARAM definition : ' , c_contactparam
908  write(ilog,*) '### Error: Fail in read in CONTACT_PARAM definition : ', c_contactparam
909  stop
910  endif
911  else if( header_name == '!CONTACT_INTERFERENCE' ) then
912  n = fstr_ctrl_get_data_line_n( ctrl )
913  if( fstr_ctrl_get_contact_if( ctrl, n, fstrparam%contact_if(c_contact_if+1:n+1) ) /= 0 ) then
914  write(*,*) '### Error: Fail in read in CONTACT_INTERFERENCE definition : ' , c_contact_if
915  write(ilog,*) '### Error: Fail in read in CONTACT_INTERFERENCE definition : ', c_contact_if
916  stop
917  endif
918  do i=1, n
919  if( check_apply_contact_if(fstrparam%contact_if(c_contact_if+i), fstrsolid%contacts) /= 0) then
920  write(*,*) '### Error:(INTERFERENCE) Inconsistence of contact_pair in CONTACTS: ' , i+c_contact_if
921  write(ilog,*) '### Error:(INTERFERENCE) Inconsistence of contact_pair in CONTACTS: ', i+c_contact_if
922  stop
923  end if
924  end do
925  c_contact_if = c_contact_if + n
926  else if( header_name == '!ULOAD' ) then
927  if( fstr_ctrl_get_userload( ctrl )/=0 ) then
928  write(*,*) '### Error: Fail in read in ULOAD definition : '
929  write(ilog,*) '### Error: Fail in read in ULOAD definition : '
930  stop
931  endif
932 
933  else if( header_name == '!INCLUDE' ) then
934  ctrl_list(ictrl) = ctrl
935  input_filename = ""
936  ierror = fstr_ctrl_get_param_ex( ctrl, 'INPUT ', '# ', 0, 'S', input_filename )
937  ctrl = fstr_ctrl_open( input_filename )
938  if( ctrl < 0 ) then
939  write(*,*) '### Error: Cannot open FSTR control file : ', input_filename
940  write(ilog,*) '### Error: Cannot open FSTR control file : ', input_filename
941  stop
942  end if
943  ictrl = ictrl + 1
944  cycle
945 
946  else if( header_name == '!END' ) then
947  exit
948  endif
949 
950  ! next
951  if( fstr_ctrl_seek_next_header(ctrl) == 0 )then
952  if( ictrl == 1 )then
953  exit
954  else
955  ierror= fstr_ctrl_close( ctrl )
956  ictrl = ictrl - 1
957  ctrl = ctrl_list(ictrl)
958  if( fstr_ctrl_seek_next_header(ctrl) == 0 ) exit
959  endif
960  endif
961 
962  end do
963 
964  ! ----- material type judgement. in case of infinitive analysis, nlgeom_flag=0
965  if( .not. p%PARAM%nlgeom ) then
966  do i=1, c_material
967  fstrsolid%materials(i)%nlgeom_flag = 0
968  enddo
969  endif
970 
971  if( fstrsolid%TEMP_ngrp_tot > 0 .or. fstrsolid%TEMP_irres > 0 ) then
972  allocate ( fstrsolid%temperature( hecmesh%n_node ) ,stat=ierror )
973  if( ierror /= 0 ) then
974  write(idbg,*) 'stop due to allocation error <FSTR_SOLID, TEMPERATURE>'
975  write(idbg,*) ' rank = ', myrank,' ierror = ',ierror
976  call flush(idbg)
977  call hecmw_abort( hecmw_comm_get_comm())
978  end if
979  fstrsolid%temperature = ref_temp
980  allocate ( fstrsolid%last_temp( hecmesh%n_node ) ,stat=ierror )
981  if( ierror /= 0 ) then
982  write(idbg,*) 'stop due to allocation error <FSTR_SOLID, LAST_TEMP>'
983  write(idbg,*) ' rank = ', myrank,' ierror = ',ierror
984  call flush(idbg)
985  call hecmw_abort( hecmw_comm_get_comm())
986  end if
987  fstrsolid%last_temp = 0.d0
988  allocate ( fstrsolid%temp_bak( hecmesh%n_node ) ,stat=ierror )
989  if( ierror /= 0 ) then
990  write(idbg,*) 'stop due to allocation error <FSTR_SOLID, TEMP_BAK>'
991  write(idbg,*) ' rank = ', myrank,' ierror = ',ierror
992  call flush(idbg)
993  call hecmw_abort( hecmw_comm_get_comm())
994  end if
995  fstrsolid%temp_bak = 0.d0
996  endif
997 
998  if( associated(fstrsolid%step_ctrl) ) then
999  fstrsolid%nstep_tot = size(fstrsolid%step_ctrl)
1000  call setup_stepinfo_starttime( fstrsolid%step_ctrl )
1001  !call fstr_print_steps( 6, fstrSOLID%step_ctrl )
1002  else
1003  if( p%PARAM%solution_type==kststatic .and. p%PARAM%nlgeom ) then
1004  write( *,* ) " ERROR: STEP not defined!"
1005  write( idbg,* ) "ERROR: STEP not defined!"
1006  call flush(idbg)
1007  call hecmw_abort( hecmw_comm_get_comm())
1008  endif
1009 
1010  if( myrank==0 ) write(*,*)"Step control not defined! Using default step=1"
1011  fstrsolid%nstep_tot = 1
1012  allocate( fstrsolid%step_ctrl(1) )
1013  call init_stepinfo( fstrsolid%step_ctrl(1) )
1014  if( p%PARAM%solution_type==kstdynamic ) then
1015  fstrsolid%step_ctrl(1)%num_substep = fstrdynamic%n_step
1016  fstrsolid%step_ctrl(1)%initdt = fstrdynamic%t_delta
1017  fstrsolid%step_ctrl(1)%elapsetime = dble(fstrdynamic%n_step) * fstrdynamic%t_delta
1018  fstrsolid%step_ctrl(1)%mindt = fstrdynamic%t_delta
1019  fstrsolid%step_ctrl(1)%maxdt = fstrdynamic%t_delta
1020  endif
1021  n = fstrsolid%BOUNDARY_ngrp_tot
1022  if( n>0 ) allocate( fstrsolid%step_ctrl(1)%Boundary(n) )
1023  do i = 1, n
1024  fstrsolid%step_ctrl(1)%Boundary(i) = fstrsolid%BOUNDARY_ngrp_GRPID(i)
1025  enddo
1026  n = fstrsolid%CLOAD_ngrp_tot + fstrsolid%DLOAD_ngrp_tot + fstrsolid%TEMP_ngrp_tot + fstrsolid%SPRING_ngrp_tot
1027  if( n>0 ) allocate( fstrsolid%step_ctrl(1)%Load(n) )
1028  n = 0
1029  do i = 1, fstrsolid%CLOAD_ngrp_tot
1030  n = n + 1
1031  fstrsolid%step_ctrl(1)%Load(n) = fstrsolid%CLOAD_ngrp_GRPID(i)
1032  enddo
1033  do i = 1, fstrsolid%DLOAD_ngrp_tot
1034  n = n + 1
1035  fstrsolid%step_ctrl(1)%Load(n) = fstrsolid%DLOAD_ngrp_GRPID(i)
1036  enddo
1037  do i = 1, fstrsolid%TEMP_ngrp_tot
1038  n = n + 1
1039  fstrsolid%step_ctrl(1)%Load(n) = fstrsolid%TEMP_ngrp_GRPID(i)
1040  enddo
1041  do i = 1, fstrsolid%SPRING_ngrp_tot
1042  n = n + 1
1043  fstrsolid%step_ctrl(1)%Load(n) = fstrsolid%SPRING_ngrp_GRPID(i)
1044  enddo
1045  n = fstrsolid%elemact%ELEMACT_egrp_tot
1046  if( n>0 ) allocate( fstrsolid%step_ctrl(1)%ElemActivation(n) )
1047  do i = 1, n
1048  fstrsolid%step_ctrl(1)%ElemActivation(i) = fstrsolid%elemact%ELEMACT_egrp_GRPID(i)
1049  enddo
1050  endif
1051 
1052  call fstr_element_init( hecmesh, fstrsolid, p%PARAM%solution_type )
1053  if( p%PARAM%solution_type==kststatic .or. p%PARAM%solution_type==kstdynamic .or. &
1054  p%PARAM%solution_type==ksteigen .or. p%PARAM%solution_type==kststaticeigen ) &
1055  call fstr_solid_alloc( hecmesh, fstrsolid )
1056 
1057  if( p%PARAM%solution_type == kstheat) then
1058  p%PARAM%fg_irres = fstrsolid%output_ctrl(3)%frequency
1059  p%PARAM%fg_iwres = fstrsolid%output_ctrl(4)%frequency
1060  p%HEAT%elemact = p%SOLID%elemact
1061  endif
1062 
1063  n_totlyr = 1
1064  do i=1,hecmesh%section%n_sect
1065  cid = hecmesh%section%sect_mat_ID_item(i)
1066  n = fstrsolid%materials(cid)%totallyr
1067  if (n > n_totlyr)then
1068  n_totlyr = n
1069  endif
1070  enddo
1071  p%SOLID%max_lyr = n_totlyr
1072 
1073  call fstr_setup_post( ctrl, p )
1074  rcode = fstr_ctrl_close( ctrl )
1075 
1076  end subroutine fstr_setup
1077 
1078 
1080  subroutine fstr_solid_init( hecMESH, fstrSOLID )
1081  use m_fstr
1082  type(hecmwst_local_mesh),target :: hecMESH
1083  type(fstr_solid) :: fstrSOLID
1084 
1085  integer :: ndof, ntotal, ierror, ic_type
1086 
1087  fstrsolid%file_type = kbcffstr
1088 
1089  fstrsolid%BOUNDARY_ngrp_tot = 0
1090  fstrsolid%BOUNDARY_ngrp_rot = 0
1091  fstrsolid%CLOAD_ngrp_tot = 0
1092  fstrsolid%CLOAD_ngrp_rot = 0
1093  fstrsolid%DLOAD_ngrp_tot = 0
1094  fstrsolid%DLOAD_follow = 1
1095  fstrsolid%TEMP_ngrp_tot = 0
1096  fstrsolid%SPRING_ngrp_tot = 0
1097  fstrsolid%TEMP_irres = 0
1098  fstrsolid%TEMP_tstep = 1
1099  fstrsolid%TEMP_interval = 1
1100  fstrsolid%TEMP_rtype = 1
1101  fstrsolid%TEMP_factor = 1.d0
1102  fstrsolid%VELOCITY_ngrp_tot = 0
1103  fstrsolid%ACCELERATION_ngrp_tot = 0
1104  fstrsolid%COUPLE_ngrp_tot = 0
1105 
1106  fstrsolid%restart_nout= 0
1107  fstrsolid%is_smoothing_active = .false.
1108 
1109  end subroutine fstr_solid_init
1110 
1112  subroutine fstr_solid_alloc( hecMESH, fstrSOLID )
1113  use m_fstr
1114  type(hecmwst_local_mesh),target :: hecMESH
1115  type(fstr_solid) :: fstrSOLID
1116 
1117  integer :: ndof, ntotal, ierror, ic_type
1118 
1119  ndof=hecmesh%n_dof
1120  ntotal=ndof*hecmesh%n_node
1121 
1122  allocate ( fstrsolid%GL( ntotal ) ,stat=ierror )
1123  if( ierror /= 0 ) then
1124  write(idbg,*) 'stop due to allocation error <FSTR_SOLID, GL>'
1125  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1126  call flush(idbg)
1127  call hecmw_abort( hecmw_comm_get_comm())
1128  end if
1129  allocate ( fstrsolid%GL0( ntotal ) ,stat=ierror )
1130  if( ierror /= 0 ) then
1131  write(idbg,*) 'stop due to allocation error <FSTR_SOLID, GL0>'
1132  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1133  call flush(idbg)
1134  call hecmw_abort( hecmw_comm_get_comm())
1135  end if
1136  allocate ( fstrsolid%EFORCE( ntotal ) ,stat=ierror )
1137  if( ierror /= 0 ) then
1138  write(idbg,*) 'stop due to allocation error <FSTR_SOLID, EFORCE>'
1139  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1140  call flush(idbg)
1141  call hecmw_abort( hecmw_comm_get_comm())
1142  end if
1143  ! allocate ( fstrSOLID%TOTAL_DISP( ntotal ) ,STAT=ierror )
1144  ! if( ierror /= 0 ) then
1145  ! write(idbg,*) 'stop due to allocation error <FSTR_SOLID, TOTAL_DISP>'
1146  ! write(idbg,*) ' rank = ', hecMESH%my_rank,' ierror = ',ierror
1147  ! call flush(idbg)
1148  ! call hecmw_abort( hecmw_comm_get_comm())
1149  ! end if
1150  allocate ( fstrsolid%unode( ntotal ) ,stat=ierror )
1151  if( ierror /= 0 ) then
1152  write(idbg,*) 'stop due to allocation error <FSTR_SOLID, unode>'
1153  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1154  call flush(idbg)
1155  call hecmw_abort( hecmw_comm_get_comm())
1156  end if
1157  allocate ( fstrsolid%unode_bak( ntotal ) ,stat=ierror )
1158  if( ierror /= 0 ) then
1159  write(idbg,*) 'stop due to allocation error <FSTR_SOLID, unode>'
1160  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1161  call flush(idbg)
1162  call hecmw_abort( hecmw_comm_get_comm())
1163  end if
1164  allocate ( fstrsolid%dunode( ntotal ) ,stat=ierror )
1165  if( ierror /= 0 ) then
1166  write(idbg,*) 'stop due to allocation error <FSTR_SOLID, dunode>'
1167  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1168  call flush(idbg)
1169  call hecmw_abort( hecmw_comm_get_comm())
1170  end if
1171  allocate ( fstrsolid%ddunode( ntotal ) ,stat=ierror )
1172  if( ierror /= 0 ) then
1173  write(idbg,*) 'stop due to allocation error <FSTR_SOLID, ddunode>'
1174  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1175  call flush(idbg)
1176  call hecmw_abort( hecmw_comm_get_comm())
1177  end if
1178  allocate ( fstrsolid%QFORCE( ntotal ) ,stat=ierror )
1179  if( ierror /= 0 ) then
1180  write(idbg,*) 'stop due to allocation error <FSTR_SOLID, QFORCE>'
1181  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1182  call flush(idbg)
1183  call hecmw_abort( hecmw_comm_get_comm())
1184  end if
1185  allocate ( fstrsolid%DFORCE( ntotal ) ,stat=ierror )
1186  if( ierror /= 0 ) then
1187  write(idbg,*) 'stop due to allocation error <FSTR_SOLID, DFORCE>'
1188  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1189  call flush(idbg)
1190  call hecmw_abort( hecmw_comm_get_comm())
1191  end if
1192  allocate ( fstrsolid%QFORCE_bak( ntotal ) ,stat=ierror )
1193  if( ierror /= 0 ) then
1194  write(idbg,*) 'stop due to allocation error <FSTR_SOLID, QFORCE_bak>'
1195  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1196  call flush(idbg)
1197  call hecmw_abort( hecmw_comm_get_comm())
1198  end if
1199 
1200  fstrsolid%GL(:)=0.d0
1201  fstrsolid%GL0(:)=0.d0
1202  ! fstrSOLID%TOTAL_DISP(:)=0.d0
1203  fstrsolid%unode(:) = 0.d0
1204  fstrsolid%unode_bak(:) = 0.d0
1205  fstrsolid%dunode(:) = 0.d0
1206  fstrsolid%ddunode(:) = 0.d0
1207  fstrsolid%QFORCE(:) = 0.d0
1208  fstrsolid%QFORCE_bak(:) = 0.d0
1209  fstrsolid%FACTOR( 1:2 ) = 0.d0
1210 
1211  ! for MPC
1212  fstrsolid%n_fix_mpc = hecmesh%mpc%n_mpc
1213  if( fstrsolid%n_fix_mpc>0 ) then
1214  allocate( fstrsolid%mpc_const( fstrsolid%n_fix_mpc ) )
1215  fstrsolid%mpc_const(:) = hecmesh%mpc%mpc_const(:)
1216  endif
1217 
1218  ! initialize for linear static problems
1219  fstrsolid%FACTOR(2)=1.d0
1220  fstrsolid%FACTOR(1)=0.d0
1221  end subroutine fstr_solid_alloc
1222 
1223  subroutine fstr_smoothed_element_init( hecMESH, fstrSOLID )
1224  type(hecmwst_local_mesh),target :: hecMESH
1225  type(fstr_solid) :: fstrSOLID
1226 
1227  logical, allocatable :: is_selem_list(:)
1228  integer :: i, isect
1229 
1230  do isect=1,hecmesh%section%n_sect
1231  if( fstrsolid%sections(isect)%elemopt341 == kel341sesns ) fstrsolid%is_smoothing_active = .true.
1232  end do
1233  if( .not. fstrsolid%is_smoothing_active ) return
1234 
1235  allocate(is_selem_list(hecmesh%n_elem), stat=i)
1236  if( i /= 0 ) then
1237  write(*,*) 'Allocation error: is_selem_list'
1238  return
1239  endif
1240  is_selem_list(:) = .false.
1241 
1242  do i=1,hecmesh%n_elem
1243  isect= hecmesh%section_ID(i)
1244  if( hecmesh%elem_type(i) /= fe_tet4n ) cycle
1245  if( fstrsolid%sections(isect)%elemopt341 == kel341sesns ) is_selem_list(i) = .true.
1246  enddo
1247 
1248  call hecmw_create_smoothing_element_connectivity(hecmesh,is_selem_list)
1249 
1250  deallocate(is_selem_list)
1251 
1252  end subroutine
1253 
1254  subroutine fstr_smoothed_element_calcmaxcon( hecMESH, fstrSOLID )
1256  type(hecmwst_local_mesh),target :: hecMESH
1257  type(fstr_solid) :: fstrSOLID
1258 
1259  integer :: i, isect, nodlocal(fstrSOLID%max_ncon), iiS, nn, con_stf
1260 
1261  if( fstrsolid%max_ncon_stf > 20 ) fstrsolid%max_ncon_stf = 20
1262 
1263  do i=1,hecmesh%n_elem
1264  isect= hecmesh%section_ID(i)
1265  if( hecmesh%elem_type(i) /= fe_tet4n ) cycle
1266  if( fstrsolid%sections(isect)%elemopt341 /= kel341sesns ) cycle
1267  iis = hecmesh%elem_node_index(i-1)
1268  nn = hecmesh%elem_node_index(i-1) - iis
1269  nodlocal(1:nn) = hecmesh%elem_node_item(iis+1:iis+nn)
1270  con_stf = return_nn_comp_c3d4_sesns(nn, nodlocal)
1271  if( con_stf > fstrsolid%max_ncon_stf ) fstrsolid%max_ncon_stf = con_stf
1272  enddo
1273  end subroutine
1274 
1276  subroutine fstr_element_init( hecMESH, fstrSOLID, solution_type )
1277  use elementinfo
1278  use mmechgauss
1279  use m_fstr
1280  type(hecmwst_local_mesh),target :: hecMESH
1281  type(fstr_solid) :: fstrSOLID
1282  integer(kind=kint), intent(in) :: solution_type
1283 
1284  integer :: i, j, ng, isect, ndof, id, nn, n_elem
1285  integer :: ncon_stf
1286 
1287  if( hecmesh%n_elem <=0 ) then
1288  stop "no element defined!"
1289  endif
1290 
1291  fstrsolid%maxn_gauss = 0
1292  fstrsolid%max_ncon = 0
1293 
1294  ! elemopt341 = kel341ES
1295  call fstr_smoothed_element_init( hecmesh, fstrsolid )
1296 
1297  ! number of elements
1298  n_elem = hecmesh%elem_type_index(hecmesh%n_elem_type)
1299  allocate( fstrsolid%elements(n_elem) )
1300 
1301  do i=1,n_elem
1302  fstrsolid%elements(i)%elemact_flag = kelact_undefined
1303  if( solution_type == kstheat) cycle !fstrSOLID is used only for elemact element in heat transfer analysis
1304 
1305  fstrsolid%elements(i)%etype = hecmesh%elem_type(i)
1306  if( hecmesh%elem_type(i)==301 ) fstrsolid%elements(i)%etype=111
1307  if (hecmw_is_etype_link(fstrsolid%elements(i)%etype)) cycle
1308  if (hecmw_is_etype_patch(fstrsolid%elements(i)%etype)) cycle
1309  ng = numofquadpoints( fstrsolid%elements(i)%etype )
1310  if( ng > fstrsolid%maxn_gauss ) fstrsolid%maxn_gauss = ng
1311  if(ng>0) allocate( fstrsolid%elements(i)%gausses( ng ) )
1312 
1313  isect= hecmesh%section_ID(i)
1314  ndof = getspacedimension( fstrsolid%elements(i)%etype )
1315  if (ndof == 2) then ! why do this???
1316  id=hecmesh%section%sect_opt(isect)
1317  if( id==0 ) then
1318  fstrsolid%elements(i)%iset=1
1319  else if( id==1) then
1320  fstrsolid%elements(i)%iset=0
1321  else if( id==2) then
1322  fstrsolid%elements(i)%iset=2
1323  endif
1324  endif
1325 
1326  if( isect<0 .or. isect>hecmesh%section%n_sect ) &
1327  stop "Error in element's section definition"
1328  id = hecmesh%section%sect_mat_ID_item(isect)
1329  fstrsolid%materials(id)%cdsys_ID = hecmesh%section%sect_orien_ID(isect)
1330  do j=1,ng
1331  fstrsolid%elements(i)%gausses(j)%pMaterial => fstrsolid%materials(id)
1332  call fstr_init_gauss( fstrsolid%elements(i)%gausses( j ) )
1333  enddo
1334 
1335  nn = hecmesh%elem_node_index(i)-hecmesh%elem_node_index(i-1)
1336  allocate(fstrsolid%elements(i)%equiForces(nn*ndof))
1337  fstrsolid%elements(i)%equiForces = 0.0d0
1338  if( nn > fstrsolid%max_ncon ) fstrsolid%max_ncon = nn
1339 
1340  if( hecmesh%elem_type(i)==361 ) then
1341  if( fstrsolid%sections(isect)%elemopt361==kel361ic ) then
1342  allocate( fstrsolid%elements(i)%aux(3,3) )
1343  fstrsolid%elements(i)%aux = 0.0d0
1344  endif
1345  endif
1346 
1347  enddo
1348 
1349  fstrsolid%max_ncon_stf = fstrsolid%max_ncon
1350  if( fstrsolid%is_smoothing_active ) call fstr_smoothed_element_calcmaxcon( hecmesh, fstrsolid )
1351 
1352  call hecmw_allreduce_i1(hecmesh,fstrsolid%maxn_gauss,hecmw_max)
1353  end subroutine
1354 
1356  subroutine fstr_solid_finalize( fstrSOLID )
1357  type(fstr_solid) :: fstrSOLID
1358  integer :: i, j, ierror
1359  if( associated(fstrsolid%materials) ) then
1360  do j=1,size(fstrsolid%materials)
1361  call finalizematerial(fstrsolid%materials(j))
1362  enddo
1363  deallocate( fstrsolid%materials )
1364  endif
1365  if( .not. associated(fstrsolid%elements ) ) return
1366  do i=1,size(fstrsolid%elements)
1367  if( associated(fstrsolid%elements(i)%gausses) ) then
1368  do j=1,size(fstrsolid%elements(i)%gausses)
1369  call fstr_finalize_gauss(fstrsolid%elements(i)%gausses(j))
1370  enddo
1371  deallocate( fstrsolid%elements(i)%gausses )
1372  endif
1373  if(associated(fstrsolid%elements(i)%equiForces) ) then
1374  deallocate(fstrsolid%elements(i)%equiForces)
1375  endif
1376  if( associated(fstrsolid%elements(i)%aux) ) then
1377  deallocate(fstrsolid%elements(i)%aux)
1378  endif
1379  enddo
1380 
1381  deallocate( fstrsolid%elements )
1382  if( associated( fstrsolid%mpc_const ) ) then
1383  deallocate( fstrsolid%mpc_const )
1384  endif
1385  call free_stepinfo( fstrsolid%step_ctrl_restart )
1386  if( associated(fstrsolid%step_ctrl) ) then
1387  do i=1,size(fstrsolid%step_ctrl)
1388  call free_stepinfo( fstrsolid%step_ctrl(i) )
1389  enddo
1390  deallocate( fstrsolid%step_ctrl )
1391  endif
1392  if(associated(fstrsolid%output_ctrl) ) then
1393  do i=1,size(fstrsolid%output_ctrl)
1394  if( fstrsolid%output_ctrl(i)%filenum==iutb ) &
1395  close(fstrsolid%output_ctrl(i)%filenum)
1396  enddo
1397  deallocate(fstrsolid%output_ctrl)
1398  endif
1399  if( associated( fstrsolid%sections ) ) then
1400  deallocate( fstrsolid%sections )
1401  endif
1402 
1403  if( associated(fstrsolid%GL) ) then
1404  deallocate(fstrsolid%GL ,stat=ierror)
1405  if( ierror /= 0 ) then
1406  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, GL>'
1407  call flush(idbg)
1408  call hecmw_abort( hecmw_comm_get_comm())
1409  end if
1410  endif
1411  if( associated(fstrsolid%EFORCE) ) then
1412  deallocate(fstrsolid%EFORCE ,stat=ierror)
1413  if( ierror /= 0 ) then
1414  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, EFORCE>'
1415  call flush(idbg)
1416  call hecmw_abort( hecmw_comm_get_comm())
1417  end if
1418  endif
1419  if( associated(fstrsolid%unode) ) then
1420  deallocate(fstrsolid%unode ,stat=ierror)
1421  if( ierror /= 0 ) then
1422  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, unode>'
1423  call flush(idbg)
1424  call hecmw_abort( hecmw_comm_get_comm())
1425  end if
1426  endif
1427  if( associated(fstrsolid%unode_bak) ) then
1428  deallocate(fstrsolid%unode_bak ,stat=ierror)
1429  if( ierror /= 0 ) then
1430  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, unode_bak>'
1431  call flush(idbg)
1432  call hecmw_abort( hecmw_comm_get_comm())
1433  end if
1434  endif
1435  if( associated(fstrsolid%dunode) ) then
1436  deallocate(fstrsolid%dunode ,stat=ierror)
1437  if( ierror /= 0 ) then
1438  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, dunode>'
1439  call flush(idbg)
1440  call hecmw_abort( hecmw_comm_get_comm())
1441  end if
1442  endif
1443  if( associated(fstrsolid%ddunode) ) then
1444  deallocate(fstrsolid%ddunode ,stat=ierror)
1445  if( ierror /= 0 ) then
1446  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, ddunode>'
1447  call flush(idbg)
1448  call hecmw_abort( hecmw_comm_get_comm())
1449  end if
1450  endif
1451  if( associated(fstrsolid%QFORCE) ) then
1452  deallocate(fstrsolid%QFORCE ,stat=ierror)
1453  if( ierror /= 0 ) then
1454  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, QFORCE>'
1455  call flush(idbg)
1456  call hecmw_abort( hecmw_comm_get_comm())
1457  end if
1458  endif
1459  if( associated(fstrsolid%DFORCE) ) then
1460  deallocate(fstrsolid%DFORCE ,stat=ierror)
1461  if( ierror /= 0 ) then
1462  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, DFORCE>'
1463  call flush(idbg)
1464  call hecmw_abort( hecmw_comm_get_comm())
1465  end if
1466  endif
1467  if( associated(fstrsolid%temperature) ) then
1468  deallocate(fstrsolid%temperature ,stat=ierror)
1469  if( ierror /= 0 ) then
1470  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, temperature>'
1471  call flush(idbg)
1472  call hecmw_abort( hecmw_comm_get_comm())
1473  end if
1474  endif
1475  if( associated(fstrsolid%last_temp) ) then
1476  deallocate(fstrsolid%last_temp ,stat=ierror)
1477  if( ierror /= 0 ) then
1478  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, reftemp>'
1479  call flush(idbg)
1480  call hecmw_abort( hecmw_comm_get_comm())
1481  end if
1482  endif
1483  if( associated(fstrsolid%temp_bak) ) then
1484  deallocate(fstrsolid%temp_bak ,stat=ierror)
1485  if( ierror /= 0 ) then
1486  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, reftemp>'
1487  call flush(idbg)
1488  call hecmw_abort( hecmw_comm_get_comm())
1489  end if
1490  endif
1491 
1492  ! Allocated in in f str_setup_BOUNDARY */
1493  if( associated(fstrsolid%BOUNDARY_ngrp_GRPID) ) then
1494  deallocate(fstrsolid%BOUNDARY_ngrp_GRPID, stat=ierror)
1495  if( ierror /= 0 ) then
1496  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, BOUNDARY_ngrp_GRPID>'
1497  call flush(idbg)
1498  call hecmw_abort( hecmw_comm_get_comm())
1499  end if
1500  endif
1501  if( associated(fstrsolid%BOUNDARY_ngrp_ID) ) then
1502  deallocate(fstrsolid%BOUNDARY_ngrp_ID, stat=ierror)
1503  if( ierror /= 0 ) then
1504  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, BOUNDARY_ngrp_ID>'
1505  call flush(idbg)
1506  call hecmw_abort( hecmw_comm_get_comm())
1507  end if
1508  endif
1509  if( associated(fstrsolid%BOUNDARY_ngrp_type) ) then
1510  deallocate(fstrsolid%BOUNDARY_ngrp_type, stat=ierror)
1511  if( ierror /= 0 ) then
1512  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, BOUNDARY_ngrp_type>'
1513  call flush(idbg)
1514  call hecmw_abort( hecmw_comm_get_comm())
1515  end if
1516  endif
1517  if( associated(fstrsolid%BOUNDARY_ngrp_val) ) then
1518  deallocate(fstrsolid%BOUNDARY_ngrp_val, stat=ierror)
1519  if( ierror /= 0 ) then
1520  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, BOUNDARY_ngrp_val>'
1521  call flush(idbg)
1522  call hecmw_abort( hecmw_comm_get_comm())
1523  end if
1524  endif
1525  if( associated(fstrsolid%BOUNDARY_ngrp_amp) ) then
1526  deallocate(fstrsolid%BOUNDARY_ngrp_amp, stat=ierror)
1527  if( ierror /= 0 ) then
1528  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, BOUNDARY_ngrp_amp>'
1529  call flush(idbg)
1530  call hecmw_abort( hecmw_comm_get_comm())
1531  end if
1532  endif
1533  if( associated(fstrsolid%BOUNDARY_ngrp_istot) ) then
1534  deallocate(fstrsolid%BOUNDARY_ngrp_istot, stat=ierror)
1535  if( ierror /= 0 ) then
1536  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, BOUNDARY_ngrp_istot>'
1537  call flush(idbg)
1538  call hecmw_abort( hecmw_comm_get_comm())
1539  end if
1540  endif
1541  if( associated(fstrsolid%BOUNDARY_ngrp_rotID) ) then
1542  deallocate(fstrsolid%BOUNDARY_ngrp_rotID, stat=ierror)
1543  if( ierror /= 0 ) then
1544  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, BOUNDARY_ngrp_rotID>'
1545  call flush(idbg)
1546  call hecmw_abort( hecmw_comm_get_comm())
1547  end if
1548  endif
1549  if( associated(fstrsolid%BOUNDARY_ngrp_centerID) ) then
1550  deallocate(fstrsolid%BOUNDARY_ngrp_centerID, stat=ierror)
1551  if( ierror /= 0 ) then
1552  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, BOUNDARY_ngrp_centerID>'
1553  call flush(idbg)
1554  call hecmw_abort( hecmw_comm_get_comm())
1555  end if
1556  endif
1557 
1558  ! Allocated in in fstr_setup_CLOAD
1559  if( associated(fstrsolid%CLOAD_ngrp_GRPID) ) then
1560  deallocate(fstrsolid%CLOAD_ngrp_GRPID, stat=ierror)
1561  if( ierror /= 0 ) then
1562  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, CLOAD_ngrp_GRPID>'
1563  call flush(idbg)
1564  call hecmw_abort( hecmw_comm_get_comm())
1565  end if
1566  endif
1567  if( associated(fstrsolid%CLOAD_ngrp_ID) ) then
1568  deallocate(fstrsolid%CLOAD_ngrp_ID, stat=ierror)
1569  if( ierror /= 0 ) then
1570  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, CLOAD_ngrp_ID>'
1571  call flush(idbg)
1572  call hecmw_abort( hecmw_comm_get_comm())
1573  end if
1574  endif
1575  if( associated(fstrsolid%CLOAD_ngrp_DOF) ) then
1576  deallocate(fstrsolid%CLOAD_ngrp_DOF, stat=ierror)
1577  if( ierror /= 0 ) then
1578  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, CLOAD_ngrp_DOF>'
1579  call flush(idbg)
1580  call hecmw_abort( hecmw_comm_get_comm())
1581  end if
1582  endif
1583  if( associated(fstrsolid%CLOAD_ngrp_val) ) then
1584  deallocate(fstrsolid%CLOAD_ngrp_val, stat=ierror)
1585  if( ierror /= 0 ) then
1586  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, CLOAD_ngrp_val>'
1587  call flush(idbg)
1588  call hecmw_abort( hecmw_comm_get_comm())
1589  end if
1590  endif
1591  if( associated(fstrsolid%CLOAD_ngrp_amp) ) then
1592  deallocate(fstrsolid%CLOAD_ngrp_amp, stat=ierror)
1593  if( ierror /= 0 ) then
1594  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, CLOAD_ngrp_amp>'
1595  call flush(idbg)
1596  call hecmw_abort( hecmw_comm_get_comm())
1597  end if
1598  endif
1599  if( associated(fstrsolid%CLOAD_ngrp_rotID) ) then
1600  deallocate(fstrsolid%CLOAD_ngrp_rotID, stat=ierror)
1601  if( ierror /= 0 ) then
1602  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, CLOAD_ngrp_rotID>'
1603  call flush(idbg)
1604  call hecmw_abort( hecmw_comm_get_comm())
1605  end if
1606  endif
1607  if( associated(fstrsolid%CLOAD_ngrp_centerID) ) then
1608  deallocate(fstrsolid%CLOAD_ngrp_centerID, stat=ierror)
1609  if( ierror /= 0 ) then
1610  write(idbg,*) 'stop due to deallocation error <FSTR_SOLID, CLOAD_ngrp_centerID>'
1611  call flush(idbg)
1612  call hecmw_abort( hecmw_comm_get_comm())
1613  end if
1614  endif
1615 
1616  end subroutine
1617 
1619  subroutine fstr_heat_init( fstrHEAT )
1620  implicit none
1621  type(fstr_heat) :: fstrHEAT
1622 
1623  fstrheat%STEPtot = 0
1624  fstrheat%MATERIALtot = 0
1625  fstrheat%AMPLITUDEtot= 0
1626  fstrheat%T_FIX_tot = 0
1627  fstrheat%Q_NOD_tot = 0
1628  fstrheat%Q_VOL_tot = 0
1629  fstrheat%Q_SUF_tot = 0
1630  fstrheat%R_SUF_tot = 0
1631  fstrheat%H_SUF_tot = 0
1632  fstrheat%WL_tot = 0
1633  fstrheat%beta = -1.0d0
1634  end subroutine fstr_heat_init
1635 
1637  subroutine fstr_eigen_init( fstrEIG )
1638  implicit none
1639  type(fstr_eigen) :: fstrEIG
1640 
1641  fstreig%nget = 5
1642  fstreig%maxiter = 60
1643  fstreig%iter = 0
1644  fstreig%sigma = 0.0d0
1645  fstreig%tolerance = 1.0d-6
1646  fstreig%totalmass = 0.0d0
1647  end subroutine fstr_eigen_init
1648 
1650  subroutine fstr_dynamic_init( fstrDYNAMIC )
1651  use m_fstr
1652  type(fstr_dynamic) :: fstrDYNAMIC
1653  fstrdynamic%idx_eqa = 1
1654  fstrdynamic%idx_resp = 1
1655  fstrdynamic%n_step = 1
1656  fstrdynamic%t_start = 0.0
1657  fstrdynamic%t_curr = 0.0d0
1658  fstrdynamic%t_end = 1.0
1659  fstrdynamic%t_delta = 1.0
1660  fstrdynamic%gamma = 0.5
1661  fstrdynamic%beta = 0.25
1662  fstrdynamic%idx_mas = 1
1663  fstrdynamic%idx_dmp = 1
1664  fstrdynamic%ray_m = 0.0
1665  fstrdynamic%ray_k = 0.0
1666  fstrdynamic%restart_nout = 0
1667  fstrdynamic%nout = 100
1668  fstrdynamic%ngrp_monit = 0
1669  fstrdynamic%nout_monit = 1
1670  fstrdynamic%iout_list(1) = 0
1671  fstrdynamic%iout_list(2) = 0
1672  fstrdynamic%iout_list(3) = 0
1673  fstrdynamic%iout_list(4) = 0
1674  fstrdynamic%iout_list(5) = 0
1675  fstrdynamic%iout_list(6) = 0
1676 
1677  end subroutine fstr_dynamic_init
1678 
1679 
1681  subroutine fstr_dynamic_alloc( hecMESH, fstrDYNAMIC )
1682  use m_fstr
1683  type(hecmwst_local_mesh),target :: hecMESH
1684  type(fstr_dynamic) :: fstrDYNAMIC
1685 
1686  integer :: ierror, ndof,nnod
1687 
1688  ndof=hecmesh%n_dof
1689  nnod=hecmesh%n_node
1690  if(fstrdynamic%idx_eqa == 11) then
1691  allocate( fstrdynamic%DISP(ndof*nnod,3) ,stat=ierror )
1692  if( ierror /= 0 ) then
1693  write(idbg,*) 'stop due to allocation error <fstr_solve_LINEAR_DYNAMIC, DISP>'
1694  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1695  call flush(idbg)
1696  call hecmw_abort( hecmw_comm_get_comm())
1697  end if
1698  allocate( fstrdynamic%VEL (ndof*nnod,1) ,stat=ierror )
1699  if( ierror /= 0 ) then
1700  write(idbg,*) 'stop due to allocation error <fstr_solve_LINEAR_DYNAMIC, VEL>'
1701  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1702  call flush(idbg)
1703  call hecmw_abort( hecmw_comm_get_comm())
1704  end if
1705  allocate( fstrdynamic%ACC (ndof*nnod,1) ,stat=ierror )
1706  if( ierror /= 0 ) then
1707  write(idbg,*) 'stop due to allocation error <fstr_solve_LINEAR_DYNAMIC, ACC>'
1708  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1709  call flush(idbg)
1710  call hecmw_abort( hecmw_comm_get_comm())
1711  end if
1712  else
1713  allocate( fstrdynamic%DISP(ndof*nnod,2) ,stat=ierror )
1714  if( ierror /= 0 ) then
1715  write(idbg,*) 'stop due to allocation error <fstr_solve_LINEAR_DYNAMIC, DISP>'
1716  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1717  call flush(idbg)
1718  call hecmw_abort( hecmw_comm_get_comm())
1719  end if
1720  allocate( fstrdynamic%VEL (ndof*nnod,2) ,stat=ierror )
1721  if( ierror /= 0 ) then
1722  write(idbg,*) 'stop due to allocation error <fstr_solve_LINEAR_DYNAMIC, VEL>'
1723  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1724  call flush(idbg)
1725  call hecmw_abort( hecmw_comm_get_comm())
1726  end if
1727  allocate( fstrdynamic%ACC (ndof*nnod,2) ,stat=ierror )
1728  if( ierror /= 0 ) then
1729  write(idbg,*) 'stop due to allocation error <fstr_solve_LINEAR_DYNAMIC, ACC>'
1730  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1731  call flush(idbg)
1732  call hecmw_abort( hecmw_comm_get_comm())
1733  end if
1734  endif
1735 
1736 
1737  allocate( fstrdynamic%VEC1(ndof*nnod) ,stat=ierror )
1738  if( ierror /= 0 ) then
1739  write(idbg,*) 'stop due to allocation error <fstr_solve_LINEAR_DYNAMIC, VEC1>'
1740  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1741  call flush(idbg)
1742  call hecmw_abort( hecmw_comm_get_comm())
1743  end if
1744  allocate( fstrdynamic%VEC2(ndof*nnod) ,stat=ierror )
1745  if( ierror /= 0 ) then
1746  write(idbg,*) 'stop due to allocation error <fstr_solve_LINEAR_DYNAMIC, VEC2>'
1747  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1748  call flush(idbg)
1749  call hecmw_abort( hecmw_comm_get_comm())
1750  end if
1751  allocate( fstrdynamic%VEC3(ndof*nnod) ,stat=ierror )
1752  if( ierror /= 0 ) then
1753  write(idbg,*) 'stop due to allocation error <fstr_solve_LINEAR_DYNAMIC, VEC3>'
1754  write(idbg,*) ' rank = ', hecmesh%my_rank,' ierror = ',ierror
1755  call flush(idbg)
1756  call hecmw_abort( hecmw_comm_get_comm())
1757  end if
1758 
1759  end subroutine fstr_dynamic_alloc
1760 
1762  subroutine fstr_dynamic_finalize( fstrDYNAMIC )
1763  type(fstr_dynamic) :: fstrDYNAMIC
1764 
1765  integer :: ierror
1766  if( associated(fstrdynamic%DISP) ) &
1767  deallocate( fstrdynamic%DISP ,stat=ierror )
1768  if( ierror /= 0 ) then
1769  write(idbg,*) 'stop due to deallocation error <fstr_solve_LINEAR_DYNAMIC, DISP>'
1770  call flush(idbg)
1771  call hecmw_abort( hecmw_comm_get_comm())
1772  end if
1773  if( associated(fstrdynamic%VEL) ) &
1774  deallocate( fstrdynamic%VEL ,stat=ierror )
1775  if( ierror /= 0 ) then
1776  write(idbg,*) 'stop due to deallocation error <fstr_solve_LINEAR_DYNAMIC, VEL>'
1777  call flush(idbg)
1778  call hecmw_abort( hecmw_comm_get_comm())
1779  end if
1780  if( associated(fstrdynamic%ACC) ) &
1781  deallocate( fstrdynamic%ACC ,stat=ierror )
1782  if( ierror /= 0 ) then
1783  write(idbg,*) 'stop due to deallocation error <fstr_solve_LINEAR_DYNAMIC, ACC>'
1784  call flush(idbg)
1785  call hecmw_abort( hecmw_comm_get_comm())
1786  end if
1787  if( associated(fstrdynamic%VEC1) ) &
1788  deallocate( fstrdynamic%VEC1 ,stat=ierror )
1789  if( ierror /= 0 ) then
1790  write(idbg,*) 'stop due to deallocation error <fstr_solve_LINEAR_DYNAMIC, VEC1>'
1791  call flush(idbg)
1792  call hecmw_abort( hecmw_comm_get_comm())
1793  end if
1794  if( associated(fstrdynamic%VEC2) ) &
1795  deallocate( fstrdynamic%VEC2 ,stat=ierror )
1796  if( ierror /= 0 ) then
1797  write(idbg,*) 'stop due to deallocation error <fstr_solve_LINEAR_DYNAMIC, VEC2>'
1798  call flush(idbg)
1799  call hecmw_abort( hecmw_comm_get_comm())
1800  end if
1801  if( associated(fstrdynamic%VEC3) ) &
1802  deallocate( fstrdynamic%VEC3 ,stat=ierror )
1803  if( ierror /= 0 ) then
1804  write(idbg,*) 'stop due to deallocation error <fstr_solve_LINEAR_DYNAMIC, VEC3>'
1805  call flush(idbg)
1806  call hecmw_abort( hecmw_comm_get_comm())
1807  end if
1808 
1809  end subroutine
1810 
1811 
1812  !-----------------------------------------------------------------------------!
1814 
1815  subroutine fstr_setup_post_phys_alloc(phys, NDOF, n_node, n_elem)
1816  implicit none
1817  type(fstr_solid_physic_val), pointer :: phys
1818  integer(kind=kint) :: NDOF, n_node, n_elem, mdof, istat
1819  mdof = (ndof*ndof+ndof)/2;
1820  allocate ( phys%STRAIN (mdof*n_node), stat=istat)
1821  if( istat /= 0 ) stop "Allocation error: phys%STRAIN"
1822  allocate ( phys%STRESS (mdof*n_node), stat=istat)
1823  if( istat /= 0 ) stop "Allocation error: phys%STRESS"
1824  allocate ( phys%MISES ( n_node), stat=istat)
1825  if( istat /= 0 ) stop "Allocation error: phys%MISES"
1826  allocate ( phys%ESTRAIN (mdof*n_elem), stat=istat)
1827  if( istat /= 0 ) stop "Allocation error: phys%ESTRAIN"
1828  allocate ( phys%ESTRESS (mdof*n_elem), stat=istat)
1829  if( istat /= 0 ) stop "Allocation error: phys%ESTRESS"
1830  allocate ( phys%EMISES ( n_elem), stat=istat)
1831  if( istat /= 0 ) stop "Allocation error: phys%EMISES"
1832  allocate ( phys%EPLSTRAIN ( n_elem), stat=istat)
1833  if( istat /= 0 ) stop "Allocation error: phys%EPLSTRAIN"
1834  allocate ( phys%ENQM (12*n_elem), stat=istat)
1835  if( istat /= 0 ) stop "Allocation error: phys%ENQM"
1836  end subroutine fstr_setup_post_phys_alloc
1837 
1838  subroutine fstr_setup_post( ctrl, P )
1839  implicit none
1840  integer(kind=kint) :: ctrl, i
1841  type(fstr_param_pack) :: P
1842  type(fstr_solid_physic_val), pointer :: phys => null()
1843 
1844  if( p%PARAM%solution_type == kststatic &
1845  .or. p%PARAM%solution_type == ksteigen &
1846  .or. p%PARAM%solution_type == kstdynamic &
1847  .or. p%PARAM%solution_type == kststaticeigen ) then
1848  ! Memory Allocation for Result Vectors ------------
1849  if( p%MESH%n_dof == 6 .or. p%SOLID%is_33shell == 1 ) then
1850  allocate ( p%SOLID%SHELL )
1851  call fstr_setup_post_phys_alloc(p%SOLID%SHELL,3, p%MESH%n_node,p%MESH%n_elem)
1852  allocate ( p%SOLID%SHELL%LAYER(p%SOLID%max_lyr) )
1853  do i=1,p%SOLID%max_lyr
1854  allocate ( p%SOLID%SHELL%LAYER(i)%PLUS )
1855  allocate ( p%SOLID%SHELL%LAYER(i)%MINUS )
1856  call fstr_setup_post_phys_alloc(p%SOLID%SHELL%LAYER(i)%PLUS , 3, p%MESH%n_node, p%MESH%n_elem)
1857  call fstr_setup_post_phys_alloc(p%SOLID%SHELL%LAYER(i)%MINUS, 3, p%MESH%n_node, p%MESH%n_elem)
1858  enddo
1859  phys => p%SOLID%SHELL
1860  else
1861  allocate ( p%SOLID%SOLID )
1862  phys => p%SOLID%SOLID
1863  call fstr_setup_post_phys_alloc(phys, p%MESH%n_dof, p%MESH%n_node, p%MESH%n_elem)
1864  end if
1865  p%SOLID%STRAIN => phys%STRAIN
1866  p%SOLID%STRESS => phys%STRESS
1867  p%SOLID%MISES => phys%MISES
1868  p%SOLID%ESTRAIN => phys%ESTRAIN
1869  p%SOLID%ESTRESS => phys%ESTRESS
1870  p%SOLID%EMISES => phys%EMISES
1871  p%SOLID%EPLSTRAIN => phys%EPLSTRAIN
1872  p%SOLID%ENQM => phys%ENQM
1873  allocate( p%SOLID%REACTION( p%MESH%n_dof*p%MESH%n_node ), stat=i )
1874  if( i /= 0 ) stop "Allocation error: REACTION"
1875  end if
1876 
1877  if( p%PARAM%fg_visual == kon )then
1878  call fstr_setup_visualize( ctrl, p%MESH )
1879  end if
1880 
1881  call hecmw_barrier( p%MESH ) ! JP-7
1882 
1883  if( p%HEAT%STEPtot == 0 ) then ! No !HEAT Input
1884  if( p%PARAM%analysis_n == 0 ) then ! No !STATIC Input
1885  call reallocate_real( p%PARAM%dtime, 1)
1886  call reallocate_real( p%PARAM%etime, 1)
1887  call reallocate_real( p%PARAM%dtmin, 1)
1888  call reallocate_real( p%PARAM%delmax,1)
1889  call reallocate_integer( p%PARAM%itmax, 1)
1890  call reallocate_real( p%PARAM%eps, 1)
1891  p%PARAM%analysis_n = 1
1892  p%PARAM%dtime = 0
1893  p%PARAM%etime = 0
1894  p%PARAM%dtmin = 0
1895  p%PARAM%delmax = 0
1896  p%PARAM%itmax = 20
1897  p%PARAM%eps = 1.0e-6
1898  end if
1899  p%HEAT%STEPtot = 1
1900  call reallocate_real( p%HEAT%STEP_DLTIME, 1)
1901  call reallocate_real( p%HEAT%STEP_EETIME, 1)
1902  call reallocate_real( p%HEAT%STEP_DELMIN, 1)
1903  call reallocate_real( p%HEAT%STEP_DELMAX, 1)
1904  p%HEAT%STEP_DLTIME = 0
1905  p%HEAT%STEP_EETIME = 0
1906  p%HEAT%STEP_DELMIN = 0
1907  p%HEAT%STEP_DELMAX = 0
1908  end if
1909  end subroutine fstr_setup_post
1910 
1911  !*****************************************************************************!
1912  !* GENERAL HEADERS ***********************************************************!
1913  !*****************************************************************************!
1914 
1915  !-----------------------------------------------------------------------------!
1917  !-----------------------------------------------------------------------------!
1918 
1919  subroutine fstr_setup_solution( ctrl, counter, P )
1920  implicit none
1921  integer(kind=kint) :: ctrl
1922  integer(kind=kint) :: counter
1923  type(fstr_param_pack) :: P
1924 
1925  integer(kind=kint) :: rcode
1926 
1927  rcode = fstr_ctrl_get_solution( ctrl, p%PARAM%solution_type, p%PARAM%nlgeom )
1928  if( rcode /= 0 ) call fstr_ctrl_err_stop
1929 
1930  end subroutine fstr_setup_solution
1931 
1932  !-----------------------------------------------------------------------------!
1934  !-----------------------------------------------------------------------------!
1935 
1936  subroutine fstr_setup_nonlinear_solver( ctrl, counter, P )
1937  implicit none
1938  integer(kind=kint) :: ctrl
1939  integer(kind=kint) :: counter
1940  type(fstr_param_pack) :: P
1941 
1942  integer(kind=kint) :: rcode
1943 
1944  rcode = fstr_ctrl_get_nonlinear_solver( ctrl, p%PARAM%nlsolver_method )
1945  if( rcode /= 0 ) call fstr_ctrl_err_stop
1946 
1947  end subroutine fstr_setup_nonlinear_solver
1948 
1949  !-----------------------------------------------------------------------------!
1951  !-----------------------------------------------------------------------------!
1952 
1953  subroutine fstr_setup_solver( ctrl, counter, P )
1954  implicit none
1955  integer(kind=kint) :: ctrl
1956  integer(kind=kint) :: counter
1957  type(fstr_param_pack),target :: P
1958 
1959  integer(kind=kint) :: rcode
1960 
1961  if( counter >= 2 ) then
1962  write(ilog,*) '### Error : !SOLVER exists twice in FSTR control file.'
1963  stop
1964  endif
1965 
1966  ! nier => svIarray(1)
1967  ! method => svIarray(2)
1968  ! precond => svIarray(3)
1969  ! nset => svIarray(4)
1970  ! iterpremax => svIarray(5)
1971  ! nrest => svIarray(6)
1972  ! scaling => svIarray(7)
1973  ! iterlog => svIarray(21)
1974  ! timelog => svIarray(22)
1975  ! steplog => svIarray(23)
1976  ! dumptype => svIarray(31)
1977  ! dumpexit => svIarray(32)
1978  ! usejad => svIarray(33)
1979  ! ncolor_in => svIarray(34)
1980  ! mpc_method => svIarray(13)
1981  ! estcond => svIarray(14)
1982  ! contact_elim=> svIarray(15)
1983  ! method2 => svIarray(8)
1984  ! recyclepre => svIarray(35)
1985  ! solver_opt => svIarray(41:50)
1986  ! nBFGS => svIarray(60)
1987 
1988  ! resid => svRarray(1)
1989  ! sigma_diag => svRarray(2)
1990  ! sigma => svRarray(3)
1991  ! thresh => svRarray(4)
1992  ! filter => svRarray(5)
1993 
1994  rcode = fstr_ctrl_get_solver( ctrl, &
1995  sviarray(2), sviarray(3), sviarray(4), sviarray(21), sviarray(22), sviarray(23),&
1996  sviarray(1), sviarray(5), sviarray(6), sviarray(60), sviarray(7), &
1997  sviarray(31), sviarray(32), sviarray(33), sviarray(34), sviarray(13), sviarray(14), sviarray(8),&
1998  sviarray(35), sviarray(41:50), sviarray(15), &
1999  svrarray(1), svrarray(2), svrarray(3), &
2000  svrarray(4), svrarray(5) )
2001  if( rcode /= 0 ) call fstr_ctrl_err_stop
2002 
2003  if( sviarray(2) <= 100 ) then
2004  sviarray(99) = 1 ! indirect method
2005  else
2006  sviarray(99) = sviarray(2)-99 !2 ! direct method
2007  end if
2008 
2009  end subroutine fstr_setup_solver
2010 
2011  !* ----------------------------------------------------------------------------------------------- *!
2013  !* ----------------------------------------------------------------------------------------------- *!
2014 
2015  integer function fstr_setup_orientation( ctrl, hecMESH, cnt, coordsys )
2016  implicit none
2017  integer(kind=kint) :: ctrl
2018  type( hecmwst_local_mesh ) :: hecmesh
2019  integer :: cnt
2020  type( tlocalcoordsys ) :: coordsys
2021 
2022  integer :: j, is, ie, grp_id(1)
2023  character(len=HECMW_NAME_LEN) :: grp_id_name(1)
2024 
2025  integer :: nid, dtype
2026  character(len=HECMW_NAME_LEN) :: data_fmt
2027  real(kind=kreal) :: fdum, xyza(3), xyzb(3), xyzc(3), ff1(3), ff2(3), ff3(3)
2028 
2030 
2031  nid = 1
2032  coordsys%sys_type = 10
2033 
2034  nid = 1
2035  data_fmt = 'COORDINATES,NODES '
2036  if( fstr_ctrl_get_param_ex( ctrl, 'DEFINITION ', data_fmt, 0, 'P', nid )/=0 ) return
2037  dtype = nid-1
2038  coordsys%sys_type = coordsys%sys_type + dtype
2039 
2040  if( fstr_ctrl_get_param_ex( ctrl, 'NAME ', '# ', 1, 'S', grp_id_name(1) )/= 0) return
2041  coordsys%sys_name = grp_id_name(1)
2042  call fstr_strupr( coordsys%sys_name )
2043 
2044  if( dtype==0 ) then
2045  data_fmt = "RRRRRRrrr "
2046  xyzc(:) = 0.d0
2047  if( fstr_ctrl_get_data_ex( ctrl, 1, data_fmt, xyza(1), xyza(2), &
2048  xyza(3), xyzb(1), xyzb(2), xyzb(3), xyzc(1), xyzc(2), xyzc(3) )/=0 ) return
2049  if( coordsys%sys_type==10 ) then
2050  ff1 = xyza-xyzc
2051  fdum = dsqrt( dot_product(ff1, ff1) )
2052  if( fdum==0.d0 ) return
2053  ff1 = ff1/fdum
2054  ff2 = xyzb-xyzc
2055  call cross_product(ff1,ff2,ff3)
2056  coordsys%CoordSys(1,:) = ff1
2057 
2058  fdum = dsqrt( dot_product(ff3, ff3) )
2059  if( fdum==0.d0 ) return
2060  coordsys%CoordSys(3,:) = ff3/fdum
2061 
2062  call cross_product(coordsys%CoordSys(3,:), coordsys%CoordSys(1,:), coordsys%CoordSys(2,:) )
2063  else
2064  coordsys%CoordSys(1,:) = xyza
2065  coordsys%CoordSys(2,:) = xyzb
2066  endif
2067 
2068  else
2069  coordsys%node_ID(3) = 0 ! global origin
2070  data_fmt = "IIi "
2071  if( fstr_ctrl_get_data_ex( ctrl, 1, data_fmt, coordsys%node_ID(1), &
2072  coordsys%node_ID(2), coordsys%node_ID(3) )/=0 ) return
2073  if( coordsys%node_ID(3) == 0 ) then
2074  nid = node_global_to_local( hecmesh, coordsys%node_ID(1:2), 2 )
2075  if( nid/=0 .and. nid/=2 ) then
2076  write(*,*) "We cannot define coordinate system using nodes in other CPU!"
2077  write(idbg,*) "We cannot define coordinate system using nodes in other CPU!"
2078  return
2079  endif
2080  else
2081  nid = node_global_to_local( hecmesh, coordsys%node_ID, 3 )
2082  if( nid/=0 .and. nid/=3 ) then
2083  write(*,*) "We cannot define coordinate system using nodes in other CPU!"
2084  write(idbg,*) "We cannot define coordinate system using nodes in other CPU!"
2085  return
2086  endif
2087  endif
2088  endif
2089 
2091  end function fstr_setup_orientation
2092 
2093 
2094  !-----------------------------------------------------------------------------!
2096  !-----------------------------------------------------------------------------!
2097 
2098  subroutine fstr_setup_step( ctrl, counter, P )
2099  implicit none
2100  integer(kind=kint) :: ctrl
2101  integer(kind=kint) :: counter
2102  type(fstr_param_pack) :: P
2103  character(HECMW_NAME_LEN) :: amp
2104  integer(kind=kint) :: amp_id
2105 
2106  integer(kind=kint) :: rcode, iproc
2107 
2108  amp = ' '
2109  rcode = fstr_ctrl_get_step( ctrl, amp, iproc )
2110  if( rcode /= 0 ) call fstr_ctrl_err_stop
2111  call amp_name_to_id( p%MESH, '!STEP', amp, amp_id )
2112  ! P%SOLID%NLSTATIC_ngrp_amp = amp_id;
2113 
2114  end subroutine fstr_setup_step
2115 
2116  integer(kind=kint) function fstr_setup_initial( ctrl, cond, hecMESH )
2117  implicit none
2118  integer(kind=kint) :: ctrl
2119  type( tinitialcondition ) :: cond
2120  type(hecmwst_local_mesh) :: hecmesh
2121  integer, pointer :: grp_id(:), dof(:)
2122  real(kind=kreal), pointer :: temp(:)
2123  character(len=HECMW_NAME_LEN), pointer :: grp_id_name(:)
2124  character(len=HECMW_NAME_LEN) :: data_fmt, ss
2125  integer :: i,j,n, is, ie, gid, nid, rcode
2126 
2127  fstr_setup_initial = -1
2128 
2129  ss = 'TEMPERATURE,VELOCITY,ACCELERATION '
2130  rcode = fstr_ctrl_get_param_ex( ctrl, 'TYPE ', ss, 1, 'P', nid )
2131  if( nid==1 ) then
2132  cond%cond_name = "temperature"
2133  allocate( cond%intval(hecmesh%n_node) )
2134  allocate( cond%realval(hecmesh%n_node) )
2135  elseif( nid==2 ) then
2136  cond%cond_name = "velocity"
2137  allocate( cond%intval(hecmesh%n_node) )
2138  allocate( cond%realval(hecmesh%n_node) )
2139  elseif( nid==3 ) then
2140  cond%cond_name = "acceleration"
2141  allocate( cond%intval(hecmesh%n_node) )
2142  allocate( cond%realval(hecmesh%n_node) )
2143  else
2144  return
2145  endif
2146 
2147  cond%intval = -1
2148  cond%realval = 0.d0
2149 
2150  n = fstr_ctrl_get_data_line_n( ctrl )
2151  if( n<=0 ) return
2152  allocate( temp(n), grp_id_name(n), grp_id(n), dof(n) )
2153  dof = 0
2154  write(ss,*) hecmw_name_len
2155  if( nid==1 ) then
2156  write(data_fmt,'(a,a,a)') 'S',trim(adjustl(ss)),'R '
2157  fstr_setup_initial = &
2158  fstr_ctrl_get_data_array_ex( ctrl, data_fmt, grp_id_name, temp )
2159  else
2160  write(data_fmt,'(a,a,a)') 'S',trim(adjustl(ss)),'IR '
2161  fstr_setup_initial = &
2162  fstr_ctrl_get_data_array_ex( ctrl, data_fmt, grp_id_name, dof, temp )
2163  endif
2164 
2165  if( fstr_setup_initial /= 0 ) then
2166  if( associated(grp_id) ) deallocate( grp_id )
2167  if( associated(temp) ) deallocate( temp )
2168  if( associated(dof) ) deallocate( dof )
2169  if( associated(grp_id_name) ) deallocate( grp_id_name )
2170  return
2171  end if
2172 
2173  call node_grp_name_to_id_ex( hecmesh, '!INITIAL CONDITION', n, grp_id_name, grp_id )
2174  do i=1,n
2175  gid = grp_id(i)
2176  is = hecmesh%node_group%grp_index(gid-1) + 1
2177  ie = hecmesh%node_group%grp_index(gid )
2178  do j=is, ie
2179  nid = hecmesh%node_group%grp_item(j)
2180  cond%realval(nid) = temp(i)
2181  cond%intval(nid) = dof(i)
2182  enddo
2183  enddo
2184 
2185  if( associated(grp_id) ) deallocate( grp_id )
2186  if( associated(temp) ) deallocate( temp )
2187  if( associated(dof) ) deallocate( dof )
2188  if( associated(grp_id_name) ) deallocate( grp_id_name )
2189 end function fstr_setup_initial
2190 
2191  !-----------------------------------------------------------------------------!
2193  !-----------------------------------------------------------------------------!
2194 
2195  subroutine fstr_setup_write( ctrl, counter, P )
2196  implicit none
2197  integer(kind=kint) :: ctrl
2198  integer(kind=kint) :: counter
2199  type(fstr_param_pack) :: P
2200  integer(kind=kint) :: res, visual, neutral
2201 
2202  integer(kind=kint) :: rcode
2203 
2204  rcode = fstr_ctrl_get_write( ctrl, res, visual, neutral )
2205  if( rcode /= 0 ) call fstr_ctrl_err_stop
2206  if( res == 1 ) p%PARAM%fg_result = 1
2207  if( visual == 1 ) p%PARAM%fg_visual = 1
2208  if( neutral == 1 ) p%PARAM%fg_neutral = 1
2209 
2210  end subroutine fstr_setup_write
2211 
2212 
2213  !-----------------------------------------------------------------------------!
2215  !-----------------------------------------------------------------------------!
2216  subroutine fstr_setup_echo( ctrl, counter, P )
2217  implicit none
2218  integer(kind=kint) :: ctrl
2219  integer(kind=kint) :: counter
2220  type(fstr_param_pack) :: P
2221 
2222  integer(kind=kint) :: rcode
2223 
2224  rcode = fstr_ctrl_get_echo( ctrl, &
2225  p%PARAM%fg_echo )
2226  if( rcode /= 0 ) call fstr_ctrl_err_stop
2227 
2228  end subroutine fstr_setup_echo
2229 
2230 
2231  !-----------------------------------------------------------------------------!
2233  !-----------------------------------------------------------------------------!
2234  subroutine fstr_setup_restart( ctrl, nout, version )
2235  implicit none
2236  integer(kind=kint) :: ctrl
2237  integer(kind=kint) :: nout
2238  integer(kind=kint) :: version
2239 
2240  integer(kind=kint) :: rcode
2241  nout = 0
2242  rcode = fstr_ctrl_get_param_ex( ctrl, 'FREQUENCY ', '# ', 0, 'I', nout )
2243  if( rcode /= 0 ) call fstr_ctrl_err_stop
2244  rcode = fstr_ctrl_get_param_ex( ctrl, 'VERSION ', '# ', 0, 'I', version )
2245  if( rcode /= 0 ) call fstr_ctrl_err_stop
2246 
2247  end subroutine fstr_setup_restart
2248 
2249 
2250  !-----------------------------------------------------------------------------!
2252  !-----------------------------------------------------------------------------!
2253 
2254  subroutine fstr_setup_couple( ctrl, counter, P )
2255  implicit none
2256  integer(kind=kint) :: ctrl
2257  integer(kind=kint) :: counter
2258  type(fstr_param_pack) :: P
2259  integer(kind=kint) :: rcode
2260  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
2261  integer(kind=kint) :: i, n, old_size, new_size
2262 
2263  if( p%SOLID%file_type /= kbcffstr ) return
2264 
2265  n = fstr_ctrl_get_data_line_n( ctrl )
2266  if( n == 0 ) return
2267  old_size = p%SOLID%COUPLE_ngrp_tot
2268  new_size = old_size + n
2269  p%SOLID%COUPLE_ngrp_tot = new_size
2270 
2271  call fstr_expand_integer_array ( p%SOLID%COUPLE_ngrp_ID, old_size, new_size )
2272 
2273  allocate( grp_id_name(n))
2274  rcode = fstr_ctrl_get_couple( ctrl, &
2275  p%PARAM%fg_couple_type, &
2276  p%PARAM%fg_couple_first, &
2277  p%PARAM%fg_couple_window, &
2278  grp_id_name, hecmw_name_len )
2279  if( rcode /= 0 ) call fstr_ctrl_err_stop
2280 
2281  call surf_grp_name_to_id_ex( p%MESH, '!COUPLE', &
2282  n, grp_id_name, p%SOLID%COUPLE_ngrp_ID(old_size+1:))
2283 
2284  deallocate( grp_id_name )
2285  p%PARAM%fg_couple = 1
2286 
2287  end subroutine fstr_setup_couple
2288 
2289  !-----------------------------------------------------------------------------!
2291  !-----------------------------------------------------------------------------!
2292 
2293  subroutine fstr_setup_amplitude( ctrl, P )
2294  implicit none
2295  integer(kind=kint) :: ctrl
2296  type(fstr_param_pack) :: P
2297  real(kind=kreal), pointer :: val(:), table(:)
2298  character(len=HECMW_NAME_LEN) :: name
2299  integer :: nline, n, type_def, type_time, type_val, rcode
2300 
2301  nline = fstr_ctrl_get_data_line_n( ctrl )
2302  if( nline<=0 ) return
2303  allocate( val(nline*4) )
2304  allocate( table(nline*4) )
2305  rcode = fstr_ctrl_get_amplitude( ctrl, nline, name, type_def, type_time, type_val, &
2306  n, val, table )
2307  if( rcode /= 0 ) call fstr_ctrl_err_stop
2308 
2309  call append_new_amplitude( p%MESH%amp, name, type_def, type_time, type_val, n, val, table )
2310 
2311  if( associated(val) ) deallocate( val )
2312  if( associated(table) ) deallocate( table )
2313  end subroutine fstr_setup_amplitude
2314 
2315 
2317  subroutine fstr_setup_element_activation( ctrl, counter, P )
2318  implicit none
2319  integer(kind=kint) :: ctrl
2320  integer(kind=kint) :: counter
2321  type(fstr_param_pack) :: P
2322 
2323  integer(kind=kint) :: rcode
2324  character(HECMW_NAME_LEN) :: amp
2325  integer(kind=kint) :: amp_id
2326  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
2327  integer(kind=kint) :: i, n, old_size, new_size
2328  integer(kind=kint) :: gid, mode, measure, state
2329  real(kind=kreal) :: eps
2330  real(kind=kreal), pointer :: thlow(:), thup(:)
2331 
2332  gid = 1
2333  rcode = fstr_ctrl_get_param_ex( ctrl, 'GRPID ', '# ', 0, 'I', gid )
2334 
2335  n = fstr_ctrl_get_data_line_n( ctrl )
2336  if( n == 0 ) return
2337  old_size = p%SOLID%elemact%ELEMACT_egrp_tot
2338  new_size = old_size + n
2339  p%SOLID%elemact%ELEMACT_egrp_tot = new_size
2340 
2341  call fstr_expand_integer_array ( p%SOLID%elemact%ELEMACT_egrp_GRPID, old_size, new_size )
2342  call fstr_expand_integer_array ( p%SOLID%elemact%ELEMACT_egrp_ID, old_size, new_size )
2343  call fstr_expand_integer_array ( p%SOLID%elemact%ELEMACT_egrp_amp, old_size, new_size )
2344  call fstr_expand_real_array ( p%SOLID%elemact%ELEMACT_egrp_eps, old_size, new_size )
2345  call fstr_expand_integer_array ( p%SOLID%elemact%ELEMACT_egrp_depends, old_size, new_size )
2346  call fstr_expand_real_array ( p%SOLID%elemact%ELEMACT_egrp_ts_lower, old_size, new_size )
2347  call fstr_expand_real_array ( p%SOLID%elemact%ELEMACT_egrp_ts_upper, old_size, new_size )
2348  call fstr_expand_integer_array ( p%SOLID%elemact%ELEMACT_egrp_state, old_size, new_size )
2349 
2350  allocate( grp_id_name(n), thlow(n), thup(n) )
2351  amp = ' '
2352  eps = 1.d-3
2353  rcode = fstr_ctrl_get_element_activation( ctrl, amp, eps, grp_id_name, mode, measure, state, thlow, thup )
2354  if( rcode /= 0 ) call fstr_ctrl_err_stop
2355 
2356  call amp_name_to_id( p%MESH, '!ELEMENT_ACTIVATION', amp, amp_id )
2357  do i=1,n
2358  p%SOLID%elemact%ELEMACT_egrp_amp(old_size+i) = amp_id
2359  p%SOLID%elemact%ELEMACT_egrp_eps(old_size+i) = eps
2360  end do
2361  p%SOLID%elemact%ELEMACT_egrp_GRPID(old_size+1:new_size) = gid
2362  p%SOLID%elemact%ELEMACT_egrp_depends(old_size+1:new_size) = measure
2363  p%SOLID%elemact%ELEMACT_egrp_ts_lower(old_size+1:new_size) = thlow(1:n)
2364  p%SOLID%elemact%ELEMACT_egrp_ts_upper(old_size+1:new_size) = thup(1:n)
2365  p%SOLID%elemact%ELEMACT_egrp_state(old_size+1:new_size) = state
2366 
2367  call elem_grp_name_to_id_ex( p%MESH, '!ELEMENT_ACTIVATION', n, grp_id_name, p%SOLID%elemact%ELEMACT_egrp_ID(old_size+1:))
2368 
2369  deallocate( grp_id_name )
2370  end subroutine fstr_setup_element_activation
2371 
2372 
2373  !*****************************************************************************!
2374  !* HEADERS FOR STATIC ANALYSIS ***********************************************!
2375  !*****************************************************************************!
2376 
2377  !-----------------------------------------------------------------------------!
2379  !-----------------------------------------------------------------------------!
2380 
2381  subroutine fstr_setup_static( ctrl, counter, P )
2382  implicit none
2383  integer(kind=kint) :: ctrl
2384  integer(kind=kint) :: counter
2385  type(fstr_param_pack) :: P
2386  integer(kind=kint) :: rcode
2387 
2388  integer :: nout, nout_monit,node_monit_1 ,elem_monit_1 ,intg_monit_1
2389  integer :: ipt, idx_elpl, iout_list(6)
2390  real(kind=kreal) :: sig_y0, h_dash
2391 
2392  if( counter > 1 ) then
2393  write(*,*)
2394  endif
2395 
2396  ipt = 0
2397  if( fstr_ctrl_get_param_ex( ctrl, 'TYPE ', 'INFINITESIMAL,NLGEOM,INFINITE ', 0, 'P', ipt )/=0 ) &
2398  return
2399  if( ipt == 2 ) p%PARAM%nlgeom = .true.
2400 
2401  ! for backward compatibility
2402  if( ipt == 3 ) then
2403  write(*,*) "Warning : !STATIC : parameter 'TYPE=INFINITE' is deprecated." &
2404  & // " Please use the replacement parameter 'TYPE=INFINITESIMAL'"
2405  endif
2406 
2407  rcode = fstr_ctrl_get_static( ctrl, &
2408  dt, etime, itmax, eps, p%SOLID%restart_nout, &
2409  idx_elpl, &
2410  iout_list, &
2411  sig_y0, h_dash, &
2412  nout, nout_monit, node_monit_1, &
2413  elem_monit_1, intg_monit_1 )
2414 
2415  if( rcode /= 0 ) call fstr_ctrl_err_stop
2416 
2417  end subroutine fstr_setup_static
2418 
2419 
2420  !-----------------------------------------------------------------------------!
2422  !-----------------------------------------------------------------------------!
2423 
2424  subroutine fstr_setup_boundary( ctrl, counter, P )
2425  implicit none
2426  integer(kind=kint) :: ctrl
2427  integer(kind=kint) :: counter
2428  type(fstr_param_pack) :: P
2429 
2430  integer(kind=kint) :: rcode
2431  integer(kind=kint) :: type = 0
2432  character(HECMW_NAME_LEN) :: amp, rotc_name(1)
2433  integer(kind=kint) :: amp_id, rotc_id(1), n_rotc
2434  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
2435  integer(kind=kint),pointer :: dof_ids (:)
2436  integer(kind=kint),pointer :: dof_ide (:)
2437  real(kind=kreal),pointer :: val_ptr(:)
2438  integer(kind=kint) :: i, n, old_size, new_size
2439 
2440  integer(kind=kint) :: gid, istot
2441 
2442  gid = 1
2443  rcode = fstr_ctrl_get_param_ex( ctrl, 'GRPID ', '# ', 0, 'I', gid )
2444  ! rcode = fstr_ctrl_get_param_ex( ctrl, 'TYPE ', 'FSTR,NASTRAN ', 0, 'P', type )
2445  ! if( rcode < 0 ) call fstr_ctrl_err_stop
2446  ! if( rcode == 1 ) type = 0 ! PARAM_NOTHING
2447 
2448  ! if( type == 0 ) then
2449 
2450  istot = 0
2451  rcode = fstr_ctrl_get_param_ex( ctrl, 'TOTAL ', '# ', 0, 'E', istot )
2452  if( rcode /= 0 ) call fstr_ctrl_err_stop
2453 
2454  ! get center of torque load
2455  rotc_name = ' '
2456  rotc_id = -1
2457  n_rotc = -1
2458  rcode = fstr_ctrl_get_param_ex( ctrl, 'ROT_CENTER ', '# ', 0, 'S', rotc_name )
2459  if( rcode /= 0 ) call fstr_ctrl_err_stop
2460  if( rotc_name(1) /= ' ' ) then
2461  if( istot /= 0 ) then
2462  write(*,*) 'fstr control file error : !BOUNDARY : rotational boundary cannot be specified with total value'
2463  write(ilog,*) 'fstr control file error : !BOUNDARY : rotational boundary cannot be specified with total value'
2464  call fstr_ctrl_err_stop
2465  endif
2466  p%SOLID%BOUNDARY_ngrp_rot = p%SOLID%BOUNDARY_ngrp_rot + 1
2467  n_rotc = p%SOLID%BOUNDARY_ngrp_rot
2468  call node_grp_name_to_id_ex( p%MESH, '!BOUNDARY,ROT_CENTER=', 1, rotc_name, rotc_id)
2469  endif
2470 
2471 
2472  ! ENTIRE -----------------------------------------------
2473  p%SOLID%file_type = kbcffstr
2474 
2475  n = fstr_ctrl_get_data_line_n( ctrl )
2476  if( n == 0 ) return
2477  old_size = p%SOLID%BOUNDARY_ngrp_tot
2478  new_size = old_size + n
2479  p%SOLID%BOUNDARY_ngrp_tot = new_size
2480  call fstr_expand_integer_array (p%SOLID%BOUNDARY_ngrp_GRPID, old_size, new_size )
2481  call fstr_expand_integer_array (p%SOLID%BOUNDARY_ngrp_ID, old_size, new_size )
2482  call fstr_expand_integer_array (p%SOLID%BOUNDARY_ngrp_type, old_size, new_size )
2483  call fstr_expand_real_array (p%SOLID%BOUNDARY_ngrp_val, old_size, new_size )
2484  call fstr_expand_integer_array (p%SOLID%BOUNDARY_ngrp_amp, old_size, new_size )
2485  call fstr_expand_integer_array (p%SOLID%BOUNDARY_ngrp_istot, old_size, new_size )
2486  call fstr_expand_integer_array (p%SOLID%BOUNDARY_ngrp_rotID, old_size, new_size )
2487  call fstr_expand_integer_array (p%SOLID%BOUNDARY_ngrp_centerID, old_size, new_size )
2488 
2489  allocate( grp_id_name(n) )
2490  allocate( dof_ids(n) )
2491  allocate( dof_ide(n) )
2492  allocate( val_ptr(n) )
2493 
2494  amp = ' '
2495  val_ptr = 0.0d0
2496  rcode = fstr_ctrl_get_boundary( ctrl, amp, grp_id_name, hecmw_name_len, dof_ids, dof_ide, val_ptr)
2497  if( rcode /= 0 ) call fstr_ctrl_err_stop
2498  call amp_name_to_id( p%MESH, '!BOUNDARY', amp, amp_id )
2499  p%SOLID%BOUNDARY_ngrp_GRPID(old_size+1:new_size) = gid
2500  call node_grp_name_to_id_ex( p%MESH, '!BOUNDARY', n, grp_id_name, p%SOLID%BOUNDARY_ngrp_ID(old_size+1:))
2501  p%SOLID%BOUNDARY_ngrp_istot(old_size+1:new_size) = istot
2502 
2503  ! set up information about rotation ( default value is set if ROT_CENTER is not given.)
2504  p%SOLID%BOUNDARY_ngrp_rotID(old_size+1:) = n_rotc
2505  p%SOLID%BOUNDARY_ngrp_centerID(old_size+1:) = rotc_id(1)
2506 
2507  do i = 1, n
2508  if( (dof_ids(i) < 1).or.(6 < dof_ids(i)).or.(dof_ide(i) < 1).or.(6 < dof_ide(i)) ) then
2509  write(*,*) 'fstr control file error : !BOUNDARY : range of dof_ids and dof_ide is from 1 to 6'
2510  write(ilog,*) 'fstr control file error : !BOUNDARY : range of dof_ids and dof_ide is from 1 to 6'
2511  call fstr_ctrl_err_stop
2512  end if
2513  p%SOLID%BOUNDARY_ngrp_val(old_size+i) = val_ptr(i)
2514  p%SOLID%BOUNDARY_ngrp_type(old_size+i) = 10 * dof_ids(i) + dof_ide(i)
2515  p%SOLID%BOUNDARY_ngrp_amp(old_size+i) = amp_id
2516  end do
2517 
2518  deallocate( grp_id_name )
2519  deallocate( dof_ids )
2520  deallocate( dof_ide )
2521  deallocate( val_ptr )
2522  nullify( grp_id_name )
2523  nullify( dof_ids )
2524  nullify( dof_ide )
2525  nullify( val_ptr )
2526  ! else
2527  ! ! NASTRAN ---------------------------------------------
2528  !
2529  ! P%SOLID%file_type = kbcfNASTRAN
2530  ! call fstr_setup_solid_nastran( ctrl, P%MESH, P%SOLID )
2531  ! end if
2532 
2533  end subroutine fstr_setup_boundary
2534 
2535 
2536  !-----------------------------------------------------------------------------!
2538  !-----------------------------------------------------------------------------!
2539 
2540  subroutine fstr_setup_cload( ctrl, counter, P )
2541  implicit none
2542  integer(kind=kint) :: ctrl
2543  integer(kind=kint) :: counter
2544  type(fstr_param_pack) :: P
2545 
2546  integer(kind=kint) :: rcode
2547  character(HECMW_NAME_LEN) :: amp, rotc_name(1)
2548  integer(kind=kint) :: amp_id, rotc_id(1), n_rotc
2549  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
2550  real(kind=kreal),pointer :: val_ptr(:)
2551  integer(kind=kint),pointer :: id_ptr(:)
2552  integer(kind=kint) :: i, n, old_size, new_size
2553  integer(kind=kint) :: gid
2554 
2555  if( p%SOLID%file_type /= kbcffstr ) return
2556  gid = 1
2557  rcode = fstr_ctrl_get_param_ex( ctrl, 'GRPID ', '# ', 0, 'I', gid )
2558  if( rcode /= 0 ) call fstr_ctrl_err_stop
2559 
2560  ! get center of torque load
2561  rotc_name = ' '
2562  rotc_id = -1
2563  n_rotc = -1
2564  rcode = fstr_ctrl_get_param_ex( ctrl, 'ROT_CENTER ', '# ', 0, 'S', rotc_name )
2565  if( rcode /= 0 ) call fstr_ctrl_err_stop
2566  if( rotc_name(1) /= ' ' ) then
2567  p%SOLID%CLOAD_ngrp_rot = p%SOLID%CLOAD_ngrp_rot + 1
2568  n_rotc = p%SOLID%CLOAD_ngrp_rot
2569  call node_grp_name_to_id_ex( p%MESH, '!CLOAD,ROT_CENTER=', 1, rotc_name, rotc_id)
2570  endif
2571 
2572  n = fstr_ctrl_get_data_line_n( ctrl )
2573  if( n == 0 ) return
2574  old_size = p%SOLID%CLOAD_ngrp_tot
2575  new_size = old_size + n
2576  p%SOLID%CLOAD_ngrp_tot = new_size
2577  ! Keiji Suemitsu (20140624) <
2578  call fstr_expand_integer_array ( p%SOLID%CLOAD_ngrp_GRPID, old_size, new_size )
2579  call fstr_expand_integer_array ( p%SOLID%CLOAD_ngrp_ID, old_size, new_size )
2580  call fstr_expand_integer_array ( p%SOLID%CLOAD_ngrp_DOF, old_size, new_size )
2581  call fstr_expand_real_array ( p%SOLID%CLOAD_ngrp_val, old_size, new_size )
2582  call fstr_expand_integer_array ( p%SOLID%CLOAD_ngrp_amp, old_size, new_size )
2583  call fstr_expand_integer_array ( p%SOLID%CLOAD_ngrp_rotID, old_size, new_size )
2584  call fstr_expand_integer_array ( p%SOLID%CLOAD_ngrp_centerID, old_size, new_size )
2585  ! > Keiji Suemitsu (20140624)
2586 
2587  allocate( grp_id_name(n))
2588  allocate( id_ptr(n) )
2589  allocate( val_ptr(n) )
2590  amp = ' '
2591  id_ptr = 0
2592  val_ptr = 0.0d0
2593  rcode = fstr_ctrl_get_cload( ctrl, amp, grp_id_name, hecmw_name_len, id_ptr, val_ptr )
2594  if( rcode /= 0 ) call fstr_ctrl_err_stop
2595 
2596  ! set up information about torque load ( default value is set if ROT_CENTER is not given.)
2597  p%SOLID%CLOAD_ngrp_rotID(old_size+1:) = n_rotc
2598  p%SOLID%CLOAD_ngrp_centerID(old_size+1:) = rotc_id(1)
2599 
2600  call amp_name_to_id( p%MESH, '!CLOAD', amp, amp_id )
2601  do i=1,n
2602  p%SOLID%CLOAD_ngrp_amp(old_size+i) = amp_id
2603  p%SOLID%CLOAD_ngrp_DOF(old_size+i) = id_ptr(i)
2604  p%SOLID%CLOAD_ngrp_val(old_size+i) = val_ptr(i)
2605  end do
2606  p%SOLID%CLOAD_ngrp_GRPID(old_size+1:new_size) = gid
2607  call node_grp_name_to_id_ex( p%MESH, '!CLOAD', n, grp_id_name, p%SOLID%CLOAD_ngrp_ID(old_size+1:))
2608 
2609  deallocate( grp_id_name )
2610  deallocate( id_ptr )
2611  deallocate( val_ptr )
2612  nullify( grp_id_name )
2613  nullify( id_ptr )
2614  nullify( val_ptr )
2615 
2616  if( p%MESH%n_refine > 0 ) then
2617  do i=1,n
2618  if( hecmw_ngrp_get_number(p%MESH, p%SOLID%CLOAD_NGRP_ID(old_size+i)) > 1 ) then
2619  write(*,*) 'fstr control file error : !CLOAD : cannot be used with NGRP when mesh is refined'
2620  write(ilog,*) 'fstr control file error : !CLOAD : cannot be used with NGRP when mesh is refined'
2621  call fstr_ctrl_err_stop
2622  endif
2623  enddo
2624  endif
2625 
2626  end subroutine fstr_setup_cload
2627 
2628  !-----------------------------------------------------------------------------!
2630  !-----------------------------------------------------------------------------!
2631  subroutine fstr_setup_fload( ctrl, counter, P )
2632  !---- args
2633  integer(kind=kint) :: ctrl
2634  integer(kind=kint) :: counter
2635  type(fstr_param_pack) :: P
2636  !---- vals
2637  integer(kind=kint) :: rcode
2638  character(HECMW_NAME_LEN) :: amp
2639  integer(kind=kint) :: amp_id
2640  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
2641  real(kind=kreal), pointer :: val_ptr(:)
2642  integer(kind=kint), pointer :: id_ptr(:)
2643  integer(kind=kint) :: i, n, old_size, new_size
2644  integer(kind=kint) :: gid, loadcase
2645  !---- body
2646 
2647  if( p%SOLID%file_type /= kbcffstr) return
2648 
2649  !read grpid
2650  gid = 1
2651  rcode = fstr_ctrl_get_param_ex( ctrl, 'GRPID ', '# ', 0, 'I', gid )
2652  !read loadcase (real=1:default, img=2)
2653  loadcase = kfloadcase_re
2654  rcode = fstr_ctrl_get_param_ex( ctrl, 'LOAD CASE ', '# ', 0, 'I', loadcase)
2655  !write(*,*) "loadcase=", loadcase
2656  !pause
2657 
2658  !read the num of dataline
2659  n = fstr_ctrl_get_data_line_n( ctrl )
2660  if( n == 0 ) return
2661  old_size = p%FREQ%FLOAD_ngrp_tot
2662  new_size = old_size + n
2663 
2664  !expand data array
2665  p%FREQ%FLOAD_ngrp_tot = new_size
2666  call fstr_expand_integer_array( p%FREQ%FLOAD_ngrp_GRPID, old_size, new_size )
2667  call fstr_expand_integer_array( p%FREQ%FLOAD_ngrp_ID, old_size, new_size )
2668  call fstr_expand_integer_array( p%FREQ%FLOAD_ngrp_TYPE, old_size, new_size )
2669  call fstr_expand_integer_array( p%FREQ%FLOAD_ngrp_DOF, old_size, new_size )
2670  call fstr_expand_real_array ( p%FREQ%FLOAD_ngrp_valre, old_size, new_size )
2671  call fstr_expand_real_array ( p%FREQ%FLOAD_ngrp_valim, old_size, new_size )
2672 
2673  !fill bc data
2674  allocate( grp_id_name(n) )
2675  allocate( id_ptr(n) )
2676  allocate( val_ptr(n) )
2677  id_ptr = 0
2678  val_ptr = 0.0d0
2679  rcode = fstr_ctrl_get_fload( ctrl, grp_id_name, hecmw_name_len, id_ptr, val_ptr)
2680  if( rcode /= 0 ) call fstr_ctrl_err_stop
2681  if(loadcase == kfloadcase_re) then
2682  do i = 1, n
2683  p%FREQ%FLOAD_ngrp_DOF(old_size+i) = id_ptr(i)
2684  p%FREQ%FLOAD_ngrp_valre(old_size+i) = val_ptr(i)
2685  enddo
2686  else if(loadcase == kfloadcase_im) then
2687  do i = 1, n
2688  p%FREQ%FLOAD_ngrp_DOF(old_size+i) = id_ptr(i)
2689  p%FREQ%FLOAD_ngrp_valim(old_size+i) = val_ptr(i)
2690  enddo
2691  else
2692  !error
2693  write(*,*) "Error this load set is not defined!"
2694  write(ilog,*) "Error this load set is not defined!"
2695  stop
2696  end if
2697  p%FREQ%FLOAD_ngrp_GRPID(old_size+1:new_size) = gid
2698  call nodesurf_grp_name_to_id_ex( p%MESH, '!FLOAD', n, grp_id_name, &
2699  p%FREQ%FLOAD_ngrp_ID(old_size+1:), p%FREQ%FLOAD_ngrp_TYPE(old_size+1:))
2700 
2701  deallocate( grp_id_name )
2702  deallocate( id_ptr )
2703  deallocate( val_ptr )
2704  nullify( grp_id_name )
2705  nullify( id_ptr )
2706  nullify( val_ptr )
2707  return
2708 
2709  contains
2710 
2711  function fstr_ctrl_get_fload(ctrl, node_id, node_id_len, dof_id, value)
2712  integer(kind=kint) :: ctrl
2713  character(len=HECMW_NAME_LEN) :: node_id(:) !Node group name
2714  integer(kind=kint), pointer :: dof_id(:)
2715  integer(kind=kint) :: node_id_len
2716  real(kind=kreal), pointer :: value(:)
2717  integer(kind=kint) :: fstr_ctrl_get_fload !return value
2718  character(len=HECMW_NAME_LEN) :: data_fmt, ss
2719 
2720  write(ss,*) node_id_len
2721  write(data_fmt, '(a,a,a)') 'S', trim(adjustl(ss)), 'IR '
2722 
2723  fstr_ctrl_get_fload = fstr_ctrl_get_data_array_ex(ctrl, data_fmt, node_id, dof_id, value)
2724  end function
2725 
2726  end subroutine
2727 
2728  !-----------------------------------------------------------------------------!
2730  !-----------------------------------------------------------------------------!
2731  subroutine fstr_setup_eigenread( ctrl, counter, P )
2732  !---- args
2733  integer(kind=kint) :: ctrl
2734  integer(kind=kint) :: counter
2735  type(fstr_param_pack) :: P
2736  !---- vals
2737  integer(kind=kint) :: filename_len
2738  character(len=HECMW_NAME_LEN) :: datafmt, ss
2739  !---- body
2740 
2741  filename_len = hecmw_filename_len
2742  write(ss,*) filename_len
2743  write(datafmt, '(a,a,a)') 'S', trim(adjustl(ss)), ' '
2744 
2745  if( fstr_ctrl_get_data_ex( ctrl, 1, datafmt, p%FREQ%eigenlog_filename ) /= 0) return
2746  if( fstr_ctrl_get_data_ex( ctrl, 2, 'ii ', p%FREQ%start_mode, p%FREQ%end_mode ) /= 0) return
2747 
2748  return
2749 
2750  end subroutine
2751 
2752  !-----------------------------------------------------------------------------!
2754  !-----------------------------------------------------------------------------!
2755 
2756  subroutine fstr_expand_dload_array( array, old_size, new_size )
2757  implicit none
2758  real(kind=kreal), pointer :: array(:,:)
2759  integer(kind=kint) :: old_size, new_size, i, j
2760  real(kind=kreal), pointer :: temp(:,:)
2761 
2762  if( old_size >= new_size ) then
2763  return
2764  end if
2765 
2766  if( associated( array ) ) then
2767  allocate(temp(0:6, old_size))
2768  temp = array
2769  deallocate(array)
2770  allocate(array(0:6, new_size))
2771  array = 0
2772  do i=1,old_size
2773  do j=0,6
2774  array(j,i) = temp(j,i)
2775  end do
2776  end do
2777  deallocate(temp)
2778  else
2779  allocate(array(0:6, new_size))
2780  array = 0
2781  end if
2782  end subroutine fstr_expand_dload_array
2783 
2785  subroutine fstr_setup_dload( ctrl, counter, P )
2786  implicit none
2787  integer(kind=kint) :: ctrl
2788  integer(kind=kint) :: counter
2789  type(fstr_param_pack) :: P
2790 
2791  integer(kind=kint) :: rcode
2792  character(HECMW_NAME_LEN) :: amp
2793  integer(kind=kint) :: amp_id
2794  integer(kind=kint) :: follow
2795  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
2796  real(kind=kreal),pointer :: new_params(:,:)
2797  logical,pointer :: fg_surface(:)
2798  integer(kind=kint),pointer :: lid_ptr(:)
2799  integer(kind=kint) :: i, j, n, old_size, new_size
2800  integer(kind=kint) :: gid
2801 
2802  if( p%SOLID%file_type /= kbcffstr ) return
2803 
2804  gid = 1
2805  rcode = fstr_ctrl_get_param_ex( ctrl, 'GRPID ', '# ', 0, 'I', gid )
2806 
2807  n = fstr_ctrl_get_data_line_n( ctrl )
2808  if( n == 0 ) return
2809  old_size = p%SOLID%DLOAD_ngrp_tot
2810  new_size = old_size + n
2811  p%SOLID%DLOAD_ngrp_tot = new_size
2812  ! Keiji Suemitsu (20140624) <
2813  call fstr_expand_integer_array ( p%SOLID%DLOAD_ngrp_GRPID, old_size, new_size )
2814  call fstr_expand_integer_array ( p%SOLID%DLOAD_ngrp_ID, old_size, new_size )
2815  call fstr_expand_integer_array ( p%SOLID%DLOAD_ngrp_LID, old_size, new_size )
2816  call fstr_expand_integer_array ( p%SOLID%DLOAD_ngrp_amp, old_size, new_size )
2817  call fstr_expand_dload_array ( p%SOLID%DLOAD_ngrp_params, old_size, new_size )
2818  ! > Keiji Suemitsu (20140624)
2819 
2820  allocate( grp_id_name(n))
2821  allocate( lid_ptr(n) )
2822  allocate( new_params(0:6,n))
2823  allocate( fg_surface(n))
2824  new_params = 0
2825  amp = ' '
2826  follow = p%SOLID%DLOAD_follow
2827  if( .not. p%PARAM%nlgeom ) follow = 0
2828  rcode = fstr_ctrl_get_dload( ctrl, amp, follow, &
2829  grp_id_name, hecmw_name_len, &
2830  lid_ptr, new_params )
2831  if( rcode /= 0 ) call fstr_ctrl_err_stop
2832  call amp_name_to_id( p%MESH, '!DLOAD', amp, amp_id )
2833  p%SOLID%DLOAD_follow = follow
2834  do i=1,n
2835  p%SOLID%DLOAD_ngrp_amp(old_size+i) = amp_id
2836  p%SOLID%DLOAD_ngrp_LID(old_size+i) = lid_ptr(i)
2837  do j=0, 6
2838  p%SOLID%DLOAD_ngrp_params(j,old_size+i) = new_params(j,i)
2839  end do
2840  fg_surface(i) = ( lid_ptr(i) == 100 )
2841  end do
2842  p%SOLID%DLOAD_ngrp_GRPID(old_size+1:new_size) = gid
2843  call dload_grp_name_to_id_ex( p%MESH, n, grp_id_name, fg_surface, p%SOLID%DLOAD_ngrp_ID(old_size+1:))
2844  deallocate( grp_id_name )
2845  deallocate( lid_ptr )
2846  deallocate( new_params )
2847  deallocate( fg_surface )
2848  nullify( grp_id_name )
2849  nullify( lid_ptr )
2850  nullify( new_params )
2851  nullify( fg_surface )
2852  end subroutine fstr_setup_dload
2853 
2854 
2855  !-----------------------------------------------------------------------------!
2857  !-----------------------------------------------------------------------------!
2858 
2859  subroutine fstr_setup_temperature( ctrl, counter, P )
2860  implicit none
2861  integer(kind=kint) :: ctrl
2862  integer(kind=kint) :: counter
2863  type(fstr_param_pack) :: P
2864 
2865  integer(kind=kint) :: rcode, gid
2866  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
2867  real(kind=kreal),pointer :: val_ptr(:)
2868  integer(kind=kint) :: i, n, old_size, new_size
2869 
2870  if( p%SOLID%file_type /= kbcffstr ) return
2871 
2872  gid = 1
2873  rcode = fstr_ctrl_get_param_ex( ctrl, 'GRPID ', '# ', 0, 'I', gid )
2874 
2875  n = fstr_ctrl_get_data_line_n( ctrl )
2876  old_size = p%SOLID%TEMP_ngrp_tot
2877  if( n > 0 ) then
2878  new_size = old_size + n
2879  else
2880  new_size = old_size + 1
2881  endif
2882  call fstr_expand_integer_array ( p%SOLID%TEMP_ngrp_GRPID, old_size, new_size )
2883  call fstr_expand_integer_array ( p%SOLID%TEMP_ngrp_ID, old_size, new_size )
2884  call fstr_expand_real_array ( p%SOLID%TEMP_ngrp_val,old_size, new_size )
2885 
2886  allocate( grp_id_name(n))
2887  allocate( val_ptr(n) )
2888  val_ptr = 0.0d0
2889 
2890  rcode = fstr_ctrl_get_temperature( ctrl, &
2891  p%SOLID%TEMP_irres, &
2892  p%SOLID%TEMP_tstep, &
2893  p%SOLID%TEMP_interval, &
2894  p%SOLID%TEMP_rtype, &
2895  grp_id_name, hecmw_name_len, &
2896  val_ptr )
2897  if( rcode /= 0 ) call fstr_ctrl_err_stop
2898  do i = 1, n
2899  p%SOLID%TEMP_ngrp_val(old_size+i) = val_ptr(i)
2900  enddo
2901  deallocate( val_ptr )
2902  nullify( val_ptr )
2903 
2904  p%SOLID%TEMP_ngrp_GRPID(old_size+1:new_size) = gid
2905  if( n > 0 ) then
2906  if( p%SOLID%TEMP_irres == 0 ) then
2907  p%SOLID%TEMP_ngrp_tot = new_size
2908  call node_grp_name_to_id_ex( p%MESH, '!TEMPERATURE', &
2909  n, grp_id_name, p%SOLID%TEMP_ngrp_ID(old_size+1:))
2910  endif
2911  deallocate( grp_id_name )
2912  endif
2913 
2914  end subroutine fstr_setup_temperature
2915 
2916 
2917  !-----------------------------------------------------------------------------!
2919  !-----------------------------------------------------------------------------!
2920 
2921  subroutine fstr_setup_spring( ctrl, counter, P )
2922  implicit none
2923  integer(kind=kint) :: ctrl
2924  integer(kind=kint) :: counter
2925  type(fstr_param_pack) :: P
2926 
2927  integer(kind=kint) :: rcode
2928  character(HECMW_NAME_LEN) :: amp
2929  integer(kind=kint) :: amp_id
2930  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
2931  real(kind=kreal),pointer :: val_ptr(:)
2932  integer(kind=kint),pointer :: id_ptr(:)
2933  integer(kind=kint) :: i, n, old_size, new_size
2934  integer(kind=kint) :: gid
2935 
2936  if( p%SOLID%file_type /= kbcffstr ) return
2937  gid = 1
2938  rcode = fstr_ctrl_get_param_ex( ctrl, 'GRPID ', '# ', 0, 'I', gid )
2939  n = fstr_ctrl_get_data_line_n( ctrl )
2940  if( n == 0 ) return
2941  old_size = p%SOLID%SPRING_ngrp_tot
2942  new_size = old_size + n
2943  p%SOLID%SPRING_ngrp_tot = new_size
2944  call fstr_expand_integer_array ( p%SOLID%SPRING_ngrp_GRPID, old_size, new_size )
2945  call fstr_expand_integer_array ( p%SOLID%SPRING_ngrp_ID, old_size, new_size )
2946  call fstr_expand_integer_array ( p%SOLID%SPRING_ngrp_DOF, old_size, new_size )
2947  call fstr_expand_real_array ( p%SOLID%SPRING_ngrp_val, old_size, new_size )
2948  call fstr_expand_integer_array ( p%SOLID%SPRING_ngrp_amp, old_size, new_size )
2949 
2950  allocate( grp_id_name(n))
2951  allocate( id_ptr(n) )
2952  allocate( val_ptr(n) )
2953  amp = ' '
2954  id_ptr = 0
2955  val_ptr = 0.0d0
2956  rcode = fstr_ctrl_get_spring( ctrl, amp, grp_id_name, hecmw_name_len, id_ptr, val_ptr )
2957  if( rcode /= 0 ) call fstr_ctrl_err_stop
2958 
2959  call amp_name_to_id( p%MESH, '!SPRING', amp, amp_id )
2960  do i=1,n
2961  p%SOLID%SPRING_ngrp_amp(old_size+i) = amp_id
2962  p%SOLID%SPRING_ngrp_DOF(old_size+i) = id_ptr(i)
2963  p%SOLID%SPRING_ngrp_val(old_size+i) = val_ptr(i)
2964  end do
2965  p%SOLID%SPRING_ngrp_GRPID(old_size+1:new_size) = gid
2966  call node_grp_name_to_id_ex( p%MESH, '!SPRING', n, grp_id_name, p%SOLID%SPRING_ngrp_ID(old_size+1:))
2967 
2968  deallocate( grp_id_name )
2969  deallocate( id_ptr )
2970  deallocate( val_ptr )
2971  nullify( grp_id_name )
2972  nullify( id_ptr )
2973  nullify( val_ptr )
2974 
2975  end subroutine fstr_setup_spring
2976 
2977 
2978  !-----------------------------------------------------------------------------!
2980  !-----------------------------------------------------------------------------!
2981 
2982  subroutine fstr_setup_reftemp( ctrl, counter, P )
2983  implicit none
2984  integer(kind=kint) :: ctrl
2985  integer(kind=kint) :: counter
2986  type(fstr_param_pack) :: P
2987 
2988  integer(kind=kint) :: rcode
2989 
2990  rcode = fstr_ctrl_get_reftemp( ctrl, p%PARAM%ref_temp )
2991  if( rcode /= 0 ) call fstr_ctrl_err_stop
2992 
2993  end subroutine fstr_setup_reftemp
2994 
2995 
2996  !*****************************************************************************!
2997  !* HEADERS FOR HEAT ANALYSIS *************************************************!
2998  !*****************************************************************************!
2999 
3000  !-----------------------------------------------------------------------------!
3002  !-----------------------------------------------------------------------------!
3003 
3004  subroutine fstr_setup_heat( ctrl, counter, P )
3005  implicit none
3006  integer(kind=kint) :: ctrl
3007  integer(kind=kint) :: counter
3008  type(fstr_param_pack) :: P
3009 
3010  integer(kind=kint) :: rcode
3011  integer(kind=kint) :: n
3012  character(len=HECMW_NAME_LEN) :: mName
3013  integer(kind=kint) :: i
3014 
3015  n = fstr_ctrl_get_data_line_n( ctrl )
3016 
3017  if( n == 0 ) return
3018 
3019  call reallocate_real( p%PARAM%dtime, n)
3020  call reallocate_real( p%PARAM%etime, n)
3021  call reallocate_real( p%PARAM%dtmin, n)
3022  call reallocate_real( p%PARAM%delmax,n)
3023  call reallocate_integer( p%PARAM%itmax, n)
3024  call reallocate_real( p%PARAM%eps, n)
3025  p%PARAM%analysis_n = n
3026 
3027  p%PARAM%dtime = 0
3028  p%PARAM%etime = 0
3029  p%PARAM%dtmin = 0
3030  p%PARAM%delmax = 0
3031  p%PARAM%itmax = 20
3032  p%PARAM%eps = 1.0e-6
3033  p%PARAM%timepoint_id = 0
3034 
3035  rcode = fstr_ctrl_get_heat( ctrl, &
3036  p%PARAM%dtime, &
3037  p%PARAM%etime, &
3038  p%PARAM%dtmin, &
3039  p%PARAM%delmax, &
3040  p%PARAM%itmax, &
3041  p%PARAM%eps, &
3042  mname, &
3043  p%HEAT%beta)
3044  if( rcode /= 0 ) then
3045  call fstr_ctrl_err_stop
3046  end if
3047 
3048  if( associated(p%PARAM%timepoints) ) then
3049  do i=1,size(p%PARAM%timepoints)
3050  if( fstr_streqr( p%PARAM%timepoints(i)%name, mname ) ) then
3051  p%PARAM%timepoint_id = i; exit
3052  endif
3053  enddo
3054  endif
3055 
3056  call reallocate_real( p%HEAT%STEP_DLTIME, n)
3057  call reallocate_real( p%HEAT%STEP_EETIME, n)
3058  call reallocate_real( p%HEAT%STEP_DELMIN, n)
3059  call reallocate_real( p%HEAT%STEP_DELMAX, n)
3060  p%HEAT%STEPtot = n
3061 
3062  p%HEAT%STEP_DLTIME = p%PARAM%dtime
3063  p%HEAT%STEP_EETIME = p%PARAM%etime
3064  p%HEAT%STEP_DELMIN = p%PARAM%dtmin
3065  p%HEAT%STEP_DELMAX = p%PARAM%delmax
3066  p%HEAT%timepoint_id = p%PARAM%timepoint_id
3067 
3068  end subroutine fstr_setup_heat
3069 
3070  !-----------------------------------------------------------------------------!
3072  !-----------------------------------------------------------------------------!
3073 
3074  subroutine fstr_setup_fixtemp( ctrl, counter, P )
3075  implicit none
3076  integer(kind=kint) :: ctrl
3077  integer(kind=kint) :: counter
3078  type(fstr_param_pack),target :: P
3079 
3080  integer(kind=kint) :: rcode
3081  character(HECMW_NAME_LEN) :: amp
3082  integer(kind=kint) :: amp_id
3083  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
3084  real(kind=kreal),pointer :: value(:)
3085  integer(kind=kint) :: i, j, n, m, head, id, member_n, old_size, new_size
3086  integer(kind=kint),pointer :: member(:)
3087  integer(kind=kint) :: local_id, rtc
3088  ! ------------------------------------------------
3089 
3090  n = fstr_ctrl_get_data_line_n( ctrl )
3091  if( n == 0 ) return
3092 
3093  allocate( grp_id_name(n))
3094  allocate( value(n))
3095 
3096  amp = ' '
3097  rcode = fstr_ctrl_get_fixtemp( ctrl, amp, &
3098  grp_id_name, hecmw_name_len, value )
3099  if( rcode /= 0 ) call fstr_ctrl_err_stop
3100 
3101  call amp_name_to_id( p%MESH, '!FIXTEMP', amp, amp_id )
3102 
3103  m = 0
3104  do i = 1, n
3105  !rtc = get_local_member_index( P%MESH, 'node', grp_id_name(i), local_id )
3106  rtc = get_sorted_local_member_index( p%MESH, p%PARAM, 'node', grp_id_name(i), local_id )
3107  if( rtc > 0 ) then
3108  m = m + 1
3109  else if( rtc < 0 ) then
3110  m = m + get_grp_member_n( p%MESH, 'node_grp', grp_id_name(i) )
3111  end if
3112  end do
3113 
3114  if (m == 0) then
3115  deallocate( grp_id_name )
3116  deallocate( value )
3117  return
3118  endif
3119 
3120  ! JP-8
3121  old_size = p%HEAT%T_FIX_tot
3122  new_size = old_size + m
3123  call fstr_expand_integer_array( p%HEAT%T_FIX_node, old_size, new_size )
3124  call fstr_expand_integer_array( p%HEAT%T_FIX_ampl, old_size, new_size )
3125  call fstr_expand_real_array( p%HEAT%T_FIX_val, old_size, new_size )
3126  p%HEAT%T_FIX_tot = new_size
3127 
3128  head = old_size + 1
3129  member => p%HEAT%T_FIX_node(head:)
3130  id = head
3131  do i = 1, n
3132  !rtc = get_local_member_index( P%MESH, 'node', grp_id_name(i), local_id )
3133  rtc = get_sorted_local_member_index( p%MESH, p%PARAM, 'node', grp_id_name(i), local_id )
3134  if( rtc > 0 ) then
3135  member(1) = local_id
3136  member_n = 1
3137  else if( rtc < 0 ) then
3138  member_n = get_grp_member( p%MESH, 'node_grp', grp_id_name(i), member )
3139  else
3140  cycle
3141  end if
3142  if( i<n ) then
3143  member => member( member_n+1 : )
3144  endif
3145  do j = 1, member_n
3146  p%HEAT%T_FIX_val (id) = value(i)
3147  p%HEAT%T_FIX_ampl (id) = amp_id
3148  id = id + 1
3149  end do
3150  end do
3151 
3152  deallocate( grp_id_name )
3153  deallocate( value )
3154  end subroutine fstr_setup_fixtemp
3155 
3156 
3157  !-----------------------------------------------------------------------------!
3159  !-----------------------------------------------------------------------------!
3160 
3161  subroutine fstr_setup_cflux( ctrl, counter, P )
3162  implicit none
3163  integer(kind=kint) :: ctrl
3164  integer(kind=kint) :: counter
3165  type(fstr_param_pack) :: P
3166 
3167  integer(kind=kint) :: rcode
3168  character(HECMW_NAME_LEN) :: amp
3169  integer(kind=kint) :: amp_id
3170  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
3171  real(kind=kreal),pointer :: value(:)
3172  integer(kind=kint) :: i, j, n, m, head, id, member_n, old_size, new_size
3173  integer(kind=kint),pointer :: member(:)
3174  integer(kind=kint) :: local_id, rtc
3175  ! ------------------------------------------------
3176 
3177  n = fstr_ctrl_get_data_line_n( ctrl )
3178  if( n == 0 ) return
3179 
3180  allocate( grp_id_name(n))
3181  allocate( value(n))
3182 
3183  amp = ' '
3184  rcode = fstr_ctrl_get_cflux( ctrl, amp, &
3185  grp_id_name, hecmw_name_len, value )
3186  if( rcode /= 0 ) call fstr_ctrl_err_stop
3187 
3188  call amp_name_to_id( p%MESH, '!CFLUX', amp, amp_id )
3189 
3190  m = 0
3191 
3192  do i = 1, n
3193  rtc = get_local_member_index( p%MESH, 'node', grp_id_name(i), local_id )
3194  if( rtc > 0 ) then
3195  m = m + 1
3196  else if( rtc < 0 ) then
3197  m = m + get_grp_member_n( p%MESH, 'node_grp', grp_id_name(i) )
3198  end if
3199  end do
3200 
3201  if (m == 0) then
3202  deallocate( grp_id_name )
3203  deallocate( value )
3204  return
3205  endif
3206 
3207  ! JP-9
3208  old_size = p%HEAT%Q_NOD_tot
3209  new_size = old_size + m
3210  call fstr_expand_integer_array( p%HEAT%Q_NOD_node, old_size, new_size )
3211  call fstr_expand_integer_array( p%HEAT%Q_NOD_ampl, old_size, new_size )
3212  call fstr_expand_real_array( p%HEAT%Q_NOD_val, old_size, new_size )
3213  p%HEAT%Q_NOD_tot = new_size
3214 
3215  head = old_size + 1
3216  member => p%HEAT%Q_NOD_node(head:)
3217  id = head
3218  do i = 1, n
3219  rtc = get_local_member_index( p%MESH, 'node', grp_id_name(i), local_id )
3220  if( rtc > 0 ) then
3221  member(1) = local_id
3222  member_n = 1
3223  else if( rtc < 0 ) then
3224  member_n = get_grp_member( p%MESH, 'node_grp', grp_id_name(i), member )
3225  else
3226  cycle
3227  end if
3228  if( i<n ) member => member( member_n+1 : )
3229  do j = 1, member_n
3230  p%HEAT%Q_NOD_val (id) = value(i)
3231  p%HEAT%Q_NOD_ampl (id) = amp_id
3232  id = id + 1
3233  end do
3234  end do
3235 
3236  deallocate( grp_id_name )
3237  deallocate( value )
3238  end subroutine fstr_setup_cflux
3239 
3240 
3241  !-----------------------------------------------------------------------------!
3243  !-----------------------------------------------------------------------------!
3244 
3245 
3246  subroutine fstr_setup_dflux( ctrl, counter, P )
3247  implicit none
3248  integer(kind=kint) :: ctrl
3249  integer(kind=kint) :: counter
3250  type(fstr_param_pack) :: P
3251 
3252  integer(kind=kint) :: rcode
3253  character(HECMW_NAME_LEN) :: amp
3254  integer(kind=kint) :: amp_id
3255  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
3256  integer(kind=kint),pointer :: load_type(:)
3257  real(kind=kreal),pointer :: value(:)
3258  integer(kind=kint) :: i, j, n, m, head, id, member_n, old_size, new_size
3259  integer(kind=kint),pointer :: member(:)
3260  integer(kind=kint) :: local_id, rtc
3261  ! ------------------------------------------------
3262 
3263  n = fstr_ctrl_get_data_line_n( ctrl )
3264  if( n == 0 ) return
3265 
3266  allocate( grp_id_name(n))
3267  allocate( load_type(n))
3268  allocate( value(n))
3269 
3270  amp = ' '
3271  rcode = fstr_ctrl_get_dflux( ctrl, amp, &
3272  grp_id_name, hecmw_name_len, load_type, value )
3273  if( rcode /= 0 ) call fstr_ctrl_err_stop
3274 
3275  call amp_name_to_id( p%MESH, '!DFLUX', amp, amp_id )
3276 
3277  m = 0
3278  do i = 1, n
3279  rtc = get_local_member_index( p%MESH, 'element', grp_id_name(i), local_id )
3280  if( rtc > 0 ) then
3281  m = m + 1
3282  else if( rtc < 0 ) then
3283  m = m + get_grp_member_n( p%MESH, 'elem_grp', grp_id_name(i) )
3284  end if
3285  end do
3286 
3287  if (m == 0) then
3288  deallocate( grp_id_name )
3289  deallocate( load_type )
3290  deallocate( value )
3291  return
3292  endif
3293 
3294  ! JP-10
3295  old_size = p%HEAT%Q_SUF_tot
3296  new_size = old_size + m
3297  call fstr_expand_integer_array( p%HEAT%Q_SUF_elem, old_size, new_size )
3298  call fstr_expand_integer_array( p%HEAT%Q_SUF_ampl, old_size, new_size )
3299  call fstr_expand_integer_array( p%HEAT%Q_SUF_surf, old_size, new_size )
3300  call fstr_expand_real_array( p%HEAT%Q_SUF_val, old_size, new_size )
3301  p%HEAT%Q_SUF_tot = new_size
3302 
3303  head = old_size + 1
3304  member => p%HEAT%Q_SUF_elem(head:)
3305  id = head
3306  do i = 1, n
3307  rtc = get_local_member_index( p%MESH, 'element', grp_id_name(i), local_id )
3308  if( rtc > 0 ) then
3309  member(1) = local_id
3310  member_n = 1
3311  else if( rtc < 0 ) then
3312  member_n = get_grp_member( p%MESH, 'elem_grp', grp_id_name(i), member )
3313  else
3314  cycle
3315  end if
3316  if( i<n ) member => member( member_n+1 : )
3317  do j = 1, member_n
3318  p%HEAT%Q_SUF_surf (id) = load_type(i)
3319  p%HEAT%Q_SUF_val (id) = value(i)
3320  p%HEAT%Q_SUF_ampl (id) = amp_id
3321  id = id + 1
3322  end do
3323  end do
3324 
3325  deallocate( grp_id_name )
3326  deallocate( load_type )
3327  deallocate( value )
3328  end subroutine fstr_setup_dflux
3329 
3330 
3331  !-----------------------------------------------------------------------------!
3333  !-----------------------------------------------------------------------------!
3334 
3335 
3336  subroutine fstr_setup_sflux( ctrl, counter, P )
3337  implicit none
3338  integer(kind=kint) :: ctrl
3339  integer(kind=kint) :: counter
3340  type(fstr_param_pack) :: P
3341 
3342  integer(kind=kint) :: rcode
3343  character(HECMW_NAME_LEN) :: amp
3344  integer(kind=kint) :: amp_id
3345  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
3346  real(kind=kreal),pointer :: value(:)
3347  integer(kind=kint) :: i, j, n, m, head, id, member_n, old_size, new_size
3348  integer(kind=kint),pointer :: member1(:), member2(:)
3349  ! ------------------------------------------------
3350 
3351  n = fstr_ctrl_get_data_line_n( ctrl )
3352  if( n == 0 ) return
3353 
3354  allocate( grp_id_name(n))
3355  allocate( value(n))
3356 
3357  amp = ' '
3358  rcode = fstr_ctrl_get_sflux( ctrl, amp, &
3359  grp_id_name, hecmw_name_len, value )
3360  if( rcode /= 0 ) call fstr_ctrl_err_stop
3361 
3362  call amp_name_to_id( p%MESH, '!SFLUX', amp, amp_id )
3363 
3364  m = 0
3365  do i = 1, n
3366  m = m + get_grp_member_n( p%MESH, 'surf_grp', grp_id_name(i) )
3367  end do
3368 
3369  if (m == 0) then
3370  deallocate( grp_id_name )
3371  deallocate( value )
3372  return
3373  endif
3374 
3375  ! JP-11
3376  old_size = p%HEAT%Q_SUF_tot
3377  new_size = old_size + m
3378  call fstr_expand_integer_array( p%HEAT%Q_SUF_elem, old_size, new_size )
3379  call fstr_expand_integer_array( p%HEAT%Q_SUF_ampl, old_size, new_size )
3380  call fstr_expand_integer_array( p%HEAT%Q_SUF_surf, old_size, new_size )
3381  call fstr_expand_real_array( p%HEAT%Q_SUF_val, old_size, new_size )
3382  p%HEAT%Q_SUF_tot = new_size
3383 
3384  head = old_size + 1
3385  member1 => p%HEAT%Q_SUF_elem(head:)
3386  member2 => p%HEAT%Q_SUF_surf(head:)
3387  id = head
3388  do i = 1, n
3389  member_n = get_grp_member( p%MESH, 'surf_grp', grp_id_name(i), member1, member2 )
3390  if( i<n ) then
3391  member1 => member1( member_n+1 : )
3392  member2 => member2( member_n+1 : )
3393  end if
3394  do j = 1, member_n
3395  p%HEAT%Q_SUF_val (id) = value(i)
3396  p%HEAT%Q_SUF_ampl (id) = amp_id
3397  id = id + 1
3398  end do
3399  end do
3400 
3401  deallocate( grp_id_name )
3402  deallocate( value )
3403  end subroutine fstr_setup_sflux
3404 
3405 
3406  !-----------------------------------------------------------------------------!
3408  !-----------------------------------------------------------------------------!
3409 
3410 
3411  subroutine fstr_setup_film( ctrl, counter, P )
3412  implicit none
3413  integer(kind=kint) :: ctrl
3414  integer(kind=kint) :: counter
3415  type(fstr_param_pack) :: P
3416 
3417  integer(kind=kint) :: rcode
3418  character(HECMW_NAME_LEN) :: amp1, amp2
3419  integer(kind=kint) :: amp_id1, amp_id2
3420  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
3421  integer(kind=kint),pointer :: load_type(:)
3422  real(kind=kreal),pointer :: value(:)
3423  real(kind=kreal),pointer :: shink(:)
3424  integer(kind=kint) :: i, j, n, m, head, id, member_n, old_size, new_size
3425  integer(kind=kint),pointer :: member(:)
3426  integer(kind=kint) :: local_id, rtc
3427  ! ------------------------------------------------
3428 
3429  n = fstr_ctrl_get_data_line_n( ctrl )
3430  if( n == 0 ) return
3431 
3432  allocate( grp_id_name(n))
3433  allocate( load_type(n))
3434  allocate( value(n))
3435  allocate( shink(n))
3436 
3437  amp1 = ' '
3438  amp2 = ' '
3439 
3440  rcode = fstr_ctrl_get_film( ctrl, amp1, amp2, &
3441  grp_id_name, hecmw_name_len, load_type, value, shink )
3442  if( rcode /= 0 ) call fstr_ctrl_err_stop
3443 
3444  call amp_name_to_id( p%MESH, '!FILM', amp1, amp_id1 )
3445  call amp_name_to_id( p%MESH, '!FILM', amp2, amp_id2 )
3446 
3447  m = 0
3448  do i = 1, n
3449  rtc = get_local_member_index( p%MESH, 'element', grp_id_name(i), local_id )
3450  if( rtc > 0 ) then
3451  m = m + 1
3452  else if( rtc < 0 ) then
3453  m = m + get_grp_member_n( p%MESH, 'elem_grp', grp_id_name(i) )
3454  end if
3455  end do
3456 
3457  if (m == 0) then
3458  deallocate( grp_id_name )
3459  deallocate( load_type )
3460  deallocate( value )
3461  deallocate( shink )
3462  return
3463  endif
3464 
3465  ! JP-12
3466  old_size = p%HEAT%H_SUF_tot
3467  new_size = old_size + m
3468  call fstr_expand_integer_array( p%HEAT%H_SUF_elem, old_size, new_size )
3469  call fstr_expand_integer_array2( p%HEAT%H_SUF_ampl, 2, old_size, new_size )
3470  call fstr_expand_integer_array( p%HEAT%H_SUF_surf, old_size, new_size )
3471  call fstr_expand_real_array2( p%HEAT%H_SUF_val, 2, old_size, new_size )
3472  p%HEAT%H_SUF_tot = new_size
3473 
3474  head = old_size + 1
3475  member => p%HEAT%H_SUF_elem(head:)
3476  id = head
3477  do i = 1, n
3478  rtc = get_local_member_index( p%MESH, 'element', grp_id_name(i), local_id )
3479  if( rtc > 0 ) then
3480  member(1) = local_id
3481  member_n = 1
3482  else if( rtc < 0 ) then
3483  member_n = get_grp_member( p%MESH, 'elem_grp', grp_id_name(i), member )
3484  else
3485  cycle
3486  end if
3487  if( i<n ) member => member( member_n+1 : )
3488  do j = 1, member_n
3489  p%HEAT%H_SUF_surf (id) = load_type(i)
3490  p%HEAT%H_SUF_val (id,1) = value(i)
3491  p%HEAT%H_SUF_val (id,2) = shink(i)
3492  p%HEAT%H_SUF_ampl (id,1) = amp_id1
3493  p%HEAT%H_SUF_ampl (id,2) = amp_id2
3494  id= id + 1
3495  end do
3496  end do
3497 
3498  deallocate( grp_id_name )
3499  deallocate( load_type )
3500  deallocate( value )
3501  deallocate( shink )
3502  end subroutine fstr_setup_film
3503 
3504 
3505  !-----------------------------------------------------------------------------!
3507  !-----------------------------------------------------------------------------!
3508 
3509 
3510  subroutine fstr_setup_sfilm( ctrl, counter, P )
3511  implicit none
3512  integer(kind=kint) :: ctrl
3513  integer(kind=kint) :: counter
3514  type(fstr_param_pack) :: P
3515 
3516  integer(kind=kint) :: rcode
3517  character(HECMW_NAME_LEN) :: amp1, amp2
3518  integer(kind=kint) :: amp_id1, amp_id2
3519  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
3520  real(kind=kreal),pointer :: value(:)
3521  real(kind=kreal),pointer :: shink(:)
3522  integer(kind=kint) :: i, j, n, m, head, id, member_n, old_size, new_size
3523  integer(kind=kint),pointer :: member1(:), member2(:)
3524  ! ------------------------------------------------
3525 
3526  n = fstr_ctrl_get_data_line_n( ctrl )
3527  if( n == 0 ) return
3528 
3529  allocate( grp_id_name(n))
3530  allocate( value(n))
3531  allocate( shink(n))
3532 
3533  amp1 = ' '
3534  amp2 = ' '
3535  rcode = fstr_ctrl_get_sfilm( ctrl, amp1, amp2, &
3536  grp_id_name, hecmw_name_len, value, shink )
3537  if( rcode /= 0 ) call fstr_ctrl_err_stop
3538 
3539  call amp_name_to_id( p%MESH, '!SFILM', amp1, amp_id1 )
3540  call amp_name_to_id( p%MESH, '!SFILM', amp2, amp_id2 )
3541 
3542  m = 0
3543  do i = 1, n
3544  m = m + get_grp_member_n( p%MESH, 'surf_grp', grp_id_name(i) )
3545  end do
3546 
3547  if (m == 0) then
3548  deallocate( grp_id_name )
3549  deallocate( value )
3550  deallocate( shink )
3551  return
3552  endif
3553 
3554  ! JP-13
3555  old_size = p%HEAT%H_SUF_tot
3556  new_size = old_size + m
3557  call fstr_expand_integer_array( p%HEAT%H_SUF_elem, old_size, new_size )
3558  call fstr_expand_integer_array2( p%HEAT%H_SUF_ampl, 2, old_size, new_size )
3559  call fstr_expand_integer_array( p%HEAT%H_SUF_surf, old_size, new_size )
3560  call fstr_expand_real_array2( p%HEAT%H_SUF_val, 2, old_size, new_size )
3561  p%HEAT%H_SUF_tot = new_size
3562 
3563  head = old_size + 1
3564  member1 => p%HEAT%H_SUF_elem(head:)
3565  member2 => p%HEAT%H_SUF_surf(head:)
3566  id = head
3567  do i = 1, n
3568  member_n = get_grp_member( p%MESH, 'surf_grp', grp_id_name(i), member1, member2 )
3569  if( i<n ) then
3570  member1 => member1( member_n+1 : )
3571  member2 => member2( member_n+1 : )
3572  end if
3573  do j = 1, member_n
3574  p%HEAT%H_SUF_val (id,1) = value(i)
3575  p%HEAT%H_SUF_val (id,2) = shink(i)
3576  p%HEAT%H_SUF_ampl (id,1) = amp_id1
3577  p%HEAT%H_SUF_ampl (id,2) = amp_id2
3578  id = id + 1
3579  end do
3580  end do
3581 
3582  deallocate( grp_id_name )
3583  deallocate( value )
3584  deallocate( shink )
3585  end subroutine fstr_setup_sfilm
3586 
3587 
3588  !-----------------------------------------------------------------------------!
3590  !-----------------------------------------------------------------------------!
3591 
3592 
3593  subroutine fstr_setup_radiate( ctrl, counter, P )
3594  implicit none
3595  integer(kind=kint) :: ctrl
3596  integer(kind=kint) :: counter
3597  type(fstr_param_pack) :: P
3598 
3599  integer(kind=kint) :: rcode
3600  character(HECMW_NAME_LEN) :: amp1, amp2
3601  integer(kind=kint) :: amp_id1, amp_id2
3602  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
3603  integer(kind=kint),pointer :: load_type(:)
3604  real(kind=kreal),pointer :: value(:)
3605  real(kind=kreal),pointer :: shink(:)
3606  integer(kind=kint) :: i, j, n, m, head, id, member_n, old_size, new_size
3607  integer(kind=kint),pointer :: member(:)
3608  integer(kind=kint) :: local_id, rtc
3609  ! ------------------------------------------------
3610 
3611  n = fstr_ctrl_get_data_line_n( ctrl )
3612  if( n == 0 ) return
3613 
3614  allocate( grp_id_name(n))
3615  allocate( load_type(n))
3616  allocate( value(n))
3617  allocate( shink(n))
3618 
3619  amp1 = ' '
3620  amp2 = ' '
3621  rcode = fstr_ctrl_get_radiate( ctrl, amp1, amp2, &
3622  grp_id_name, hecmw_name_len, load_type, value, shink )
3623  if( rcode /= 0 ) call fstr_ctrl_err_stop
3624 
3625  call amp_name_to_id( p%MESH, '!RADIATE', amp1, amp_id1 )
3626  call amp_name_to_id( p%MESH, '!RADIATE', amp2, amp_id2 )
3627 
3628  m = 0
3629  do i = 1, n
3630  rtc = get_local_member_index( p%MESH, 'element', grp_id_name(i), local_id )
3631  if( rtc > 0 ) then
3632  m = m + 1
3633  else if( rtc < 0 ) then
3634  m = m + get_grp_member_n( p%MESH, 'elem_grp', grp_id_name(i) )
3635  end if
3636  end do
3637 
3638  if (m == 0) then
3639  deallocate( grp_id_name )
3640  deallocate( load_type )
3641  deallocate( value )
3642  deallocate( shink )
3643  return
3644  endif
3645 
3646  ! JP-14
3647  old_size = p%HEAT%R_SUF_tot
3648  new_size = old_size + m
3649  call fstr_expand_integer_array( p%HEAT%R_SUF_elem, old_size, new_size )
3650  call fstr_expand_integer_array2( p%HEAT%R_SUF_ampl, 2, old_size, new_size )
3651  call fstr_expand_integer_array( p%HEAT%R_SUF_surf, old_size, new_size )
3652  call fstr_expand_real_array2( p%HEAT%R_SUF_val, 2, old_size, new_size )
3653  p%HEAT%R_SUF_tot = new_size
3654 
3655  head = old_size + 1
3656  member => p%HEAT%R_SUF_elem(head:)
3657  id = head
3658  do i = 1, n
3659  rtc = get_local_member_index( p%MESH, 'element', grp_id_name(i), local_id )
3660  if( rtc > 0 ) then
3661  member(1) = local_id
3662  member_n = 1
3663  else if( rtc < 0 ) then
3664  member_n = get_grp_member( p%MESH, 'elem_grp', grp_id_name(i), member )
3665  else
3666  cycle
3667  end if
3668  if( i<n ) member => member( member_n+1 : )
3669  do j = 1, member_n
3670  p%HEAT%R_SUF_surf (id) = load_type(i)
3671  p%HEAT%R_SUF_val (id,1) = value(i)
3672  p%HEAT%R_SUF_val (id,2) = shink(i)
3673  p%HEAT%R_SUF_ampl (id,1) = amp_id1
3674  p%HEAT%R_SUF_ampl (id,2) = amp_id2
3675  id = id + 1
3676  end do
3677  end do
3678 
3679  deallocate( grp_id_name )
3680  deallocate( load_type )
3681  deallocate( value )
3682  deallocate( shink )
3683  end subroutine fstr_setup_radiate
3684 
3685 
3686  !-----------------------------------------------------------------------------!
3688  !-----------------------------------------------------------------------------!
3689 
3690 
3691  subroutine fstr_setup_sradiate( ctrl, counter, P )
3692  implicit none
3693  integer(kind=kint) :: ctrl
3694  integer(kind=kint) :: counter
3695  type(fstr_param_pack) :: P
3696 
3697  integer(kind=kint) :: rcode
3698  character(HECMW_NAME_LEN) :: amp1, amp2
3699  integer(kind=kint) :: amp_id1, amp_id2
3700  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
3701  real(kind=kreal),pointer :: value(:)
3702  real(kind=kreal),pointer :: shink(:)
3703  integer(kind=kint) :: i, j, n, m, head, id, member_n, old_size, new_size
3704  integer(kind=kint),pointer :: member1(:), member2(:)
3705  ! ------------------------------------------------
3706 
3707  n = fstr_ctrl_get_data_line_n( ctrl )
3708  if( n == 0 ) return
3709 
3710  allocate( grp_id_name(n))
3711  allocate( value(n))
3712  allocate( shink(n))
3713 
3714  amp1 = ' '
3715  amp2 = ' '
3716  rcode = fstr_ctrl_get_sradiate( ctrl, amp1, amp2, grp_id_name, hecmw_name_len, value, shink )
3717  if( rcode /= 0 ) call fstr_ctrl_err_stop
3718 
3719  call amp_name_to_id( p%MESH, '!SRADIATE', amp1, amp_id1 )
3720  call amp_name_to_id( p%MESH, '!SRADIATE', amp2, amp_id2 )
3721 
3722  m = 0
3723  do i = 1, n
3724  m = m + get_grp_member_n( p%MESH, 'surf_grp', grp_id_name(i) )
3725  end do
3726 
3727  if (m == 0) then
3728  deallocate( grp_id_name )
3729  deallocate( value )
3730  deallocate( shink )
3731  return
3732  endif
3733 
3734  ! JP-15
3735  old_size = p%HEAT%R_SUF_tot
3736  new_size = old_size + m
3737  call fstr_expand_integer_array( p%HEAT%R_SUF_elem, old_size, new_size )
3738  call fstr_expand_integer_array2( p%HEAT%R_SUF_ampl, 2, old_size, new_size )
3739  call fstr_expand_integer_array( p%HEAT%R_SUF_surf, old_size, new_size )
3740  call fstr_expand_real_array2( p%HEAT%R_SUF_val, 2, old_size, new_size )
3741  p%HEAT%R_SUF_tot = new_size
3742 
3743  head = old_size + 1
3744  member1 => p%HEAT%R_SUF_elem(head:)
3745  member2 => p%HEAT%R_SUF_surf(head:)
3746  id = head
3747  do i = 1, n
3748  member_n = get_grp_member( p%MESH, 'surf_grp', grp_id_name(i), member1, member2 )
3749  if( i<n ) then
3750  member1 => member1( member_n+1 : )
3751  member2 => member2( member_n+1 : )
3752  end if
3753  do j = 1, member_n
3754  p%HEAT%R_SUF_val (id,1) = value(i)
3755  p%HEAT%R_SUF_val (id,2) = shink(i)
3756  p%HEAT%R_SUF_ampl (id,1) = amp_id1
3757  p%HEAT%R_SUF_ampl (id,2) = amp_id2
3758  id = id + 1
3759  end do
3760  end do
3761 
3762  deallocate( grp_id_name )
3763  deallocate( value )
3764  deallocate( shink )
3765  end subroutine fstr_setup_sradiate
3766 
3767 
3768  !*****************************************************************************!
3769  !* HEADERS FOR EIGEN ANALYSIS ************************************************!
3770  !*****************************************************************************!
3771 
3772  !-----------------------------------------------------------------------------!
3774  !-----------------------------------------------------------------------------!
3775 
3776  subroutine fstr_setup_eigen( ctrl, counter, P )
3777  implicit none
3778  integer(kind=kint) :: ctrl
3779  integer(kind=kint) :: counter
3780  type(fstr_param_pack) :: P
3781 
3782  integer(kind=kint) :: rcode
3783 
3784  rcode = fstr_ctrl_get_eigen( ctrl, p%EIGEN%nget, p%EIGEN%tolerance, p%EIGEN%maxiter)
3785  if( rcode /= 0) call fstr_ctrl_err_stop
3786 
3787  end subroutine fstr_setup_eigen
3788 
3789 
3790  !*****************************************************************************!
3791  !* HEADERS FOR DYNAMIC ANALYSIS **********************************************!
3792  !*****************************************************************************!
3793 
3794  !-----------------------------------------------------------------------------!
3796  !-----------------------------------------------------------------------------!
3797 
3798  subroutine fstr_setup_dynamic( ctrl, counter, P )
3799  implicit none
3800  integer(kind=kint) :: ctrl
3801  integer(kind=kint) :: counter
3802  type(fstr_param_pack) :: P
3803  integer(kind=kint) :: rcode
3804  character(HECMW_NAME_LEN) :: grp_id_name(1)
3805  integer(kind=kint) :: grp_id(1)
3806 
3807  rcode = fstr_ctrl_get_dynamic( ctrl, &
3808  p%PARAM%nlgeom, &
3809  p%DYN%idx_eqa, &
3810  p%DYN%idx_resp,&
3811  p%DYN%n_step, &
3812  p%DYN%t_start, &
3813  p%DYN%t_end, &
3814  p%DYN%t_delta, &
3815  p%DYN%gamma, &
3816  p%DYN%beta, &
3817  p%DYN%idx_mas, &
3818  p%DYN%idx_dmp, &
3819  p%DYN%ray_m, &
3820  p%DYN%ray_k, &
3821  p%DYN%nout, &
3822  grp_id_name(1), hecmw_name_len, &
3823  p%DYN%nout_monit, &
3824  p%DYN%iout_list )
3825 
3826  if( rcode /= 0) call fstr_ctrl_err_stop
3827 
3828  if (p%DYN%idx_resp == 1) then
3829  call node_grp_name_to_id_ex( p%MESH, '!DYNAMIC', 1, grp_id_name, grp_id)
3830  p%DYN%ngrp_monit = grp_id(1)
3831  else
3832  read(grp_id_name,*) p%DYN%ngrp_monit
3833  endif
3834 
3835  end subroutine fstr_setup_dynamic
3836 
3837 
3838  !-----------------------------------------------------------------------------!
3840  !-----------------------------------------------------------------------------!
3841 
3842  subroutine fstr_setup_velocity( ctrl, counter, P )
3843  implicit none
3844  integer(kind=kint) :: ctrl
3845  integer(kind=kint) :: counter
3846  type(fstr_param_pack) :: P
3847 
3848  integer(kind=kint) :: rcode
3849  integer(kind=kint) :: vType
3850  character(HECMW_NAME_LEN) :: amp
3851  integer(kind=kint) :: amp_id
3852  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
3853  integer(kind=kint),pointer :: dof_ids (:)
3854  integer(kind=kint),pointer :: dof_ide (:)
3855  real(kind=kreal),pointer :: val_ptr(:)
3856  integer(kind=kint) :: i, j, n, old_size, new_size
3857  integer(kind=kint) :: gid
3858 
3859  gid = 1
3860  rcode = fstr_ctrl_get_param_ex( ctrl, 'GRPID ', '# ', 0, 'I', gid )
3861 
3862  n = fstr_ctrl_get_data_line_n( ctrl )
3863  if( n == 0 ) return
3864  old_size = p%SOLID%VELOCITY_ngrp_tot
3865  new_size = old_size + n
3866  p%SOLID%VELOCITY_ngrp_tot = new_size
3867 
3868  call fstr_expand_integer_array (p%SOLID%VELOCITY_ngrp_GRPID, old_size, new_size )
3869  call fstr_expand_integer_array (p%SOLID%VELOCITY_ngrp_ID , old_size, new_size )
3870  call fstr_expand_integer_array (p%SOLID%VELOCITY_ngrp_type, old_size, new_size )
3871  call fstr_expand_real_array (p%SOLID%VELOCITY_ngrp_val , old_size, new_size )
3872  call fstr_expand_integer_array (p%SOLID%VELOCITY_ngrp_amp , old_size, new_size )
3873 
3874  allocate( grp_id_name(n))
3875  allocate( dof_ids(n))
3876  allocate( dof_ide(n))
3877  allocate( val_ptr(n) )
3878 
3879  amp = ''
3880  val_ptr = 0.0d0
3881  rcode = fstr_ctrl_get_velocity( ctrl, vtype, amp, &
3882  grp_id_name, hecmw_name_len, &
3883  dof_ids, dof_ide, val_ptr )
3884  if( rcode /= 0 ) call fstr_ctrl_err_stop
3885  p%SOLID%VELOCITY_type = vtype
3886  if( vtype == kbcinitial ) p%DYN%VarInitialize = .true.
3887  call amp_name_to_id( p%MESH, '!VELOCITY', amp, amp_id )
3888  call node_grp_name_to_id_ex( p%MESH, '!VELOCITY', &
3889  n, grp_id_name, p%SOLID%VELOCITY_ngrp_ID(old_size+1:))
3890  p%SOLID%VELOCITY_ngrp_GRPID(old_size+1:new_size) = gid
3891 
3892  j = old_size+1
3893  do i = 1, n
3894  if( (dof_ids(i) < 1).or.(6 < dof_ids(i)).or.(dof_ide(i) < 1).or.(6 < dof_ide(i)) ) then
3895  write(ilog,*) 'fstr control file error : !VELOCITY : range of dof_ids and dof_ide is from 1 to 6'
3896  stop
3897  end if
3898  p%SOLID%VELOCITY_ngrp_type(j) = 10 * dof_ids(i) + dof_ide(i)
3899  p%SOLID%VELOCITY_ngrp_amp(j) = amp_id
3900  p%SOLID%VELOCITY_ngrp_val(old_size+i) = val_ptr(i)
3901  j = j+1
3902  end do
3903 
3904  deallocate( grp_id_name )
3905  deallocate( dof_ids )
3906  deallocate( dof_ide )
3907  deallocate( val_ptr )
3908  nullify( grp_id_name )
3909  nullify( dof_ids )
3910  nullify( dof_ide )
3911  nullify( val_ptr )
3912 
3913  end subroutine fstr_setup_velocity
3914 
3915 
3916  !-----------------------------------------------------------------------------!
3918  !-----------------------------------------------------------------------------!
3919 
3920  subroutine fstr_setup_acceleration( ctrl, counter, P )
3921  implicit none
3922  integer(kind=kint) :: ctrl
3923  integer(kind=kint) :: counter
3924  type(fstr_param_pack) :: P
3925 
3926  integer(kind=kint) :: rcode
3927  integer(kind=kint) :: aType
3928  character(HECMW_NAME_LEN) :: amp
3929  integer(kind=kint) :: amp_id
3930  character(HECMW_NAME_LEN), pointer :: grp_id_name(:)
3931  integer(kind=kint),pointer :: dof_ids (:)
3932  integer(kind=kint),pointer :: dof_ide (:)
3933  real(kind=kreal),pointer :: val_ptr(:)
3934  integer(kind=kint) :: i, j, n, old_size, new_size
3935  integer(kind=kint) :: gid
3936 
3937  gid = 1
3938  rcode = fstr_ctrl_get_param_ex( ctrl, 'GRPID ', '# ', 0, 'I', gid )
3939 
3940  n = fstr_ctrl_get_data_line_n( ctrl )
3941  if( n == 0 ) return
3942  old_size = p%SOLID%ACCELERATION_ngrp_tot
3943  new_size = old_size + n
3944  p%SOLID%ACCELERATION_ngrp_tot = new_size
3945 
3946  call fstr_expand_integer_array (p%SOLID%ACCELERATION_ngrp_GRPID, old_size, new_size )
3947  call fstr_expand_integer_array (p%SOLID%ACCELERATION_ngrp_ID , old_size, new_size )
3948  call fstr_expand_integer_array (p%SOLID%ACCELERATION_ngrp_type, old_size, new_size )
3949  call fstr_expand_real_array (p%SOLID%ACCELERATION_ngrp_val , old_size, new_size )
3950  call fstr_expand_integer_array (p%SOLID%ACCELERATION_ngrp_amp , old_size, new_size )
3951 
3952  allocate( grp_id_name(n))
3953  allocate( dof_ids(n))
3954  allocate( dof_ide(n))
3955  allocate( val_ptr(n))
3956 
3957  amp = ' '
3958  val_ptr = 0.0d0
3959  rcode = fstr_ctrl_get_acceleration( ctrl, atype, amp, &
3960  grp_id_name, hecmw_name_len, &
3961  dof_ids, dof_ide, val_ptr)
3962  if( rcode /= 0 ) call fstr_ctrl_err_stop
3963  p%SOLID%ACCELERATION_type = atype
3964  if( atype == kbcinitial )p%DYN%VarInitialize = .true.
3965  call amp_name_to_id( p%MESH, '!ACCELERATION', amp, amp_id )
3966  call node_grp_name_to_id_ex( p%MESH, '!ACCELERATION', &
3967  n, grp_id_name, p%SOLID%ACCELERATION_ngrp_ID(old_size+1:))
3968  p%SOLID%ACCELERATION_ngrp_GRPID(old_size+1:new_size) = gid
3969 
3970  j = old_size+1
3971  do i = 1, n
3972  if( (dof_ids(i) < 1).or.(6 < dof_ids(i)).or.(dof_ide(i) < 1).or.(6 < dof_ide(i)) ) then
3973  write(ilog,*) 'fstr control file error : !ACCELERATION : range of dof_ids and dof_ide is from 1 to 6'
3974  stop
3975  end if
3976  p%SOLID%ACCELERATION_ngrp_type(j) = 10 * dof_ids(i) + dof_ide(i)
3977  p%SOLID%ACCELERATION_ngrp_amp(j) = amp_id
3978  p%SOLID%ACCELERATION_ngrp_val(old_size+i) = val_ptr(i)
3979  j = j+1
3980  end do
3981 
3982  deallocate( grp_id_name )
3983  deallocate( dof_ids )
3984  deallocate( dof_ide )
3985  deallocate( val_ptr )
3986  nullify( grp_id_name )
3987  nullify( dof_ids )
3988  nullify( dof_ide )
3989  nullify( val_ptr )
3990  end subroutine fstr_setup_acceleration
3991 
3992 
3993  !*****************************************************************************!
3994  !* MPC ***********************************************************************!
3995  !*****************************************************************************!
3996 
3997  !-----------------------------------------------------------------------------!
3999  !-----------------------------------------------------------------------------!
4000 
4001  subroutine fstr_setup_mpc( ctrl, counter, P )
4002  implicit none
4003  integer(kind=kint) :: ctrl
4004  integer(kind=kint) :: counter
4005  type(fstr_param_pack), target :: P
4006 
4007  integer(kind=kint) :: rcode
4008  ! integer(kind=kint) :: type
4009  ! integer(kind=kint),pointer :: node1_ptr(:)
4010  ! integer(kind=kint),pointer :: node2_ptr(:)
4011  ! integer(kind=kint),pointer :: dof_ptr(:)
4012  ! integer(kind=kint) :: n, old_size, new_size
4013  !
4014  ! rcode = fstr_ctrl_get_param_ex( ctrl, 'TYPE ', 'RIGID ', 1, 'P', type )
4015  ! if( rcode < 0 ) call fstr_ctrl_err_stop
4016  !
4017  ! n = fstr_ctrl_get_data_line_n( ctrl )
4018  ! if( n == 0 ) return
4019  ! old_size = P%MPC_RD%nmpc
4020  ! new_size = old_size + n
4021  ! P%MPC_RD%nmpc = new_size
4022  !
4023  ! call fstr_expand_integer_array ( P%MPC_RD%node1, old_size, new_size )
4024  ! call fstr_expand_integer_array ( P%MPC_RD%node2, old_size, new_size )
4025  ! call fstr_expand_integer_array ( P%MPC_RD%dof, old_size, new_size )
4026  !
4027  ! node1_ptr => P%MPC_RD%node1(old_size+1:)
4028  ! node2_ptr => P%MPC_RD%node2(old_size+1:)
4029  ! dof_ptr => P%MPC_RD%dof(old_size+1:)
4030  !
4031  ! rcode = fstr_ctrl_get_MPC( ctrl, type, node1_ptr, node2_ptr, dof_ptr )
4032  ! if( rcode /= 0 ) call fstr_ctrl_err_stop
4033  !
4034  ! if( node_global_to_local( P%MESH, node1_ptr, n ) /= n ) then
4035  ! call fstr_setup_util_err_stop( '### Error : not exist node (!MPC)' )
4036  ! endif
4037  ! if( node_global_to_local( P%MESH, node2_ptr, n ) /= n ) then
4038  ! call fstr_setup_util_err_stop( '### Error : not exist node (!MPC)' )
4039  ! endif
4040 
4041  ! penalty => svRarray(11)
4042  rcode = fstr_ctrl_get_mpc( ctrl, svrarray(11))
4043  if( rcode /= 0) call fstr_ctrl_err_stop
4044  end subroutine fstr_setup_mpc
4045 
4046 
4047  !*****************************************************************************!
4048  !* IMPORTING NASTRAN BOUNDARY CONDITIONS *************************************!
4049  !*****************************************************************************!
4050 
4051  subroutine fstr_setup_solid_nastran( ctrl, hecMESH, fstrSOLID )
4052  implicit none
4053  integer(kind=kint) :: ctrl
4054  type (hecmwST_local_mesh) :: hecMESH
4055  type (fstr_solid ) :: fstrSOLID
4056  write(ilog,*) '### Error : In !BOUNDARY, TYPE=NASTRAN is not supported.'
4057  call hecmw_abort( hecmw_comm_get_comm())
4058  end subroutine fstr_setup_solid_nastran
4059 
4060  !-----------------------------------------------------------------------------!
4062  !-----------------------------------------------------------------------------!
4063 
4064  subroutine fstr_setup_contactalgo( ctrl, P )
4065  implicit none
4066  integer(kind=kint) :: ctrl
4067  ! integer(kind=kint) :: counter
4068  type(fstr_param_pack) :: P
4069 
4070  integer(kind=kint) :: rcode
4071 
4072 
4073  rcode = fstr_ctrl_get_contactalgo( ctrl, p%PARAM%contact_algo, p%PARAM%augiter )
4074  if( rcode /= 0 ) call fstr_ctrl_err_stop
4075 
4076  end subroutine fstr_setup_contactalgo
4077 
4078  !-----------------------------------------------------------------------------!
4080  !-----------------------------------------------------------------------------!
4081 
4082  subroutine fstr_setup_output_sstype( ctrl, P )
4083  implicit none
4084  integer(kind=kint) :: ctrl
4085  type(fstr_param_pack) :: P
4086 
4087  integer(kind=kint) :: rcode, nid
4088  character(len=HECMW_NAME_LEN) :: data_fmt
4089 
4090  data_fmt = 'SOLUTION,MATERIAL '
4091  rcode = fstr_ctrl_get_param_ex( ctrl, 'TYPE ', data_fmt, 0, 'P', nid )
4092  opsstype = nid
4093  if( rcode /= 0 ) call fstr_ctrl_err_stop
4094 
4095  end subroutine fstr_setup_output_sstype
4096 
4097  !-----------------------------------------------------------------------------!
4099  !-----------------------------------------------------------------------------!
4100 
4101  subroutine fstr_convert_contact_type( hecMESH )
4102  implicit none
4103  type(hecmwst_local_mesh), pointer :: hecMESH
4104  integer(kind=kint) :: n, i, sgrp_id, ngrp_id, ngrp_id2
4105  ! convert SURF_SURF to NODE_SURF
4106  n = hecmesh%contact_pair%n_pair
4107  do i = 1,n
4108  if( hecmesh%contact_pair%type(i) /= hecmw_contact_type_surf_surf ) cycle
4109  sgrp_id = hecmesh%contact_pair%slave_grp_id(i)
4110  call append_node_grp_from_surf_grp( hecmesh, sgrp_id, ngrp_id )
4111  ! change type of contact and slave group ID
4112  hecmesh%contact_pair%type(i) = hecmw_contact_type_node_surf
4113  hecmesh%contact_pair%slave_grp_id(i) = ngrp_id
4114  ! ! for DEBUG
4115  ! sgrp_id = hecMESH%contact_pair%master_grp_id(i)
4116  ! call append_node_grp_from_surf_grp( hecMESH, sgrp_id, ngrp_id2 )
4117  ! ! intersection node group of slave and master
4118  ! call append_intersection_node_grp( hecMESH, ngrp_id, ngrp_id2 )
4119  ! ! intersection node_group of original slave and patch-slave
4120  ! ngrp_id=get_grp_id( hecMESH, 'node_grp', 'SLAVE' )
4121  ! ngrp_id2=get_grp_id( hecMESH, 'node_grp', '_PT_SLAVE_S' )
4122  ! call append_intersection_node_grp( hecMESH, ngrp_id, ngrp_id2 )
4123  enddo
4124  end subroutine fstr_convert_contact_type
4125 
4126 end module m_fstr_setup
int fstr_ctrl_get_param_ex(int *ctrl, const char *param_name, const char *value_list, int *necessity, char *type, void *val)
int fstr_ctrl_get_data_array_ex(int *ctrl, const char *format,...)
int fstr_ctrl_open(char *filename)
int fstr_ctrl_get_c_h_name(int *ctrl, char *header_name, int *buff_size)
int fstr_ctrl_get_data_ex(int *ctrl, int *line_no, const char *format,...)
integer(kind=kint) function fstr_ctrl_get_fload(ctrl, node_id, node_id_len, dof_id, value)
This module encapsulate the basic functions of all elements provide by this software.
Definition: element.f90:43
integer function numofquadpoints(fetype)
Obtains the number of quadrature points of the element.
Definition: element.f90:450
integer(kind=kind(2)) function getspacedimension(etype)
Obtain the space dimension of the element.
Definition: element.f90:117
This module contains fstr control file data obtaining functions.
integer(kind=kint) function fstr_ctrl_get_element_activation(ctrl, amp, eps, grp_id_name, mode, measure, state, thlow, thup)
Read in !ELEMENT_ACTIVATION.
integer(kind=kint) function fstr_ctrl_get_contactparam(ctrl, contactparam)
Read in !CONTACT_PARAM !
integer(kind=kint) function fstr_ctrl_get_solution(ctrl, type, nlgeom)
Read in !SOLUTION.
integer(kind=kint) function fstr_ctrl_get_contactalgo(ctrl, algo, augiter)
Read in !CONTACT.
integer(kind=kint) function fstr_ctrl_get_contact_if(ctrl, n, contact_if)
Read in contact interference.
integer(kind=kint) function fstr_ctrl_get_couple(ctrl, fg_type, fg_first, fg_window, surf_id, surf_id_len)
Read in !COUPLE.
integer(kind=kint) function fstr_get_autoinc(ctrl, aincparam)
Read in !AUTOINC_PARAM !
integer(kind=kint) function fstr_ctrl_get_amplitude(ctrl, nline, name, type_def, type_time, type_val, n, val, table)
Read in !AMPLITUDE.
logical function fstr_ctrl_get_outitem(ctrl, hecMESH, outinfo)
Read in !OUTPUT_RES & !OUTPUT_VIS.
integer(kind=kint) function fstr_ctrl_get_elemopt(ctrl, elemopt361)
Read in !ELEMOPT.
integer(kind=kint) function fstr_ctrl_get_timepoints(ctrl, tp)
Read in !TIME_POINTS.
integer(kind=kint) function fstr_ctrl_get_solver(ctrl, method, precond, nset, iterlog, timelog, steplog, nier, iterpremax, nrest, nBFGS, scaling, dumptype, dumpexit, usejad, ncolor_in, mpc_method, estcond, method2, recyclepre, solver_opt, contact_elim, resid, singma_diag, sigma, thresh, filter)
Read in !SOLVER.
integer(kind=kint) function fstr_ctrl_get_echo(ctrl, echo)
Read in !ECHO.
logical function fstr_ctrl_get_contact(ctrl, n, contact, np, tp, ntol, ttol, ctAlgo, cpname, smoothing)
Read in contact definition.
integer(kind=kint) function fstr_ctrl_get_nonlinear_solver(ctrl, method)
Read in !NONLINEAR_SOLVER.
integer(kind=kint) function fstr_ctrl_get_mpc(ctrl, penalty)
Read in !MPC.
integer function fstr_ctrl_get_section(ctrl, hecMESH, sections)
Read in !SECTION.
logical function fstr_ctrl_get_istep(ctrl, hecMESH, steps, tpname, apname)
Read in !STEP and !ISTEP.
integer(kind=kint) function fstr_ctrl_get_write(ctrl, res, visual, femap)
Read in !WRITE.
integer(kind=kint) function fstr_ctrl_get_step(ctrl, amp, iproc)
Read in !STEP.
logical function fstr_ctrl_get_embed(ctrl, n, embed, cpname, smoothing)
Read in contact definition.
This module contains control file data obtaining functions for dynamic analysis.
integer(kind=kint) function fstr_ctrl_get_dynamic(ctrl, nlgeom, idx_eqa, idx_resp, n_step, t_start, t_end, t_delta, gamma, beta, idx_mas, idx_dmp, ray_m, ray_k, nout, node_id, node_id_len, nout_monit, iout_list)
Read in !DYNAMIC.
integer(kind=kint) function fstr_ctrl_get_velocity(ctrl, vType, amp, node_id, node_id_len, dof_ids, dof_ide, value)
Read in !VELOCITY.
integer(kind=kint) function fstr_ctrl_get_acceleration(ctrl, aType, amp, node_id, node_id_len, dof_ids, dof_ide, value)
Read in !ACCELERATION.
This module contains control file data obtaining functions for dynamic analysis.
integer(kind=kint) function fstr_ctrl_get_eigen(ctrl, nget, tolerance, maxiter)
Read in !EIGEN (struct)
This module contains control file data obtaining functions for heat conductive analysis.
integer(kind=kint) function fstr_ctrl_get_dflux(ctrl, amp, elem_grp_name, elem_grp_name_len, load_type, value)
Read in !DFLUX (heat)
integer(kind=kint) function fstr_ctrl_get_sflux(ctrl, amp, surface_grp_name, surface_grp_name_len, value)
Read in !SFLUX (heat)
integer(kind=kint) function fstr_ctrl_get_weldline(ctrl, hecMESH, grp_name_len, weldline)
Read in !WELD_LINE (heat)
integer(kind=kint) function fstr_ctrl_get_heat(ctrl, dt, etime, dtmin, deltmx, itmax, eps, tpname, beta)
Read in !HEAT.
integer(kind=kint) function fstr_ctrl_get_film(ctrl, amp1, amp2, elem_grp_name, elem_grp_name_len, load_type, value, sink)
Read in !FILM (heat)
integer(kind=kint) function fstr_ctrl_get_radiate(ctrl, amp1, amp2, elem_grp_name, elem_grp_name_len, load_type, value, sink)
Read in !RADIATE (heat)
integer(kind=kint) function fstr_ctrl_get_cflux(ctrl, amp, node_grp_name, node_grp_name_len, value)
Read in !CFLUX (heat)
integer(kind=kint) function fstr_ctrl_get_fixtemp(ctrl, amp, node_grp_name, node_grp_name_len, value)
Read in !FIXTEMP.
integer(kind=kint) function fstr_ctrl_get_sfilm(ctrl, amp1, amp2, surface_grp_name, surface_grp_name_len, value, sink)
Read in !SFILM (heat)
integer(kind=kint) function fstr_ctrl_get_sradiate(ctrl, amp1, amp2, surface_grp_name, surface_grp_name_len, value, sink)
Read in !SRADIATE (heat)
This module manages read in of various material properties.
integer function fstr_ctrl_get_dashpot_d(ctrl, mattype, nlgeom, matval_i, dict)
Read in !DASHPOT_D.
integer function fstr_ctrl_get_hyperelastic(ctrl, mattype, nlgeom, matval)
Read in !HYPERELASTIC.
integer function fstr_ctrl_get_viscoelasticity(ctrl, mattype, nlgeom, dict)
Read in !VISCOELASTIC.
integer function fstr_ctrl_get_viscoplasticity(ctrl, mattype, nlgeom, dict)
Read in !CREEP.
integer function fstr_ctrl_get_usermaterial(ctrl, mattype, nlgeom, nstatus, matval)
Read in !USER_MATERIAL.
integer function fstr_ctrl_get_expansion_coeff(ctrl, matval, dict)
Read in !EXPANSION_COEFF.
integer function fstr_ctrl_get_trs(ctrl, mattype, matval)
Read in !TRS.
integer function fstr_ctrl_get_elasticity(ctrl, mattype, nlgeom, matval, dict)
Read in !ELASTIC.
integer function fstr_ctrl_get_plasticity(ctrl, mattype, nlgeom, matval, mattable, dict)
Read in !PLASTIC.
integer function fstr_ctrl_get_dashpot_a(ctrl, mattype, nlgeom, matval_i, dict)
Read in !DASHPOT_A.
integer function fstr_ctrl_get_material(ctrl, matname)
Read in !MATERIAL.
integer function fstr_ctrl_get_density(ctrl, matval)
Read in !DENSITY.
integer function fstr_ctrl_get_spring_a(ctrl, mattype, nlgeom, matval_i, dict)
Read in !SPRING_A.
integer function fstr_ctrl_get_rayleigh_damping(ctrl, matval, is_RD)
Read in !RAYLEIGH_DAMPING.
integer function fstr_ctrl_get_fluid(ctrl, mattype, nlgeom, matval, dict)
Read in !FLUID.
integer function fstr_ctrl_get_spring_d(ctrl, mattype, nlgeom, matval_i, dict)
Read in !SPRING_D.
This module contains control file data obtaining functions for static analysis.
integer(kind=kint) function fstr_ctrl_get_spring(ctrl, amp, node_id, node_id_len, dof_id, value)
Read in !SPRING.
integer(kind=kint) function fstr_ctrl_get_static(ctrl, dtime, etime, itime, eps, restart_nout, idx_elpl, iout_list, sig_y0, h_dash, nout, nout_monit, node_monit_1, elem_monit_1, intg_monit_1)
Read in !STATIC.
integer(kind=kint) function fstr_ctrl_get_boundary(ctrl, amp, node_id, node_id_len, dof_ids, dof_ide, value)
Read in !BOUNDARY.
integer(kind=kint) function fstr_ctrl_get_reftemp(ctrl, value)
Read in !REFTEMP.
integer(kind=kint) function fstr_ctrl_get_dload(ctrl, amp, follow, element_id, element_id_len, load_type, params)
Read in !DLOAD.
integer(kind=kint) function fstr_ctrl_get_temperature(ctrl, irres, tstep, tintl, rtype, node_id, node_id_len, value)
Read in !TEMPERATURE.
integer(kind=kint) function fstr_ctrl_get_cload(ctrl, amp, node_id, node_id_len, dof_id, value)
Read in !CLOAD.
integer function fstr_ctrl_get_userload(ctrl)
Read in !ULOAD.
This module contains auxiliary functions in calculation setup.
integer(kind=kint) function get_grp_member_n(hecMESH, grp_type_name, name)
subroutine fstr_ctrl_err_stop
subroutine node_grp_name_to_id_ex(hecMESH, header_name, n, grp_id_name, grp_ID)
subroutine surf_grp_name_to_id_ex(hecMESH, header_name, n, grp_id_name, grp_ID)
subroutine dload_grp_name_to_id_ex(hecMESH, n, grp_id_name, fg_surface, grp_ID)
subroutine fstr_setup_visualize(ctrl, hecMESH)
subroutine nodesurf_grp_name_to_id_ex(hecMESH, header_name, n, grp_id_name, grp_ID, grp_TYPE)
integer(kind=kint) function get_local_member_index(hecMESH, type_name, name, local_id)
subroutine fstr_expand_real_array2(array, column, old_size, new_size)
integer(kind=kint) function get_grp_member(hecMESH, grp_type_name, name, member1, member2)
subroutine fstr_expand_integer_array(array, old_size, new_size)
subroutine fstr_expand_real_array(array, old_size, new_size)
subroutine amp_name_to_id(hecMESH, header_name, aname, id)
subroutine append_new_amplitude(amp, name, type_def, type_time, type_val, np, val, table)
Append new amplitude table at the end of existing amplitude tables.
subroutine append_node_grp_from_surf_grp(hecMESH, sgrp_id, ngrp_id)
integer(kind=kint) function node_global_to_local(hecMESH, list, n)
subroutine elem_grp_name_to_id_ex(hecMESH, header_name, n, grp_id_name, grp_ID)
subroutine fstr_strupr(s)
subroutine reallocate_real(array, n)
subroutine reallocate_integer(array, n)
integer(kind=kint) function get_sorted_local_member_index(hecMESH, hecPARAM, type_name, name, local_id)
subroutine fstr_expand_integer_array2(array, column, old_size, new_size)
logical function fstr_streqr(s1, s2)
This module provides functions to read in data from control file and do necessary preparation for fol...
Definition: fstr_setup.f90:7
subroutine fstr_setup_boundary(ctrl, counter, P)
Read in !BOUNDARY !
subroutine fstr_setup_eigenread(ctrl, counter, P)
Read in !EIGENREAD !
subroutine fstr_setup_static(ctrl, counter, P)
Read in !STATIC(old) !
subroutine fstr_setup_mpc(ctrl, counter, P)
Read in !MPC !
integer(kind=kint) function fstr_setup_initial(ctrl, cond, hecMESH)
subroutine fstr_setup_sradiate(ctrl, counter, P)
Read in !SRADIATE !
subroutine fstr_setup_radiate(ctrl, counter, P)
Read in !RADIATE !
subroutine fstr_setup_element_activation(ctrl, counter, P)
Read in !ELEMENT_ACTIVATION.
subroutine fstr_setup_fload(ctrl, counter, P)
Read in !FLOAD !
subroutine fstr_setup_contactalgo(ctrl, P)
Read in !CONTACT !
subroutine fstr_setup_dload(ctrl, counter, P)
Read in !DLOAD.
subroutine fstr_eigen_init(fstrEIG)
Initial setting of eigen ca;culation.
subroutine fstr_setup_dflux(ctrl, counter, P)
Read in !DFLUX !
subroutine fstr_setup_post_phys_alloc(phys, NDOF, n_node, n_elem)
Initial setting of postprecessor.
subroutine fstr_solid_finalize(fstrSOLID)
Finalizer of fstr_solid.
subroutine fstr_setup_cflux(ctrl, counter, P)
Read in !CFLUX !
subroutine fstr_smoothed_element_calcmaxcon(hecMESH, fstrSOLID)
subroutine fstr_smoothed_element_init(hecMESH, fstrSOLID)
subroutine fstr_setup_amplitude(ctrl, P)
Read in !AMPLITUDE !
subroutine fstr_convert_contact_type(hecMESH)
Convert SURF-SURF contact to NODE-SURF contact !
subroutine fstr_setup_couple(ctrl, counter, P)
Read in !COUPLE !
subroutine fstr_solid_init(hecMESH, fstrSOLID)
Initializer of structure fstr_solid.
subroutine fstr_setup_step(ctrl, counter, P)
Read in !STEP !
subroutine fstr_dynamic_init(fstrDYNAMIC)
Initial setting of dynamic calculation.
subroutine fstr_setup_solid_nastran(ctrl, hecMESH, fstrSOLID)
subroutine fstr_setup_solver(ctrl, counter, P)
Read in !SOLVER !
subroutine fstr_setup_restart(ctrl, nout, version)
Read in !RESTART !
subroutine fstr_setup_cload(ctrl, counter, P)
Read in !CLOAD !
subroutine fstr_heat_init(fstrHEAT)
Initial setting of heat analysis.
subroutine fstr_setup_output_sstype(ctrl, P)
Read in !OUTPUT_SSTYPE !
subroutine fstr_setup_write(ctrl, counter, P)
Read in !WRITE !
subroutine fstr_setup_eigen(ctrl, counter, P)
Read in !EIGEN !
subroutine fstr_setup_film(ctrl, counter, P)
Read in !FILM !
subroutine fstr_setup_solution(ctrl, counter, P)
Read in !SOLUTION !
subroutine fstr_setup_acceleration(ctrl, counter, P)
Read in !ACCELERATION !
subroutine fstr_setup_velocity(ctrl, counter, P)
Read in !VELOCITY !
subroutine fstr_setup_heat(ctrl, counter, P)
Read in !HEAT !
subroutine fstr_setup_temperature(ctrl, counter, P)
Read in !TEMPERATURE !
subroutine fstr_setup_dynamic(ctrl, counter, P)
Read in !DYNAMIC !
subroutine fstr_setup_nonlinear_solver(ctrl, counter, P)
Read in !NONLINEAR_SOLVER !
subroutine fstr_setup(cntl_filename, hecMESH, fstrPARAM, fstrSOLID, fstrEIG, fstrHEAT, fstrDYNAMIC, fstrCPL, fstrFREQ)
Read in and initialize control data !
Definition: fstr_setup.f90:44
integer function fstr_setup_orientation(ctrl, hecMESH, cnt, coordsys)
Read in !ORIENTATION.
subroutine fstr_setup_fixtemp(ctrl, counter, P)
Read in !FIXTEMP !
subroutine fstr_element_init(hecMESH, fstrSOLID, solution_type)
Initialize elements info in static calculation.
subroutine fstr_setup_reftemp(ctrl, counter, P)
Read in !REFTEMP !
subroutine fstr_setup_echo(ctrl, counter, P)
Read in !ECHO !
subroutine fstr_setup_post(ctrl, P)
subroutine fstr_expand_dload_array(array, old_size, new_size)
Reset !DLOAD !
subroutine fstr_setup_sfilm(ctrl, counter, P)
Read in !SFILM !
subroutine fstr_dynamic_alloc(hecMESH, fstrDYNAMIC)
Initial setting of dynamic calculation.
subroutine fstr_setup_spring(ctrl, counter, P)
Read in !SPRING !
subroutine fstr_dynamic_finalize(fstrDYNAMIC)
Finalizer of fstr_solid.
subroutine fstr_setup_sflux(ctrl, counter, P)
Read in !SFLUX !
subroutine fstr_solid_alloc(hecMESH, fstrSOLID)
Initializer of structure fstr_solid.
This module defines common data and basic structures for analysis.
Definition: m_fstr.F90:15
integer(kind=kint), parameter iutb
Definition: m_fstr.F90:111
real(kind=kreal) eps
Definition: m_fstr.F90:144
integer(kind=kint) myrank
PARALLEL EXECUTION.
Definition: m_fstr.F90:98
integer(kind=kint), parameter kel341sesns
Definition: m_fstr.F90:77
integer(kind=kint), parameter kbcffstr
boundary condition file type (bcf)
Definition: m_fstr.F90:65
real(kind=kreal), dimension(100) svrarray
Definition: m_fstr.F90:120
integer(kind=kint), parameter kstdynamic
Definition: m_fstr.F90:42
real(kind=kreal) etime
Definition: m_fstr.F90:142
integer(kind=kint), parameter kel341fi
section control
Definition: m_fstr.F90:76
integer(kind=kint), parameter idbg
Definition: m_fstr.F90:113
integer(kind=kint), parameter kel361fi
Definition: m_fstr.F90:79
integer(kind=kint) opsstype
Definition: m_fstr.F90:134
integer(kind=kint), dimension(100) sviarray
SOLVER CONTROL.
Definition: m_fstr.F90:119
integer(kind=kint), parameter kon
Definition: m_fstr.F90:34
integer(kind=kint), parameter kfloadcase_im
Definition: m_fstr.F90:88
integer(kind=kint) itmax
Definition: m_fstr.F90:143
integer(kind=kint), parameter kel361ic
Definition: m_fstr.F90:81
integer(kind=kint), parameter ilog
FILE HANDLER.
Definition: m_fstr.F90:109
real(kind=kreal) dt
ANALYSIS CONTROL for NLGEOM and HEAT.
Definition: m_fstr.F90:141
integer(kind=kint), parameter kststatic
Definition: m_fstr.F90:39
integer(kind=kint), parameter kbcinitial
Definition: m_fstr.F90:68
integer(kind=kint), parameter kcaalagrange
Definition: m_fstr.F90:62
integer(kind=kint), parameter kststaticeigen
Definition: m_fstr.F90:44
integer(kind=kint), parameter kstheat
Definition: m_fstr.F90:41
real(kind=kreal), pointer ref_temp
REFTEMP.
Definition: m_fstr.F90:138
integer(kind=kint), parameter kel361fbar
Definition: m_fstr.F90:82
integer(kind=kint), parameter ksteigen
Definition: m_fstr.F90:40
type(tinitialcondition), dimension(:), pointer, save g_initialcnd
Definition: m_fstr.F90:153
logical paracontactflag
PARALLEL CONTACT FLAG.
Definition: m_fstr.F90:102
integer(kind=kint), parameter kfloadcase_re
Definition: m_fstr.F90:87
This module manages step information.
Definition: m_out.f90:6
subroutine fstr_init_outctrl(outctrl)
Definition: m_out.f90:228
subroutine fstr_copy_outctrl(outctrl1, outctrl2)
Definition: m_out.f90:236
subroutine fstr_ctrl_get_output(ctrl, outctrl, islog, res, visual, femap)
Definition: m_out.f90:259
This module provides a function to fetch material properties from hecmw.
subroutine fstr_get_prop(hecMESH, shell_var, isect, ee, pp, rho, alpha, thick, n_totlyr, alpha_over_mu, beam_radius, beam_angle1, beam_angle2, beam_angle3, beam_angle4, beam_angle5, beam_angle6)
This module contains several strategy to free locking problem in Eight-node hexagonal element.
integer(kind=kint) function, public return_nn_comp_c3d4_sesns(nn, nodlocal)
This module manages step information.
Definition: m_step.f90:6
subroutine free_stepinfo(step)
Finalizer.
Definition: m_step.f90:137
subroutine init_stepinfo(stepinfo)
Initializer.
Definition: m_step.f90:68
integer, parameter stepfixedinc
Definition: m_step.f90:14
subroutine init_aincparam(aincparam)
Initializer.
Definition: m_step.f90:182
subroutine setup_stepinfo_starttime(stepinfos)
Definition: m_step.f90:89
This module provides aux functions.
Definition: utilities.f90:6
subroutine cross_product(v1, v2, vn)
Definition: utilities.f90:406
Top-level contact analysis module (System level)
This module manage the parameters for contact calculation.
subroutine, public init_contactparam(cparam)
subroutine, public init_contact_if(contact_if)
This module summarizes all information of material properties.
Definition: material.f90:6
integer(kind=kint), parameter m_youngs
Definition: material.f90:92
integer(kind=kint), parameter m_beam_radius
Definition: material.f90:109
integer(kind=kint), parameter viscoelastic
Definition: material.f90:77
integer(kind=kint), parameter m_exapnsion
Definition: material.f90:105
integer(kind=kint), parameter m_beam_angle6
Definition: material.f90:115
integer(kind=kint), parameter elastic
Definition: material.f90:65
integer(kind=kint), parameter m_beam_angle3
Definition: material.f90:112
integer(kind=kint), parameter m_density
Definition: material.f90:94
integer(kind=kint), parameter m_beam_angle4
Definition: material.f90:113
integer(kind=kint), parameter m_poisson
Definition: material.f90:93
integer(kind=kint), parameter m_beam_angle1
Definition: material.f90:110
integer(kind=kint), parameter m_thick
Definition: material.f90:95
integer(kind=kint), parameter m_beam_angle5
Definition: material.f90:114
integer(kind=kint), parameter m_beam_angle2
Definition: material.f90:111
integer(kind=kint), parameter m_alpha_over_mu
Definition: material.f90:107
subroutine initmaterial(material)
Initializer.
Definition: material.f90:189
This modules defines a structure to record history dependent parameter in static analysis.
Definition: mechgauss.f90:6
subroutine fstr_init_gauss(gauss)
Initializer.
Definition: mechgauss.f90:46
Data for coupling analysis.
Definition: m_fstr.F90:623
Data for DYNAMIC ANSLYSIS (fstrDYNAMIC)
Definition: m_fstr.F90:517
Package of data used by Lanczos eigenvalue solver.
Definition: m_fstr.F90:605
Data for HEAT ANSLYSIS (fstrHEAT)
Definition: m_fstr.F90:435
FSTR INNER CONTROL PARAMETERS (fstrPARAM)
Definition: m_fstr.F90:156
Data for STATIC ANSLYSIS (fstrSOLID)
Definition: m_fstr.F90:215
Package of all data needs to initialize.
Definition: fstr_setup.f90:26
output control such as output filename, output frequency etc.
Definition: m_out.f90:29