resqpy 4.14.2__py3-none-any.whl → 5.1.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- resqpy/__init__.py +1 -1
- resqpy/fault/_gcs_functions.py +10 -10
- resqpy/fault/_grid_connection_set.py +277 -113
- resqpy/grid/__init__.py +2 -3
- resqpy/grid/_defined_geometry.py +3 -3
- resqpy/grid/_extract_functions.py +8 -2
- resqpy/grid/_grid.py +95 -12
- resqpy/grid/_grid_types.py +22 -7
- resqpy/grid/_points_functions.py +1 -1
- resqpy/grid/_regular_grid.py +6 -2
- resqpy/grid_surface/__init__.py +17 -38
- resqpy/grid_surface/_blocked_well_populate.py +5 -5
- resqpy/grid_surface/_find_faces.py +1413 -253
- resqpy/lines/_polyline.py +24 -33
- resqpy/model/_catalogue.py +9 -0
- resqpy/model/_forestry.py +18 -14
- resqpy/model/_hdf5.py +11 -3
- resqpy/model/_model.py +85 -10
- resqpy/model/_xml.py +38 -13
- resqpy/multi_processing/wrappers/grid_surface_mp.py +92 -37
- resqpy/olio/read_nexus_fault.py +8 -2
- resqpy/olio/relperm.py +1 -1
- resqpy/olio/transmission.py +8 -8
- resqpy/olio/triangulation.py +36 -30
- resqpy/olio/vector_utilities.py +340 -6
- resqpy/olio/volume.py +0 -20
- resqpy/olio/wellspec_keywords.py +19 -13
- resqpy/olio/write_hdf5.py +1 -1
- resqpy/olio/xml_et.py +12 -0
- resqpy/property/__init__.py +6 -4
- resqpy/property/_collection_add_part.py +4 -3
- resqpy/property/_collection_create_xml.py +4 -2
- resqpy/property/_collection_get_attributes.py +4 -0
- resqpy/property/attribute_property_set.py +311 -0
- resqpy/property/grid_property_collection.py +11 -11
- resqpy/property/property_collection.py +79 -31
- resqpy/property/property_common.py +3 -8
- resqpy/rq_import/_add_surfaces.py +34 -14
- resqpy/rq_import/_grid_from_cp.py +2 -2
- resqpy/rq_import/_import_nexus.py +75 -48
- resqpy/rq_import/_import_vdb_all_grids.py +64 -52
- resqpy/rq_import/_import_vdb_ensemble.py +12 -13
- resqpy/surface/_mesh.py +4 -0
- resqpy/surface/_surface.py +593 -118
- resqpy/surface/_tri_mesh.py +13 -10
- resqpy/surface/_tri_mesh_stencil.py +4 -4
- resqpy/surface/_triangulated_patch.py +71 -51
- resqpy/time_series/_any_time_series.py +7 -4
- resqpy/time_series/_geologic_time_series.py +1 -1
- resqpy/unstructured/_hexa_grid.py +6 -2
- resqpy/unstructured/_prism_grid.py +13 -5
- resqpy/unstructured/_pyramid_grid.py +6 -2
- resqpy/unstructured/_tetra_grid.py +6 -2
- resqpy/unstructured/_unstructured_grid.py +6 -2
- resqpy/well/_blocked_well.py +1986 -1946
- resqpy/well/_deviation_survey.py +3 -3
- resqpy/well/_md_datum.py +11 -21
- resqpy/well/_trajectory.py +10 -5
- resqpy/well/_wellbore_frame.py +10 -2
- resqpy/well/blocked_well_frame.py +3 -3
- resqpy/well/well_object_funcs.py +7 -9
- resqpy/well/well_utils.py +33 -0
- {resqpy-4.14.2.dist-info → resqpy-5.1.6.dist-info}/METADATA +8 -9
- {resqpy-4.14.2.dist-info → resqpy-5.1.6.dist-info}/RECORD +66 -66
- {resqpy-4.14.2.dist-info → resqpy-5.1.6.dist-info}/WHEEL +1 -1
- resqpy/grid/_moved_functions.py +0 -15
- {resqpy-4.14.2.dist-info → resqpy-5.1.6.dist-info}/LICENSE +0 -0
resqpy/__init__.py
CHANGED
resqpy/fault/_gcs_functions.py
CHANGED
@@ -423,15 +423,15 @@ def combined_tr_mult_from_gcs_mults(model,
|
|
423
423
|
|
424
424
|
if grid is None: # first gcs: grab grid and initialise combined tr mult arrays
|
425
425
|
grid = gcs.grid_list[0]
|
426
|
-
combo_trm_k = np.full((grid.nk + 1, grid.nj, grid.ni), np.
|
427
|
-
combo_trm_j = np.full((grid.nk, grid.nj + 1, grid.ni), np.
|
428
|
-
combo_trm_i = np.full((grid.nk, grid.nj, grid.ni + 1), np.
|
426
|
+
combo_trm_k = np.full((grid.nk + 1, grid.nj, grid.ni), np.nan, dtype = float)
|
427
|
+
combo_trm_j = np.full((grid.nk, grid.nj + 1, grid.ni), np.nan, dtype = float)
|
428
|
+
combo_trm_i = np.full((grid.nk, grid.nj, grid.ni + 1), np.nan, dtype = float)
|
429
429
|
else: # check same grid is referenced by this gcs
|
430
430
|
assert bu.matching_uuids(gcs.grid_list[0].uuid, grid.uuid)
|
431
431
|
|
432
432
|
# get gcs tr mult data in form of triplet of grid faces arrays
|
433
433
|
gcs_trm_k, gcs_trm_j, gcs_trm_i = gcs.grid_face_arrays(tr_mult_uuid,
|
434
|
-
default_value = np.
|
434
|
+
default_value = np.nan,
|
435
435
|
active_only = active_only,
|
436
436
|
lazy = not sided,
|
437
437
|
baffle_uuid = baffle_uuid)
|
@@ -439,29 +439,29 @@ def combined_tr_mult_from_gcs_mults(model,
|
|
439
439
|
|
440
440
|
# merge in each of the three directional face arrays for this gcs with combined arrays
|
441
441
|
for (combo_trm, gcs_trm) in [(combo_trm_k, gcs_trm_k), (combo_trm_j, gcs_trm_j), (combo_trm_i, gcs_trm_i)]:
|
442
|
-
mask = np.logical_not(np.isnan(gcs_trm)) # true where this tr mult is present
|
442
|
+
mask = np.logical_not(np.isnan(gcs_trm)).astype(bool) # true where this tr mult is present
|
443
443
|
clash_mask = np.logical_and(mask, np.logical_not(np.isnan(combo_trm))) # true where combined value clashes
|
444
444
|
if np.any(clash_mask):
|
445
445
|
if merge_mode == 'exception':
|
446
446
|
raise ValueError('gcs transmissibility multiplier conflict when merging')
|
447
447
|
if merge_mode == 'minimum':
|
448
|
-
combo_trm[
|
448
|
+
combo_trm[clash_mask] = np.minimum(combo_trm, gcs_trm)[clash_mask]
|
449
449
|
elif merge_mode == 'maximum':
|
450
|
-
combo_trm[
|
450
|
+
combo_trm[clash_mask] = np.maximum(combo_trm, gcs_trm)[clash_mask]
|
451
451
|
elif merge_mode == 'multiply':
|
452
|
-
combo_trm[
|
452
|
+
combo_trm[clash_mask] = (combo_trm * gcs_trm)[clash_mask]
|
453
453
|
else:
|
454
454
|
raise Exception(f'code failure with unrecognised merge mode {merge_mode}')
|
455
455
|
mask = np.logical_and(mask,
|
456
456
|
np.logical_not(clash_mask)) # remove clash faces from mask (already handled)
|
457
457
|
if np.any(mask):
|
458
|
-
combo_trm[
|
458
|
+
combo_trm[mask] = gcs_trm[mask] # update combined array from individual array
|
459
459
|
|
460
460
|
# for each of the 3 combined tr mult arrays, replace unused values with the default fill value
|
461
461
|
# also check that any set values are non-negative
|
462
462
|
for combo_trm in (combo_trm_k, combo_trm_j, combo_trm_i):
|
463
463
|
if fill_value is not None and not np.isnan(fill_value):
|
464
|
-
combo_trm[:]
|
464
|
+
combo_trm[:][np.isnan(combo_trm).astype(bool)] = fill_value
|
465
465
|
assert np.all(combo_trm >= 0.0)
|
466
466
|
else:
|
467
467
|
assert np.all(np.logical_or(np.isnan(combo_trm), combo_trm >= 0.0))
|