diff --git a/src/ansys/dpf/core/field.py b/src/ansys/dpf/core/field.py index d39e9de13a..3ca076a9ad 100644 --- a/src/ansys/dpf/core/field.py +++ b/src/ansys/dpf/core/field.py @@ -232,12 +232,12 @@ def as_local_field(self): ... for i in range(1,num_entities+1): ... f.append([[0.1*i,0.2*i, 0.3*i],[0.1*i,0.2*i, 0.3*i]],i) ... f.get_entity_data(i-1),[[0.1*i,0.2*i, 0.3*i],[0.1*i,0.2*i, 0.3*i]] - (array([[0.1, 0.2, 0.3], - [0.1, 0.2, 0.3]]), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) - (array([[0.2, 0.4, 0.6], - [0.2, 0.4, 0.6]]), [[0.2, 0.4, 0.6], [0.2, 0.4, 0.6]]) - (array([[0.3, 0.6, 0.9], - [0.3, 0.6, 0.9]]), [[0.30000000000000004, 0.6000000000000001, 0.8999999999999999], [0.30000000000000004, 0.6000000000000001, 0.8999999999999999]]) + (DPFArray([[0.1, 0.2, 0.3], + [0.1, 0.2, 0.3]]), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) + (DPFArray([[0.2, 0.4, 0.6], + [0.2, 0.4, 0.6]]), [[0.2, 0.4, 0.6], [0.2, 0.4, 0.6]]) + (DPFArray([[0.3, 0.6, 0.9], + [0.3, 0.6, 0.9]]), [[0.30000000000000004, 0.6000000000000001, 0.8999999999999999], [0.30000000000000004, 0.6000000000000001, 0.8999999999999999]]) """ # noqa: E501 # Do not copy data if using InProcess server @@ -864,12 +864,12 @@ class _LocalField(_LocalFieldBase, Field): ... for i in range(1,num_entities+1): ... f.append(np.array([[0.1*i,0.2*i, 0.3*i],[0.1*i,0.2*i, 0.3*i]]),i) ... f.get_entity_data(i-1),[[0.1*i,0.2*i, 0.3*i],[0.1*i,0.2*i, 0.3*i]] - (array([[0.1, 0.2, 0.3], - [0.1, 0.2, 0.3]]), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) - (array([[0.2, 0.4, 0.6], - [0.2, 0.4, 0.6]]), [[0.2, 0.4, 0.6], [0.2, 0.4, 0.6]]) - (array([[0.3, 0.6, 0.9], - [0.3, 0.6, 0.9]]), [[0.30000000000000004, 0.6000000000000001, 0.8999999999999999], [0.30000000000000004, 0.6000000000000001, 0.8999999999999999]]) + (DPFArray([[0.1, 0.2, 0.3], + [0.1, 0.2, 0.3]]), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) + (DPFArray([[0.2, 0.4, 0.6], + [0.2, 0.4, 0.6]]), [[0.2, 0.4, 0.6], [0.2, 0.4, 0.6]]) + (DPFArray([[0.3, 0.6, 0.9], + [0.3, 0.6, 0.9]]), [[0.30000000000000004, 0.6000000000000001, 0.8999999999999999], [0.30000000000000004, 0.6000000000000001, 0.8999999999999999]]) """ # noqa: E501 diff --git a/src/ansys/dpf/core/field_base.py b/src/ansys/dpf/core/field_base.py index c3be8154e8..3e06fd7e51 100644 --- a/src/ansys/dpf/core/field_base.py +++ b/src/ansys/dpf/core/field_base.py @@ -618,7 +618,7 @@ def get_entity_data_by_id(self, id): >>> stress_op = model.results.stress() >>> fields_container = stress_op.outputs.fields_container() >>> with fields_container[0].as_local_field() as f: - ... for id in f.scoping_ids: + ... for id in f.scoping.ids: ... if id < 2: ... print(f.get_entity_data_by_id(id)) [[-5.83890625e+03 -1.04498969e+05 -5.83890625e+03 2.10637354e+03