FrontISTR  6.0.0
Large-scale structural analysis program with finit element method
fstr_setup_inp.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 !-------------------------------------------------------------------------------
12  use m_fstr
13  use fstr_setup_util
14  use m_fstr_solid_setup, only &
22  use m_fstr_param_setup, only &
27  use hecmw_setup_util, only : hecmw_streqr
28  implicit none
29  private
30  public :: fstr_setup_inp
31 
32 contains
33 
34  !=============================================================================!
36  !=============================================================================!
37  subroutine fstr_setup_inp( inp_filename, hecMESH, hecMAT, fstrPARAM, &
38  fstrSOLID, fstrEIG, fstrHEAT, fstrDYNAMIC, fstrCPL, fstrFREQ )
39  character(len=HECMW_FILENAME_LEN) :: inp_filename
40  type(hecmwst_local_mesh),target :: hecmesh
41  type(hecmwst_matrix),target :: hecmat
42  type(fstr_param),target :: fstrparam
43  type(fstr_solid),target :: fstrsolid
44  type(fstr_eigen),target :: fstreig
45  type(fstr_heat),target :: fstrheat
46  type(fstr_dynamic),target :: fstrdynamic
47  type(fstr_couple),target :: fstrcpl
48  type(fstr_freqanalysis), target :: fstrfreq
49 
50  integer(kind=kint) :: ctrl, rcode
51  type(fstr_param_pack) :: p
52  type(fstr_card_table) :: t
53  integer(kind=kint) :: total(fstr_card_max)
54  type(fstr_setup_counts) :: counts
55 
56  ! packaging
57  p%MESH => hecmesh
58  p%MAT => hecmat
59  p%PARAM => fstrparam
60  p%SOLID => fstrsolid
61  p%EIGEN => fstreig
62  p%HEAT => fstrheat
63  p%DYN => fstrdynamic
64  p%CPL => fstrcpl
65  p%FREQ => fstrfreq
66 
67  fstrparam%contact_algo = kcaalagrange
68 
69  ! Defaults of an inp file: the linear solver is DIRECTmf unless *SOLVER is given,
70  ! with the solver type of a direct method as fstr_setup_SOLVER sets it, and the result file is written.
71  hecmat%Iarray(2) = 106
72  hecmat%Iarray(99) = hecmat%Iarray(2) - 99
73  fstrparam%fg_result = kon
74 
75  call fstr_setup_inp_cards( t )
76 
77  ctrl = fstr_ctrl_open_inp( inp_filename )
78  if( ctrl < 0 ) then
79  write(*,*) '### Error: Cannot read the inp file : ', trim(inp_filename)
80  write(ilog,*) '### Error: Cannot read the inp file : ', trim(inp_filename)
82  end if
83 
84  call fstr_setup_inp_read_cards( ctrl, t, 1, total, p )
85 
86  ! ----- counts stay 0: the materials are those of the mesh,
87  ! and no other card of the table is stored in the arrays that fstr_setup_prepare allocates
88  call fstr_setup_prepare( p, counts )
89  call fstr_setup_inp_formulation( p )
90 
91  ! -----
92  rcode = fstr_ctrl_rewind( ctrl )
93  call fstr_setup_inp_read_cards( ctrl, t, 2, total, p )
94 
95  call fstr_setup_finish( p, counts )
96  rcode = fstr_ctrl_close( ctrl )
97 
98  end subroutine fstr_setup_inp
99 
104  subroutine fstr_setup_inp_cards( T )
105  implicit none
106  type(fstr_card_table) :: t
107 
108  ! The cards of the inp format. The conditions go into the default step, as in a cnt file without !STEP.
109  ! The analysis cards share a sequence, so that the second one in the step is found.
110  call fstr_card_add( t, 'STEP', first=fstr_setup_inp_step )
111  call fstr_card_add( t, 'END STEP' )
112  call fstr_card_add( t, 'STATIC', first=fstr_setup_inp_static, seq='analysis' )
113  call fstr_card_add( t, 'FREQUENCY', first=fstr_setup_inp_frequency, seq='analysis' )
114  call fstr_card_add( t, 'BOUNDARY', first=fstr_setup_inp_boundary )
115  call fstr_card_add( t, 'CLOAD', first=fstr_setup_inp_cload )
116  call fstr_card_add( t, 'TEMPERATURE', first=fstr_setup_inp_temperature )
117  call fstr_card_add( t, 'INITIAL CONDITIONS', first=fstr_setup_inp_initial_conditions )
118 
119  ! The material constants that hecmw1 does not read, stored in the material of the last *MATERIAL
120  call fstr_card_add( t, 'MATERIAL', second=fstr_setup_inp_material )
121  call fstr_card_add( t, 'EXPANSION', second=fstr_setup_inp_expansion )
122 
123  ! FrontISTR's own cards, read as the cnt cards
124  call fstr_card_add( t, 'SOLVER', first=fstr_setup_solver )
125  call fstr_card_add( t, 'SECTION', second=fstr_setup_section )
126  call fstr_card_add( t, 'WRITE', first=fstr_setup_inp_write, second=fstr_setup_write_store )
127 
128  ! Read by hecmw1
129  call fstr_card_add( t, 'HEADING' )
130  call fstr_card_add( t, 'NODE' )
131  call fstr_card_add( t, 'ELEMENT' )
132  call fstr_card_add( t, 'NSET' )
133  call fstr_card_add( t, 'ELSET' )
134  call fstr_card_add( t, 'ELASTIC' )
135  call fstr_card_add( t, 'DENSITY' )
136  call fstr_card_add( t, 'CONDUCTIVITY' )
137  call fstr_card_add( t, 'SPECIFIC HEAT' )
138  call fstr_card_add( t, 'SOLID SECTION' )
139  call fstr_card_add( t, 'SHELL SECTION' )
140  call fstr_card_add( t, 'EQUATION' )
141  call fstr_card_add( t, 'AMPLITUDE' )
142 
143  ! Output requests, skipped with a warning. FrontISTR writes its own result file.
144  call fstr_card_add( t, 'NODE PRINT', first=fstr_setup_inp_output_request )
145  call fstr_card_add( t, 'EL PRINT', first=fstr_setup_inp_output_request )
146  call fstr_card_add( t, 'NODE FILE', first=fstr_setup_inp_output_request )
147  call fstr_card_add( t, 'EL FILE', first=fstr_setup_inp_output_request )
148  call fstr_card_add( t, 'CONTACT PRINT', first=fstr_setup_inp_output_request )
149  call fstr_card_add( t, 'CONTACT FILE', first=fstr_setup_inp_output_request )
150  call fstr_card_add( t, 'SECTION PRINT', first=fstr_setup_inp_output_request )
151  call fstr_card_add( t, 'OUTPUT', first=fstr_setup_inp_output_request )
152  call fstr_card_add( t, 'NODE OUTPUT', first=fstr_setup_inp_output_request )
153  call fstr_card_add( t, 'ELEMENT OUTPUT', first=fstr_setup_inp_output_request )
154  call fstr_card_add( t, 'CONTACT OUTPUT', first=fstr_setup_inp_output_request )
155  end subroutine fstr_setup_inp_cards
156 
161  subroutine fstr_setup_inp_read_cards( ctrl, T, ipass, total, P )
162  implicit none
163  integer(kind=kint) :: ctrl
164  type(fstr_card_table), intent(in) :: t
165  integer(kind=kint), intent(in) :: ipass
166  integer(kind=kint), intent(inout) :: total(:)
167  type(fstr_param_pack) :: p
168 
169  integer(kind=kint) :: rcode, k, comma, next_comma, i, c
170  integer(kind=kint) :: pos(size(total))
171  character(len=HECMW_NAME_LEN) :: header_name
172  character(len=256) :: header, param
173  logical :: supported
174 
175  pos(:) = 0
176  do
177  rcode = fstr_ctrl_get_c_h_name_inp( ctrl, header_name, hecmw_name_len )
178  if( ipass == 1 ) then
179  select case( trim(header_name) )
180  case( '*STEP', '*END STEP', '*STATIC', '*FREQUENCY', '*BOUNDARY', '*CLOAD', &
181  '*TEMPERATURE', '*INITIAL CONDITIONS', '*EXPANSION' )
182  rcode = fstr_ctrl_get_line( ctrl, fstr_ctrl_get_c_h_pos(ctrl), header, len(header) )
183  if( rcode /= 0 ) call fstr_ctrl_err_stop
184  comma = index( header, ',' )
185  do while( comma > 0 )
186  header = adjustl( header(comma+1:) )
187  next_comma = index( header, ',' )
188  param = header
189  if( next_comma > 0 ) param = header(:next_comma-1)
190  if( len_trim(param) > 0 ) then
191  i = scan( param, '= ' )
192  if( i > 0 ) param = param(:i-1)
193  do i = 1, len_trim(param)
194  c = iachar( param(i:i) )
195  if( c >= iachar('a') .and. c <= iachar('z') ) param(i:i) = achar( c - iachar('a') + iachar('A') )
196  enddo
197  supported = .false.
198  select case( trim(header_name) )
199  case( '*STEP' )
200  supported = param == 'NLGEOM'
201  case( '*FREQUENCY' )
202  supported = param == 'SOLVER' .or. param == 'STORAGE'
203  case( '*BOUNDARY', '*CLOAD' )
204  supported = param == 'AMPLITUDE'
205  case( '*TEMPERATURE' )
206  supported = param == 'AMPLITUDE' .or. param == 'USER' .or. param == 'SUBMODEL' .or. param == 'FILE' &
207  .or. param == 'INPUT'
208  case( '*INITIAL CONDITIONS' )
209  supported = param == 'TYPE' .or. param == 'INPUT'
210  case( '*EXPANSION' )
211  supported = param == 'TYPE' .or. param == 'ZERO'
212  end select
213  if( .not. supported ) call fstr_setup_inp_warn( ctrl, p, &
214  'unsupported parameter '//trim(param)//' is skipped' )
215  endif
216  comma = next_comma
217  enddo
218  end select
219  endif
220  k = fstr_card_find( t, header_name(2:), p%STATE%version )
221  if( k > 0 ) then
222  call fstr_card_read( ctrl, t, k, ipass, header_name, pos, total, p )
223  else if( ipass == 1 ) then
224  call fstr_setup_inp_err_stop( ctrl, 'not supported in an inp file yet' )
225  endif
226  if( fstr_ctrl_seek_next_header( ctrl ) == 0 ) exit
227  end do
228  if( ipass == 1 ) total(:) = pos(:)
229  end subroutine fstr_setup_inp_read_cards
230 
232  subroutine fstr_setup_inp_err_stop( ctrl, msg )
233  implicit none
234  integer(kind=kint) :: ctrl
235  character(len=*), intent(in) :: msg
236 
237  integer(kind=kint) :: rcode
238  character(len=HECMW_NAME_LEN) :: header_name
239  character(len=HECMW_MSG_LEN) :: s
240 
241  rcode = fstr_ctrl_get_c_h_name_inp( ctrl, header_name, hecmw_name_len )
242  write( s, '(a,a,a,i0,a,a)' ) '### Error: ', trim(header_name), ' (line:', fstr_ctrl_get_c_h_line_no( ctrl ), &
243  ') : ', msg
244  call fstr_setup_util_err_stop( trim(s) )
245  end subroutine fstr_setup_inp_err_stop
246 
248  subroutine fstr_setup_inp_warn( ctrl, P, msg )
249  implicit none
250  integer(kind=kint) :: ctrl
251  type(fstr_param_pack) :: p
252  character(len=*), intent(in) :: msg
253 
254  integer(kind=kint) :: rcode
255  character(len=HECMW_NAME_LEN) :: header_name
256 
257  if( p%MESH%my_rank /= 0 ) return
258  rcode = fstr_ctrl_get_c_h_name_inp( ctrl, header_name, hecmw_name_len )
259  write(*,'(a,a,a,i0,a,a)') ' Warning: ', trim(header_name), ' (line:', fstr_ctrl_get_c_h_line_no( ctrl ), &
260  ') : ', msg
261  end subroutine fstr_setup_inp_warn
262 
263  !-----------------------------------------------------------------------------!
265  !-----------------------------------------------------------------------------!
266  subroutine fstr_setup_inp_step( ctrl, P )
267  implicit none
268  integer(kind=kint) :: ctrl
269  type(fstr_param_pack) :: p
270 
271  integer(kind=kint) :: rcode, is_nlgeom, nlgeom
272 
273  if( p%STATE%slot%first > 1 ) call fstr_setup_inp_err_stop( ctrl, 'more than one step is not supported yet' )
274 
275  is_nlgeom = 0
276  rcode = fstr_ctrl_get_param_ex( ctrl, 'NLGEOM ', '# ', 0, 'E', is_nlgeom )
277  if( is_nlgeom == 0 ) return
278  nlgeom = 1
279  rcode = fstr_ctrl_get_param_ex( ctrl, 'NLGEOM ', 'YES,NO ', 0, 'P', nlgeom )
280  if( rcode /= 0 ) call fstr_ctrl_err_stop
281  if( nlgeom == 1 ) call fstr_setup_inp_err_stop( ctrl, 'NLGEOM is not supported yet' )
282  end subroutine fstr_setup_inp_step
283 
284  !-----------------------------------------------------------------------------!
286  !-----------------------------------------------------------------------------!
288  subroutine fstr_setup_inp_static( ctrl, P )
289  implicit none
290  integer(kind=kint) :: ctrl
291  type(fstr_param_pack) :: p
292 
293  if( p%STATE%slot%first > 1 ) call fstr_setup_inp_err_stop( ctrl, 'only one analysis card is allowed in a step' )
294 
295  p%PARAM%solution_type = kststatic
296  end subroutine fstr_setup_inp_static
297 
298  !-----------------------------------------------------------------------------!
300  !-----------------------------------------------------------------------------!
304  subroutine fstr_setup_inp_frequency( ctrl, P )
305  implicit none
306  integer(kind=kint) :: ctrl
307  type(fstr_param_pack) :: p
308 
309  integer(kind=kint) :: rcode, storage
310  real(kind=kreal) :: fmin, fmax
311  character(len=HECMW_NAME_LEN) :: solver
312 
313  if( p%STATE%slot%first > 1 ) call fstr_setup_inp_err_stop( ctrl, 'only one analysis card is allowed in a step' )
314 
315  solver = ' '
316  rcode = fstr_ctrl_get_param_ex( ctrl, 'SOLVER ', '# ', 0, 'S', solver )
317  if( rcode /= 0 ) call fstr_ctrl_err_stop
318  if( solver == 'MATRIXSTORAGE' ) then
319  call fstr_setup_inp_err_stop( ctrl, 'SOLVER=MATRIXSTORAGE is not supported' )
320  else if( solver /= ' ' ) then
321  call fstr_setup_inp_warn( ctrl, p, 'SOLVER='//trim(solver)// &
322  ' is skipped. The linear solver is given by *SOLVER, DIRECTmf by default' )
323  endif
324 
325  storage = 2
326  rcode = fstr_ctrl_get_param_ex( ctrl, 'STORAGE ', 'YES,NO ', 0, 'P', storage )
327  if( rcode /= 0 ) call fstr_ctrl_err_stop
328  if( storage == 1 ) call fstr_setup_inp_warn( ctrl, p, &
329  'STORAGE=YES is skipped. The eigenmodes are written to the result file of FrontISTR' )
330 
331  fmin = 0.0d0
332  fmax = -1.0d0
333  rcode = fstr_ctrl_get_data_ex( ctrl, 1, 'Irr ', p%EIGEN%nget, fmin, fmax )
334  if( rcode /= 0 ) call fstr_ctrl_err_stop
335  if( p%EIGEN%nget < 1 ) call fstr_setup_inp_err_stop( ctrl, 'the number of eigenfrequencies must be positive' )
336  if( fmin > 0.0d0 .or. fmax >= 0.0d0 ) call fstr_setup_inp_warn( ctrl, p, &
337  'the frequency range is skipped. All the eigenmodes computed are written to the result file' )
338 
339  p%PARAM%solution_type = ksteigen
340  end subroutine fstr_setup_inp_frequency
341 
342  !-----------------------------------------------------------------------------!
344  !-----------------------------------------------------------------------------!
347  subroutine fstr_setup_inp_boundary( ctrl, P )
348  implicit none
349  integer(kind=kint) :: ctrl
350  type(fstr_param_pack) :: p
351 
352  integer(kind=kint) :: rcode, n
353  character(len=HECMW_NAME_LEN) :: amp, rotc_name, data_fmt
354  character(len=HECMW_NAME_LEN), allocatable :: grp_names(:)
355  integer(kind=kint), allocatable :: dof_ids(:), dof_ide(:)
356  real(kind=kreal), allocatable :: vals(:)
357 
358  amp = ' '
359  rcode = fstr_ctrl_get_param_ex( ctrl, 'AMPLITUDE ', '# ', 0, 'S', amp )
360  if( rcode /= 0 ) call fstr_ctrl_err_stop
361  rotc_name = ' '
362 
363  n = fstr_ctrl_get_data_line_n( ctrl )
364  allocate( grp_names(n), dof_ids(n), dof_ide(n), vals(n) )
365  dof_ide = 0
366  vals = 0.0d0
367  if( n > 0 ) then
368  write( data_fmt, '(a,i0,a)' ) 'S', hecmw_name_len, 'Iir '
369  rcode = fstr_ctrl_get_data_array_ex( ctrl, data_fmt, grp_names, dof_ids, dof_ide, vals )
370  if( rcode /= 0 ) call fstr_ctrl_err_stop
371  endif
372  where( dof_ide == 0 ) dof_ide = dof_ids
373 
374  call fstr_solid_append_boundary( p%MESH, p%SOLID, '*BOUNDARY', 1, 0, rotc_name, &
375  amp, n, grp_names, dof_ids, dof_ide, vals )
376  end subroutine fstr_setup_inp_boundary
377 
378  !-----------------------------------------------------------------------------!
380  !-----------------------------------------------------------------------------!
382  subroutine fstr_setup_inp_cload( ctrl, P )
383  implicit none
384  integer(kind=kint) :: ctrl
385  type(fstr_param_pack) :: p
386 
387  integer(kind=kint) :: rcode, n
388  character(len=HECMW_NAME_LEN) :: amp, rotc_name, data_fmt
389  character(len=HECMW_NAME_LEN), allocatable :: grp_names(:)
390  integer(kind=kint), allocatable :: dofs(:)
391  real(kind=kreal), allocatable :: vals(:)
392 
393  amp = ' '
394  rcode = fstr_ctrl_get_param_ex( ctrl, 'AMPLITUDE ', '# ', 0, 'S', amp )
395  if( rcode /= 0 ) call fstr_ctrl_err_stop
396  rotc_name = ' '
397 
398  n = fstr_ctrl_get_data_line_n( ctrl )
399  allocate( grp_names(n), dofs(n), vals(n) )
400  if( n > 0 ) then
401  write( data_fmt, '(a,i0,a)' ) 'S', hecmw_name_len, 'IR '
402  rcode = fstr_ctrl_get_data_array_ex( ctrl, data_fmt, grp_names, dofs, vals )
403  if( rcode /= 0 ) call fstr_ctrl_err_stop
404  endif
405 
406  call fstr_solid_append_cload( p%MESH, p%SOLID, '*CLOAD', 1, rotc_name, &
407  amp, n, grp_names, dofs, vals )
408  end subroutine fstr_setup_inp_cload
409 
410  !-----------------------------------------------------------------------------!
412  !-----------------------------------------------------------------------------!
415  subroutine fstr_setup_inp_temperature( ctrl, P )
416  implicit none
417  integer(kind=kint) :: ctrl
418  type(fstr_param_pack) :: p
419 
420  integer(kind=kint) :: rcode, n, i, is_given
421  character(len=HECMW_NAME_LEN) :: data_fmt
422  character(len=HECMW_NAME_LEN), allocatable :: grp_names(:)
423  real(kind=kreal), allocatable :: vals(:)
424  character(len=9), parameter :: params(5) = [ 'AMPLITUDE', 'USER ', 'SUBMODEL ', 'FILE ', 'INPUT ' ]
425 
426  do i = 1, size(params)
427  is_given = 0
428  rcode = fstr_ctrl_get_param_ex( ctrl, params(i)//' ', '# ', 0, 'E', is_given )
429  if( is_given /= 0 ) call fstr_setup_inp_err_stop( ctrl, trim(params(i))//' is not supported yet' )
430  end do
431  call fstr_setup_inp_check_constant_materials( ctrl, p )
432 
433  n = fstr_ctrl_get_data_line_n( ctrl )
434  allocate( grp_names(n), vals(n) )
435  if( n > 0 ) then
436  write( data_fmt, '(a,i0,a)' ) 'S', hecmw_name_len, 'R '
437  rcode = fstr_ctrl_get_data_array_ex( ctrl, data_fmt, grp_names, vals )
438  if( rcode /= 0 ) call fstr_ctrl_err_stop
439  endif
440 
441  call fstr_solid_append_temperature( p%MESH, p%SOLID, '*TEMPERATURE', 1, n, grp_names, vals )
442  end subroutine fstr_setup_inp_temperature
443 
444  !-----------------------------------------------------------------------------!
446  !-----------------------------------------------------------------------------!
448  subroutine fstr_setup_inp_initial_conditions( ctrl, P )
449  implicit none
450  integer(kind=kint) :: ctrl
451  type(fstr_param_pack) :: p
452 
453  integer(kind=kint) :: rcode, n
454  character(len=HECMW_NAME_LEN) :: type_name
455 
456  type_name = ' '
457  rcode = fstr_ctrl_get_param_ex( ctrl, 'TYPE ', '# ', 0, 'S', type_name )
458  if( rcode /= 0 ) call fstr_ctrl_err_stop
459  if( type_name /= 'TEMPERATURE' ) &
460  call fstr_setup_inp_err_stop( ctrl, 'TYPE='//trim(type_name)//' is not supported yet' )
461 
462  n = 0
463  if( p%MESH%hecmw_flag_initcon == 1 ) n = p%MESH%node_init_val_index(p%MESH%n_node)
464  if( n /= p%MESH%n_node ) call fstr_setup_inp_err_stop( ctrl, 'the initial temperature must be given to all the nodes' )
465  call fstr_setup_inp_check_constant_materials( ctrl, p )
466  end subroutine fstr_setup_inp_initial_conditions
467 
471  subroutine fstr_setup_inp_check_constant_materials( ctrl, P )
472  implicit none
473  integer(kind=kint) :: ctrl
474  type(fstr_param_pack) :: p
475 
476  integer(kind=kint) :: i
477 
478  do i = 1, p%MESH%material%n_mat_subitem
479  if( p%MESH%material%mat_table_index(i) - p%MESH%material%mat_table_index(i-1) > 1 ) then
480  call fstr_setup_inp_err_stop( ctrl, &
481  'not supported yet with a material constant depending on the temperature (*ELASTIC, *DENSITY)' )
482  endif
483  end do
484  end subroutine fstr_setup_inp_check_constant_materials
485 
488  subroutine fstr_setup_inp_material( ctrl, P )
489  implicit none
490  integer(kind=kint) :: ctrl
491  type(fstr_param_pack) :: p
492 
493  integer(kind=kint) :: i
494  character(len=HECMW_FILENAME_LEN) :: mname
495 
496  if( fstr_ctrl_get_material( ctrl, mname ) /= 0 ) call fstr_ctrl_err_stop
497  p%STATE%cid = -1
498  do i = 1, p%MESH%material%n_mat
499  if( hecmw_streqr( p%MESH%material%mat_name(i), mname ) ) then
500  p%STATE%cid = i
501  exit
502  endif
503  end do
504  end subroutine fstr_setup_inp_material
505 
506  !-----------------------------------------------------------------------------!
508  !-----------------------------------------------------------------------------!
512  subroutine fstr_setup_inp_expansion( ctrl, P )
513  implicit none
514  integer(kind=kint) :: ctrl
515  type(fstr_param_pack) :: p
516 
517  integer(kind=kint) :: rcode, is_type
518 
519  if( p%STATE%cid == 0 ) call fstr_setup_inp_err_stop( ctrl, 'given before *MATERIAL' )
520  if( p%STATE%cid < 0 ) return
521  is_type = 0
522  rcode = fstr_ctrl_get_param_ex( ctrl, 'TYPE ', '# ', 0, 'E', is_type )
523  if( is_type /= 0 ) call fstr_setup_inp_err_stop( ctrl, &
524  'TYPE is not supported yet; omit it for an isotropic coefficient' )
525  if( fstr_ctrl_get_data_line_n( ctrl ) /= 1 ) call fstr_setup_inp_err_stop( ctrl, &
526  'only a coefficient independent of the temperature, in one data line, is supported yet' )
527 
528  call fstr_setup_expansion_coeff( ctrl, p )
529  end subroutine fstr_setup_inp_expansion
530 
531  !-----------------------------------------------------------------------------!
533  !-----------------------------------------------------------------------------!
535  subroutine fstr_setup_inp_write( ctrl, P )
536  implicit none
537  integer(kind=kint) :: ctrl
538  type(fstr_param_pack) :: p
539 
540  call fstr_setup_write_flags( ctrl, p )
541  if( p%PARAM%fg_visual == kon ) call fstr_setup_inp_err_stop( ctrl, 'VISUAL is not supported in an inp file yet' )
542  end subroutine fstr_setup_inp_write
543 
545  subroutine fstr_setup_inp_output_request( ctrl, P )
546  implicit none
547  integer(kind=kint) :: ctrl
548  type(fstr_param_pack) :: p
549 
550  integer(kind=kint) :: rcode
551  character(len=HECMW_NAME_LEN) :: header_name
552 
553  if( p%MESH%my_rank /= 0 ) return
554  rcode = fstr_ctrl_get_c_h_name_inp( ctrl, header_name, hecmw_name_len )
555  write(*,'(a,a,a,i0,a)') ' Warning: ', trim(header_name), ' (line:', fstr_ctrl_get_c_h_line_no( ctrl ), &
556  ') is skipped. The results are written to the result file of FrontISTR'
557  end subroutine fstr_setup_inp_output_request
558 
562  subroutine fstr_setup_inp_formulation( P )
563  implicit none
564  type(fstr_param_pack) :: p
565 
566  integer(kind=kint) :: i
567 
568  do i = 1, p%MESH%section%n_sect
569  select case( p%MESH%section%sect_opt(i) )
570  case( hecmw_sect_opt_solid_fi )
571  p%SOLID%sections(i)%elemopt361 = kel361fi
572  p%SOLID%sections(i)%elemopt362 = kel362fi
573  case( hecmw_sect_opt_solid_ic )
574  p%SOLID%sections(i)%elemopt361 = kel361ic
575  case( hecmw_sect_opt_solid_ri )
576  p%SOLID%sections(i)%elemopt361 = kel361ri
577  p%SOLID%sections(i)%elemopt362 = kel362ri
578  case( hecmw_sect_opt_solid_fbar )
579  p%SOLID%sections(i)%elemopt361 = kel361fbar
580  end select
581  enddo
582  end subroutine fstr_setup_inp_formulation
583 
584 end module m_fstr_setup_inp
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_c_h_name_inp(int *ctrl, char *header_name, int *buff_size)
int fstr_ctrl_open_inp(char *filename)
int fstr_ctrl_get_line(int *ctrl, int *rec_no, char *buff, int *buff_size)
int fstr_ctrl_get_data_array_ex(int *ctrl, const char *format,...)
int fstr_ctrl_get_data_ex(int *ctrl, int *line_no, const char *format,...)
This module manages read in of various material properties.
integer function fstr_ctrl_get_material(ctrl, matname)
Read in !MATERIAL.
This module contains auxiliary functions in calculation setup.
subroutine fstr_ctrl_err_stop
integer(kind=kint), parameter fstr_card_max
rows and sequences of a card table
subroutine fstr_card_read(ctrl, T, k, ipass, header_name, pos, total, P)
Reads the card at the current header of ctrl by the row k of the table T in the reading ipass (1 or 2...
subroutine fstr_card_add(T, name, first, second, by_line, seq, version_min, version_max)
Adds a card to the table T, read by first in the first reading and by second in the second reading....
subroutine fstr_setup_util_err_stop(msg)
integer(kind=kint) function fstr_card_find(T, name, version)
Index of the row of the card name for !VERSION version in the table T, or 0 if there is none.
This module contains auxiliary functions in calculation setup.
logical function hecmw_streqr(s1, s2)
This module provides subroutines to read the cards that go into fstr_param, and the cards that go int...
subroutine fstr_setup_solver(ctrl, P)
Read in !SOLVER !
This module provides subroutines to process the data read from the cards, independently of the input ...
subroutine fstr_setup_prepare(P, counts)
Allocation and preparation after the cards are counted: the arrays sized by counts,...
subroutine fstr_setup_finish(P, counts)
Processing after all the cards are read: the temperature arrays, the default step,...
This module provides functions to read in the analysis data of an inp file and do necessary preparati...
subroutine, public fstr_setup_inp(inp_filename, hecMESH, hecMAT, fstrPARAM, fstrSOLID, fstrEIG, fstrHEAT, fstrDYNAMIC, fstrCPL, fstrFREQ)
Read in and initialize the analysis data of an inp file !
This module provides subroutines to initialize, allocate and finalize fstr_solid, and to read the car...
subroutine fstr_setup_expansion_coeff(ctrl, P)
Read in !EXPANSION_COEF !
subroutine fstr_setup_section(ctrl, P)
Read in !SECTION !
subroutine fstr_setup_write_store(ctrl, P)
Read in !WRITE after fstr_setup_prepare and store the output controls. fg_result and fg_visual are se...
subroutine fstr_solid_append_temperature(hecMESH, fstrSOLID, header_name, gid, n, grp_names, vals)
Append !TEMPERATURE !
subroutine fstr_solid_append_boundary(hecMESH, fstrSOLID, header_name, gid, istot, rotc_name, amp_name, n, grp_names, dof_ids, dof_ide, vals)
Append !BOUNDARY !
subroutine fstr_setup_write_flags(ctrl, P)
Read in !WRITE before fstr_setup_prepare and set fg_result and fg_visual.
subroutine fstr_solid_append_cload(hecMESH, fstrSOLID, header_name, gid, rotc_name, amp_name, n, grp_names, dofs, vals)
Append !CLOAD !
This module defines common data and basic structures for analysis.
Definition: m_fstr.F90:15
integer(kind=kint), parameter kel361ri
Definition: m_fstr.F90:95
integer(kind=kint), parameter kel361fi
Definition: m_fstr.F90:90
integer(kind=kint), parameter kel362fi
Definition: m_fstr.F90:97
integer(kind=kint), parameter kon
Definition: m_fstr.F90:33
integer(kind=kint), parameter kel361ic
Definition: m_fstr.F90:92
integer(kind=kint), parameter ilog
FILE HANDLER.
Definition: m_fstr.F90:128
integer(kind=kint), parameter kststatic
Definition: m_fstr.F90:38
integer(kind=kint), parameter kel362ri
Definition: m_fstr.F90:98
integer(kind=kint), parameter kcaalagrange
Definition: m_fstr.F90:63
integer(kind=kint), parameter kel361fbar
Definition: m_fstr.F90:93
integer(kind=kint), parameter ksteigen
Definition: m_fstr.F90:39
Table of the cards of the control file, not changed after the cards are added. Each card is counted i...
Package of all data needs to initialize.
Data for coupling analysis.
Definition: m_fstr.F90:650
Data for DYNAMIC ANSLYSIS (fstrDYNAMIC)
Definition: m_fstr.F90:533
Package of data used by Lanczos eigenvalue solver.
Definition: m_fstr.F90:631
Data for HEAT ANSLYSIS (fstrHEAT)
Definition: m_fstr.F90:447
FSTR INNER CONTROL PARAMETERS (fstrPARAM)
Definition: m_fstr.F90:151
Counts of the input for fstr_setup_prepare and fstr_setup_finish, independent of the input file forma...