diff --git a/doc/source/_static/dpf_operators.html b/doc/source/_static/dpf_operators.html index c843038f79..221c7fba4e 100644 --- a/doc/source/_static/dpf_operators.html +++ b/doc/source/_static/dpf_operators.html @@ -8954,7 +8954,7 @@
Displacement field's container. Must contain the mesh if mesh not specified in input. |
Mesh must be defined if the displacement field's container does not contain it, or if there is no displacement. |
Apply bartlett windowing on a given FieldsContainer having time label or a Field located on time. Assume that time sampling is evenly spaced (use time_freq_interpolation before otherwise).
-Extracts a meshed region from another meshed region based on a scoping. Regarding the property fields of the meshed region: the 'Elemental', 'Face', and 'Nodal' property fields are scoped to the elements, faces or nodes of the output mesh, the 'Global' property fields are transferred from the input mesh to the output mesh without changes, and the rest of the property fields are not present in the output mesh.
+Extracts a meshed region from another meshed region based on a scoping. Regarding the property fields whose scoping location is 'Elemental', 'Faces', and 'Nodal', they are scoped to the elements, faces or nodes of the output mesh. The ones whose scoping location is 'Global' are transferred from the input mesh to the output mesh without changes, and the rest of the property fields are not present in the output mesh.
if nodal/face scoping, then the scoping is transposed respecting the inclusive pin |
if inclusive == 1 then all the elements/faces adjacent to the nodes/faces ids in input are added, if inclusive == 0, only the elements/faces which have all their nodes/faces in the scoping are included |
returns mesh with nodes only (without any elements or property fields). Default is false. diff --git a/src/ansys/dpf/core/operators/mesh/from_scoping.py b/src/ansys/dpf/core/operators/mesh/from_scoping.py index 6c1d5c84d4..bd19616d69 100644 --- a/src/ansys/dpf/core/operators/mesh/from_scoping.py +++ b/src/ansys/dpf/core/operators/mesh/from_scoping.py @@ -17,11 +17,11 @@ class from_scoping(Operator): r"""Extracts a meshed region from another meshed region based on a scoping. - Regarding the property fields of the meshed region: the ‘Elemental’, - ‘Face’, and ‘Nodal’ property fields are scoped to the elements, faces or - nodes of the output mesh, the ‘Global’ property fields are transferred - from the input mesh to the output mesh without changes, and the rest of - the property fields are not present in the output mesh. + Regarding the property fields whose scoping location is ‘Elemental’, + ‘Faces’, and ‘Nodal’, they are scoped to the elements, faces or nodes of + the output mesh. The ones whose scoping location is ‘Global’ are + transferred from the input mesh to the output mesh without changes, and + the rest of the property fields are not present in the output mesh. Parameters @@ -91,11 +91,11 @@ def __init__( @staticmethod def _spec() -> Specification: description = r"""Extracts a meshed region from another meshed region based on a scoping. -Regarding the property fields of the meshed region: the ‘Elemental’, -‘Face’, and ‘Nodal’ property fields are scoped to the elements, faces or -nodes of the output mesh, the ‘Global’ property fields are transferred -from the input mesh to the output mesh without changes, and the rest of -the property fields are not present in the output mesh. +Regarding the property fields whose scoping location is ‘Elemental’, +‘Faces’, and ‘Nodal’, they are scoped to the elements, faces or nodes of +the output mesh. The ones whose scoping location is ‘Global’ are +transferred from the input mesh to the output mesh without changes, and +the rest of the property fields are not present in the output mesh. """ spec = Specification( description=description, diff --git a/src/ansys/dpf/gate/generated/capi.py b/src/ansys/dpf/gate/generated/capi.py index 00ac206fd2..afc01e692a 100644 --- a/src/ansys/dpf/gate/generated/capi.py +++ b/src/ansys/dpf/gate/generated/capi.py @@ -3253,6 +3253,10 @@ def load_api(path): dll.CSPropertyField_new.argtypes = (ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.CSPropertyField_new.restype = ctypes.c_void_p + if hasattr(dll, "CSPropertyField_new_location"): + dll.CSPropertyField_new_location.argtypes = (ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_new_location.restype = ctypes.c_void_p + if hasattr(dll, "CSPropertyField_newWithTransformation"): dll.CSPropertyField_newWithTransformation.argtypes = (ctypes.c_int32, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.CSPropertyField_newWithTransformation.restype = ctypes.c_void_p @@ -3329,6 +3333,10 @@ def load_api(path): dll.CSPropertyField_SetEntityData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.CSPropertyField_SetEntityData.restype = None + if hasattr(dll, "CSPropertyField_SetLocation"): + dll.CSPropertyField_SetLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_SetLocation.restype = None + if hasattr(dll, "CSPropertyField_Resize"): dll.CSPropertyField_Resize.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.CSPropertyField_Resize.restype = None @@ -3393,6 +3401,10 @@ def load_api(path): dll.CSPropertyField_new_on_client.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.CSPropertyField_new_on_client.restype = ctypes.c_void_p + if hasattr(dll, "CSPropertyField_new_location_on_client"): + dll.CSPropertyField_new_location_on_client.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_new_location_on_client.restype = ctypes.c_void_p + if hasattr(dll, "CSPropertyField_getCopy"): dll.CSPropertyField_getCopy.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.CSPropertyField_getCopy.restype = ctypes.c_void_p diff --git a/src/ansys/dpf/gate/generated/property_field_abstract_api.py b/src/ansys/dpf/gate/generated/property_field_abstract_api.py index f883af1cf3..f7509910f8 100644 --- a/src/ansys/dpf/gate/generated/property_field_abstract_api.py +++ b/src/ansys/dpf/gate/generated/property_field_abstract_api.py @@ -43,6 +43,10 @@ def property_field_get_location(field): def csproperty_field_new(numEntities, data_size): raise NotImplementedError + @staticmethod + def csproperty_field_new_location(numEntities, data_size, location): + raise NotImplementedError + @staticmethod def csproperty_field_new_with_transformation(numEntities, data_size, wf, input_name, output_name): raise NotImplementedError @@ -119,6 +123,10 @@ def csproperty_field_set_cscoping(field, scoping): def csproperty_field_set_entity_data(field, index, id, size, data): raise NotImplementedError + @staticmethod + def csproperty_field_set_location(field, location): + raise NotImplementedError + @staticmethod def csproperty_field_resize(field, dataSize, scopingSize): raise NotImplementedError @@ -183,6 +191,10 @@ def property_get_data_fast(f, index, data, id, size, n_comp): def csproperty_field_new_on_client(client, numEntities, data_size): raise NotImplementedError + @staticmethod + def csproperty_field_new_location_on_client(client, numEntities, data_size, location): + raise NotImplementedError + @staticmethod def csproperty_field_get_copy(id, client): raise NotImplementedError diff --git a/src/ansys/dpf/gate/generated/property_field_capi.py b/src/ansys/dpf/gate/generated/property_field_capi.py index fcc7eb4fd1..900a9d3fd7 100644 --- a/src/ansys/dpf/gate/generated/property_field_capi.py +++ b/src/ansys/dpf/gate/generated/property_field_capi.py @@ -91,6 +91,15 @@ def csproperty_field_new(numEntities, data_size): raise errors.DPFServerException(sError.value) return res + @staticmethod + def csproperty_field_new_location(numEntities, data_size, location): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_new_location(utils.to_int32(numEntities), utils.to_int32(data_size), utils.to_char_ptr(location), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + @staticmethod def csproperty_field_new_with_transformation(numEntities, data_size, wf, input_name, output_name): errorSize = ctypes.c_int(0) @@ -262,6 +271,15 @@ def csproperty_field_set_entity_data(field, index, id, size, data): raise errors.DPFServerException(sError.value) return res + @staticmethod + def csproperty_field_set_location(field, location): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_SetLocation(field._internal_obj if field is not None else None, utils.to_char_ptr(location), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + @staticmethod def csproperty_field_resize(field, dataSize, scopingSize): errorSize = ctypes.c_int(0) @@ -406,6 +424,15 @@ def csproperty_field_new_on_client(client, numEntities, data_size): raise errors.DPFServerException(sError.value) return res + @staticmethod + def csproperty_field_new_location_on_client(client, numEntities, data_size, location): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_new_location_on_client(client._internal_obj if client is not None else None, utils.to_int32(numEntities), utils.to_int32(data_size), utils.to_char_ptr(location), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + @staticmethod def csproperty_field_get_copy(id, client): errorSize = ctypes.c_int(0) diff --git a/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll b/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll index 92e6a0c078..e4ba8b0385 100644 Binary files a/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll and b/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll differ diff --git a/src/ansys/dpf/gatebin/DPFClientAPI.dll b/src/ansys/dpf/gatebin/DPFClientAPI.dll index a9335f4eee..c30513bffd 100644 Binary files a/src/ansys/dpf/gatebin/DPFClientAPI.dll and b/src/ansys/dpf/gatebin/DPFClientAPI.dll differ diff --git a/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so b/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so index 4fa5fdfa4f..a24cacef6a 100644 Binary files a/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so and b/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so differ diff --git a/src/ansys/dpf/gatebin/libDPFClientAPI.so b/src/ansys/dpf/gatebin/libDPFClientAPI.so index 18bfec5c23..e6a7d93a02 100644 Binary files a/src/ansys/dpf/gatebin/libDPFClientAPI.so and b/src/ansys/dpf/gatebin/libDPFClientAPI.so differ |