Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 41 additions & 41 deletions doc/source/_static/dpf_operators.html

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions src/ansys/dpf/gate/generated/capi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2063,6 +2063,14 @@ def load_api(path):
dll.CSField_GetEntityIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
dll.CSField_GetEntityIndex.restype = ctypes.c_int32

if hasattr(dll, "CSField_SetHeaderAsDataTree"):
dll.CSField_SetHeaderAsDataTree.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
dll.CSField_SetHeaderAsDataTree.restype = None

if hasattr(dll, "CSField_GetHeaderAsDataTree"):
dll.CSField_GetHeaderAsDataTree.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
dll.CSField_GetHeaderAsDataTree.restype = ctypes.c_void_p

if hasattr(dll, "CSField_GetData_For_DpfVector"):
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), )
dll.CSField_GetData_For_DpfVector.restype = None
Expand Down Expand Up @@ -4250,6 +4258,10 @@ def load_api(path):
dll.CSCustomTypeField_GetEntityIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
dll.CSCustomTypeField_GetEntityIndex.restype = ctypes.c_int32

if hasattr(dll, "CSCustomTypeField_SetHeaderAsDataTree"):
dll.CSCustomTypeField_SetHeaderAsDataTree.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
dll.CSCustomTypeField_SetHeaderAsDataTree.restype = None

if hasattr(dll, "CSCustomTypeField_new_on_client"):
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), )
dll.CSCustomTypeField_new_on_client.restype = ctypes.c_void_p
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ def cscustom_type_field_get_entity_id(field, index):
def cscustom_type_field_get_entity_index(field, id):
raise NotImplementedError

@staticmethod
def cscustom_type_field_set_header_as_data_tree(field, header):
raise NotImplementedError

@staticmethod
def cscustom_type_field_new_on_client(client, type, unitarySize, numEntities, numUnitaryData):
raise NotImplementedError
Expand Down
9 changes: 9 additions & 0 deletions src/ansys/dpf/gate/generated/custom_type_field_capi.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,15 @@ def cscustom_type_field_get_entity_index(field, id):
raise errors.DPFServerException(sError.value)
return res

@staticmethod
def cscustom_type_field_set_header_as_data_tree(field, header):
errorSize = ctypes.c_int(0)
sError = ctypes.c_wchar_p()
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))
if errorSize.value != 0:
raise errors.DPFServerException(sError.value)
return res

@staticmethod
def cscustom_type_field_new_on_client(client, type, unitarySize, numEntities, numUnitaryData):
errorSize = ctypes.c_int(0)
Expand Down
8 changes: 8 additions & 0 deletions src/ansys/dpf/gate/generated/field_abstract_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,14 @@ def csfield_get_entity_id(field, index):
def csfield_get_entity_index(field, id):
raise NotImplementedError

@staticmethod
def csfield_set_header_as_data_tree(field, header):
raise NotImplementedError

@staticmethod
def csfield_get_header_as_data_tree(field):
raise NotImplementedError

@staticmethod
def csfield_get_data_for_dpf_vector(field, var1, data, size):
raise NotImplementedError
Expand Down
18 changes: 18 additions & 0 deletions src/ansys/dpf/gate/generated/field_capi.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,24 @@ def csfield_get_entity_index(field, id):
raise errors.DPFServerException(sError.value)
return res

@staticmethod
def csfield_set_header_as_data_tree(field, header):
errorSize = ctypes.c_int(0)
sError = ctypes.c_wchar_p()
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))
if errorSize.value != 0:
raise errors.DPFServerException(sError.value)
return res

@staticmethod
def csfield_get_header_as_data_tree(field):
errorSize = ctypes.c_int(0)
sError = ctypes.c_wchar_p()
res = capi.dll.CSField_GetHeaderAsDataTree(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
if errorSize.value != 0:
raise errors.DPFServerException(sError.value)
return res

@staticmethod
def csfield_get_data_for_dpf_vector(field, var1, data, size):
errorSize = ctypes.c_int(0)
Expand Down
Binary file modified src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll
Binary file not shown.
Binary file modified src/ansys/dpf/gatebin/DPFClientAPI.dll
Binary file not shown.
Binary file modified src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so
Binary file not shown.
Binary file modified src/ansys/dpf/gatebin/libDPFClientAPI.so
Binary file not shown.
28 changes: 15 additions & 13 deletions src/ansys/grpc/dpf/field_pb2.py

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions src/ansys/grpc/dpf/field_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ def __init__(self, channel):
request_serializer=field__pb2.UpdateElementaryDataRequest.SerializeToString,
response_deserializer=base__pb2.Empty.FromString,
)
self.UpdateProperties = channel.unary_unary(
'/ansys.api.dpf.field.v0.FieldService/UpdateProperties',
request_serializer=field__pb2.UpdatePropertiesRequest.SerializeToString,
response_deserializer=base__pb2.Empty.FromString,
)
self.List = channel.unary_stream(
'/ansys.api.dpf.field.v0.FieldService/List',
request_serializer=field__pb2.ListRequest.SerializeToString,
Expand Down Expand Up @@ -192,6 +197,12 @@ def UpdateElementaryData(self, request, context):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def UpdateProperties(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def List(self, request, context):
"""sends streamed data, to choose the size of each chunk set metadata with "num_float", "num_double", "num_int" or "num_bytes"
"""
Expand Down Expand Up @@ -313,6 +324,11 @@ def add_FieldServiceServicer_to_server(servicer, server):
request_deserializer=field__pb2.UpdateElementaryDataRequest.FromString,
response_serializer=base__pb2.Empty.SerializeToString,
),
'UpdateProperties': grpc.unary_unary_rpc_method_handler(
servicer.UpdateProperties,
request_deserializer=field__pb2.UpdatePropertiesRequest.FromString,
response_serializer=base__pb2.Empty.SerializeToString,
),
'List': grpc.unary_stream_rpc_method_handler(
servicer.List,
request_deserializer=field__pb2.ListRequest.FromString,
Expand Down Expand Up @@ -548,6 +564,23 @@ def UpdateElementaryData(request,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def UpdateProperties(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field.v0.FieldService/UpdateProperties',
field__pb2.UpdatePropertiesRequest.SerializeToString,
base__pb2.Empty.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def List(request,
target,
Expand Down