h2lib 13.1.3102__py3-none-win_amd64.whl → 13.1.3104__py3-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
h2lib/HAWC2Lib.dll CHANGED
Binary file
h2lib/_h2lib.py CHANGED
@@ -52,6 +52,7 @@ class H2LibThread(H2LibSignatures, DLLWrapper):
52
52
  if os.path.isdir(os.path.join(f, 'Library/bin')):
53
53
  os.add_dll_directory(os.path.join(f, 'Library/bin'))
54
54
  DLLWrapper.__init__(self, filename, cwd=cwd, cdecl=True)
55
+ self.stop_on_error(False)
55
56
  self.suppress_output = suppress_output
56
57
  self._initialized = False
57
58
  self.time = 0
@@ -141,7 +142,7 @@ class H2LibThread(H2LibSignatures, DLLWrapper):
141
142
  """
142
143
  assert not self._initialized, "h2lib already initialized via init, init_AD or init_AL"
143
144
  self.read_input(htc_path, model_path)
144
- r = H2LibSignatures.init_ad(self, rotor + 1, int(tiploss_method), float(tiploss_shen_c2))
145
+ r = H2LibSignatures.init_AD(self, rotor + 1, int(tiploss_method), float(tiploss_shen_c2))
145
146
  self._initialized = True
146
147
  return r
147
148
 
@@ -159,7 +160,7 @@ class H2LibThread(H2LibSignatures, DLLWrapper):
159
160
  """
160
161
  assert not self._initialized, "h2lib already initialized via init, init_AD or init_AL"
161
162
  self.read_input(htc_path, model_path)
162
- r = H2LibSignatures.init_al(self, rotor=rotor + 1, epsilon_smearing=float(epsilon_smearing))
163
+ r = H2LibSignatures.init_AL(self, rotor=rotor + 1, epsilon_smearing=float(epsilon_smearing))
163
164
  self._initialized = True
164
165
  return r
165
166
 
@@ -409,7 +410,7 @@ class H2LibThread(H2LibSignatures, DLLWrapper):
409
410
 
