Skip to content

Commit d3b8041

Browse files
authored
Merge branch 'main' into ci/remove-main-master-sync
2 parents a126a17 + 717f986 commit d3b8041

16 files changed

+204
-84
lines changed

.github/workflows/pydpf-post.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ jobs:
152152
PACKAGE_NAME: ansys-dpf-post
153153
working-directory: pydpf-post/src
154154
if: inputs.test_docstrings == 'true'
155-
timeout-minutes: 10
155+
timeout-minutes: 12
156156
continue-on-error: true
157157

158158
- uses: mainmatter/continue-on-error-comment@v1

doc/source/_static/dpf_operators.html

Lines changed: 43 additions & 43 deletions
Large diffs are not rendered by default.

src/ansys/dpf/gate/generated/capi.py

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,6 +2063,14 @@ def load_api(path):
20632063
dll.CSField_GetEntityIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
20642064
dll.CSField_GetEntityIndex.restype = ctypes.c_int32
20652065

2066+
if hasattr(dll, "CSField_SetHeaderAsDataTree"):
2067+
dll.CSField_SetHeaderAsDataTree.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
2068+
dll.CSField_SetHeaderAsDataTree.restype = None
2069+
2070+
if hasattr(dll, "CSField_GetHeaderAsDataTree"):
2071+
dll.CSField_GetHeaderAsDataTree.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
2072+
dll.CSField_GetHeaderAsDataTree.restype = ctypes.c_void_p
2073+
20662074
if hasattr(dll, "CSField_GetData_For_DpfVector"):
20672075
dll.CSField_GetData_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_double)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
20682076
dll.CSField_GetData_For_DpfVector.restype = None
@@ -4250,6 +4258,10 @@ def load_api(path):
42504258
dll.CSCustomTypeField_GetEntityIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
42514259
dll.CSCustomTypeField_GetEntityIndex.restype = ctypes.c_int32
42524260

4261+
if hasattr(dll, "CSCustomTypeField_SetHeaderAsDataTree"):
4262+
dll.CSCustomTypeField_SetHeaderAsDataTree.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
4263+
dll.CSCustomTypeField_SetHeaderAsDataTree.restype = None
4264+
42534265
if hasattr(dll, "CSCustomTypeField_new_on_client"):
42544266
dll.CSCustomTypeField_new_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
42554267
dll.CSCustomTypeField_new_on_client.restype = ctypes.c_void_p
@@ -5086,13 +5098,9 @@ def load_api(path):
50865098
dll.FbsRef_new.restype = ctypes.c_void_p
50875099

