FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
fstr_ctrl_dynamic.f90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
2 ! Copyright (c) 2019 FrontISTR Commos
3 ! This software is released under the MIT License, see LICENSE.txt
4 !-------------------------------------------------------------------------------
6 
8  use m_fstr
9  use hecmw
10  include 'fstr_ctrl_util_f.inc'
11  private :: fstr_ctrl_get_nval
12 contains
13 
14  !* ----------------------------------------------------------------------------------------------- *!
15  !* fstr_ctrl_get_nval *!
16  !* ----------------------------------------------------------------------------------------------- *!
17 
18  function fstr_ctrl_get_nval( ctrl, iType, amp, node_id, node_id_len, dof_ids, dof_ide, value )
19  implicit none
20  integer(kind=kint) :: ctrl
21  integer(kind=kint) :: iType
22  character(len=HECMW_NAME_LEN) :: amp
23  character(len=HECMW_NAME_LEN),target :: node_id(:)
24  character(len=HECMW_NAME_LEN),pointer :: node_id_p
25  integer(kind=kint) :: node_id_len
26  integer(kind=kint),pointer :: dof_ids (:)
27  integer(kind=kint),pointer :: dof_ide (:)
28  real(kind=kreal),pointer :: value(:)
29  integer(kind=kint) :: fstr_ctrl_get_nval
30  integer(kind=kint) :: rcode
31 
32  character(len=HECMW_NAME_LEN) :: data_fmt,ss
33  write(ss,*) node_id_len
34  write(data_fmt,'(a,a,a)') 'S',trim(adjustl(ss)),'IIr '
35 
36  itype=2
37  ss='INITIAL,TRANSIT '
38  fstr_ctrl_get_nval = -1
39  rcode=fstr_ctrl_get_param_ex( ctrl, 'TYPE ', ss, 0, 'P', itype )
40 
41  if( fstr_ctrl_get_param_ex( ctrl, 'AMP ', '# ', 0, 'S', amp )/= 0) return
42  node_id_p => node_id(1)
43  fstr_ctrl_get_nval = &
44  fstr_ctrl_get_data_array_ex( ctrl, data_fmt, node_id_p, dof_ids, dof_ide, value )
45 
46  end function fstr_ctrl_get_nval
47 
49  function fstr_ctrl_get_velocity( ctrl, vType, amp, node_id, node_id_len, dof_ids, dof_ide, value )
50  implicit none
51  integer(kind=kint) :: ctrl
52  integer(kind=kint) vtype
53  character(len=HECMW_NAME_LEN) :: amp
54  character(len=HECMW_NAME_LEN) :: node_id(:)
55  integer(kind=kint) :: node_id_len
56  integer(kind=kint),pointer :: dof_ids (:)
57  integer(kind=kint),pointer :: dof_ide (:)
58  real(kind=kreal),pointer :: value(:)
59  integer(kind=kint) :: fstr_ctrl_get_velocity
60 
62  fstr_ctrl_get_nval( ctrl, vtype, amp, node_id, node_id_len, dof_ids, dof_ide, value )
63 
64  end function fstr_ctrl_get_velocity
65 
67  function fstr_ctrl_get_acceleration( ctrl, aType, amp, node_id, node_id_len, dof_ids, dof_ide, value )
68  implicit none
69  integer(kind=kint) :: ctrl
70  integer(kind=kint) :: atype
71  character(len=HECMW_NAME_LEN) :: amp
72  character(len=HECMW_NAME_LEN) :: node_id(:)
73  integer(kind=kint) :: node_id_len
74  integer(kind=kint),pointer :: dof_ids (:)
75  integer(kind=kint),pointer :: dof_ide (:)
76  real(kind=kreal),pointer :: value(:)
77  integer(kind=kint) :: fstr_ctrl_get_acceleration
78 
80  fstr_ctrl_get_nval( ctrl, atype, amp, node_id, node_id_len, dof_ids, dof_ide, value )
81 
82  end function fstr_ctrl_get_acceleration
83 
85  function fstr_ctrl_get_dynamic( ctrl, nlgeom, &
86  idx_eqa, idx_resp, n_step, t_start, t_end, t_delta, &
87  ganma, beta, idx_mas, idx_dmp, ray_m, ray_k, &
88  nout, node_id, node_id_len, nout_monit, iout_list )
89  implicit none
90  integer(kind=kint) :: ctrl
91 
92  ! ANALYSIS TYPE CONTROL
93  logical :: nlgeom
94  integer(kind=kint) :: idx_eqa
95  integer(kind=kint) :: idx_resp
96 
97  ! TIME CONTROL
98  integer(kind=kint) :: n_step
99  real(kind=kreal) :: t_start
100  real(kind=kreal) :: t_end
101  real(kind=kreal) :: t_delta
102 
103  ! Newmark-beta parameter
104  real(kind=kreal) :: ganma
105  real(kind=kreal) :: beta
106 
107  ! mass matrix control
108  integer(kind=kint) :: idx_mas
109 
110  ! damping control
111  integer(kind=kint) :: idx_dmp
112  real(kind=kreal) :: ray_m
113  real(kind=kreal) :: ray_k
114 
115  ! OUTPUT CONTROL
116  integer(kind=kint) :: nout
117  character(len=HECMW_NAME_LEN) :: node_id
118  integer(kind=kint) :: node_id_len
119  integer(kind=kint) :: nout_monit
120  integer(kind=kint) :: iout_list(6)
121 
122  integer(kind=kint) :: rcode, nlflag
123  character(len=80) :: s
124  character(len=HECMW_NAME_LEN) :: data_fmt,ss
125 
126  integer(kind=kint) :: fstr_ctrl_get_dynamic
127 
129 
130 
131  s = 'LINEAR,NONLINEAR '
132  nlflag=0
133  rcode = fstr_ctrl_get_param_ex( ctrl, 'TYPE ', s, 1, 'P', nlflag )
134  if( nlflag/=0 ) nlgeom = (nlflag==2)
135 
136  if( fstr_ctrl_get_data_ex( ctrl, 1, 'ii ', idx_eqa, idx_resp )/=0 ) return
137  if( fstr_ctrl_get_data_ex( ctrl, 2, 'rrir ', t_start, t_end, n_step, t_delta )/=0 ) return
138  if( fstr_ctrl_get_data_ex( ctrl, 3, 'rr ', ganma, beta )/=0 ) return
139  if( fstr_ctrl_get_data_ex( ctrl, 4, 'iirr ', idx_mas, idx_dmp, ray_m, ray_k )/=0 ) return
140  write(ss,*) node_id_len
141  write(data_fmt,'(a,a,a)') 'iS',trim(adjustl(ss)),'i '
142  if( fstr_ctrl_get_data_ex( ctrl, 5, data_fmt, nout, node_id, nout_monit )/=0 ) return
143  if( fstr_ctrl_get_data_ex( ctrl, 6, 'iiiiii ', &
144  iout_list(1), iout_list(2), iout_list(3), iout_list(4), iout_list(5), iout_list(6) )/=0 ) return
146 
147  end function fstr_ctrl_get_dynamic
148 
149 end module fstr_ctrl_dynamic
fstr_ctrl_dynamic::fstr_ctrl_get_velocity
integer(kind=kint) function fstr_ctrl_get_velocity(ctrl, vType, amp, node_id, node_id_len, dof_ids, dof_ide, value)
Read in !VELOCITY.
Definition: fstr_ctrl_dynamic.f90:50
fstr_ctrl_dynamic
This module contains control file data obtaining functions for dynamic analysis.
Definition: fstr_ctrl_dynamic.f90:7
m_fstr
This module defines common data and basic structures for analysis.
Definition: m_fstr.f90:15
hecmw
Definition: hecmw.f90:6
fstr_ctrl_get_param_ex
int fstr_ctrl_get_param_ex(int *ctrl, const char *param_name, const char *value_list, int *necessity, char *type, void *val)
Definition: fstr_ctrl_util.c:1404
fstr_ctrl_dynamic::fstr_ctrl_get_dynamic
integer(kind=kint) function fstr_ctrl_get_dynamic(ctrl, nlgeom, idx_eqa, idx_resp, n_step, t_start, t_end, t_delta, ganma, beta, idx_mas, idx_dmp, ray_m, ray_k, nout, node_id, node_id_len, nout_monit, iout_list)
Read in !DYNAMIC.
Definition: fstr_ctrl_dynamic.f90:89
fstr_ctrl_get_data_array_ex
int fstr_ctrl_get_data_array_ex(int *ctrl, const char *format,...)
Definition: fstr_ctrl_util.c:1701
fstr_ctrl_get_data_ex
int fstr_ctrl_get_data_ex(int *ctrl, int *line_no, const char *format,...)
Definition: fstr_ctrl_util.c:1628
fstr_ctrl_dynamic::fstr_ctrl_get_acceleration
integer(kind=kint) function fstr_ctrl_get_acceleration(ctrl, aType, amp, node_id, node_id_len, dof_ids, dof_ide, value)
Read in !ACCELERATION.
Definition: fstr_ctrl_dynamic.f90:68