FrontISTR  6.0.0
Large-scale structural analysis program with finit element method
fstr_param_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
9  use hecmw_setup_util, only &
11  use fstr_setup_util, only &
12  : fstr_param_pack &
13  , fstr_card_slot &
18  use mcontactparam
19  use m_utilities
21  implicit none
22 
23 contains
24 
25  !-----------------------------------------------------------------------------!
27  !-----------------------------------------------------------------------------!
28 
29  subroutine fstr_setup_version( ctrl, P )
30  implicit none
31  integer(kind=kint) :: ctrl
32  type(fstr_param_pack) :: P
33 
34  integer(kind=kint) :: rcode
35 
36  rcode = fstr_ctrl_get_data_ex( ctrl, 1, 'i ', p%STATE%version )
37 
38  end subroutine fstr_setup_version
39 
40  !-----------------------------------------------------------------------------!
42  !-----------------------------------------------------------------------------!
43 
44  subroutine fstr_setup_solution( ctrl, P )
45  implicit none
46  integer(kind=kint) :: ctrl
47  type(fstr_param_pack) :: P
48 
49  integer(kind=kint) :: rcode
50 
51  rcode = fstr_ctrl_get_solution( ctrl, p%PARAM%solution_type, p%PARAM%nlgeom )
52  if( rcode /= 0 ) call fstr_ctrl_err_stop
53 
54  end subroutine fstr_setup_solution
55 
56  !-----------------------------------------------------------------------------!
58  !-----------------------------------------------------------------------------!
59 
60  subroutine fstr_setup_nonlinear_solver( ctrl, P )
61  implicit none
62  integer(kind=kint) :: ctrl
63  type(fstr_param_pack) :: P
64 
65  integer(kind=kint) :: rcode
66 
67  rcode = fstr_ctrl_get_nonlinear_solver( ctrl, p%PARAM%nlsolver_method )
68  if( rcode /= 0 ) call fstr_ctrl_err_stop
69 
70  end subroutine fstr_setup_nonlinear_solver
71 
72  !-----------------------------------------------------------------------------!
74  !-----------------------------------------------------------------------------!
75 
76  subroutine fstr_setup_solver( ctrl, P )
77  implicit none
78  integer(kind=kint) :: ctrl
79  type(fstr_param_pack) :: P
80 
81  integer(kind=kint) :: rcode
82  type(fstr_card_slot) :: slot
83 
84  slot = p%STATE%slot
85  if( slot%first > 1 ) then
86  write(ilog,*) '### Error : !SOLVER exists twice in FSTR control file.'
87  stop hecmw_exit_input
88  endif
89 
90  ! nier => svIarray(1)
91  ! method => svIarray(2)
92  ! precond => svIarray(3)
93  ! nset => svIarray(4)
94  ! iterpremax => svIarray(5)
95  ! nrest => svIarray(6)
96  ! scaling => svIarray(7)
97  ! iterlog => svIarray(21)
98  ! timelog => svIarray(22)
99  ! steplog => svIarray(23)
100  ! loglevel => svIarray(24)
101  ! dumptype => svIarray(31)
102  ! dumpexit => svIarray(32)
103  ! usejad => svIarray(33)
104  ! ncolor_in => svIarray(34)
105  ! mpc_method => svIarray(13)
106  ! estcond => svIarray(14)
107  ! contact_elim=> svIarray(15)
108  ! recompute_residual => svIarray(16)
109  ! method2 => svIarray(8)
110  ! recyclepre => svIarray(35)
111  ! matvec_impl=> svIarray(36)
112  ! precond_impl=> svIarray(37)
113  ! solver_opt => svIarray(41:50)
114  ! nBFGS => svIarray(60)
115 
116  ! resid => svRarray(1)
117  ! sigma_diag => svRarray(2)
118  ! omega => svRarray(3)
119  ! thresh => svRarray(4)
120  ! filter => svRarray(5)
121  ! solver_ropt=> svRarray(41:50)
122 
123  rcode = fstr_ctrl_get_solver( ctrl, &
124  p%MAT%Iarray(2), p%MAT%Iarray(3), p%MAT%Iarray(4), &
125  p%MAT%Iarray(21), p%MAT%Iarray(22), p%MAT%Iarray(23), &
126  p%MAT%Iarray(1), p%MAT%Iarray(5), p%MAT%Iarray(6), p%MAT%Iarray(60), p%MAT%Iarray(7), &
127  p%MAT%Iarray(31), p%MAT%Iarray(32), p%MAT%Iarray(33), p%MAT%Iarray(34), &
128  p%MAT%Iarray(13), p%MAT%Iarray(14), p%MAT%Iarray(8), &
129  p%MAT%Iarray(35), p%MAT%Iarray(41:50), p%MAT%Iarray(15), &
130  p%MAT%Rarray(1), p%MAT%Rarray(2), p%MAT%Rarray(3), &
131  p%MAT%Rarray(4), p%MAT%Rarray(5), p%MAT%Rarray(41:50), p%MAT%Iarray(24), &
132  p%MAT%Iarray(36), p%MAT%Iarray(37), p%MAT%Iarray(16) )
133  if( rcode /= 0 ) call fstr_ctrl_err_stop
134 
135  if( p%MAT%Iarray(2) <= 100 ) then
136  p%MAT%Iarray(99) = 1 ! indirect method
137  else
138  p%MAT%Iarray(99) = p%MAT%Iarray(2)-99 !2 ! direct method
139  end if
140 
141  end subroutine fstr_setup_solver
142 
143  !* ----------------------------------------------------------------------------------------------- *!
145  !* ----------------------------------------------------------------------------------------------- *!
146 
147  subroutine fstr_setup_orientation( ctrl, P )
148  implicit none
149  integer(kind=kint) :: ctrl
150  type(fstr_param_pack) :: P
151 
152  type(fstr_card_slot) :: slot
153 
154  slot = p%STATE%slot
155  if( fstr_get_orientation( ctrl, p%MESH, g_localcoordsys(slot%first) )/=0 ) then
156  write(*,*) '### Error: Fail in read in ORIENTATION definition : ', slot%first
157  write(ilog,*) '### Error: Fail in read in ORIENTATION definition : ', slot%first
158  stop hecmw_exit_input
159  endif
160  end subroutine fstr_setup_orientation
161 
163  integer function fstr_get_orientation( ctrl, hecMESH, coordsys )
165  implicit none
166  integer(kind=kint) :: ctrl
167  type( hecmwst_local_mesh ) :: hecmesh
168  type( tlocalcoordsys ) :: coordsys
169 
170  character(len=HECMW_NAME_LEN) :: grp_id_name(1)
171 
172  integer :: nid, dtype
173  character(len=HECMW_NAME_LEN) :: data_fmt
174  real(kind=kreal) :: fdum, xyza(3), xyzb(3), xyzc(3), ff1(3), ff2(3), ff3(3)
175 
177 
178  nid = 1
179  coordsys%sys_type = 10
180 
181  nid = 1
182  data_fmt = 'COORDINATES,NODES,LOCAL_NODES '
183  if( fstr_ctrl_get_param_ex( ctrl, 'DEFINITION ', data_fmt, 0, 'P', nid )/=0 ) return
184  dtype = nid-1
185  coordsys%sys_type = coordsys%sys_type + dtype
186 
187  if( fstr_ctrl_get_param_ex( ctrl, 'NAME ', '# ', 1, 'S', grp_id_name(1) )/= 0) return
188  coordsys%sys_name = grp_id_name(1)
189 
190  if( dtype==0 ) then
191  data_fmt = "RRRRRRrrr "
192  xyzc(:) = 0.d0
193  if( fstr_ctrl_get_data_ex( ctrl, 1, data_fmt, xyza(1), xyza(2), &
194  xyza(3), xyzb(1), xyzb(2), xyzb(3), xyzc(1), xyzc(2), xyzc(3) )/=0 ) return
195  if( coordsys%sys_type==10 ) then
196  ff1 = xyza-xyzc
197  fdum = dsqrt( dot_product(ff1, ff1) )
198  if( fdum==0.d0 ) return
199  ff1 = ff1/fdum
200  ff2 = xyzb-xyzc
201  call cross_product(ff1,ff2,ff3)
202  coordsys%CoordSys(1,:) = ff1
203 
204  fdum = dsqrt( dot_product(ff3, ff3) )
205  if( fdum==0.d0 ) return
206  coordsys%CoordSys(3,:) = ff3/fdum
207 
208  call cross_product(coordsys%CoordSys(3,:), coordsys%CoordSys(1,:), coordsys%CoordSys(2,:) )
209  else
210  coordsys%CoordSys(1,:) = xyza
211  coordsys%CoordSys(2,:) = xyzb
212  endif
213 
214  else
215  coordsys%node_ID(3) = 0 ! global origin
216  data_fmt = "IIi "
217  if( fstr_ctrl_get_data_ex( ctrl, 1, data_fmt, coordsys%node_ID(1), &
218  coordsys%node_ID(2), coordsys%node_ID(3) )/=0 ) return
219  ! DEFINITION=LOCAL_NODES: three local node numbers (1..number of nodes of
220  ! the element) defining the coordinate system of each element. All three
221  ! are mandatory here, unlike the third node of DEFINITION=NODES.
222  if( dtype==2 ) then
223  if( maxval(coordsys%node_ID(1:3)) > 10 .or. minval(coordsys%node_ID(1:3)) < 1 ) then
224  write(*,*) "!ORIENTATION, DEFINITION=LOCAL_NODES needs three local node numbers (1-10)!"
225  write(idbg,*) "!ORIENTATION, DEFINITION=LOCAL_NODES needs three local node numbers (1-10)!"
226  return
227  endif
229  return
230  endif
231  if( coordsys%node_ID(3) == 0 ) then
232  nid = node_global_to_local( hecmesh, coordsys%node_ID(1:2), 2 )
233  if( nid/=0 .and. nid/=2 ) then
234  write(*,*) "We cannot define coordinate system using nodes in other CPU!"
235  write(idbg,*) "We cannot define coordinate system using nodes in other CPU!"
236  return
237  endif
238  else
239  nid = node_global_to_local( hecmesh, coordsys%node_ID, 3 )
240  if( nid/=0 .and. nid/=3 ) then
241  write(*,*) "We cannot define coordinate system using nodes in other CPU!"
242  write(idbg,*) "We cannot define coordinate system using nodes in other CPU!"
243  return
244  endif
245  endif
246  endif
247 
249  end function fstr_get_orientation
250 
252  subroutine fstr_setup_initial_condition( ctrl, P )
253  implicit none
254  integer(kind=kint) :: ctrl
255  type(fstr_param_pack) :: P
256 
257  type(fstr_card_slot) :: slot
258 
259  slot = p%STATE%slot
260  if( fstr_get_initial_condition( ctrl, g_initialcnd(slot%first), p%MESH )/=0 ) then
261  write(*,*) '### Error: Fail in read in INITIAL CONDITION definition : ' ,slot%first
262  write(ilog,*) '### Error: Fail in read in INITIAL CONDITION definition : ', slot%first
263  stop hecmw_exit_input
264  endif
265  end subroutine fstr_setup_initial_condition
266 
268  integer(kind=kint) function fstr_get_initial_condition( ctrl, cond, hecMESH )
269  implicit none
270  integer(kind=kint) :: ctrl
271  type( tinitialcondition ) :: cond
272  type(hecmwst_local_mesh) :: hecmesh
273  integer, pointer :: grp_id(:), dof(:)
274  real(kind=kreal), pointer :: temp(:)
275  character(len=HECMW_NAME_LEN), pointer :: grp_id_name(:)
276  character(len=HECMW_NAME_LEN) :: data_fmt, ss
277  integer :: i,j,n, is, ie, gid, nid, rcode
278 
280 
281  ss = 'TEMPERATURE,VELOCITY,ACCELERATION '
282  rcode = fstr_ctrl_get_param_ex( ctrl, 'TYPE ', ss, 1, 'P', nid )
283  if( nid==1 ) then
284  cond%cond_name = "temperature"
285  allocate( cond%intval(hecmesh%n_node) )
286  allocate( cond%realval(hecmesh%n_node) )
287  elseif( nid==2 ) then
288  cond%cond_name = "velocity"
289  allocate( cond%intval(hecmesh%n_node) )
290  allocate( cond%realval(hecmesh%n_node) )
291  elseif( nid==3 ) then
292  cond%cond_name = "acceleration"
293  allocate( cond%intval(hecmesh%n_node) )
294  allocate( cond%realval(hecmesh%n_node) )
295  else
296  return
297  endif
298 
299  cond%intval = -1
300  cond%realval = 0.d0
301 
302  n = fstr_ctrl_get_data_line_n( ctrl )
303  if( n<=0 ) return
304  allocate( temp(n), grp_id_name(n), grp_id(n), dof(n) )
305  dof = 0
306  write(ss,*) hecmw_name_len
307  if( nid==1 ) then
308  write(data_fmt,'(a,a,a)') 'S',trim(adjustl(ss)),'R '
310  fstr_ctrl_get_data_array_ex( ctrl, data_fmt, grp_id_name, temp )
311  else
312  write(data_fmt,'(a,a,a)') 'S',trim(adjustl(ss)),'IR '
314  fstr_ctrl_get_data_array_ex( ctrl, data_fmt, grp_id_name, dof, temp )
315  endif
316 
317  if( fstr_get_initial_condition /= 0 ) then
318  if( associated(grp_id) ) deallocate( grp_id )
319  if( associated(temp) ) deallocate( temp )
320  if( associated(dof) ) deallocate( dof )
321  if( associated(grp_id_name) ) deallocate( grp_id_name )
322  return
323  end if
324 
325  call node_grp_name_to_id_ex( hecmesh, '!INITIAL CONDITION', n, grp_id_name, grp_id )
326  do i=1,n
327  gid = grp_id(i)
328  is = hecmesh%node_group%grp_index(gid-1) + 1
329  ie = hecmesh%node_group%grp_index(gid )
330  do j=is, ie
331  nid = hecmesh%node_group%grp_item(j)
332  cond%realval(nid) = temp(i)
333  cond%intval(nid) = dof(i)
334  enddo
335  enddo
336 
337  if( associated(grp_id) ) deallocate( grp_id )
338  if( associated(temp) ) deallocate( temp )
339  if( associated(dof) ) deallocate( dof )
340  if( associated(grp_id_name) ) deallocate( grp_id_name )
341  end function fstr_get_initial_condition
342 
343  !-----------------------------------------------------------------------------!
345  !-----------------------------------------------------------------------------!
346 
347  subroutine fstr_setup_write( ctrl, counter, P )
348  implicit none
349  integer(kind=kint) :: ctrl
350  integer(kind=kint) :: counter
351  type(fstr_param_pack) :: P
352  integer(kind=kint) :: res, visual, neutral
353 
354  integer(kind=kint) :: rcode
355 
356  rcode = fstr_ctrl_get_write( ctrl, res, visual, neutral )
357  if( rcode /= 0 ) call fstr_ctrl_err_stop
358  if( res == 1 ) p%PARAM%fg_result = 1
359  if( visual == 1 ) p%PARAM%fg_visual = 1
360  if( neutral == 1 ) p%PARAM%fg_neutral = 1
361 
362  end subroutine fstr_setup_write
363 
364  !-----------------------------------------------------------------------------!
366  !-----------------------------------------------------------------------------!
367  subroutine fstr_setup_echo( ctrl, P )
368  implicit none
369  integer(kind=kint) :: ctrl
370  type(fstr_param_pack) :: P
371 
372  integer(kind=kint) :: rcode
373 
374  rcode = fstr_ctrl_get_echo( ctrl, &
375  p%PARAM%fg_echo )
376  if( rcode /= 0 ) call fstr_ctrl_err_stop
377 
378  end subroutine fstr_setup_echo
379 
380  !-----------------------------------------------------------------------------!
382  !-----------------------------------------------------------------------------!
383  subroutine fstr_setup_restart( ctrl, P )
384  implicit none
385  integer(kind=kint) :: ctrl
386  type(fstr_param_pack) :: P
387 
388  integer(kind=kint) :: rcode, nout
389  nout = 0
390  rcode = fstr_ctrl_get_param_ex( ctrl, 'FREQUENCY ', '# ', 0, 'I', nout )
391  if( rcode /= 0 ) call fstr_ctrl_err_stop
392  rcode = fstr_ctrl_get_param_ex( ctrl, 'VERSION ', '# ', 0, 'I', p%PARAM%restart_version )
393  if( rcode /= 0 ) call fstr_ctrl_err_stop
394  p%SOLID%restart_nout= nout
395  p%DYN%restart_nout= nout
396  p%HEAT%restart_nout= nout
397 
398  end subroutine fstr_setup_restart
399 
400  !-----------------------------------------------------------------------------!
402  !-----------------------------------------------------------------------------!
403 
404  subroutine fstr_setup_amplitude( ctrl, P )
405  implicit none
406  integer(kind=kint) :: ctrl
407  type(fstr_param_pack) :: P
408  real(kind=kreal), pointer :: val(:), table(:)
409  character(len=HECMW_NAME_LEN) :: name
410  integer :: nline, n, type_def, type_time, type_val, rcode
411 
412  nline = fstr_ctrl_get_data_line_n( ctrl )
413  if( nline<=0 ) return
414  allocate( val(nline*4) )
415  allocate( table(nline*4) )
416  rcode = fstr_ctrl_get_amplitude( ctrl, nline, name, type_def, type_time, type_val, &
417  n, val, table )
418  if( rcode /= 0 ) call fstr_ctrl_err_stop
419 
420  call append_new_amplitude( p%MESH%amp, name, type_def, type_time, type_val, n, val, table )
421 
422  if( associated(val) ) deallocate( val )
423  if( associated(table) ) deallocate( table )
424  end subroutine fstr_setup_amplitude
425 
426  !-----------------------------------------------------------------------------!
428  !-----------------------------------------------------------------------------!
429 
430  subroutine fstr_setup_reftemp( ctrl, P )
431  implicit none
432  integer(kind=kint) :: ctrl
433  type(fstr_param_pack) :: P
434 
435  integer(kind=kint) :: rcode
436 
437  rcode = fstr_ctrl_get_reftemp( ctrl, p%PARAM%ref_temp )
438  if( rcode /= 0 ) call fstr_ctrl_err_stop
439 
440  end subroutine fstr_setup_reftemp
441 
442  !-----------------------------------------------------------------------------!
444  !-----------------------------------------------------------------------------!
445 
446  subroutine fstr_setup_mpc( ctrl, P )
447  implicit none
448  integer(kind=kint) :: ctrl
449  type(fstr_param_pack) :: P
450 
451  integer(kind=kint) :: rcode
452  ! integer(kind=kint) :: type
453  ! integer(kind=kint),pointer :: node1_ptr(:)
454  ! integer(kind=kint),pointer :: node2_ptr(:)
455  ! integer(kind=kint),pointer :: dof_ptr(:)
456  ! integer(kind=kint) :: n, old_size, new_size
457  !
458  ! rcode = fstr_ctrl_get_param_ex( ctrl, 'TYPE ', 'RIGID ', 1, 'P', type )
459  ! if( rcode < 0 ) call fstr_ctrl_err_stop
460  !
461  ! n = fstr_ctrl_get_data_line_n( ctrl )
462  ! if( n == 0 ) return
463  ! old_size = P%MPC_RD%nmpc
464  ! new_size = old_size + n
465  ! P%MPC_RD%nmpc = new_size
466  !
467  ! call hecmw_expand_integer_array ( P%MPC_RD%node1, old_size, new_size )
468  ! call hecmw_expand_integer_array ( P%MPC_RD%node2, old_size, new_size )
469  ! call hecmw_expand_integer_array ( P%MPC_RD%dof, old_size, new_size )
470  !
471  ! node1_ptr => P%MPC_RD%node1(old_size+1:)
472  ! node2_ptr => P%MPC_RD%node2(old_size+1:)
473  ! dof_ptr => P%MPC_RD%dof(old_size+1:)
474  !
475  ! rcode = fstr_ctrl_get_MPC( ctrl, type, node1_ptr, node2_ptr, dof_ptr )
476  ! if( rcode /= 0 ) call fstr_ctrl_err_stop
477  !
478  ! if( node_global_to_local( P%MESH, node1_ptr, n ) /= n ) then
479  ! call fstr_setup_util_err_stop( '### Error : not exist node (!MPC)' )
480  ! endif
481  ! if( node_global_to_local( P%MESH, node2_ptr, n ) /= n ) then
482  ! call fstr_setup_util_err_stop( '### Error : not exist node (!MPC)' )
483  ! endif
484 
485  ! penalty => svRarray(11)
486  rcode = fstr_ctrl_get_mpc( ctrl, p%MAT%Rarray(11))
487  if( rcode /= 0) call fstr_ctrl_err_stop
488  end subroutine fstr_setup_mpc
489 
490  !-----------------------------------------------------------------------------!
492  !-----------------------------------------------------------------------------!
493 
494  subroutine fstr_setup_contactalgo( ctrl, P )
495  implicit none
496  integer(kind=kint) :: ctrl
497  type(fstr_param_pack) :: P
498 
499  integer(kind=kint) :: rcode
500 
501 
502  rcode = fstr_ctrl_get_contactalgo( ctrl, p%PARAM%contact_algo, p%PARAM%augiter, &
503  p%PARAM%fric_cone_follow, p%PARAM%eps_fric_band )
504  if( rcode /= 0 ) call fstr_ctrl_err_stop
505 
506  end subroutine fstr_setup_contactalgo
507 
508  !-----------------------------------------------------------------------------!
510  !-----------------------------------------------------------------------------!
511 
512  subroutine fstr_setup_output_sstype( ctrl, P )
513  implicit none
514  integer(kind=kint) :: ctrl
515  type(fstr_param_pack) :: P
516 
517  integer(kind=kint) :: rcode, nid
518  character(len=HECMW_NAME_LEN) :: data_fmt
519 
520  data_fmt = 'SOLUTION,MATERIAL '
521  rcode = fstr_ctrl_get_param_ex( ctrl, 'TYPE ', data_fmt, 0, 'P', nid )
522  opsstype = nid
523  if( rcode /= 0 ) call fstr_ctrl_err_stop
524 
525  end subroutine fstr_setup_output_sstype
526 
527  !-----------------------------------------------------------------------------!
529  !-----------------------------------------------------------------------------!
530  subroutine fstr_setup_autoinc_param( ctrl, P )
531  implicit none
532  integer(kind=kint) :: ctrl
533  type(fstr_param_pack) :: P
534 
535  type(fstr_param), pointer :: fstrPARAM
536  type(fstr_card_slot) :: slot
537 
538  slot = p%STATE%slot
539  fstrparam => p%PARAM
540 
541  if( fstr_get_autoinc( ctrl, fstrparam%ainc(slot%first) ) /=0 ) then
542  write(*,*) '### Error: Fail in read in AUTOINC_PARAM definition : ' , slot%first
543  write(ilog,*) '### Error: Fail in read in AUTOINC_PARAM definition : ', slot%first
544  stop hecmw_exit_input
545  endif
546  end subroutine fstr_setup_autoinc_param
547 
548  !-----------------------------------------------------------------------------!
550  !-----------------------------------------------------------------------------!
551  subroutine fstr_setup_converg_param( ctrl, P )
552  implicit none
553  integer(kind=kint) :: ctrl
554  type(fstr_param_pack) :: P
555 
556  type(fstr_param), pointer :: fstrPARAM
557  type(fstr_card_slot) :: slot
558 
559  slot = p%STATE%slot
560  fstrparam => p%PARAM
561 
562  if( fstr_ctrl_get_convergparam( ctrl, fstrparam%cnvparam(slot%first) ) /=0 ) then
563  write(*,*) '### Error: Fail in read in CONVERG_PARAM definition : ' , slot%first
564  write(ilog,*) '### Error: Fail in read in CONVERG_PARAM definition : ', slot%first
565  stop hecmw_exit_input
566  endif
567  end subroutine fstr_setup_converg_param
568 
569  !-----------------------------------------------------------------------------!
571  !-----------------------------------------------------------------------------!
572  subroutine fstr_setup_time_points( ctrl, P )
573  implicit none
574  integer(kind=kint) :: ctrl
575  type(fstr_param_pack) :: P
576 
577  type(fstr_param), pointer :: fstrPARAM
578  type(fstr_card_slot) :: slot
579 
580  slot = p%STATE%slot
581  fstrparam => p%PARAM
582 
583  if( fstr_ctrl_get_timepoints( ctrl, fstrparam%timepoints(slot%first) )/=0 ) then
584  write(*,*) '### Error: Fail in read in TIME_POINTS definition : ' , slot%first
585  write(ilog,*) '### Error: Fail in read in TIME_POINTS definition : ', slot%first
586  stop hecmw_exit_input
587  endif
588  end subroutine fstr_setup_time_points
589 
590  !-----------------------------------------------------------------------------!
592  !-----------------------------------------------------------------------------!
593  subroutine fstr_setup_contact_param( ctrl, P )
594  implicit none
595  integer(kind=kint) :: ctrl
596  type(fstr_param_pack) :: P
597 
598  type(fstr_param), pointer :: fstrPARAM
599  type(fstr_card_slot) :: slot
600 
601  slot = p%STATE%slot
602  fstrparam => p%PARAM
603 
604  if( fstr_ctrl_get_contactparam( ctrl, fstrparam%contactparam(slot%first) ) /=0 ) then
605  write(*,*) '### Error: Fail in read in CONTACT_PARAM definition : ' , slot%first
606  write(ilog,*) '### Error: Fail in read in CONTACT_PARAM definition : ', slot%first
607  stop hecmw_exit_input
608  endif
609  end subroutine fstr_setup_contact_param
610 
611  !-----------------------------------------------------------------------------!
613  !-----------------------------------------------------------------------------!
614  subroutine fstr_setup_contact_interference( ctrl, P )
615  implicit none
616  integer(kind=kint) :: ctrl
617  type(fstr_param_pack) :: P
618 
619  type(fstr_param), pointer :: fstrPARAM
620  type(fstr_solid), pointer :: fstrSOLID
621  integer(kind=kint) :: c_contact_if, n, i
622  type(fstr_card_slot) :: slot
623 
624  slot = p%STATE%slot
625  fstrparam => p%PARAM
626  fstrsolid => p%SOLID
627 
628  n = fstr_ctrl_get_data_line_n( ctrl )
629  c_contact_if = slot%first - 1
630  if( fstr_ctrl_get_contact_if( ctrl, n, fstrparam%contact_if(slot%first:slot%last) ) /= 0 ) then
631  write(*,*) '### Error: Fail in read in CONTACT_INTERFERENCE definition : ' , c_contact_if
632  write(ilog,*) '### Error: Fail in read in CONTACT_INTERFERENCE definition : ', c_contact_if
633  stop hecmw_exit_input
634  endif
635  do i=1, n
636  if( check_apply_contact_if(fstrparam%contact_if(c_contact_if+i), fstrsolid%contacts) /= 0) then
637  write(*,*) '### Error:(INTERFERENCE) Inconsistence of contact_pair in CONTACTS: ' , i+c_contact_if
638  write(ilog,*) '### Error:(INTERFERENCE) Inconsistence of contact_pair in CONTACTS: ', i+c_contact_if
639  stop hecmw_exit_model
640  end if
641  end do
642  end subroutine fstr_setup_contact_interference
643 
644 end module m_fstr_param_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_get_data_ex(int *ctrl, int *line_no, const char *format,...)
This module contains fstr control file data obtaining functions.
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_contact_if(ctrl, n, contact_if)
Read in contact interference.
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.
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, sigma_diag, omega, thresh, filter, solver_ropt, loglevel, matvec_impl, precond_impl, recompute_residual)
Read in !SOLVER.
integer(kind=kint) function fstr_ctrl_get_echo(ctrl, echo)
Read in !ECHO.
integer(kind=kint) function fstr_ctrl_get_nonlinear_solver(ctrl, method)
Read in !NONLINEAR_SOLVER.
integer(kind=kint) function fstr_ctrl_get_convergparam(ctrl, cnvparam)
Read in !CONVERG_PARAM.
integer(kind=kint) function fstr_ctrl_get_contactalgo(ctrl, algo, augiter, conefollow, eps_fric_band)
Read in !CONTACT.
integer(kind=kint) function fstr_ctrl_get_mpc(ctrl, penalty)
Read in !MPC.
integer(kind=kint) function fstr_ctrl_get_write(ctrl, res, visual, femap)
Read in !WRITE.
This module contains control file data obtaining functions for static analysis.
integer(kind=kint) function fstr_ctrl_get_reftemp(ctrl, value)
Read in !REFTEMP.
This module contains auxiliary functions in calculation setup.
subroutine fstr_ctrl_err_stop
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.
This module contains auxiliary functions in calculation setup.
integer(kind=kint) function node_global_to_local(hecMESH, list, n)
subroutine node_grp_name_to_id_ex(hecMESH, header_name, n, grp_id_name, grp_ID)
This module provides subroutines to read the cards that go into fstr_param, and the cards that go int...
subroutine fstr_setup_converg_param(ctrl, P)
Read in !CONVERG_PARAM !
subroutine fstr_setup_echo(ctrl, P)
Read in !ECHO !
subroutine fstr_setup_contactalgo(ctrl, P)
Read in !CONTACT !
subroutine fstr_setup_restart(ctrl, P)
Read in !RESTART !
subroutine fstr_setup_mpc(ctrl, P)
Read in !MPC !
integer(kind=kint) function fstr_get_initial_condition(ctrl, cond, hecMESH)
Reads !INITIAL_CONDITION into cond. Returns 0, or nonzero for an error.
subroutine fstr_setup_output_sstype(ctrl, P)
Read in !OUTPUT_SSTYPE !
subroutine fstr_setup_contact_interference(ctrl, P)
Read in !CONTACT_INTERFERENCE !
subroutine fstr_setup_amplitude(ctrl, P)
Read in !AMPLITUDE !
subroutine fstr_setup_solution(ctrl, P)
Read in !SOLUTION !
subroutine fstr_setup_time_points(ctrl, P)
Read in !TIME_POINTS !
subroutine fstr_setup_version(ctrl, P)
Read in !VERSION !
subroutine fstr_setup_contact_param(ctrl, P)
Read in !CONTACT_PARAM !
subroutine fstr_setup_autoinc_param(ctrl, P)
Read in !AUTOINC_PARAM !
subroutine fstr_setup_write(ctrl, counter, P)
Read in !WRITE !
subroutine fstr_setup_initial_condition(ctrl, P)
Read in !INITIAL_CONDITION.
subroutine fstr_setup_nonlinear_solver(ctrl, P)
Read in !NONLINEAR_SOLVER !
integer function fstr_get_orientation(ctrl, hecMESH, coordsys)
Reads !ORIENTATION into coordsys. Returns 0, or -1 for an error.
subroutine fstr_setup_reftemp(ctrl, P)
Read in !REFTEMP !
subroutine fstr_setup_solver(ctrl, P)
Read in !SOLVER !
subroutine fstr_setup_orientation(ctrl, P)
Read in !ORIENTATION.
This module defines common data and basic structures for analysis.
Definition: m_fstr.F90:15
integer(kind=kint), parameter idbg
Definition: m_fstr.F90:122
integer(kind=kint) opsstype
Definition: m_fstr.F90:130
integer(kind=kint), parameter ilog
FILE HANDLER.
Definition: m_fstr.F90:118
type(tinitialcondition), dimension(:), pointer, save g_initialcnd
Definition: m_fstr.F90:139
This module provides aux functions.
Definition: utilities.f90:6
subroutine cross_product(v1, v2, vn)
Definition: utilities.f90:383
This module manage the parameters for contact calculation.
Places of a card in its sequence, from first to last. A card counted one by one has one place (first ...
Package of all data needs to initialize.
FSTR INNER CONTROL PARAMETERS (fstrPARAM)
Definition: m_fstr.F90:142