50885100
if hasattr(dll, "FbsRef_getFromDB"):
5089-
dll.FbsRef_getFromDB.argtypes = (ctypes.c_size_t, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
5101+
dll.FbsRef_getFromDB.argtypes = (ctypes.c_void_p, ctypes.c_size_t, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
50905102
dll.FbsRef_getFromDB.restype = ctypes.c_void_p
50915103

5092-
if hasattr(dll, "FbsRef_getID"):
5093-
dll.FbsRef_getID.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
5094-
dll.FbsRef_getID.restype = ctypes.c_size_t
5095-
50965104
if hasattr(dll, "Any_getAs_FbsRef"):
50975105
dll.Any_getAs_FbsRef.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_size_t), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
50985106
dll.Any_getAs_FbsRef.restype = None
@@ -5101,6 +5109,18 @@ def load_api(path):
51015109
dll.FbsRef_StartOrGetThreadServer.argtypes = (ctypes.c_bool, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
51025110
dll.FbsRef_StartOrGetThreadServer.restype = ctypes.c_void_p
51035111

5112+
if hasattr(dll, "Fbs_GetBytesBufferFromSlice"):
5113+
dll.Fbs_GetBytesBufferFromSlice.argtypes = (ctypes.c_void_p, ctypes.c_size_t, ctypes.POINTER(ctypes.c_size_t), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
5114+
dll.Fbs_GetBytesBufferFromSlice.restype = ctypes.c_void_p
5115+
5116+
if hasattr(dll, "Fbs_DeleteChannel"):
5117+
dll.Fbs_DeleteChannel.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
5118+
dll.Fbs_DeleteChannel.restype = None
5119+
5120+
if hasattr(dll, "Fbs_DeleteSlice"):
5121+
dll.Fbs_DeleteSlice.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
5122+
dll.Fbs_DeleteSlice.restype = None
5123+
51045124
if hasattr(dll, "FbsRef_new_on_client"):
51055125
dll.FbsRef_new_on_client.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.c_size_t, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
51065126
dll.FbsRef_new_on_client.restype = ctypes.c_void_p

src/ansys/dpf/gate/generated/custom_type_field_abstract_api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ def cscustom_type_field_get_entity_id(field, index):
131131
def cscustom_type_field_get_entity_index(field, id):
132132
raise NotImplementedError
133133

134+
@staticmethod
135+
def cscustom_type_field_set_header_as_data_tree(field, header):
136+
raise NotImplementedError
137+
134138
@staticmethod
135139
def cscustom_type_field_new_on_client(client, type, unitarySize, numEntities, numUnitaryData):
136140
raise NotImplementedError

src/ansys/dpf/gate/generated/custom_type_field_capi.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,15 @@ def cscustom_type_field_get_entity_index(field, id):
289289
raise errors.DPFServerException(sError.value)
290290
return res
291291

292+
@staticmethod
293+
def cscustom_type_field_set_header_as_data_tree(field, header):
294+
errorSize = ctypes.c_int(0)
295+
sError = ctypes.c_wchar_p()
296+
res = capi.dll.CSCustomTypeField_SetHeaderAsDataTree(field._internal_obj if field is not None else None, header._internal_obj if header is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
297+
if errorSize.value != 0:
298+
raise errors.DPFServerException(sError.value)
299+
return res
300+
292301
@staticmethod
293302
def cscustom_type_field_new_on_client(client, type, unitarySize, numEntities, numUnitaryData):
294303
errorSize = ctypes.c_int(0)

src/ansys/dpf/gate/generated/fbs_ref_abstract_api.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,27 @@ def fbs_ref_new(client, channel_address, req_slice, req_offset):
1616
raise NotImplementedError
1717

1818
@staticmethod
19-
def fbs_ref_get_from_db(id):
19+
def fbs_ref_get_from_db(ptr, size):
2020
raise NotImplementedError
2121

2222
@staticmethod
23-
def fbs_ref_get_id(obj):
23+
def any_get_as_fbs_ref(obj, client, channel_address, req_slice, req_offset):
2424
raise NotImplementedError
2525

2626
@staticmethod
27-
def any_get_as_fbs_ref(obj, client, channel_address, req_slice, req_offset):
27+
def fbs_ref_start_or_get_thread_server(get_existing, ip, port, address):
2828
raise NotImplementedError
2929

3030
@staticmethod
31-
def fbs_ref_start_or_get_thread_server(get_existing, ip, port, address):
31+
def fbs_get_bytes_buffer_from_slice(req_slice, req_offset, size_out):
32+
raise NotImplementedError
33+
34+
@staticmethod
35+
def fbs_delete_channel(client):
36+
raise NotImplementedError
37+
38+
@staticmethod
39+
def fbs_delete_slice(req_slice):
3240
raise NotImplementedError
3341

3442
@staticmethod

src/ansys/dpf/gate/generated/fbs_ref_capi.py

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,37 +27,55 @@ def fbs_ref_new(client, channel_address, req_slice, req_offset):
2727
return res
2828

2929
@staticmethod
30-
def fbs_ref_get_from_db(id):
30+
def fbs_ref_get_from_db(ptr, size):
3131
errorSize = ctypes.c_int(0)
3232
sError = ctypes.c_wchar_p()
33-
res = capi.dll.FbsRef_getFromDB(id, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
33+
res = capi.dll.FbsRef_getFromDB(ptr, size, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
3434
if errorSize.value != 0:
3535
raise errors.DPFServerException(sError.value)
3636
return res
3737

3838
@staticmethod
39-
def fbs_ref_get_id(obj):
39+
def any_get_as_fbs_ref(obj, client, channel_address, req_slice, req_offset):
4040
errorSize = ctypes.c_int(0)
4141
sError = ctypes.c_wchar_p()
42-
res = capi.dll.FbsRef_getID(obj._internal_obj if obj is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
42+
res = capi.dll.Any_getAs_FbsRef(obj._internal_obj if obj is not None else None, client, utils.to_char_ptr(channel_address), req_slice, req_offset, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
4343
if errorSize.value != 0:
4444
raise errors.DPFServerException(sError.value)
4545
return res
4646

4747
@staticmethod
48-
def any_get_as_fbs_ref(obj, client, channel_address, req_slice, req_offset):
48+
def fbs_ref_start_or_get_thread_server(get_existing, ip, port, address):
4949
errorSize = ctypes.c_int(0)
5050
sError = ctypes.c_wchar_p()
51-
res = capi.dll.Any_getAs_FbsRef(obj._internal_obj if obj is not None else None, client, utils.to_char_ptr(channel_address), req_slice, req_offset, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
51+
res = capi.dll.FbsRef_StartOrGetThreadServer(get_existing, utils.to_char_ptr(ip), utils.to_int32(port), utils.to_char_ptr(address), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
5252
if errorSize.value != 0:
5353
raise errors.DPFServerException(sError.value)
5454
return res
5555

5656
@staticmethod
57-
def fbs_ref_start_or_get_thread_server(get_existing, ip, port, address):
57+
def fbs_get_bytes_buffer_from_slice(req_slice, req_offset, size_out):
5858
errorSize = ctypes.c_int(0)
5959
sError = ctypes.c_wchar_p()
60-
res = capi.dll.FbsRef_StartOrGetThreadServer(get_existing, utils.to_char_ptr(ip), utils.to_int32(port), utils.to_char_ptr(address), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
60+
res = capi.dll.Fbs_GetBytesBufferFromSlice(req_slice, req_offset, size_out, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
61+
if errorSize.value != 0:
62+
raise errors.DPFServerException(sError.value)
63+
return res
64+
65+
@staticmethod
66+
def fbs_delete_channel(client):
67+
errorSize = ctypes.c_int(0)
68+
sError = ctypes.c_wchar_p()
69+
res = capi.dll.Fbs_DeleteChannel(client, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
70+
if errorSize.value != 0:
71+
raise errors.DPFServerException(sError.value)
72+
return res
73+
74+
@staticmethod
75+
def fbs_delete_slice(req_slice):
76+
errorSize = ctypes.c_int(0)
77+
sError = ctypes.c_wchar_p()
78+
res = capi.dll.Fbs_DeleteSlice(req_slice, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
6179
if errorSize.value != 0:
6280
raise errors.DPFServerException(sError.value)
6381
return res

src/ansys/dpf/gate/generated/field_abstract_api.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,14 @@ def csfield_get_entity_id(field, index):
283283
def csfield_get_entity_index(field, id):
284284
raise NotImplementedError
285285

286+
@staticmethod
287+
def csfield_set_header_as_data_tree(field, header):
288+
raise NotImplementedError
289+
290+
@staticmethod
291+
def csfield_get_header_as_data_tree(field):
292+
raise NotImplementedError
293+
286294
@staticmethod
287295
def csfield_get_data_for_dpf_vector(field, var1, data, size):
288296
raise NotImplementedError

src/ansys/dpf/gate/generated/field_capi.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,24 @@ def csfield_get_entity_index(field, id):
639639
raise errors.DPFServerException(sError.value)
640640
return res
641641

642+
@staticmethod
643+
def csfield_set_header_as_data_tree(field, header):
644+
errorSize = ctypes.c_int(0)
645+
sError = ctypes.c_wchar_p()
646+
res = capi.dll.CSField_SetHeaderAsDataTree(field._internal_obj if field is not None else None, header._internal_obj if header is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
647+
if errorSize.value != 0:
648+
raise errors.DPFServerException(sError.value)
649+
return res
650+
651+
@staticmethod
652+
def csfield_get_header_as_data_tree(field):
653+
errorSize = ctypes.c_int(0)
654+
sError = ctypes.c_wchar_p()
655+
res = capi.dll.CSField_GetHeaderAsDataTree(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
656+
if errorSize.value != 0:
657+
raise errors.DPFServerException(sError.value)
658+
return res
659+
642660
@staticmethod
643661
def csfield_get_data_for_dpf_vector(field, var1, data, size):
644662
errorSize = ctypes.c_int(0)
-512 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)