Skip to content

Commit cc75556

Browse files
bugfix for reading wellbores
1 parent c057137 commit cc75556

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

energyml-utils/example/attic/arrays_test.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,5 +501,13 @@ def test_read_write_array(h5_path):
501501

502502
# read_props_and_cbt()
503503
read_props_and_cbt(epc_path=["D:/Geosiris/Gitlab/clients/brgm/csv-to-energyml/rc/output/result.epc"],
504-
p_or_cbt_uuids=["deaa96db-9cd0-456c-beb1-dc19607fcfb9", "399678cf-6fe6-4522-9fba-710115c546cf"])
504+
p_or_cbt_uuids=["a9d7a549-1a21-4659-b85e-2b2d3ba3a7ca"])
505+
# read_props_and_cbt(epc_path=["D:/Geosiris/Gitlab/clients/brgm/csv-to-energyml/rc/output/result.epc"],
506+
# p_or_cbt_uuids=["deaa96db-9cd0-456c-beb1-dc19607fcfb9", "399678cf-6fe6-4522-9fba-710115c546cf"])
507+
508+
# from energyml.eml.v2_3.commonv2 import IntegerLatticeArray, IntegerConstantArray
509+
# print(read_array(IntegerLatticeArray(
510+
# start_value=1,
511+
# offset=[IntegerConstantArray(value=2, count=5)],
512+
# )))
505513
# test_read_write_array("test_array_rw.h5")

energyml-utils/src/energyml/utils/data/mesh_numpy.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,13 @@ def flat_patches(self) -> List["NumpyMesh"]:
242242
for child in self.children:
243243
result.extend(child.flat_patches())
244244
return result
245+
246+
def flat_children(self) -> List["NumpyMultiMesh"]:
247+
"""Return all child containers in depth-first order."""
248+
result: List[NumpyMultiMesh] = list(self.children)
249+
for child in self.children:
250+
result.extend(child.flat_children())
251+
return result
245252

246253
def to_pyvista(self) -> Any: # return type: pv.MultiBlock
247254
"""Convert to a PyVista ``MultiBlock``. Requires ``pyvista``."""
@@ -1122,6 +1129,7 @@ def read_numpy_wellbore_frame_representation(
11221129
result.identifier = frame_uri
11231130
result.source_uuid = get_obj_uuid(energyml_object)
11241131
result.source_type = type(energyml_object).__name__
1132+
result.energyml_object = energyml_object
11251133
return result
11261134

11271135

0 commit comments

Comments
 (0)