resqpy 4.14.1__py3-none-any.whl → 5.1.5__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. resqpy/__init__.py +1 -1
  2. resqpy/fault/_gcs_functions.py +10 -10
  3. resqpy/fault/_grid_connection_set.py +277 -113
  4. resqpy/grid/__init__.py +2 -3
  5. resqpy/grid/_defined_geometry.py +3 -3
  6. resqpy/grid/_extract_functions.py +2 -1
  7. resqpy/grid/_grid.py +95 -12
  8. resqpy/grid/_grid_types.py +22 -7
  9. resqpy/grid/_points_functions.py +1 -1
  10. resqpy/grid/_regular_grid.py +6 -2
  11. resqpy/grid_surface/__init__.py +17 -38
  12. resqpy/grid_surface/_blocked_well_populate.py +5 -5
  13. resqpy/grid_surface/_find_faces.py +1349 -253
  14. resqpy/lines/_polyline.py +24 -33
  15. resqpy/model/_catalogue.py +9 -0
  16. resqpy/model/_forestry.py +18 -14
  17. resqpy/model/_hdf5.py +11 -3
  18. resqpy/model/_model.py +85 -10
  19. resqpy/model/_xml.py +38 -13
  20. resqpy/multi_processing/wrappers/grid_surface_mp.py +92 -37
  21. resqpy/olio/read_nexus_fault.py +8 -2
  22. resqpy/olio/relperm.py +1 -1
  23. resqpy/olio/transmission.py +8 -8
  24. resqpy/olio/triangulation.py +36 -30
  25. resqpy/olio/vector_utilities.py +340 -6
  26. resqpy/olio/volume.py +0 -20
  27. resqpy/olio/wellspec_keywords.py +19 -13
  28. resqpy/olio/write_hdf5.py +1 -1
  29. resqpy/olio/xml_et.py +12 -0
  30. resqpy/property/__init__.py +6 -4
  31. resqpy/property/_collection_add_part.py +4 -3
  32. resqpy/property/_collection_create_xml.py +4 -2
  33. resqpy/property/_collection_get_attributes.py +4 -0
  34. resqpy/property/attribute_property_set.py +311 -0
  35. resqpy/property/grid_property_collection.py +11 -11
  36. resqpy/property/property_collection.py +79 -31
  37. resqpy/property/property_common.py +3 -8
  38. resqpy/rq_import/_add_surfaces.py +34 -14
  39. resqpy/rq_import/_grid_from_cp.py +2 -2
  40. resqpy/rq_import/_import_nexus.py +75 -48
  41. resqpy/rq_import/_import_vdb_all_grids.py +64 -52
  42. resqpy/rq_import/_import_vdb_ensemble.py +12 -13
  43. resqpy/surface/_mesh.py +4 -0
  44. resqpy/surface/_surface.py +593 -118
  45. resqpy/surface/_tri_mesh.py +22 -12
  46. resqpy/surface/_tri_mesh_stencil.py +4 -4
  47. resqpy/surface/_triangulated_patch.py +71 -51
  48. resqpy/time_series/_any_time_series.py +7 -4
  49. resqpy/time_series/_geologic_time_series.py +1 -1
  50. resqpy/unstructured/_hexa_grid.py +6 -2
  51. resqpy/unstructured/_prism_grid.py +13 -5
  52. resqpy/unstructured/_pyramid_grid.py +6 -2
  53. resqpy/unstructured/_tetra_grid.py +6 -2
  54. resqpy/unstructured/_unstructured_grid.py +6 -2
  55. resqpy/well/_blocked_well.py +1986 -1946
  56. resqpy/well/_deviation_survey.py +3 -3
  57. resqpy/well/_md_datum.py +11 -21
  58. resqpy/well/_trajectory.py +10 -5
  59. resqpy/well/_wellbore_frame.py +10 -2
  60. resqpy/well/blocked_well_frame.py +3 -3
  61. resqpy/well/well_object_funcs.py +7 -9
  62. resqpy/well/well_utils.py +33 -0
  63. {resqpy-4.14.1.dist-info → resqpy-5.1.5.dist-info}/METADATA +8 -9
  64. {resqpy-4.14.1.dist-info → resqpy-5.1.5.dist-info}/RECORD +66 -66
  65. {resqpy-4.14.1.dist-info → resqpy-5.1.5.dist-info}/WHEEL +1 -1
  66. resqpy/grid/_moved_functions.py +0 -15
  67. {resqpy-4.14.1.dist-info → resqpy-5.1.5.dist-info}/LICENSE +0 -0
resqpy/__init__.py CHANGED
@@ -28,6 +28,6 @@
28
28
 
29
29
  import logging
30
30
 
31
- __version__ = "4.14.1" # Set at build time
31
+ __version__ = "5.1.5" # Set at build time
32
32
  log = logging.getLogger(__name__)
33
33
  log.info(f"Imported resqpy version {__version__}")
@@ -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.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)
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.NaN,
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[:] = np.where(clash_mask, np.minimum(combo_trm, gcs_trm), combo_trm)
448
+ combo_trm[clash_mask] = np.minimum(combo_trm, gcs_trm)[clash_mask]
449
449
  elif merge_mode == 'maximum':
450
- combo_trm[:] = np.where(clash_mask, np.maximum(combo_trm, gcs_trm), combo_trm)
450
+ combo_trm[clash_mask] = np.maximum(combo_trm, gcs_trm)[clash_mask]
451
451
  elif merge_mode == 'multiply':
452
- combo_trm[:] = np.where(clash_mask, combo_trm * gcs_trm, 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[:] = np.where(mask, gcs_trm, combo_trm) # update combined array from individual array
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[:] = np.where(np.isnan(combo_trm), fill_value, 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))