h2lib 13.0.407__cp38-cp38-win_amd64.whl → 13.0.410__cp38-cp38-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 +2 -3
- h2lib/h2lib_signatures.py +13 -10
- h2lib/utils.py +4 -6
- {h2lib-13.0.407.dist-info → h2lib-13.0.410.dist-info}/METADATA +2 -5
- h2lib-13.0.410.dist-info/RECORD +10 -0
- h2lib-13.0.407.dist-info/RECORD +0 -10
- {h2lib-13.0.407.dist-info → h2lib-13.0.410.dist-info}/WHEEL +0 -0
- {h2lib-13.0.407.dist-info → h2lib-13.0.410.dist-info}/top_level.txt +0 -0
h2lib/HAWC2Lib.dll
CHANGED
Binary file
|
h2lib/_h2lib.py
CHANGED
@@ -4,7 +4,6 @@ import shutil
|
|
4
4
|
from h2lib.dll_wrapper import DLLWrapper
|
5
5
|
from h2lib.h2lib_signatures import H2LibSignatures
|
6
6
|
from h2lib.utils import MultiProcessInterface
|
7
|
-
from _collections import defaultdict
|
8
7
|
|
9
8
|
|
10
9
|
class H2Lib(H2LibSignatures, DLLWrapper):
|
@@ -142,8 +141,8 @@ class H2Lib(H2LibSignatures, DLLWrapper):
|
|
142
141
|
def get_nSections(self, rotor=0, blade=0):
|
143
142
|
return H2LibSignatures.get_nSections(self, rotor + 1, blade + 1, restype=np.int64)[1]
|
144
143
|
|
145
|
-
def
|
146
|
-
return H2LibSignatures.
|
144
|
+
def get_diameter(self, rotor=0):
|
145
|
+
return H2LibSignatures.get_diameter(self, rotor + 1, restype=np.float64)[1]
|
147
146
|
|
148
147
|
def aero_sections_data_shape(self, rotor):
|
149
148
|
if not rotor in self._aero_sections_data_shape:
|
h2lib/h2lib_signatures.py
CHANGED
@@ -8,18 +8,12 @@ class H2LibSignatures():
|
|
8
8
|
end function'''
|
9
9
|
return self.get_lib_function('add_sensor')(sensor_line, restype=restype)
|
10
10
|
|
11
|
-
def diameter(self, rotor, restype):
|
12
|
-
'''function diameter(rotor) bind(C, name="diameter")
|
13
|
-
!DEC$ ATTRIBUTES DLLEXPORT :: diameter
|
14
|
-
integer*8, intent(in) :: rotor
|
15
|
-
Type (Taerorotor),pointer :: rotor_p
|
16
|
-
real(c_double) :: diameter
|
17
|
-
end function'''
|
18
|
-
return self.get_lib_function('diameter')(rotor, restype=restype)
|
19
|
-
|
20
11
|
def echo_version(self, ):
|
21
12
|
'''subroutine echo_version() BIND(C, NAME='echo_version')
|
22
|
-
!
|
13
|
+
!DEC$ ATTRIBUTES DLLEXPORT :: echo_version
|
14
|
+
!GCC$ ATTRIBUTES DLLEXPORT :: echo_version
|
15
|
+
type (tbuildinfo) :: b
|
16
|
+
end subroutine'''
|
23
17
|
return self.get_lib_function('echo_version')()
|
24
18
|
|
25
19
|
def extern_write_log(self, c_msg, n, dll_name, error, warning):
|
@@ -148,6 +142,15 @@ END SUBROUTINE'''
|
|
148
142
|
return self.get_lib_function('get_def_ini_hawc2_4miras')(xini_,yini_,zini_,txini_,tyini_,tzini_,
|
149
143
|
xi_hub_,yi_hub_,zi_hub_,xi_root_,yi_root_,zi_root_)
|
150
144
|
|
145
|
+
def get_diameter(self, rotor, restype):
|
146
|
+
'''function get_diameter(rotor) bind(C, name="get_diameter")
|
147
|
+
!DEC$ ATTRIBUTES DLLEXPORT :: get_diameter
|
148
|
+
integer*8, intent(in) :: rotor
|
149
|
+
Type (Taerorotor),pointer :: rotor_p
|
150
|
+
real(c_double) :: get_diameter
|
151
|
+
end function'''
|
152
|
+
return self.get_lib_function('get_diameter')(rotor, restype=restype)
|
153
|
+
|
151
154
|
def get_fsi_loads_hawc2(self, fxbld_,fybld_,fzbld_,mxbld_,mybld_,mzbld_):
|
152
155
|
'''subroutine get_fsi_loads_hawc2(fxbld_,fybld_,fzbld_,mxbld_,mybld_,mzbld_) &
|
153
156
|
real(c_double),intent(out)::fxbld_(nrotors,nblades_max,nsec_max), &
|
h2lib/utils.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import multiprocessing
|
2
|
-
import time
|
3
|
-
from multiprocessing import Queue
|
4
2
|
import atexit
|
3
|
+
import numpy as np
|
5
4
|
|
6
5
|
|
7
6
|
def run(cls, inputQueue, outputQueue, cls_args, **kwargs):
|
@@ -88,6 +87,7 @@ class ProcessClass():
|
|
88
87
|
|
89
88
|
class MultiProcessInterface():
|
90
89
|
def __init__(self, cls, args_lst):
|
90
|
+
self.cls = cls
|
91
91
|
self.obj_lst = [ProcessClass(cls)(*args) for args in args_lst]
|
92
92
|
|
93
93
|
def __getattribute__(self, name):
|
@@ -99,7 +99,7 @@ class MultiProcessInterface():
|
|
99
99
|
def wrap(*args, **kwargs):
|
100
100
|
for i, o in enumerate(self.obj_lst):
|
101
101
|
def get_arg(arg):
|
102
|
-
if
|
102
|
+
if isinstance(arg, list) and len(arg) == len(a_lst):
|
103
103
|
return arg[i]
|
104
104
|
else:
|
105
105
|
return arg
|
@@ -116,9 +116,7 @@ class MultiProcessInterface():
|
|
116
116
|
return [getattr(o, name) for o in self.obj_lst]
|
117
117
|
|
118
118
|
def __getitem__(self, slice):
|
119
|
-
lst = self.obj_lst[slice]
|
120
|
-
if not hasattr(lst, '__len__'):
|
121
|
-
lst = [lst]
|
119
|
+
lst = np.atleast_1d(np.array(self.obj_lst)[slice]).tolist()
|
122
120
|
return SubsetProcessWrapper(lst)
|
123
121
|
|
124
122
|
def __enter__(self):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: h2lib
|
3
|
-
Version: 13.0.
|
3
|
+
Version: 13.0.410
|
4
4
|
Summary: Python interface to HAWC2 (13.0.4+17-g58229ac)
|
5
5
|
Download-URL:
|
6
6
|
Author: S.G.Horcas and N.G.Ramos
|
@@ -11,8 +11,5 @@ Requires-Dist: numpy
|
|
11
11
|
Requires-Dist: intel-fortran-rt ==2021.3.0
|
12
12
|
Requires-Dist: mkl ==2021.3.0
|
13
13
|
Provides-Extra: test
|
14
|
-
Requires-Dist:
|
15
|
-
Requires-Dist: pytest-cov ; extra == 'test'
|
16
|
-
Requires-Dist: hipersim ; extra == 'test'
|
17
|
-
Requires-Dist: wetb ; extra == 'test'
|
14
|
+
Requires-Dist: h2lib-tests ; extra == 'test'
|
18
15
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
h2lib/HAWC2Lib.dll,sha256=xMykcPC5qGVqdZiU-e80f0s53wkoXs6Q0FlyHpTOXYw,29155840
|
2
|
+
h2lib/__init__.py,sha256=v4RtCtR7Cfv-LSx-9tnLK0WSefKVjIKrGjfBVBhONzI,27
|
3
|
+
h2lib/_h2lib.py,sha256=u6V-J_B-SBfBCgTkRu0AphywTikQSfQGAfBwvJYISxI,9060
|
4
|
+
h2lib/dll_wrapper.py,sha256=jFCcT1gnjIl6k_I5nvzeLgG75I0D5VTiWwwWKV7M77w,11962
|
5
|
+
h2lib/h2lib_signatures.py,sha256=zhANdNacmPZ_9mMvSEiLK_09PSkwZ0lXHLWKDxmEAEQ,25371
|
6
|
+
h2lib/utils.py,sha256=Et7LTR1jlKDcMfkwlUpdIaZcy9qRr46p0WP-U0JNK7k,4722
|
7
|
+
h2lib-13.0.410.dist-info/METADATA,sha256=Zjjj9YTOZFr73rgAoexQwIW5SYjlr-x4KCtUCKNvVko,379
|
8
|
+
h2lib-13.0.410.dist-info/WHEEL,sha256=KplWMgwSZbeAOumvxNxIrVbNPnn_LVzfBH7l38jDCVM,100
|
9
|
+
h2lib-13.0.410.dist-info/top_level.txt,sha256=y_a-tUqphEZQ_0nsWSMaSb21P8Lsd8hUxUdE9g2Dcbk,6
|
10
|
+
h2lib-13.0.410.dist-info/RECORD,,
|
h2lib-13.0.407.dist-info/RECORD
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
h2lib/HAWC2Lib.dll,sha256=D-B557qyIepvdTNX6HtOqQp29OK6HWOqHg7vzri9q5s,29155840
|
2
|
-
h2lib/__init__.py,sha256=v4RtCtR7Cfv-LSx-9tnLK0WSefKVjIKrGjfBVBhONzI,27
|
3
|
-
h2lib/_h2lib.py,sha256=9pUp7Gll3YxtfKg_CoNrUnl4pRy55V8Q7g4lykmRjBo,9090
|
4
|
-
h2lib/dll_wrapper.py,sha256=jFCcT1gnjIl6k_I5nvzeLgG75I0D5VTiWwwWKV7M77w,11962
|
5
|
-
h2lib/h2lib_signatures.py,sha256=V1AjS4z5pzuJQwUv_6cbJSOW2eNT1aCVBH1uF7PlJfo,25230
|
6
|
-
h2lib/utils.py,sha256=sd1__Cr6HIILB101KiqI4tYN_j6yb2UwRSdnArpW9lU,4760
|
7
|
-
h2lib-13.0.407.dist-info/METADATA,sha256=OXhFVilpZzsL8P3cO2PGc1XiP_MHnTTgY24VkmgiFTM,501
|
8
|
-
h2lib-13.0.407.dist-info/WHEEL,sha256=KplWMgwSZbeAOumvxNxIrVbNPnn_LVzfBH7l38jDCVM,100
|
9
|
-
h2lib-13.0.407.dist-info/top_level.txt,sha256=y_a-tUqphEZQ_0nsWSMaSb21P8Lsd8hUxUdE9g2Dcbk,6
|
10
|
-
h2lib-13.0.407.dist-info/RECORD,,
|
File without changes
|
File without changes
|