Skip to content

Commit 17bc61f

Browse files
pyansys-ci-botPProfizicbellot000rafacanton
authored
Update generated code for DPF 252_daily on master (#2038)
* update generated code * collection message moved (cherry picked from commit f791371) * update generated code --------- Co-authored-by: PProfizi <[email protected]> Co-authored-by: cbellot <[email protected]> Co-authored-by: Rafael Canton <[email protected]>
1 parent 9e03604 commit 17bc61f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+953
-256
lines changed

src/ansys/dpf/core/collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Collection(CollectionBase[TYPE]):
3636
3737
Parameters
3838
----------
39-
collection : ansys.grpc.dpf.collection_pb2.Collection or
39+
collection : ansys.grpc.dpf.collection_message_pb2.Collection or
4040
ansys.dpf.core.Collection, optional
4141
Create a collection from a collection message or create a copy from an
4242
existing collection. The default is ``None``.

src/ansys/dpf/core/collection_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class CollectionBase(Generic[TYPE]):
5858
5959
Parameters
6060
----------
61-
collection : ansys.grpc.dpf.collection_pb2.Collection, optional
61+
collection : ansys.grpc.dpf.collection_message_pb2.Collection, optional
6262
Collection to create from the collection message. The default is ``None``.
6363
server : server.DPFServer, optional
6464
Server with the channel connected to the remote or local instance. The

src/ansys/dpf/core/custom_fields_container.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ElShapeFieldsContainer(FieldsContainer):
4242
4343
Parameters
4444
----------
45-
fields_container : ansys.grpc.dpf.collection_pb2.Collection or FieldsContainer, optional
45+
fields_container : ansys.grpc.dpf.collection_message_pb2.Collection or FieldsContainer, optional
4646
Fields container created from either a collection message or by copying an existing
4747
fields container. The default is ``None``.
4848
server : server.DPFServer, optional
@@ -278,7 +278,7 @@ class BodyFieldsContainer(FieldsContainer):
278278
279279
Parameters
280280
----------
281-
fields_container : ansys.grpc.dpf.collection_pb2.Collection or FieldsContainer, optional
281+
fields_container : ansys.grpc.dpf.collection_message_pb2.Collection or FieldsContainer, optional
282282
Fields container created from either a collection message or by copying an existing
283283
fields container. The default is ``None``.
284284
server : server.DPFServer, optional

src/ansys/dpf/core/fields_container.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class FieldsContainer(CollectionBase["field.Field"]):
4949
5050
Parameters
5151
----------
52-
fields_container : ansys.grpc.dpf.collection_pb2.Collection, ctypes.c_void_p,
52+
fields_container : ansys.grpc.dpf.collection_message_pb2.Collection, ctypes.c_void_p,
5353
FieldsContainer, optional
5454
Fields container created from either a collection message or by copying an existing
5555
fields container. The default is "None``.

src/ansys/dpf/core/meshes_container.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class MeshesContainer(CollectionBase[meshed_region.MeshedRegion]):
3737
3838
Parameters
3939
----------
40-
meshes_container : ansys.grpc.dpf.collection_pb2.Collection or
40+
meshes_container : ansys.grpc.dpf.collection_message_pb2.Collection or
4141
ansys.dpf.core.MeshesContainer, optional
4242
Create a meshes container from a collection message or create a copy from an
4343
existing meshes container. The default is ``None``.

src/ansys/dpf/core/scopings_container.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ScopingsContainer(CollectionBase[scoping.Scoping]):
3737
3838
Parameters
3939
----------
40-
scopings_container : ansys.grpc.dpf.collection_pb2.Collection or
40+
scopings_container : ansys.grpc.dpf.collection_message_pb2.Collection or
4141
ansys.dpf.core.ScopingsContainer, optional
4242
Create a scopings container from a Collection message or create
4343
a copy from an existing scopings container

src/ansys/dpf/gate/collection_grpcapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class CollectionGRPCAPI(collection_abstract_api.CollectionAbstractAPI):
2121

2222
@staticmethod
2323
def init_collection_environment(object):
24-
from ansys.grpc.dpf import collection_pb2, collection_pb2_grpc
24+
from ansys.grpc.dpf import collection_message_pb2, collection_pb2_grpc
2525
if not hasattr(object, "_server"):
2626
server = object
2727
elif isinstance(object._server, weakref.ref):
@@ -32,7 +32,7 @@ def init_collection_environment(object):
3232
CollectionGRPCAPI.STUBNAME, collection_pb2_grpc.CollectionServiceStub)
3333

3434
object._deleter_func = (
35-
_get_stub(server).Delete, lambda obj: obj._internal_obj if isinstance(obj, collection_pb2.Collection) else None)
35+
_get_stub(server).Delete, lambda obj: obj._internal_obj if isinstance(obj, collection_message_pb2.Collection) else None)
3636

3737
@staticmethod
3838
def collection_of_scoping_new_on_client(client):

src/ansys/dpf/gate/data_processing_grpcapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def data_processing_get_server_version_on_client(client, major, minor):
210210
@staticmethod
211211
def data_processing_description_string(data):
212212
data_obj = data._internal_obj
213-
from ansys.grpc.dpf import base_pb2, collection_pb2
213+
from ansys.grpc.dpf import base_pb2, collection_message_pb2
214214
request = base_pb2.DescribeRequest()
215215
if isinstance(data_obj.id, int):
216216
request.dpf_type_id = data_obj.id
@@ -224,7 +224,7 @@ def data_processing_description_string(data):
224224
client = serv_to_test.client
225225
else:
226226
return ""
227-
if isinstance(data_obj, collection_pb2.Collection):
227+
if isinstance(data_obj, collection_message_pb2.Collection):
228228
from ansys.dpf.gate import collection_grpcapi
229229
collection_grpcapi.CollectionGRPCAPI.init_collection_environment(data)
230230
response = collection_grpcapi._get_stub(data._server.client).Describe(request)

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ def any_get_as_custom_type_fields_container(any):
131131
def any_get_as_custom_type_field(any):
132132
raise NotImplementedError
133133

134+
@staticmethod
135+
def any_get_as_support(any):
136+
raise NotImplementedError
137+
134138
@staticmethod
135139
def any_make_obj_as_any(dpf_object):
136140
raise NotImplementedError

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,15 @@ def any_get_as_custom_type_field(any):
293293
raise errors.DPFServerException(sError.value)
294294
return res
295295

296+
@staticmethod
297+
def any_get_as_support(any):
298+
errorSize = ctypes.c_int(0)
299+
sError = ctypes.c_wchar_p()
300+
res = capi.dll.Any_getAs_Support(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
301+
if errorSize.value != 0:
302+
raise errors.DPFServerException(sError.value)
303+
return res
304+
296305
@staticmethod
297306
def any_make_obj_as_any(dpf_object):
298307
errorSize = ctypes.c_int(0)

0 commit comments

Comments
 (0)