410
411
  """
411
412
  error_code = -1
412
- _, error_code = H2LibSignatures.solver_static_run(self, reset_structure, error_code)[0]
413
+ _, error_code = H2LibSignatures.solver_static_run(self, reset_structure, error_code, check_stop=False)[0]
413
414
  if error_code > 0:
414
415
  raise _ERROR_CODES[error_code]
415
416
 
@@ -622,7 +623,8 @@ class H2LibThread(H2LibSignatures, DLLWrapper):
622
623
  bool(angles_in_deg),
623
624
  reset_orientation,
624
625
  np.asfortranarray(mbdy2_ini_rotvec_d1).astype(np.float64),
625
- error_code)[0][-1]
626
+ error_code,
627
+ check_stop=False)[0][-1]
626
628
  if error_code > 0:
627
629
  raise _ERROR_CODES[error_code]
628
630
 
@@ -809,7 +811,7 @@ class H2LibThread(H2LibSignatures, DLLWrapper):
809
811
  ncst,
810
812
  error_code,
811
813
  ) = H2LibSignatures.get_number_of_bodies_and_constraints(
812
- self, nbdy, ncst, error_code
814
+ self, nbdy, ncst, error_code, check_stop=False
813
815
  )[
814
816
  0
815
817
  ]
@@ -837,7 +839,7 @@ class H2LibThread(H2LibSignatures, DLLWrapper):
837
839
  nelem = np.zeros((nbdy, ), dtype=np.int64, order="F")
838
840
  error_code = -1
839
841
  _, nelem, error_code = H2LibSignatures.get_number_of_elements(
840
- self, nbdy, nelem, error_code
842
+ self, nbdy, nelem, error_code, check_stop=False
841
843
  )[0]
842
844
 
843
845
  if error_code > 0: # pragma: no cover
@@ -890,10 +892,7 @@ class H2LibThread(H2LibSignatures, DLLWrapper):
890
892
  tes,
891
893
  error_code,
892
894
  ) = H2LibSignatures.get_timoshenko_location(
893
- self, ibdy + 1, ielem + 1, l, r1, r12, tes, error_code
894
- )[
895
- 0
896
- ]
895
+ self, ibdy + 1, ielem + 1, l, r1, r12, tes, error_code, check_stop=False)[0]
897
896
  if error_code > 0:
898
897
  raise _ERROR_CODES[error_code]
899
898
  return l, r1, r12, tes
@@ -923,8 +922,7 @@ class H2LibThread(H2LibSignatures, DLLWrapper):
923
922
  amat = np.zeros((3, 3), order="F")
924
923
  error_code = -1
925
924
  _, amat, error_code = H2LibSignatures.get_body_rotation_tensor(
926
- self, ibdy + 1, amat, error_code
927
- )[0]
925
+ self, ibdy + 1, amat, error_code, check_stop=False)[0]
928
926
  if error_code > 0:
929
927
  raise _ERROR_CODES[error_code]
930
928
  return amat
@@ -968,8 +966,7 @@ class H2LibThread(H2LibSignatures, DLLWrapper):
968
966
  error_code = -1
969
967
 
970
968
  _, _, M, C, K, R, error_code = H2LibSignatures.get_system_matrices(
971
- self, n_tdofs, n_rdofs, M, C, K, R, error_code
972
- )[0]
969
+ self, n_tdofs, n_rdofs, M, C, K, R, error_code, check_stop=False)[0]
973
970
 
974
971
  if error_code > 0:
975
972
  raise _ERROR_CODES[error_code]
h2lib/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # This file is autogenerated and should not be modified manually
2
- __version__ = '13.1.3102'
3
- h2lib_version = '13.1.3102'
2
+ __version__ = '13.1.3104'
3
+ h2lib_version = '13.1.3104'
4
4
  hawc2_version = '13.1.31+5-g08eea40'
h2lib/dll_wrapper.py CHANGED
@@ -89,7 +89,7 @@ def cwd(f):
89
89
  return wrap
90
90
 
91
91
 
92
- def wrap(self, f, *args, **kwargs):
92
+ def wrap(self, f, *args, check_stop=True, **kwargs):
93
93
  c_args = []
94
94
  args = list(args)
95
95
  for i, arg in enumerate(args):
@@ -149,6 +149,12 @@ def wrap(self, f, *args, **kwargs):
149
149
  res = f(*c_args)
150
150
  else:
151
151
  res = f(*c_args)
152
+ try:
153
+ self.check_stop()
154
+ except BaseException:
155
+ if check_stop:
156
+ raise
157
+
152
158
  ret_args = []
153
159
  for arg in args:
154
160
  c_arg = c_args.pop(0)
@@ -178,6 +184,18 @@ class DLLWrapper(object):
178
184
  in_use.append(os.path.abspath(self.filename))
179
185
  atexit.register(self.close)
180
186
 
187
+ def check_stop(self):
188
+ stop_code = 0
189
+ cstop_code = c_long_p(c_longlong(stop_code))
190
+ getattr(self.lib, 'get_stop_code')(cstop_code)
191
+ if cstop_code.contents.value:
192
+ stop_msg = (" " * 1024).encode('cp1252')
193
+ cstop_msg = c_char_p(stop_msg)
194
+ getattr(self.lib, 'get_stop_message')(cstop_msg)
195
+ stop_msg = cstop_msg.value.decode('cp1252').strip()
196
+ getattr(self.lib, 'reset_stop_code_and_message')()
197
+ raise Exception(stop_msg)
198
+
181
199
  @staticmethod
182
200
  def find_dll(path, name):
183
201
  p = Path(path)
h2lib/h2lib_signatures.py CHANGED
@@ -4,23 +4,24 @@ from h2lib.dll_wrapper import DLLWrapper
4
4
 
5
5
 
6
6
  class H2LibSignatures():
7
- def add_sensor(self, sensor_line, index_start, index_stop):
7
+ def add_sensor(self, sensor_line, index_start, index_stop, check_stop=True):
8
8
  '''subroutine add_sensor(sensor_line, index_start, index_stop) bind(C, name="add_sensor")
9
9
  integer*8 :: index_start, index_stop
10
10
  character(kind=c_char, len=1), intent(in) :: sensor_line(1024)
11
11
  end subroutine'''
12
- return self.get_lib_function('add_sensor')(sensor_line, index_start, index_stop)
12
+ return self.get_lib_function('add_sensor')(sensor_line, index_start, index_stop, check_stop=check_stop)
13
13
 
14
- def check_convergence(self, bconv, resq, resg, resd):
14
+ def check_convergence(self, bconv, resq, resg, resd, check_stop=True):
15
15
  '''subroutine check_convergence(bconv, resq, resg, resd) bind(C, name='check_convergence')
16
16
  logical(kind=c_bool), intent(out) :: bconv
17
17
  real(c_double), intent(out) :: resq
18
18
  real(c_double), intent(out) :: resg
19
19
  real(c_double), intent(out) :: resd
20
20
  end subroutine'''
21
- return self.get_lib_function('check_convergence')(bconv, resq, resg, resd)
21
+ return self.get_lib_function('check_convergence')(bconv, resq, resg, resd, check_stop=check_stop)
22
22
 
23
- def do_system_eigenanalysis(self, include_damping, n_modes, natural_frequencies, damping_ratios, error_code):
23
+ def do_system_eigenanalysis(self, include_damping, n_modes, natural_frequencies,
24
+ damping_ratios, error_code, check_stop=True):
24
25
  '''subroutine do_system_eigenanalysis(include_damping, n_modes, natural_frequencies, damping_ratios, error_code) &
25
26
  logical(kind=c_bool), intent(in) :: include_damping
26
27
  integer(kind=4), intent(in) :: n_modes
@@ -28,190 +29,192 @@ real(kind=c_double), dimension(n_modes), intent(out) :: natural_frequencies
28
29
  real(kind=c_double), dimension(n_modes), intent(out) :: damping_ratios
29
30
  integer(kind=8), intent(out) :: error_code
30
31
  end subroutine'''
31
- return self.get_lib_function('do_system_eigenanalysis')(include_damping, n_modes, natural_frequencies, damping_ratios, error_code)
32
+ return self.get_lib_function('do_system_eigenanalysis')(include_damping, n_modes,
33
+ natural_frequencies, damping_ratios, error_code, check_stop=check_stop)
32
34
 
33
- def echo_version(self, ):
35
+ def echo_version(self, check_stop=True):
34
36
  '''subroutine echo_version() BIND(C, NAME='echo_version')
35
37
  !DEC$ ATTRIBUTES DLLEXPORT :: echo_version
36
38
  !GCC$ ATTRIBUTES DLLEXPORT :: echo_version
37
39
  type (tbuildinfo) :: b
38
40
  end subroutine'''
39
- return self.get_lib_function('echo_version')()
41
+ return self.get_lib_function('echo_version')(check_stop=check_stop)
40
42
 
41
- def extern_write_log(self, c_msg, n, dll_name, error, warning):
43
+ def extern_write_log(self, c_msg, n, dll_name, error, warning, check_stop=True):
42
44
  '''subroutine extern_write_log(c_msg, n, dll_name, error, warning) bind(C, name="extern_write_log")
43
45
  integer, intent(in) :: n
44
46
  character(kind=c_char, len=1), intent(in) :: c_msg(n)
45
47
  character(kind=c_char), intent(in) :: dll_name(50)
46
48
  logical(kind=c_bool), intent(in), optional :: error, warning
47
- character(kind=c_char, len=1), intent(in) :: c_msg(n_msg)
48
- integer, intent(in) :: n_msg
49
- character(kind=c_char), intent(in) :: dll_name(50)
50
- character(len=50) :: n
51
- logical(kind=c_bool), intent(in), optional :: error, warning
49
+ character(kind=c_char, len=1), intent(in) :: c_msg(n_msg)
50
+ integer, intent(in) :: n_msg
51
+ character(kind=c_char), intent(in) :: dll_name(50)
52
+ character(len=50) :: n
53
+ logical(kind=c_bool), intent(in), optional :: error, warning
52
54
  end subroutine'''
53
- return self.get_lib_function('extern_write_log')(c_msg, n, dll_name, error, warning)
55
+ return self.get_lib_function('extern_write_log')(c_msg, n, dll_name, error, warning, check_stop=check_stop)
54
56
 
55
- def fail(self, str_arr): # pragma: no cover
57
+ def fail(self, str_arr, check_stop=True):
56
58
  '''subroutine fail(str_arr) bind(C, name='fail')
57
59
  character(kind=c_char, len=1), intent(inout) :: str_arr(255)
58
60
  end subroutine'''
59
- return self.get_lib_function('fail')(str_arr)
61
+ return self.get_lib_function('fail')(str_arr, check_stop=check_stop)
60
62
 
61
- def finalize(self, ):
63
+ def finalize(self, check_stop=True):
62
64
  '''SUBROUTINE finalize() bind(C, name="finalize")
63
65
  !DEC$ ATTRIBUTES DLLEXPORT :: finalize
64
66
  integer:: i
65
67
  real*4:: T2
66
68
  END SUBROUTINE'''
67
- return self.get_lib_function('finalize')()
69
+ return self.get_lib_function('finalize')(check_stop=check_stop)
68
70
 
69
- def getSquare(self, val, restype):
71
+ def getSquare(self, val, restype, check_stop=True):
70
72
  '''function getSquare(val) result(valSquared) BIND(C, NAME='getSquare')
71
73
  !DEC$ ATTRIBUTES DLLEXPORT :: getSquare
72
74
  real(RK), intent(in) :: val
73
75
  real(RK) :: valSquared
74
76
  end function'''
75
- return self.get_lib_function('getSquare')(val, restype=restype)
77
+ return self.get_lib_function('getSquare')(val, restype=restype, check_stop=check_stop)
76
78
 
77
- def getState(self, restype):
79
+ def getState(self, restype, check_stop=True):
78
80
  '''function getState() result(val) BIND(C, NAME='getState')
79
81
  !DEC$ ATTRIBUTES DLLEXPORT :: getState
80
82
  integer :: val
81
83
  end function'''
82
- return self.get_lib_function('getState')(restype=restype)
84
+ return self.get_lib_function('getState')(restype=restype, check_stop=check_stop)
83
85
 
84
- def get_aerosections_forces(self, rotor, Fxyz):
86
+ def get_aerosections_forces(self, rotor, Fxyz, check_stop=True):
85
87
  '''subroutine get_aerosections_forces(rotor, Fxyz) bind(C, name='get_aerosections_forces')
86
88
  integer*8, intent(in) :: rotor
87
89
  real(c_double),intent(out)::Fxyz(rotors_gl%rotor(rotor)%nbld, rotors_gl%rotor(rotor)%blade(1)%nsec, 3)
88
90
  end subroutine'''
89
- return self.get_lib_function('get_aerosections_forces')(rotor, Fxyz)
91
+ return self.get_lib_function('get_aerosections_forces')(rotor, Fxyz, check_stop=check_stop)
90
92
 
91
- def get_aerosections_moments(self, rotor, Mxyz):
93
+ def get_aerosections_moments(self, rotor, Mxyz, check_stop=True):
92
94
  '''subroutine get_aerosections_moments(rotor, Mxyz) bind(C, name='get_aerosections_moments')
93
95
  integer*8, intent(in) :: rotor
94
96
  real(c_double),intent(out):: Mxyz(rotors_gl%rotor(rotor)%nbld, rotors_gl%rotor(rotor)%blade(1)%nsec, 3)
95
97
  end subroutine'''
96
- return self.get_lib_function('get_aerosections_moments')(rotor, Mxyz)
98
+ return self.get_lib_function('get_aerosections_moments')(rotor, Mxyz, check_stop=check_stop)
97
99
 
98
- def get_aerosections_position(self, rotor, position):
100
+ def get_aerosections_position(self, rotor, position, check_stop=True):
99
101
  '''subroutine get_aerosections_position(rotor, position) bind(C, name="get_aerosections_position")
100
102
  integer*8, intent(in) :: rotor
101
103
  real(c_double),intent(out) :: position(rotors_gl%rotor(rotor)%nbld, rotors_gl%rotor(rotor)%blade(1)%nsec, 3)
102
104
  end subroutine'''
103
- return self.get_lib_function('get_aerosections_position')(rotor, position)
105
+ return self.get_lib_function('get_aerosections_position')(rotor, position, check_stop=check_stop)
104
106
 
105
- def get_bem_grid(self, rotor, azi, rad):
107
+ def get_bem_grid(self, rotor, azi, rad, check_stop=True):
106
108
  '''subroutine get_bem_grid(rotor, azi, rad) bind(C, name="get_bem_grid")
107
109
  integer*8, intent(in) :: rotor
108
110
  real(c_double), intent(out) :: azi(rotors_gl%rotor(rotor)%dyn_induc%bem%nazi)
109
111
  real(c_double), intent(out) :: rad(rotors_gl%rotor(rotor)%dyn_induc%bem%nrad)
110
112
  end subroutine'''
111
- return self.get_lib_function('get_bem_grid')(rotor, azi, rad)
113
+ return self.get_lib_function('get_bem_grid')(rotor, azi, rad, check_stop=check_stop)
112
114
 
113
- def get_bem_grid_dim(self, rotor, nazi, nrad):
115
+ def get_bem_grid_dim(self, rotor, nazi, nrad, check_stop=True):
114
116
  '''subroutine get_bem_grid_dim(rotor, nazi, nrad) bind(C, name="get_bem_grid_dim")
115
117
  integer*8, intent(in) :: rotor
116
118
  integer*8, intent(out) :: nazi, nrad
117
119
  end subroutine'''
118
- return self.get_lib_function('get_bem_grid_dim')(rotor, nazi, nrad)
120
+ return self.get_lib_function('get_bem_grid_dim')(rotor, nazi, nrad, check_stop=check_stop)
119
121
 
120
- def get_body_rotation_tensor(self, ibdy, amat, error_code):
122
+ def get_body_rotation_tensor(self, ibdy, amat, error_code, check_stop=True):
121
123
  '''subroutine get_body_rotation_tensor(ibdy, amat, error_code) &
122
124
  integer(kind=8), intent(in) :: ibdy
123
125
  real(kind=c_double), dimension(3, 3), intent(out) :: amat
124
126
  integer(kind=8), intent(out) :: error_code
125
127
  end subroutine'''
126
- return self.get_lib_function('get_body_rotation_tensor')(ibdy, amat, error_code)
128
+ return self.get_lib_function('get_body_rotation_tensor')(ibdy, amat, error_code, check_stop=check_stop)
127
129
 
128
- def get_diameter(self, rotor, restype):
130
+ def get_diameter(self, rotor, restype, check_stop=True):
129
131
  '''function get_diameter(rotor) bind(C, name="get_diameter")
130
132
  !DEC$ ATTRIBUTES DLLEXPORT :: get_diameter
131
133
  integer*8, intent(in) :: rotor
132
134
  Type (Taerorotor),pointer :: rotor_p
133
135
  real(c_double) :: get_diameter
134
136
  end function'''
135
- return self.get_lib_function('get_diameter')(rotor, restype=restype)
137
+ return self.get_lib_function('get_diameter')(rotor, restype=restype, check_stop=check_stop)
136
138
 
137
- def get_induction_axisymmetric(self, rotor, induction):
139
+ def get_induction_axisymmetric(self, rotor, induction, check_stop=True):
138
140
  '''subroutine get_induction_axisymmetric(rotor, induction) bind(C, name="get_induction_axisymmetric")
139
141
  integer*8, intent(in) :: rotor
140
142
  real(c_double),intent(out) :: induction(rotors_gl%rotor(rotor)%dyn_induc%bem%nrad)
141
143
  end subroutine'''
142
- return self.get_lib_function('get_induction_axisymmetric')(rotor, induction)
144
+ return self.get_lib_function('get_induction_axisymmetric')(rotor, induction, check_stop=check_stop)
143
145
 
144
- def get_induction_polargrid(self, rotor, induction):
146
+ def get_induction_polargrid(self, rotor, induction, check_stop=True):
145
147
  '''subroutine get_induction_polargrid(rotor, induction) bind(C, name="get_induction_polargrid")
146
148
  integer*8, intent(in) :: rotor
147
149
  real(c_double),intent(out) :: induction(rotors_gl%rotor(rotor)%dyn_induc%bem%nazi, rotors_gl%rotor(rotor)%dyn_induc%bem%nrad)
148
150
  end subroutine'''
149
- return self.get_lib_function('get_induction_polargrid')(rotor, induction)
151
+ return self.get_lib_function('get_induction_polargrid')(rotor, induction, check_stop=check_stop)
150
152
 
151
- def get_induction_rotoravg(self, rotor, induction):
153
+ def get_induction_rotoravg(self, rotor, induction, check_stop=True):
152
154
  '''subroutine get_induction_rotoravg(rotor, induction) bind(C, name="get_induction_rotoravg")
153
155
  !DEC$ ATTRIBUTES DLLEXPORT :: get_induction_rotoravg
154
156
  integer*8, intent(in) :: rotor
155
157
  real(c_double), intent(out) :: induction
156
158
  end subroutine'''
157
- return self.get_lib_function('get_induction_rotoravg')(rotor, induction)
159
+ return self.get_lib_function('get_induction_rotoravg')(rotor, induction, check_stop=check_stop)
158
160
 
159
- def get_nSections(self, rotor, blade, restype):
161
+ def get_nSections(self, rotor, blade, restype, check_stop=True):
160
162
  '''function get_nSections(rotor, blade) bind(C, name="get_nSections")
161
163
  !DEC$ ATTRIBUTES DLLEXPORT :: get_nSections
162
164
  integer*8, intent(in) :: rotor, blade
163
165
  integer*8 :: get_nSections
164
166
  end function'''
165
- return self.get_lib_function('get_nSections')(rotor, blade, restype=restype)
167
+ return self.get_lib_function('get_nSections')(rotor, blade, restype=restype, check_stop=check_stop)
166
168
 
167
- def get_nblades(self, rotor, restype):
169
+ def get_nblades(self, rotor, restype, check_stop=True):
168
170
  '''function get_nblades(rotor) bind(C, name="get_nblades")
169
171
  !DEC$ ATTRIBUTES DLLEXPORT :: get_nblades
170
172
  integer*8, intent(in) :: rotor
171
173
  integer*8 :: get_nblades
172
174
  end function'''
173
- return self.get_lib_function('get_nblades')(rotor, restype=restype)
175
+ return self.get_lib_function('get_nblades')(rotor, restype=restype, check_stop=check_stop)
174
176
 
175
- def get_nrotors(self, restype):
177
+ def get_nrotors(self, restype, check_stop=True):
176
178
  '''function get_nrotors() bind(C, name="get_nrotors")
177
179
  !DEC$ ATTRIBUTES DLLEXPORT :: get_nrotors
178
180
  integer*8 :: get_nrotors
179
181
  end function'''
180
- return self.get_lib_function('get_nrotors')(restype=restype)
182
+ return self.get_lib_function('get_nrotors')(restype=restype, check_stop=check_stop)
181
183
 
182
- def get_number_of_bodies_and_constraints(self, nbdy, ncst, error_code):
184
+ def get_number_of_bodies_and_constraints(self, nbdy, ncst, error_code, check_stop=True):
183
185
  '''subroutine get_number_of_bodies_and_constraints(nbdy, ncst, error_code) &
184
186
  integer(kind=8), intent(out) :: nbdy
185
187
  integer(kind=8), intent(out) :: ncst
186
188
  integer(kind=8), intent(out) :: error_code
187
189
  end subroutine'''
188
- return self.get_lib_function('get_number_of_bodies_and_constraints')(nbdy, ncst, error_code)
190
+ return self.get_lib_function('get_number_of_bodies_and_constraints')(
191
+ nbdy, ncst, error_code, check_stop=check_stop)
189
192
 
190
- def get_number_of_elements(self, nbdy, nelem, error_code):
193
+ def get_number_of_elements(self, nbdy, nelem, error_code, check_stop=True):
191
194
  '''subroutine get_number_of_elements(nbdy, nelem, error_code) &
192
195
  integer(kind=8), intent(in) :: nbdy
193
196
  integer(kind=8), dimension(nbdy), intent(out) :: nelem
194
197
  integer(kind=8), intent(out) :: error_code
195
198
  end subroutine'''
196
- return self.get_lib_function('get_number_of_elements')(nbdy, nelem, error_code)
199
+ return self.get_lib_function('get_number_of_elements')(nbdy, nelem, error_code, check_stop=check_stop)
197
200
 
198
- def get_rotor_avg_wsp(self, coo, rotor, wsp):
201
+ def get_rotor_avg_wsp(self, coo, rotor, wsp, check_stop=True):
199
202
  '''subroutine get_rotor_avg_wsp(coo, rotor, wsp) bind(C, name="get_rotor_avg_wsp")
200
203
  integer*8, intent(in) :: rotor
201
204
  integer*8, intent(in) :: coo ! 1: global, 2: rotor
202
205
  real(c_double), dimension(3):: wsp
203
206
  end subroutine'''
204
- return self.get_lib_function('get_rotor_avg_wsp')(coo, rotor, wsp)
207
+ return self.get_lib_function('get_rotor_avg_wsp')(coo, rotor, wsp, check_stop=check_stop)
205
208
 
206
- def get_rotor_orientation(self, rotor, yaw, tilt, azi):
209
+ def get_rotor_orientation(self, rotor, yaw, tilt, azi, check_stop=True):
207
210
  '''subroutine get_rotor_orientation(rotor, yaw, tilt, azi) bind(C, name="get_rotor_orientation")
208
211
  !DEC$ ATTRIBUTES DLLEXPORT :: get_rotor_orientation
209
212
  integer*8, intent(in) :: rotor
210
213
  real(c_double), intent(out) :: yaw, tilt, azi
211
214
  end subroutine'''
212
- return self.get_lib_function('get_rotor_orientation')(rotor, yaw, tilt, azi)
215
+ return self.get_lib_function('get_rotor_orientation')(rotor, yaw, tilt, azi, check_stop=check_stop)
213
216
 
214
- def get_rotor_position(self, rotor, position):
217
+ def get_rotor_position(self, rotor, position, check_stop=True):
215
218
  '''subroutine get_rotor_position(rotor, position) bind(C, name="get_rotor_position")
216
219
  !DEC$ ATTRIBUTES DLLEXPORT :: get_rotor_position
217
220
  integer*8, intent(in) :: rotor
@@ -220,24 +223,38 @@ end subroutine'''
220
223
  integer*8, intent(in) :: rotor
221
224
  integer*8, intent(in) :: coo ! 1: global, 2: rotor
222
225
  end subroutine'''
223
- return self.get_lib_function('get_rotor_position')(rotor, position)
226
+ return self.get_lib_function('get_rotor_position')(rotor, position, check_stop=check_stop)
224
227
 
225
- def get_sensor_info(self, id, name, unit, desc):
228
+ def get_sensor_info(self, id, name, unit, desc, check_stop=True):
226
229
  '''subroutine get_sensor_info(id, name, unit, desc) bind(C, name="get_sensor_info")
227
230
  integer*8, intent(in) :: id
228
231
  character(kind=c_char, len=1), intent(out) :: name(30), unit(10), desc(512)
229
232
  end subroutine'''
230
- return self.get_lib_function('get_sensor_info')(id, name, unit, desc)
233
+ return self.get_lib_function('get_sensor_info')(id, name, unit, desc, check_stop=check_stop)
231
234
 
232
- def get_sensor_values(self, ids, values, n):
235
+ def get_sensor_values(self, ids, values, n, check_stop=True):
233
236
  '''subroutine get_sensor_values(ids, values, n) bind(C, name="get_sensor_values")
234
237
  integer*8, intent(in) :: n
235
238
  integer*8, intent(in) :: ids(n)
236
239
  real(c_double), intent(out) :: values(n)
237
240
  end subroutine'''
238
- return self.get_lib_function('get_sensor_values')(ids, values, n)
241
+ return self.get_lib_function('get_sensor_values')(ids, values, n, check_stop=check_stop)
239
242
 
240
- def get_system_eigval_eigvec_with_damping(self, n_modes, ny, eigenvalues, eigenvectors, error_code):
243
+ def get_stop_code(self, stop_code_, check_stop=True):
244
+ '''subroutine get_stop_code(stop_code_) bind(C, name="get_stop_code")
245
+ integer*8, intent(out) :: stop_code_
246
+ end subroutine'''
247
+ return self.get_lib_function('get_stop_code')(stop_code_, check_stop=check_stop)
248
+
249
+ def get_stop_message(self, stop_message, check_stop=True):
250
+ '''subroutine get_stop_message(stop_message) bind(C, name="get_stop_message")
251
+ !DEC$ ATTRIBUTES DLLEXPORT :: get_stop_message
252
+ character(kind=c_char, len=1), intent(inout) :: stop_message(1024)
253
+ end subroutine'''
254
+ return self.get_lib_function('get_stop_message')(stop_message, check_stop=check_stop)
255
+
256
+ def get_system_eigval_eigvec_with_damping(self, n_modes, ny, eigenvalues,
257
+ eigenvectors, error_code, check_stop=True):
241
258
  '''subroutine get_system_eigval_eigvec_with_damping(n_modes, ny, eigenvalues, eigenvectors, error_code) &
242
259
  integer(kind=4), intent(in) :: n_modes
243
260
  integer(kind=4), intent(in) :: ny
@@ -245,9 +262,11 @@ complex(kind=c_double_complex), dimension(n_modes), intent(out) :: eigenvalues
245
262
  complex(kind=c_double_complex), dimension(ny, n_modes), intent(out) :: eigenvectors
246
263
  integer(kind=8), intent(out) :: error_code
247
264
  end subroutine'''
248
- return self.get_lib_function('get_system_eigval_eigvec_with_damping')(n_modes, ny, eigenvalues, eigenvectors, error_code)
265
+ return self.get_lib_function('get_system_eigval_eigvec_with_damping')(
266
+ n_modes, ny, eigenvalues, eigenvectors, error_code, check_stop=check_stop)
249
267
 
250
- def get_system_eigval_eigvec_without_damping(self, n_modes, ny, eigenvalues, eigenvectors, error_code):
268
+ def get_system_eigval_eigvec_without_damping(
269
+ self, n_modes, ny, eigenvalues, eigenvectors, error_code, check_stop=True):
251
270
  '''subroutine get_system_eigval_eigvec_without_damping(n_modes, ny, eigenvalues, eigenvectors, error_code) &
252
271
  integer(kind=4), intent(in) :: n_modes
253
272
  integer(kind=4), intent(in) :: ny
@@ -255,9 +274,10 @@ real(kind=c_double), dimension(n_modes), intent(out) :: eigenvalues
255
274
  real(kind=c_double), dimension(ny, n_modes), intent(out) :: eigenvectors
256
275
  integer(kind=8), intent(out) :: error_code
257
276
  end subroutine'''
258
- return self.get_lib_function('get_system_eigval_eigvec_without_damping')(n_modes, ny, eigenvalues, eigenvectors, error_code)
277
+ return self.get_lib_function('get_system_eigval_eigvec_without_damping')(
278
+ n_modes, ny, eigenvalues, eigenvectors, error_code, check_stop=check_stop)
259
279
 
260
- def get_system_matrices(self, n_tdofs, n_rdofs, M, C, K, R, error_code):
280
+ def get_system_matrices(self, n_tdofs, n_rdofs, M, C, K, R, error_code, check_stop=True):
261
281
  '''subroutine get_system_matrices(n_tdofs, n_rdofs, M, C, K, R, error_code) &
262
282
  integer(kind=4), intent(in) :: n_tdofs
263
283
  integer(kind=4), intent(in) :: n_rdofs
@@ -267,14 +287,15 @@ real(kind=c_double), dimension(n_rdofs, n_rdofs), intent(out) :: K
267
287
  real(kind=c_double), dimension(n_tdofs, n_rdofs), intent(out) :: R
268
288
  integer(kind=8), intent(out) :: error_code
269
289
  end subroutine'''
270
- return self.get_lib_function('get_system_matrices')(n_tdofs, n_rdofs, M, C, K, R, error_code)
290
+ return self.get_lib_function('get_system_matrices')(
291
+ n_tdofs, n_rdofs, M, C, K, R, error_code, check_stop=check_stop)
271
292
 
272
- def get_time(self, time):
293
+ def get_time(self, time, check_stop=True):
273
294
  '''subroutine
274
295
  subroutine'''
275
- return self.get_lib_function('get_time')(time)
296
+ return self.get_lib_function('get_time')(time, check_stop=check_stop)
276
297
 
277
- def get_timoshenko_location(self, ibdy, ielem, l, r1, r12, tes, error_code):
298
+ def get_timoshenko_location(self, ibdy, ielem, l, r1, r12, tes, error_code, check_stop=True):
278
299
  '''subroutine get_timoshenko_location(ibdy, ielem, l, r1, r12, tes, error_code) &
279
300
  integer(kind=8), intent(in) :: ibdy
280
301
  integer(kind=8), intent(in) :: ielem
@@ -284,104 +305,112 @@ subroutine'''
284
305
  real(kind=c_double), dimension(3,3), intent(out) :: tes
285
306
  integer(kind=8), intent(out) :: error_code
286
307
  end subroutine'''
287
- return self.get_lib_function('get_timoshenko_location')(ibdy, ielem, l, r1, r12, tes, error_code)
308
+ return self.get_lib_function('get_timoshenko_location')(
309
+ ibdy, ielem, l, r1, r12, tes, error_code, check_stop=check_stop)
288
310
 
289
- def get_version(self, s):
311
+ def get_version(self, s, check_stop=True):
290
312
  '''subroutine get_version(s) BIND(C, NAME='get_version')
291
313
  character(kind=c_char, len=1), intent(inout) :: s(255)
292
314
  end subroutine'''
293
- return self.get_lib_function('get_version')(s)
315
+ return self.get_lib_function('get_version')(s, check_stop=check_stop)
294
316
 
295
- def init(self, ):
317
+ def init(self, check_stop=True):
296
318
  '''subroutine init() bind(C, name="init")
297
319
  !DEC$ ATTRIBUTES DLLEXPORT :: init
298
320
  end subroutine'''
299
- return self.get_lib_function('init')()
321
+ return self.get_lib_function('init')(check_stop=check_stop)
300
322
 
301
- def init_ad(self, rotor, tiploss_method, tiploss_shen_c2):
302
- '''subroutine init_ad(rotor, tiploss_method, tiploss_shen_c2) bind(C, name="init_ad")
323
+ def init_AD(self, rotor, tiploss_method, tiploss_shen_c2):
324
+ '''subroutine init_AD(rotor, tiploss_method, tiploss_shen_c2) bind(C, name="init_AD")
303
325
  integer*8, intent(in) :: rotor
304
326
  integer*8, intent(in) :: tiploss_method
305
327
  REAL(c_double), intent(in) :: tiploss_shen_c2
306
328
  end subroutine'''
307
- return self.get_lib_function('init_ad')(rotor, tiploss_method, tiploss_shen_c2)
329
+ return self.get_lib_function('init_AD')(rotor, tiploss_method, tiploss_shen_c2)
308
330
 
309
- def init_al(self, rotor, epsilon_smearing):
310
- '''subroutine init_al(rotor, epsilon_smearing) bind(C, name="init_al")
331
+ def init_AL(self, rotor, epsilon_smearing):
332
+ '''subroutine init_AL(rotor, epsilon_smearing) bind(C, name="init_AL")
311
333
  real(c_double), intent(in) :: epsilon_smearing
312
334
  integer*8, intent(in) :: rotor
313
335
  end subroutine'''
314
- return self.get_lib_function('init_al')(rotor, epsilon_smearing)
336
+ return self.get_lib_function('init_AL')(rotor, epsilon_smearing)
315
337
 
316
338
  def init_windfield(self, Nxyz, dxyz, box_offset_yz, transport_speed):
317
339
  '''subroutine init_windfield(Nxyz, dxyz, box_offset_yz, transport_speed) bind(C, name="init_windfield")
318
340
  integer*8, dimension(3), intent(in) :: Nxyz
319
341
  real*8 :: transport_speed
320
342
  end subroutine'''
321
- return self.get_lib_function('init_windfield')(Nxyz, dxyz, box_offset_yz, transport_speed)
343
+ return self.get_lib_function('init_windfield')(
344
+ Nxyz, dxyz, box_offset_yz, transport_speed)
322
345
 
323
- def linearize(self, n_tdofs, n_rdofs):
346
+ def linearize(self, n_tdofs, n_rdofs, check_stop=True):
324
347
  '''subroutine linearize(n_tdofs, n_rdofs) bind(C, name="linearize")
325
348
  integer(kind=8), intent(out) :: n_tdofs
326
349
  integer(kind=8), intent(out) :: n_rdofs
327
350
  end subroutine'''
328
- return self.get_lib_function('linearize')(n_tdofs, n_rdofs)
351
+ return self.get_lib_function('linearize')(n_tdofs, n_rdofs, check_stop=check_stop)
329
352
 
330
- def loop(self, N, restype):
353
+ def loop(self, N, restype, check_stop=True):
331
354
  '''function loop(N) bind(C, Name='loop')
332
355
  !DEC$ ATTRIBUTES DLLEXPORT :: loop
333
356
  integer*8, intent(in) :: N
334
357
  real(c_double) :: loop,a
335
358
  integer*8 :: i, j
336
359
  end function'''
337
- return self.get_lib_function('loop')(N, restype=restype)
360
+ return self.get_lib_function('loop')(N, restype=restype, check_stop=check_stop)
338
361
 
339
- def myfunction(self, int, dbl, restype):
362
+ def myfunction(self, int, dbl, restype, check_stop=True):
340
363
  '''function myfunction(int, dbl) bind(C, name='myfunction')
341
364
  !DEC$ ATTRIBUTES DLLEXPORT :: myfunction
342
365
  integer*8, intent(in) :: int
343
366
  real(c_double), intent(in) :: dbl
344
367
  real(c_double) :: myfunction
345
368
  end function'''
346
- return self.get_lib_function('myfunction')(int, dbl, restype=restype)
369
+ return self.get_lib_function('myfunction')(int, dbl, restype=restype, check_stop=check_stop)
347
370
 
348
- def mysubroutine(self, str_arr, dbl_arr):
371
+ def mysubroutine(self, str_arr, dbl_arr, check_stop=True):
349
372
  '''subroutine mysubroutine(str_arr, dbl_arr) bind(C, name='mysubroutine')
350
373
  character(kind=c_char, len=1), intent(inout) :: str_arr(20)
351
374
  real(c_double), intent(inout), dimension(2) :: dbl_arr
352
375
  end subroutine'''
353
- return self.get_lib_function('mysubroutine')(str_arr, dbl_arr)
376
+ return self.get_lib_function('mysubroutine')(str_arr, dbl_arr, check_stop=check_stop)
354
377
 
355
- def read_input(self, htc_path):
378
+ def read_input(self, htc_path, check_stop=True):
356
379
  '''subroutine read_input(htc_path) bind(C, name="read_input")
357
380
  character(kind=c_char, len=1), intent(in) :: htc_path(1024)
358
381
  end subroutine'''
359
- return self.get_lib_function('read_input')(htc_path)
382
+ return self.get_lib_function('read_input')(htc_path, check_stop=check_stop)
360
383
 
361
- def run(self, time, restype):
384
+ def run(self, time, restype, check_stop=True):
362
385
  '''function run(time) bind(C, name='run')
363
386
  !DEC$ ATTRIBUTES DLLEXPORT :: run
364
387
  real(c_double), intent(in) :: time
365
388
  real(c_double) :: run, eps
366
389
  end function'''
367
- return self.get_lib_function('run')(time, restype=restype)
390
+ return self.get_lib_function('run')(time, restype=restype, check_stop=check_stop)
368
391
 
369
- def setState(self, val):
392
+ def reset_stop_code_and_message(self, check_stop=True):
393
+ '''subroutine reset_stop_code_and_message() bind(C, name="reset_stop_code_and_message")
394
+ !DEC$ ATTRIBUTES DLLEXPORT :: reset_stop_code_and_message
395
+ end subroutine'''
396
+ return self.get_lib_function('reset_stop_code_and_message')(check_stop=check_stop)
397
+
398
+ def setState(self, val, check_stop=True):
370
399
  '''subroutine setState(val) BIND(C, NAME='setState')
371
400
  integer, intent(in) :: val
372
401
  end subroutine'''
373
- return self.get_lib_function('setState')(val)
402
+ return self.get_lib_function('setState')(val, check_stop=check_stop)
374
403
 
375
- def set_aerosections_windspeed(self, rotor, uvw):
404
+ def set_aerosections_windspeed(self, rotor, uvw, check_stop=True):
376
405
  '''subroutine set_aerosections_windspeed(rotor, uvw) bind(C, name="set_aerosections_windspeed")
377
406
  integer*8, intent(in) :: rotor
378
407
  real(c_double),intent(in) :: uvw(rotors_gl%rotor(rotor)%nbld, rotors_gl%rotor(rotor)%blade(1)%nsec, 3)
379
408
  end subroutine'''
380
- return self.get_lib_function('set_aerosections_windspeed')(rotor, uvw)
409
+ return self.get_lib_function('set_aerosections_windspeed')(rotor, uvw, check_stop=check_stop)
381
410
 
382
411
  def set_orientation_base(self, main_body_name,
383
412
  n_rows, mbdy_eulerang_table, angles_in_deg, reset_orientation, mbdy_ini_rotvec_d1,
384
- error_code):
413
+ error_code, check_stop=True):
385
414
  '''subroutine set_orientation_base(main_body_name, &
386
415
  character(kind=c_char, len=1), dimension(256), intent(in) :: main_body_name
387
416
  real(kind=c_double), dimension(n_rows, 3), intent(in) :: mbdy_eulerang_table
@@ -391,13 +420,13 @@ real(kind=c_double), dimension(4), intent(in) :: mbdy_ini_rotvec_d1
391
420
  end subroutine'''
392
421
  return self.get_lib_function('set_orientation_base')(main_body_name,
393
422
  n_rows, mbdy_eulerang_table, angles_in_deg, reset_orientation, mbdy_ini_rotvec_d1,
394
- error_code)
423
+ error_code, check_stop=check_stop)
395
424
 
396
425
  def set_orientation_relative(self, main_body_1_name, node_1, main_body_2_name, node_2,
397
426
  n_rows, mbdy2_eulerang_table, angles_in_deg,
398
427
  reset_orientation,
399
428
  mbdy2_ini_rotvec_d1,
400
- error_code):
429
+ error_code, check_stop=True):
401
430
  '''subroutine set_orientation_relative(main_body_1_name, node_1, main_body_2_name, node_2, &
402
431
  character(kind=c_char, len=1), dimension(256), intent(in ) :: main_body_1_name ! Defined as an array of length 1 characters because of bind.
403
432
  character(kind=c_char, len=1), dimension(256), intent(in ) :: main_body_2_name ! Defined as an array of length 1 characters because of bind.
@@ -416,80 +445,80 @@ end subroutine'''
416
445
  n_rows, mbdy2_eulerang_table, angles_in_deg,
417
446
  reset_orientation,
418
447
  mbdy2_ini_rotvec_d1,
419
- error_code)
448
+ error_code, check_stop=check_stop)
420
449
 
421
- def set_variable_sensor_value(self, id, value):
450
+ def set_variable_sensor_value(self, id, value, check_stop=True):
422
451
  '''subroutine set_variable_sensor_value(id, value) bind(C, name="set_variable_sensor_value")
423
452
  integer*8, intent(in) :: id
424
453
  real(c_double) :: value
425
454
  end subroutine'''
426
- return self.get_lib_function('set_variable_sensor_value')(id, value)
455
+ return self.get_lib_function('set_variable_sensor_value')(id, value, check_stop=check_stop)
427
456
 
428
- def set_windfield(self, uvw, box_offset_x, time):
457
+ def set_windfield(self, uvw, box_offset_x, time, check_stop=True):
429
458
  '''subroutine set_windfield(uvw, box_offset_x, time) bind(C, name="set_windfield")
430
459
  real*4, intent(in) :: uvw(3, gwsd%TMOD%buffer_points_x,gwsd%TMOD%buffer_points_y,gwsd%TMOD%buffer_points_z)
431
460
  real*8, intent(in):: box_offset_x, time
432
461
  end subroutine'''
433
- return self.get_lib_function('set_windfield')(uvw, box_offset_x, time)
462
+ return self.get_lib_function('set_windfield')(uvw, box_offset_x, time, check_stop=check_stop)
434
463
 
435
- def solver_static_delete(self, ):
464
+ def solver_static_delete(self, check_stop=True):
436
465
  '''subroutine solver_static_delete() &
437
466
  !DEC$ ATTRIBUTES DLLEXPORT :: solver_static_delete
438
467
  end subroutine'''
439
- return self.get_lib_function('solver_static_delete')()
468
+ return self.get_lib_function('solver_static_delete')(check_stop=check_stop)
440
469
 
441
- def solver_static_init(self, ):
470
+ def solver_static_init(self, check_stop=True):
442
471
  '''subroutine solver_static_init() &
443
472
  !DEC$ ATTRIBUTES DLLEXPORT :: solver_static_init
444
473
  end subroutine'''
445
- return self.get_lib_function('solver_static_init')()
474
+ return self.get_lib_function('solver_static_init')(check_stop=check_stop)
446
475
 
447
- def solver_static_run(self, reset_structure, error_code):
476
+ def solver_static_run(self, reset_structure, error_code, check_stop=True):
448
477
  '''subroutine solver_static_run(reset_structure, error_code) bind(C, name="solver_static_run")
449
478
  logical(c_bool), intent(in) :: reset_structure
450
479
  integer(8), intent(out) :: error_code
451
480
  end subroutine'''
452
- return self.get_lib_function('solver_static_run')(reset_structure, error_code)
481
+ return self.get_lib_function('solver_static_run')(reset_structure, error_code, check_stop=check_stop)
453
482
 
454
- def solver_static_solve(self, error_code):
483
+ def solver_static_solve(self, error_code, check_stop=True):
455
484
  '''subroutine solver_static_solve(error_code) &
456
485
  integer*8, intent(out) :: error_code
457
486
  end subroutine'''
458
- return self.get_lib_function('solver_static_solve')(error_code)
487
+ return self.get_lib_function('solver_static_solve')(error_code, check_stop=check_stop)
459
488
 
460
- def solver_static_update(self, error_code):
489
+ def solver_static_update(self, error_code, check_stop=True):
461
490
  '''subroutine solver_static_update(error_code) &
462
491
  integer*8, intent(out) :: error_code
463
492
  end subroutine'''
464
- return self.get_lib_function('solver_static_update')(error_code)
493
+ return self.get_lib_function('solver_static_update')(error_code, check_stop=check_stop)
465
494
 
466
- def sqr2(self, val):
495
+ def sqr2(self, val, check_stop=True):
467
496
  '''subroutine sqr2(val) BIND(C, NAME='sqr2')
468
497
  integer, intent(inout) :: val
469
498
  end subroutine'''
470
- return self.get_lib_function('sqr2')(val)
499
+ return self.get_lib_function('sqr2')(val, check_stop=check_stop)
471
500
 
472
- def step(self, restype):
501
+ def step(self, restype, check_stop=True):
473
502
  '''function step() bind(C, name='step')
474
503
  !DEC$ ATTRIBUTES DLLEXPORT :: step
475
504
  real(c_double) :: step
476
505
  end function'''
477
- return self.get_lib_function('step')(restype=restype)
506
+ return self.get_lib_function('step')(restype=restype, check_stop=check_stop)
478
507
 
479
- def stop_on_error(self, flag):
508
+ def stop_on_error(self, flag, check_stop=True):
480
509
  '''subroutine stop_on_error(flag) bind(C, name="stop_on_error")
481
- logical(c_bool), intent(in) :: flag
482
- end subroutine'''
483
- return self.get_lib_function('stop_on_error')(flag)
510
+ logical(c_bool), intent(in) :: flag
511
+ end subroutine'''
512
+ return self.get_lib_function('stop_on_error')(flag, check_stop=check_stop)
484
513
 
485
- def structure_reset(self, ):
514
+ def structure_reset(self, check_stop=True):
486
515
  '''subroutine structure_reset() bind(C, name="structure_reset")
487
516
  !DEC$ ATTRIBUTES DLLEXPORT :: structure_reset
488
517
  integer*4 :: i, j
489
518
  end subroutine'''
490
- return self.get_lib_function('structure_reset')()
519
+ return self.get_lib_function('structure_reset')(check_stop=check_stop)
491
520
 
492
- def test_hdf5(self, ):
521
+ def test_hdf5(self, check_stop=True):
493
522
  '''subroutine test_hdf5() BIND(C, NAME='test_hdf5')
494
523
  !DEC$ ATTRIBUTES DLLEXPORT :: test_hdf5
495
524
  INTEGER :: hdferr ! Error flag
@@ -498,22 +527,22 @@ end subroutine'''
498
527
  INTEGER(HID_T) :: H5_Create_file,H5_Open_file ! File identifier
499
528
  type(c_ptr) :: x
500
529
  end subroutine'''
501
- return self.get_lib_function('test_hdf5')()
530
+ return self.get_lib_function('test_hdf5')(check_stop=check_stop)
502
531
 
503
- def work(self, time, restype):
532
+ def work(self, time, restype, check_stop=True):
504
533
  '''function work(time) bind(C, Name='work')
505
534
  !DEC$ ATTRIBUTES DLLEXPORT :: work
506
535
  real(c_double), intent(in) :: time
507
536
  real*4 :: start_time, t
508
537
  integer*8 :: N, work
509
538
  end function'''
510
- return self.get_lib_function('work')(time, restype=restype)
539
+ return self.get_lib_function('work')(time, restype=restype, check_stop=check_stop)
511
540
 
512
- def write_output(self, ):
541
+ def write_output(self, check_stop=True):
513
542
  '''subroutine write_output() bind(C, name="write_output")
514
543
  !DEC$ ATTRIBUTES DLLEXPORT :: write_output
515
544
  integer :: nr, dummy=1
516
545
  character*10 :: status = 'close'
517
546
  Type (Toutvar) :: ov_dummy
518
547
  end subroutine'''
519
- return self.get_lib_function('write_output')()
548
+ return self.get_lib_function('write_output')(check_stop=check_stop)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: h2lib
3
- Version: 13.1.3102
3
+ Version: 13.1.3104
4
4
  Summary: Python interface to HAWC2 (13.1.31+5-g08eea40)
5
5
  Download-URL:
6
6
  Author: Mads M. Pedersen, S.G.Horcas and N.G.Ramos
@@ -0,0 +1,10 @@
1
+ h2lib/HAWC2Lib.dll,sha256=1HQJ7Jn40dhSWCNHeq78C4LNuxVc1rlz6pf2yQGLYHQ,30970368
2
+ h2lib/__init__.py,sha256=f3fO4I6IEFRM9LaV2O3w9Pioj3GPI8qRl7P5Tg5ONtE,528
3
+ h2lib/_h2lib.py,sha256=EOxtjXytUpbQrDxTNORgZlVcZe2msKWwUXtDUGTHycs,39486
4
+ h2lib/_version.py,sha256=dbkABBlFAGNnwwxpt0869wfydggDTtK4z_TTT0ehb-k,160
5
+ h2lib/dll_wrapper.py,sha256=NtH3wVJ4okYLBXjdRxpllnImRDE7p692OgHuwHkt-WQ,13552
6
+ h2lib/h2lib_signatures.py,sha256=sPCh92WdCc6brPgARZ_QBgSz49Yjq0M5SpWb0or5KvM,29396
7
+ h2lib-13.1.3104.dist-info/METADATA,sha256=wJBHMoVp2lnjhJlWw3kEIQ7n2TFKkjujN8eNZ-fW9Iw,862
8
+ h2lib-13.1.3104.dist-info/WHEEL,sha256=YvQgr19VPpDKcQ70xCXIWyDmGnURmFmzZpp_Uw5rBS8,101
9
+ h2lib-13.1.3104.dist-info/top_level.txt,sha256=y_a-tUqphEZQ_0nsWSMaSb21P8Lsd8hUxUdE9g2Dcbk,6
10
+ h2lib-13.1.3104.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (79.0.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp312-cp312-win_amd64
5
5
 
@@ -1,10 +0,0 @@
1
- h2lib/HAWC2Lib.dll,sha256=s-0vzTnTAkCPi7q8sNsyjB8v8PfackauKFF40WIJFvU,30970368
2
- h2lib/__init__.py,sha256=f3fO4I6IEFRM9LaV2O3w9Pioj3GPI8qRl7P5Tg5ONtE,528
3
- h2lib/_h2lib.py,sha256=Sf-lc-moYGXqhZCH7DnwtMHR1revPN_uTYwDVP4Tl-E,39366
4
- h2lib/_version.py,sha256=N9-xsR1zGb_HwvbhBXPpD4OJx0CzxYKb0iB_gU-SF5Q,160
5
- h2lib/dll_wrapper.py,sha256=ZkcHog6jdVvzRNbVFza0atmMDTlbErf-42IqYITdVRE,12897
6
- h2lib/h2lib_signatures.py,sha256=IbehcM2ajdjhKN6JMEHnPpo-agFtimfDF2XXcSfs4ZE,25790
7
- h2lib-13.1.3102.dist-info/METADATA,sha256=Fb4r8r1oY3QJepfIQcELyTda4JtzNN6vB21_ScvbQUI,862
8
- h2lib-13.1.3102.dist-info/WHEEL,sha256=ovhA9_Ei_7ok2fAych90j-feDV4goiAxbO7REePtvw0,101
9
- h2lib-13.1.3102.dist-info/top_level.txt,sha256=y_a-tUqphEZQ_0nsWSMaSb21P8Lsd8hUxUdE9g2Dcbk,6
10
- h2lib-13.1.3102.dist-info/RECORD,,