h2lib 13.1.505__py3-none-win_amd64.whl → 13.1.506__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 +0 -0
- h2lib/_h2lib.py +85 -20
- h2lib/_version.py +3 -3
- h2lib/h2lib_signatures.py +35 -7
- {h2lib-13.1.505.dist-info → h2lib-13.1.506.dist-info}/METADATA +2 -2
- h2lib-13.1.506.dist-info/RECORD +10 -0
- h2lib-13.1.505.dist-info/RECORD +0 -10
- {h2lib-13.1.505.dist-info → h2lib-13.1.506.dist-info}/WHEEL +0 -0
- {h2lib-13.1.505.dist-info → h2lib-13.1.506.dist-info}/top_level.txt +0 -0
h2lib/HAWC2Lib.dll
CHANGED
Binary file
|
h2lib/_h2lib.py
CHANGED
@@ -98,6 +98,91 @@ class H2LibThread(H2LibSignatures, DLLWrapper):
|
|
98
98
|
self.time = np.round(H2LibSignatures.run(self, np.float64(time), restype=np.float64)[1], 6)
|
99
99
|
return self.time
|
100
100
|
|
101
|
+
def solver_static_init(self):
|
102
|
+
"""
|
103
|
+
Initialize the static solver.
|
104
|
+
|
105
|
+
Returns
|
106
|
+
-------
|
107
|
+
None.
|
108
|
+
|
109
|
+
"""
|
110
|
+
H2LibSignatures.solver_static_init(self)
|
111
|
+
|
112
|
+
def solver_static_update(self):
|
113
|
+
"""
|
114
|
+
Update the static solver.
|
115
|
+
|
116
|
+
Raises
|
117
|
+
------
|
118
|
+
RuntimeError
|
119
|
+
If the static solver has not been initialized. Call `solver_static_init()` first.
|
120
|
+
|
121
|
+
Returns
|
122
|
+
-------
|
123
|
+
None.
|
124
|
+
|
125
|
+
"""
|
126
|
+
error_code = -1
|
127
|
+
error_code = H2LibSignatures.solver_static_update(self, error_code)[0][0]
|
128
|
+
if error_code > 0:
|
129
|
+
if error_code == 101:
|
130
|
+
raise RuntimeError("STATIC_SOLVER_NOT_INITIALIZED")
|
131
|
+
raise RuntimeError(error_code) # pragma: no cover
|
132
|
+
|
133
|
+
def solver_static_solve(self):
|
134
|
+
"""
|
135
|
+
Compute the static solution.
|
136
|
+
|
137
|
+
Raises
|
138
|
+
------
|
139
|
+
RuntimeError
|
140
|
+
If the static solver has not been initialized. Call `solver_static_init()` first.
|
141
|
+
|
142
|
+
Returns
|
143
|
+
-------
|
144
|
+
None.
|
145
|
+
|
146
|
+
"""
|
147
|
+
error_code = -1
|
148
|
+
error_code = H2LibSignatures.solver_static_solve(self, error_code)[0][0]
|
149
|
+
if error_code > 0:
|
150
|
+
if error_code == 101:
|
151
|
+
raise RuntimeError("STATIC_SOLVER_NOT_INITIALIZED")
|
152
|
+
raise RuntimeError(error_code) # pragma: no cover
|
153
|
+
|
154
|
+
def solver_static_delete(self):
|
155
|
+
"""
|
156
|
+
Delete the static solver.
|
157
|
+
|
158
|
+
Returns
|
159
|
+
-------
|
160
|
+
None.
|
161
|
+
|
162
|
+
"""
|
163
|
+
H2LibSignatures.solver_static_delete(self)
|
164
|
+
|
165
|
+
def solver_static_run(self):
|
166
|
+
"""
|
167
|
+
Run the complete static solver algorithm.
|
168
|
+
|
169
|
+
Raises
|
170
|
+
------
|
171
|
+
RuntimeError
|
172
|
+
If the static solver has not converged.
|
173
|
+
|
174
|
+
Returns
|
175
|
+
-------
|
176
|
+
None.
|
177
|
+
|
178
|
+
"""
|
179
|
+
error_code = -1
|
180
|
+
error_code = H2LibSignatures.solver_static_run(self, error_code)[0][0]
|
181
|
+
if error_code > 0:
|
182
|
+
if error_code == 100:
|
183
|
+
raise RuntimeError("STATIC_SOLVER_DID_NOT_CONVERGE")
|
184
|
+
raise RuntimeError(error_code) # pragma: no cover
|
185
|
+
|
101
186
|
def add_sensor(self, sensor_line):
|
102
187
|
"""Add sensor to hawc2. The sensor will be accessible from h2lib but will not show up in the output file of HAWC2
|
103
188
|
Note, that some sensors consist of multiple HAWC2 sensors, e.g. "wind free_wind" which has a Vx, Vy and Vz sensors
|
@@ -302,26 +387,6 @@ class H2LibThread(H2LibSignatures, DLLWrapper):
|
|
302
387
|
vx, vy, vz = self.get_rotor_avg_wsp(1, rotor)
|
303
388
|
return [vy, vx, -vz]
|
304
389
|
|
305
|
-
def init_static_solver(self):
|
306
|
-
"""
|
307
|
-
Initialize the static solver.
|
308
|
-
|
309
|
-
Raises
|
310
|
-
------
|
311
|
-
RuntimeError
|
312
|
-
If the static solver has already been initialized.
|
313
|
-
|
314
|
-
Returns
|
315
|
-
-------
|
316
|
-
None.
|
317
|
-
|
318
|
-
"""
|
319
|
-
error_code = H2LibSignatures.init_static_solver(self, restype=np.int64)[1]
|
320
|
-
if error_code > 0:
|
321
|
-
if error_code == 102:
|
322
|
-
raise RuntimeError("STATIC_SOLVER_ALREADY_INITIALIZED")
|
323
|
-
raise RuntimeError(error_code) # pragma: no cover
|
324
|
-
|
325
390
|
def get_number_of_bodies_and_constraints(self):
|
326
391
|
"""
|
327
392
|
Get number of bodies and constraints.
|
h2lib/_version.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
# This file is autogenerated and should not be modified manually
|
2
|
-
__version__ = '13.1.
|
3
|
-
h2lib_version = '13.1.
|
4
|
-
hawc2_version = '13.1.
|
2
|
+
__version__ = '13.1.506'
|
3
|
+
h2lib_version = '13.1.506'
|
4
|
+
hawc2_version = '13.1.8'
|
h2lib/h2lib_signatures.py
CHANGED
@@ -6,7 +6,7 @@ from h2lib.dll_wrapper import DLLWrapper
|
|
6
6
|
class H2LibSignatures():
|
7
7
|
def add_sensor(self, sensor_line, index_start, index_stop):
|
8
8
|
'''subroutine add_sensor(sensor_line, index_start, index_stop) bind(C, name="add_sensor")
|
9
|
-
integer*8 :: index_start, index_stop
|
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
12
|
return self.get_lib_function('add_sensor')(sensor_line, index_start, index_stop)
|
@@ -247,12 +247,6 @@ end subroutine'''
|
|
247
247
|
end subroutine'''
|
248
248
|
return self.get_lib_function('init')()
|
249
249
|
|
250
|
-
def init_static_solver(self, restype):
|
251
|
-
'''function init_static_solver() result(error_code) &
|
252
|
-
!DEC$ ATTRIBUTES DLLEXPORT :: init_static_solver
|
253
|
-
end function'''
|
254
|
-
return self.get_lib_function('init_static_solver')(restype=restype)
|
255
|
-
|
256
250
|
def init_windfield(self, Nxyz, dxyz, box_offset_yz, transport_speed):
|
257
251
|
'''subroutine init_windfield(Nxyz, dxyz, box_offset_yz, transport_speed) bind(C, name="init_windfield")
|
258
252
|
integer*8, dimension(3), intent(in) :: Nxyz
|
@@ -326,6 +320,36 @@ end function'''
|
|
326
320
|
end subroutine'''
|
327
321
|
return self.get_lib_function('set_windfield')(uvw, box_offset_x, time)
|
328
322
|
|
323
|
+
def solver_static_delete(self, ):
|
324
|
+
'''subroutine solver_static_delete() &
|
325
|
+
!DEC$ ATTRIBUTES DLLEXPORT :: solver_static_delete
|
326
|
+
end subroutine'''
|
327
|
+
return self.get_lib_function('solver_static_delete')()
|
328
|
+
|
329
|
+
def solver_static_init(self, ):
|
330
|
+
'''subroutine solver_static_init() &
|
331
|
+
!DEC$ ATTRIBUTES DLLEXPORT :: solver_static_init
|
332
|
+
end subroutine'''
|
333
|
+
return self.get_lib_function('solver_static_init')()
|
334
|
+
|
335
|
+
def solver_static_run(self, error_code):
|
336
|
+
'''subroutine solver_static_run(error_code) bind(C, name="solver_static_run")
|
337
|
+
integer(8), intent(out) :: error_code
|
338
|
+
end subroutine'''
|
339
|
+
return self.get_lib_function('solver_static_run')(error_code)
|
340
|
+
|
341
|
+
def solver_static_solve(self, error_code):
|
342
|
+
'''subroutine solver_static_solve(error_code) &
|
343
|
+
integer*8, intent(out) :: error_code
|
344
|
+
end subroutine'''
|
345
|
+
return self.get_lib_function('solver_static_solve')(error_code)
|
346
|
+
|
347
|
+
def solver_static_update(self, error_code):
|
348
|
+
'''subroutine solver_static_update(error_code) &
|
349
|
+
integer*8, intent(out) :: error_code
|
350
|
+
end subroutine'''
|
351
|
+
return self.get_lib_function('solver_static_update')(error_code)
|
352
|
+
|
329
353
|
def sqr2(self, val):
|
330
354
|
'''subroutine sqr2(val) BIND(C, NAME='sqr2')
|
331
355
|
integer, intent(inout) :: val
|
@@ -362,5 +386,9 @@ end function'''
|
|
362
386
|
def write_output(self, ):
|
363
387
|
'''subroutine write_output() bind(C, name="write_output")
|
364
388
|
!DEC$ ATTRIBUTES DLLEXPORT :: write_output
|
389
|
+
logical :: firstcall
|
390
|
+
integer :: nr, dummy=1
|
391
|
+
character*10 :: status = 'close';
|
392
|
+
Type (Toutvar) :: ov_dummy
|
365
393
|
end subroutine'''
|
366
394
|
return self.get_lib_function('write_output')()
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: h2lib
|
3
|
-
Version: 13.1.
|
4
|
-
Summary: Python interface to HAWC2 (13.1.
|
3
|
+
Version: 13.1.506
|
4
|
+
Summary: Python interface to HAWC2 (13.1.8)
|
5
5
|
Download-URL:
|
6
6
|
Author: Mads M. Pedersen, S.G.Horcas and N.G.Ramos
|
7
7
|
Author-email: mmpe@dtu.dk
|
@@ -0,0 +1,10 @@
|
|
1
|
+
h2lib/HAWC2Lib.dll,sha256=_ECzaJeq1hmHTNyfA2oiyBf5qZKkeyepyF4Y8cyKLyc,30728192
|
2
|
+
h2lib/__init__.py,sha256=f3fO4I6IEFRM9LaV2O3w9Pioj3GPI8qRl7P5Tg5ONtE,528
|
3
|
+
h2lib/_h2lib.py,sha256=AVZODCr2c-NEosVTeqjZNU206MpnAVpmn_t3PolwjqM,22203
|
4
|
+
h2lib/_version.py,sha256=rV968fg9Lfv32R9TQD6ussF8dTsA74ZCbW8VTanCuus,146
|
5
|
+
h2lib/dll_wrapper.py,sha256=RC5_gJ1cwHXVfUaSvmsatyQrvks-aZJFAiXrG4B-FEI,12061
|
6
|
+
h2lib/h2lib_signatures.py,sha256=mqAqgg93ZEiglibECu8yDk-hy3MU8XDfAeXg-aokLk8,17961
|
7
|
+
h2lib-13.1.506.dist-info/METADATA,sha256=D3B2YjuywPU_q7nHchHr-2t5b2xOAU471mbaBI1j5UY,727
|
8
|
+
h2lib-13.1.506.dist-info/WHEEL,sha256=3vidnDuZ-QSnHIxLhNbI1gIM-KgyEcMHuZuv1mWPd_Q,101
|
9
|
+
h2lib-13.1.506.dist-info/top_level.txt,sha256=y_a-tUqphEZQ_0nsWSMaSb21P8Lsd8hUxUdE9g2Dcbk,6
|
10
|
+
h2lib-13.1.506.dist-info/RECORD,,
|
h2lib-13.1.505.dist-info/RECORD
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
h2lib/HAWC2Lib.dll,sha256=IGuHPScAOZ_H6Mar3pcaZkYvWdZ1-8-s3JoJj2hNQcQ,30576128
|
2
|
-
h2lib/__init__.py,sha256=f3fO4I6IEFRM9LaV2O3w9Pioj3GPI8qRl7P5Tg5ONtE,528
|
3
|
-
h2lib/_h2lib.py,sha256=itCf0sXkdYekNLg9fFu_zi9n_pCV660SvbRoD8clPDk,20558
|
4
|
-
h2lib/_version.py,sha256=-tWFhe0RjnHTZr6S5BuRysb-EOM4i5jWwSA5k18ne1E,157
|
5
|
-
h2lib/dll_wrapper.py,sha256=RC5_gJ1cwHXVfUaSvmsatyQrvks-aZJFAiXrG4B-FEI,12061
|
6
|
-
h2lib/h2lib_signatures.py,sha256=j0TL8Zv6kX18F28X5cdzTlwQd1ZKiyg_zVBRqdOCPhY,16858
|
7
|
-
h2lib-13.1.505.dist-info/METADATA,sha256=sd7TmknyNYz91Xig6ZUbYZFT6WymETsemf0x-dX9kTo,738
|
8
|
-
h2lib-13.1.505.dist-info/WHEEL,sha256=3vidnDuZ-QSnHIxLhNbI1gIM-KgyEcMHuZuv1mWPd_Q,101
|
9
|
-
h2lib-13.1.505.dist-info/top_level.txt,sha256=y_a-tUqphEZQ_0nsWSMaSb21P8Lsd8hUxUdE9g2Dcbk,6
|
10
|
-
h2lib-13.1.505.dist-info/RECORD,,
|
File without changes
|
File without changes
|