resqpy 4.17.10__tar.gz → 4.18.1__tar.gz
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-4.17.10 → resqpy-4.18.1}/PKG-INFO +1 -1
- {resqpy-4.17.10 → resqpy-4.18.1}/pyproject.toml +1 -1
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/__init__.py +1 -1
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid_surface/__init__.py +4 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid_surface/_find_faces.py +245 -3
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/multi_processing/wrappers/grid_surface_mp.py +43 -40
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/write_hdf5.py +1 -1
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/property/_collection_add_part.py +4 -3
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/property/_collection_create_xml.py +3 -1
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/property/property_collection.py +20 -9
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/well/blocked_well_frame.py +2 -2
- {resqpy-4.17.10 → resqpy-4.18.1}/LICENSE +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/README.md +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/crs.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/__init__.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_add_edges_per_column_property_array.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_add_faults.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_add_one_blocked_well_property.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_add_one_grid_property_array.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_add_single_cell_grid.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_add_wells_from_ascii_file.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_add_zone_by_layer_property.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_coarsened_grid.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_common.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_copy_grid.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_drape_to_surface.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_extract_box.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_extract_box_for_well.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_fault_throw_scaling.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_gather_ensemble.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_interpolated_grid.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_local_depth_adjustment.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_refined_grid.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_tilted_grid.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_unsplit_grid.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_zonal_grid.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/derived_model/_zone_layer_ranges_from_array.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/fault/__init__.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/fault/_gcs_functions.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/fault/_grid_connection_set.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/__init__.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_cell_properties.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_connection_sets.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_create_grid_xml.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_defined_geometry.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_extract_functions.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_face_functions.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_faults.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_grid.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_grid_types.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_intervals_info.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_moved_functions.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_pillars.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_pixel_maps.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_points_functions.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_regular_grid.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_transmissibility.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_write_hdf5_from_caches.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_write_nexus_corp.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid/_xyz.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid_surface/_blocked_well_populate.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid_surface/_grid_skin.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid_surface/_grid_surface.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid_surface/_trajectory_intersects.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/grid_surface/grid_surface_cuda.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/lines/__init__.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/lines/_common.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/lines/_polyline.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/lines/_polyline_set.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/model/__init__.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/model/_catalogue.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/model/_context.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/model/_forestry.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/model/_grids.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/model/_hdf5.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/model/_model.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/model/_xml.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/multi_processing/__init__.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/multi_processing/_multiprocessing.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/multi_processing/wrappers/__init__.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/multi_processing/wrappers/blocked_well_mp.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/multi_processing/wrappers/mesh_mp.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/__init__.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/ab_toolbox.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/base.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/box_utilities.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/class_dict.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/consolidation.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/data/build.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/data/properties.json +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/dataframe.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/exceptions.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/factors.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/fine_coarse.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/grid_functions.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/intersection.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/keyword_files.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/load_data.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/point_inclusion.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/random_seed.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/read_nexus_fault.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/relperm.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/simple_lines.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/time.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/trademark.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/transmission.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/triangulation.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/uuid.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/vdb.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/vector_utilities.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/volume.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/wellspec_keywords.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/write_data.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/xml_et.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/xml_namespaces.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/olio/zmap_reader.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/__init__.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/_utils.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/boundary_feature.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/boundary_feature_interpretation.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/earth_model_interpretation.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/fault_interpretation.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/fluid_boundary_feature.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/frontier_feature.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/generic_interpretation.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/genetic_boundary_feature.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/geobody_boundary_interpretation.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/geobody_feature.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/geobody_interpretation.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/geologic_unit_feature.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/horizon_interpretation.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/organization_feature.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/rock_fluid_unit_feature.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/structural_organization_interpretation.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/tectonic_boundary_feature.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/wellbore_feature.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/organize/wellbore_interpretation.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/property/__init__.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/property/_collection_get_attributes.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/property/_collection_support.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/property/_property.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/property/attribute_property_set.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/property/grid_property_collection.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/property/property_common.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/property/property_kind.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/property/string_lookup.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/property/well_interval_property.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/property/well_interval_property_collection.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/property/well_log.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/property/well_log_collection.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/rq_import/__init__.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/rq_import/_add_ab_properties.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/rq_import/_add_surfaces.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/rq_import/_grid_from_cp.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/rq_import/_import_nexus.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/rq_import/_import_vdb_all_grids.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/rq_import/_import_vdb_ensemble.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/strata/__init__.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/strata/_binary_contact_interpretation.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/strata/_geologic_unit_interpretation.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/strata/_strata_common.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/strata/_stratigraphic_column.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/strata/_stratigraphic_column_rank.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/strata/_stratigraphic_unit_feature.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/strata/_stratigraphic_unit_interpretation.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/surface/__init__.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/surface/_base_surface.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/surface/_combined_surface.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/surface/_mesh.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/surface/_pointset.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/surface/_surface.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/surface/_tri_mesh.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/surface/_tri_mesh_stencil.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/surface/_triangulated_patch.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/time_series/__init__.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/time_series/_any_time_series.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/time_series/_from_nexus_summary.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/time_series/_functions.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/time_series/_geologic_time_series.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/time_series/_time_duration.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/time_series/_time_series.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/unstructured/__init__.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/unstructured/_hexa_grid.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/unstructured/_prism_grid.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/unstructured/_pyramid_grid.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/unstructured/_tetra_grid.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/unstructured/_unstructured_grid.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/weights_and_measures/__init__.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/weights_and_measures/nexus_units.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/weights_and_measures/weights_and_measures.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/well/__init__.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/well/_blocked_well.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/well/_deviation_survey.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/well/_md_datum.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/well/_trajectory.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/well/_wellbore_frame.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/well/_wellbore_marker.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/well/_wellbore_marker_frame.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/well/well_object_funcs.py +0 -0
- {resqpy-4.17.10 → resqpy-4.18.1}/resqpy/well/well_utils.py +0 -0
@@ -23,6 +23,8 @@ __all__ = [
|
|
23
23
|
"find_faces_to_represent_surface_regular_dense_optimised",
|
24
24
|
"find_faces_to_represent_surface",
|
25
25
|
"bisector_from_faces",
|
26
|
+
"bisector_from_face_indices",
|
27
|
+
"packed_bisector_from_face_indices",
|
26
28
|
"column_bisector_from_faces",
|
27
29
|
"shadow_from_faces",
|
28
30
|
"get_boundary",
|
@@ -61,6 +63,8 @@ from ._find_faces import (
|
|
61
63
|
find_faces_to_represent_surface_regular_dense_optimised,
|
62
64
|
find_faces_to_represent_surface,
|
63
65
|
bisector_from_faces,
|
66
|
+
bisector_from_face_indices,
|
67
|
+
packed_bisector_from_face_indices,
|
64
68
|
column_bisector_from_faces,
|
65
69
|
shadow_from_faces,
|
66
70
|
get_boundary,
|
@@ -24,6 +24,27 @@ import resqpy.olio.vector_utilities as vec
|
|
24
24
|
# note: resqpy.grid_surface._grid_surface_cuda will be imported by the find_faces_to_represent_surface() function if needed
|
25
25
|
|
26
26
|
|
27
|
+
@njit # pragma: no cover
|
28
|
+
def _bitwise_count_njit(a: np.ndarray) -> int:
|
29
|
+
"""Deprecated: only needed till numpy versions < 2.0.0 are dropped."""
|
30
|
+
c: int = 0
|
31
|
+
c += np.count_nonzero(np.bitwise_and(a, 0x01))
|
32
|
+
c += np.count_nonzero(np.bitwise_and(a, 0x02))
|
33
|
+
c += np.count_nonzero(np.bitwise_and(a, 0x04))
|
34
|
+
c += np.count_nonzero(np.bitwise_and(a, 0x08))
|
35
|
+
c += np.count_nonzero(np.bitwise_and(a, 0x10))
|
36
|
+
c += np.count_nonzero(np.bitwise_and(a, 0x20))
|
37
|
+
c += np.count_nonzero(np.bitwise_and(a, 0x40))
|
38
|
+
c += np.count_nonzero(np.bitwise_and(a, 0x80))
|
39
|
+
return c
|
40
|
+
|
41
|
+
|
42
|
+
if hasattr(np, 'bitwise_count'):
|
43
|
+
bitwise_count = np.bitwise_count
|
44
|
+
else:
|
45
|
+
bitwise_count = _bitwise_count_njit
|
46
|
+
|
47
|
+
|
27
48
|
def find_faces_to_represent_surface_staffa(grid, surface, name, feature_type = "fault", progress_fn = None):
|
28
49
|
"""Returns a grid connection set containing those cell faces which are deemed to represent the surface.
|
29
50
|
|
@@ -877,7 +898,8 @@ def find_faces_to_represent_surface_regular_optimised(grid,
|
|
877
898
|
progress_fn = None,
|
878
899
|
return_properties = None,
|
879
900
|
raw_bisector = False,
|
880
|
-
n_batches = 20
|
901
|
+
n_batches = 20,
|
902
|
+
packed_bisectors = False):
|
881
903
|
"""Returns a grid connection set containing those cell faces which are deemed to represent the surface.
|
882
904
|
|
883
905
|
argumants:
|
@@ -911,6 +933,8 @@ def find_faces_to_represent_surface_regular_optimised(grid,
|
|
911
933
|
form without assessing which side is shallower (True values indicate same side as origin cell)
|
912
934
|
n_batches (int, default 20): the number of batches of triangles to use at the low level (numba multi
|
913
935
|
threading allows some parallelism between the batches)
|
936
|
+
packed_bisectors (bool, default False): if True and return properties include 'grid bisector' then
|
937
|
+
non curtain bisectors are returned in packed form
|
914
938
|
|
915
939
|
returns:
|
916
940
|
gcs or (gcs, gcs_props)
|
@@ -1231,6 +1255,12 @@ def find_faces_to_represent_surface_regular_optimised(grid,
|
|
1231
1255
|
(j_faces_kji0 is None or len(j_faces_kji0) == 0) and (i_faces_kji0 is None or len(i_faces_kji0) == 0)):
|
1232
1256
|
bisector = np.ones((grid.nj, grid.ni), dtype = bool)
|
1233
1257
|
is_curtain = True
|
1258
|
+
elif packed_bisectors:
|
1259
|
+
bisector, is_curtain = packed_bisector_from_face_indices(tuple(grid.extent_kji), k_faces_kji0,
|
1260
|
+
j_faces_kji0, i_faces_kji0, raw_bisector)
|
1261
|
+
if is_curtain:
|
1262
|
+
bisector = np.unpackbits(bisector[0], axis = -1,
|
1263
|
+
count = grid.ni).astype(bool) # reduce to a columns property
|
1234
1264
|
else:
|
1235
1265
|
bisector, is_curtain = bisector_from_face_indices(tuple(grid.extent_kji), k_faces_kji0, j_faces_kji0,
|
1236
1266
|
i_faces_kji0, raw_bisector)
|
@@ -1478,6 +1508,92 @@ def bisector_from_face_indices( # type: ignore
|
|
1478
1508
|
return array, is_curtain
|
1479
1509
|
|
1480
1510
|
|
1511
|
+
def packed_bisector_from_face_indices( # type: ignore
|
1512
|
+
grid_extent_kji: Tuple[int, int, int], k_faces_kji0: Union[np.ndarray, None], j_faces_kji0: Union[np.ndarray,
|
1513
|
+
None],
|
1514
|
+
i_faces_kji0: Union[np.ndarray, None], raw_bisector: bool) -> Tuple[np.ndarray, bool]:
|
1515
|
+
"""Creates a uint8 (packed bool) array denoting the bisection of the grid by the face sets.
|
1516
|
+
|
1517
|
+
arguments:
|
1518
|
+
- grid_extent_kji (Tuple[int, int, int]): the shape of the grid
|
1519
|
+
- k_faces_kji0 (np.ndarray): an int array of indices of which faces represent the surface in the k dimension
|
1520
|
+
- j_faces_kji0 (np.ndarray): an int array of indices of which faces represent the surface in the j dimension
|
1521
|
+
- i_faces_kji0 (np.ndarray): an int array of indices of which faces represent the surface in the i dimension
|
1522
|
+
- raw_bisector (bool): if True, the bisector is returned without determining which side is shallower
|
1523
|
+
|
1524
|
+
returns:
|
1525
|
+
Tuple containing:
|
1526
|
+
- array (np.uint8 array): packed boolean bisector array where values are 1 for cells on the side
|
1527
|
+
of the surface that has a lower mean k index on average and 0 for cells on the other side
|
1528
|
+
- is_curtain (bool): True if the surface is a curtain (vertical), otherwise False
|
1529
|
+
|
1530
|
+
notes:
|
1531
|
+
- the face sets must form a single 'sealed' cut of the grid (eg. not waving in and out of the grid)
|
1532
|
+
- any 'boxed in' parts of the grid (completely enclosed by bisecting faces) will be consistently
|
1533
|
+
assigned to either the True or False part
|
1534
|
+
- the returned array is packed in the I axis; use np.unpackbits() to unpack
|
1535
|
+
"""
|
1536
|
+
assert len(grid_extent_kji) == 3
|
1537
|
+
|
1538
|
+
# find the surface boundary (includes a buffer slice where surface does not reach edge of grid), and shrink the I axis
|
1539
|
+
box = get_packed_boundary_from_indices(k_faces_kji0, j_faces_kji0, i_faces_kji0, grid_extent_kji)
|
1540
|
+
# set k_faces as uint8 packed bool arrays covering box
|
1541
|
+
k_faces, j_faces, i_faces = _packed_box_face_arrays_from_indices(k_faces_kji0, j_faces_kji0, i_faces_kji0, box)
|
1542
|
+
|
1543
|
+
box_shape = box[1, :] - box[0, :]
|
1544
|
+
|
1545
|
+
# set up the bisector array for the bounding box
|
1546
|
+
box_array = np.zeros(box_shape, dtype = np.uint8)
|
1547
|
+
|
1548
|
+
# seed the bisector box array at (0, 0, 0)
|
1549
|
+
box_array[0, 0, 0] = 0x80 # first bit only set
|
1550
|
+
|
1551
|
+
# prepare to spread True values to neighbouring cells that are not the other side of a face
|
1552
|
+
if k_faces is None:
|
1553
|
+
open_k = np.invert(np.zeros((box_shape[0] - 1, box_shape[1], box_shape[2]), dtype = np.uint8), dtype = np.uint8)
|
1554
|
+
else:
|
1555
|
+
open_k = np.invert(k_faces, dtype = np.uint8)
|
1556
|
+
if j_faces is None:
|
1557
|
+
open_j = np.invert(np.zeros((box_shape[0], box_shape[1] - 1, box_shape[2]), dtype = np.uint8), dtype = np.uint8)
|
1558
|
+
else:
|
1559
|
+
open_j = np.invert(j_faces, dtype = np.uint8)
|
1560
|
+
if i_faces is None:
|
1561
|
+
open_i = np.invert(np.zeros(tuple(box_shape), dtype = np.uint8), dtype = np.uint8)
|
1562
|
+
else:
|
1563
|
+
open_i = np.invert(i_faces, dtype = np.uint8)
|
1564
|
+
|
1565
|
+
# close off faces in padding bits
|
1566
|
+
tail = grid_extent_kji[2] % 8 # number of valid bits in padded byte
|
1567
|
+
if tail:
|
1568
|
+
m = np.uint8((255 << (8 - tail)) & 255)
|
1569
|
+
open_k[:, :, -1] &= m
|
1570
|
+
open_j[:, :, -1] &= m
|
1571
|
+
m = np.uint8((m << 1) & 255)
|
1572
|
+
open_i[:, :, -1] &= m
|
1573
|
+
|
1574
|
+
# populate bisector array for box
|
1575
|
+
_fill_packed_bisector(box_array, open_k, open_j, open_i)
|
1576
|
+
|
1577
|
+
del open_i, open_j, open_k
|
1578
|
+
|
1579
|
+
# set up the full bisectors array and assigning the bounding box values
|
1580
|
+
array = np.zeros(_shape_packed(grid_extent_kji), dtype = np.uint8)
|
1581
|
+
array[box[0, 0]:box[1, 0], box[0, 1]:box[1, 1], box[0, 2]:box[1, 2]] = box_array
|
1582
|
+
|
1583
|
+
# set bisector values outside of the bounding box
|
1584
|
+
_set_packed_bisector_outside_box(array, box, box_array)
|
1585
|
+
|
1586
|
+
# check all array elements are not the same
|
1587
|
+
true_count = np.sum(bitwise_count(array)) # note: will usually include some padding bits, so not so true!
|
1588
|
+
cell_count = np.prod(grid_extent_kji)
|
1589
|
+
assert (0 < true_count < cell_count), "face set for surface is leaky or empty (surface does not intersect grid)"
|
1590
|
+
|
1591
|
+
# negate the array if it minimises the mean k and determine if the surface is a curtain
|
1592
|
+
is_curtain = _packed_shallow_or_curtain(array, true_count, raw_bisector)
|
1593
|
+
|
1594
|
+
return array, is_curtain
|
1595
|
+
|
1596
|
+
|
1481
1597
|
def column_bisector_from_face_indices(grid_extent_ji: Tuple[int, int], j_faces_ji0: np.ndarray,
|
1482
1598
|
i_faces_ji0: np.ndarray) -> np.ndarray:
|
1483
1599
|
"""Returns a numpy bool array denoting the bisection of the top layer of the grid by the curtain face sets.
|
@@ -1890,14 +2006,12 @@ def _all_offsets(crs, k_offsets_list, j_offsets_list, i_offsets_list):
|
|
1890
2006
|
|
1891
2007
|
@njit # pragma: no cover
|
1892
2008
|
def _fill_bisector(bisect: np.ndarray, open_k: np.ndarray, open_j: np.ndarray, open_i: np.ndarray):
|
1893
|
-
change = np.zeros(bisect.shape, dtype = np.bool_)
|
1894
2009
|
nk: int = bisect.shape[0]
|
1895
2010
|
nj: int = bisect.shape[1]
|
1896
2011
|
ni: int = bisect.shape[2]
|
1897
2012
|
going: bool = True
|
1898
2013
|
while going:
|
1899
2014
|
going = False
|
1900
|
-
change[:] = False
|
1901
2015
|
for k in range(nk):
|
1902
2016
|
for j in range(nj):
|
1903
2017
|
for i in range(ni):
|
@@ -1911,7 +2025,43 @@ def _fill_bisector(bisect: np.ndarray, open_k: np.ndarray, open_j: np.ndarray, o
|
|
1911
2025
|
(i < ni - 1 and bisect[k, j, i + 1] and open_i[k, j, i])):
|
1912
2026
|
bisect[k, j, i] = True
|
1913
2027
|
going = True
|
2028
|
+
|
2029
|
+
|
2030
|
+
# TODO: uncomment njit
|
2031
|
+
#@njit # pragma: no cover
|
2032
|
+
def _fill_packed_bisector(bisect: np.ndarray, open_k: np.ndarray, open_j: np.ndarray, open_i: np.ndarray):
|
2033
|
+
nk: int = bisect.shape[0]
|
2034
|
+
nj: int = bisect.shape[1]
|
2035
|
+
ni: int = bisect.shape[2]
|
2036
|
+
going: bool = True
|
2037
|
+
while going:
|
2038
|
+
going = False
|
2039
|
+
for k in range(nk):
|
2040
|
+
for j in range(nj):
|
2041
|
+
for i in range(ni):
|
2042
|
+
m = bisect[k, j, i] # 8 bools packed into a uint8
|
2043
|
+
if bisect[k, j, i] == 255: # all 8 values already set
|
1914
2044
|
continue
|
2045
|
+
om = m # copy to check for changes later
|
2046
|
+
if k:
|
2047
|
+
m |= (bisect[k - 1, j, i] & open_k[k - 1, j, i])
|
2048
|
+
if k < nk - 1:
|
2049
|
+
m |= (bisect[k + 1, j, i] & open_k[k, j, i])
|
2050
|
+
if j:
|
2051
|
+
m |= (bisect[k, j - 1, i] & open_j[k, j - 1, i])
|
2052
|
+
if j < nj - 1:
|
2053
|
+
m |= (bisect[k, j + 1, i] & open_j[k, j, i])
|
2054
|
+
oi = open_i[k, j, i]
|
2055
|
+
m |= (m >> 1) & (oi >> 1)
|
2056
|
+
m |= (m << 1) & oi
|
2057
|
+
# handle rollover bits for I
|
2058
|
+
if i and (bisect[k, j, i - 1] & open_i[k, j, i - 1] & 1):
|
2059
|
+
m |= 0x80
|
2060
|
+
if (i < ni - 1) and (oi & 1) and (bisect[k, j, i + 1] & 0x80):
|
2061
|
+
m |= 1
|
2062
|
+
if m != om:
|
2063
|
+
bisect[k, j, i] = m
|
2064
|
+
going = True
|
1915
2065
|
|
1916
2066
|
|
1917
2067
|
@njit # pragma: no cover
|
@@ -1937,6 +2087,30 @@ def _shallow_or_curtain(a: np.ndarray, true_count: int, raw: bool) -> bool:
|
|
1937
2087
|
return is_curtain
|
1938
2088
|
|
1939
2089
|
|
2090
|
+
# TODO: uncomment njit
|
2091
|
+
#@njit # pragma: no cover
|
2092
|
+
def _packed_shallow_or_curtain(a: np.ndarray, true_count: int, raw: bool) -> bool:
|
2093
|
+
# negate the packed bool array if it minimises the mean k and determine if the bisector indicates a curtain
|
2094
|
+
assert a.ndim == 3
|
2095
|
+
layer_cell_count: int = 8 * a.shape[1] * a.shape[2] # note: includes padding bits
|
2096
|
+
k_sum: int = 0
|
2097
|
+
opposite_k_sum: int = 0
|
2098
|
+
is_curtain: bool = False
|
2099
|
+
layer_count: int = 0
|
2100
|
+
for k in range(a.shape[0]):
|
2101
|
+
layer_count = np.sum(bitwise_count(a[k]))
|
2102
|
+
k_sum += (k + 1) * layer_count
|
2103
|
+
opposite_k_sum += (k + 1) * (layer_cell_count - layer_count)
|
2104
|
+
mean_k: float = float(k_sum) / float(true_count)
|
2105
|
+
opposite_mean_k: float = float(opposite_k_sum) / float(8 * a.size - true_count)
|
2106
|
+
if mean_k > opposite_mean_k and not raw:
|
2107
|
+
a[:] = np.invert(a, dtype = np.uint8)
|
2108
|
+
if abs(mean_k - opposite_mean_k) <= 0.001:
|
2109
|
+
# log.warning('unable to determine which side of surface is shallower')
|
2110
|
+
is_curtain = True
|
2111
|
+
return is_curtain
|
2112
|
+
|
2113
|
+
|
1940
2114
|
def _set_bisector_outside_box(a: np.ndarray, box: np.ndarray, box_array: np.ndarray):
|
1941
2115
|
# set values outside of the bounding box
|
1942
2116
|
if box[1, 0] < a.shape[0] and np.any(box_array[-1, :, :]):
|
@@ -1953,6 +2127,22 @@ def _set_bisector_outside_box(a: np.ndarray, box: np.ndarray, box_array: np.ndar
|
|
1953
2127
|
a[:, :, :box[0, 2]] = True
|
1954
2128
|
|
1955
2129
|
|
2130
|
+
def _set_packed_bisector_outside_box(a: np.ndarray, box: np.ndarray, box_array: np.ndarray):
|
2131
|
+
# set values outside of the bounding box, working with packed arrays
|
2132
|
+
if box[1, 0] < a.shape[0] and np.any(box_array[-1, :, :]):
|
2133
|
+
a[box[1, 0]:, :, :] = 255
|
2134
|
+
if box[0, 0] != 0:
|
2135
|
+
a[:box[0, 0], :, :] = 255
|
2136
|
+
if box[1, 1] < a.shape[1] and np.any(box_array[:, -1, :]):
|
2137
|
+
a[:, box[1, 1]:, :] = 255
|
2138
|
+
if box[0, 1] != 0:
|
2139
|
+
a[:, :box[0, 1], :] = 255
|
2140
|
+
if box[1, 2] < a.shape[2] and np.any(np.bitwise_and(box_array[:, :, -1], 1)):
|
2141
|
+
a[:, :, box[1, 2]:] = 255
|
2142
|
+
if box[0, 2] != 0:
|
2143
|
+
a[:, :, :box[0, 2]] = 255
|
2144
|
+
|
2145
|
+
|
1956
2146
|
def _box_face_arrays_from_indices( # type: ignore
|
1957
2147
|
k_faces_kji0: Union[np.ndarray, None], j_faces_kji0: Union[np.ndarray, None],
|
1958
2148
|
i_faces_kji0: Union[np.ndarray, None], box: np.ndarray) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:
|
@@ -1972,6 +2162,25 @@ def _box_face_arrays_from_indices( # type: ignore
|
|
1972
2162
|
return k_a, j_a, i_a
|
1973
2163
|
|
1974
2164
|
|
2165
|
+
def _packed_box_face_arrays_from_indices( # type: ignore
|
2166
|
+
k_faces_kji0: Union[np.ndarray, None], j_faces_kji0: Union[np.ndarray, None],
|
2167
|
+
i_faces_kji0: Union[np.ndarray, None], box: np.ndarray) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:
|
2168
|
+
box_shape = box[1, :] - box[0, :] # note: I axis already shrunken
|
2169
|
+
k_a = np.zeros((box_shape[0] - 1, box_shape[1], box_shape[2]), dtype = np.uint8)
|
2170
|
+
j_a = np.zeros((box_shape[0], box_shape[1] - 1, box_shape[2]), dtype = np.uint8)
|
2171
|
+
i_a = np.zeros(tuple(box_shape), dtype = np.uint8)
|
2172
|
+
ko = box[0, 0]
|
2173
|
+
jo = box[0, 1]
|
2174
|
+
io = box[0, 2]
|
2175
|
+
if k_faces_kji0 is not None:
|
2176
|
+
_set_packed_face_array(k_a, k_faces_kji0, ko, jo, io)
|
2177
|
+
if j_faces_kji0 is not None:
|
2178
|
+
_set_packed_face_array(j_a, j_faces_kji0, ko, jo, io)
|
2179
|
+
if i_faces_kji0 is not None:
|
2180
|
+
_set_packed_face_array(i_a, i_faces_kji0, ko, jo, io)
|
2181
|
+
return k_a, j_a, i_a
|
2182
|
+
|
2183
|
+
|
1975
2184
|
@njit # pragma: no cover
|
1976
2185
|
def _set_face_array(a: np.ndarray, indices: np.ndarray, ko: int, jo: int, io: int):
|
1977
2186
|
k: int = 0
|
@@ -1984,6 +2193,19 @@ def _set_face_array(a: np.ndarray, indices: np.ndarray, ko: int, jo: int, io: in
|
|
1984
2193
|
a[k, j, i] = True
|
1985
2194
|
|
1986
2195
|
|
2196
|
+
@njit # pragma: no cover
|
2197
|
+
def _set_packed_face_array(a: np.ndarray, indices: np.ndarray, ko: int, jo: int, io: int):
|
2198
|
+
k: int = 0
|
2199
|
+
j: int = 0
|
2200
|
+
i: int = 0
|
2201
|
+
for ind in range(len(indices)):
|
2202
|
+
k = indices[ind, 0] - ko
|
2203
|
+
j = indices[ind, 1] - jo
|
2204
|
+
i = indices[ind, 2] - io
|
2205
|
+
ii, ib = divmod(i, 8)
|
2206
|
+
a[k, j, ii] |= (1 << (7 - ib))
|
2207
|
+
|
2208
|
+
|
1987
2209
|
def get_boundary_from_indices( # type: ignore
|
1988
2210
|
k_faces_kji0: Union[np.ndarray, None], j_faces_kji0: Union[np.ndarray, None],
|
1989
2211
|
i_faces_kji0: Union[np.ndarray, None], grid_extent_kji: Tuple[int, int, int]) -> np.ndarray:
|
@@ -2028,3 +2250,23 @@ def get_boundary_from_indices( # type: ignore
|
|
2028
2250
|
assert np.all(box[1] > box[0])
|
2029
2251
|
assert np.all(box[1] <= grid_extent_kji)
|
2030
2252
|
return box
|
2253
|
+
|
2254
|
+
|
2255
|
+
def get_packed_boundary_from_indices( # type: ignore
|
2256
|
+
k_faces_kji0: Union[np.ndarray, None], j_faces_kji0: Union[np.ndarray, None],
|
2257
|
+
i_faces_kji0: Union[np.ndarray, None], grid_extent_kji: Tuple[int, int, int]) -> np.ndarray:
|
2258
|
+
"""Return python protocol box containing indices, with I axis packed"""
|
2259
|
+
box = get_boundary_from_indices(k_faces_kji0, j_faces_kji0, i_faces_kji0, grid_extent_kji)
|
2260
|
+
box[0, 2] /= 8
|
2261
|
+
box[1, 2] = ((box[1, 2] - 1) // 8) + 1
|
2262
|
+
return box
|
2263
|
+
|
2264
|
+
|
2265
|
+
def _shape_packed(unpacked_shape):
|
2266
|
+
"""Return the equivalent packed shape for a given unpacked shape, as a tuple."""
|
2267
|
+
shrunken = ((unpacked_shape[-1] - 1) // 8) + 1
|
2268
|
+
if len(unpacked_shape) == 1:
|
2269
|
+
return (shrunken,)
|
2270
|
+
head = list(unpacked_shape[:-1])
|
2271
|
+
head.append(shrunken)
|
2272
|
+
return tuple(head)
|
@@ -18,32 +18,32 @@ import resqpy.surface as rqs
|
|
18
18
|
import resqpy.olio.uuid as bu
|
19
19
|
|
20
20
|
|
21
|
-
def find_faces_to_represent_surface_regular_wrapper(
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
21
|
+
def find_faces_to_represent_surface_regular_wrapper(index: int,
|
22
|
+
parent_tmp_dir: str,
|
23
|
+
use_index_as_realisation: bool,
|
24
|
+
grid_epc: str,
|
25
|
+
grid_uuid: Union[UUID, str],
|
26
|
+
surface_epc: str,
|
27
|
+
surface_uuid: Union[UUID, str],
|
28
|
+
name: str,
|
29
|
+
title: Optional[str] = None,
|
30
|
+
agitate: bool = False,
|
31
|
+
random_agitation: bool = False,
|
32
|
+
feature_type: str = 'fault',
|
33
|
+
trimmed: bool = False,
|
34
|
+
is_curtain = False,
|
35
|
+
extend_fault_representation: bool = False,
|
36
|
+
flange_inner_ring = False,
|
37
|
+
saucer_parameter = None,
|
38
|
+
retriangulate: bool = False,
|
39
|
+
related_uuid = None,
|
40
|
+
progress_fn: Optional[Callable] = None,
|
41
|
+
extra_metadata = None,
|
42
|
+
return_properties: Optional[List[str]] = None,
|
43
|
+
raw_bisector: bool = False,
|
44
|
+
use_pack: bool = False,
|
45
|
+
flange_radius = None,
|
46
|
+
n_threads = 20) -> Tuple[int, bool, str, List[Union[UUID, str]]]:
|
47
47
|
"""Multiprocessing wrapper function of find_faces_to_represent_surface_regular_optimised.
|
48
48
|
|
49
49
|
arguments:
|
@@ -92,10 +92,11 @@ def find_faces_to_represent_surface_regular_wrapper(
|
|
92
92
|
the returned dictionary has the passed strings as keys and numpy arrays as values
|
93
93
|
raw_bisector (bool, default False): if True and grid bisector is requested then it is left in a raw
|
94
94
|
form without assessing which side is shallower (True values indicate same side as origin cell)
|
95
|
-
use_pack (bool, default False): if True, boolean properties will be stored in numpy
|
96
|
-
which will only be readable by resqpy based applications
|
95
|
+
use_pack (bool, default False): if True, boolean properties will be generated and stored in numpy
|
96
|
+
packed format, which will only be readable by resqpy based applications
|
97
97
|
flange_radius (float, optional): the radial distance to use for outer flange extension points; if None,
|
98
98
|
a large value will be calculated from the grid size; units are xy units of grid crs
|
99
|
+
n_threads (int, default 20): the number of parallel threads to use in numba points in triangles function
|
99
100
|
|
100
101
|
returns:
|
101
102
|
Tuple containing:
|
@@ -250,7 +251,9 @@ def find_faces_to_represent_surface_regular_wrapper(
|
|
250
251
|
is_curtain,
|
251
252
|
progress_fn,
|
252
253
|
return_properties,
|
253
|
-
raw_bisector = raw_bisector
|
254
|
+
raw_bisector = raw_bisector,
|
255
|
+
n_batches = n_threads,
|
256
|
+
packed_bisectors = use_pack)
|
254
257
|
|
255
258
|
success = False
|
256
259
|
|
@@ -340,17 +343,17 @@ def find_faces_to_represent_surface_regular_wrapper(
|
|
340
343
|
if grid_pc is None:
|
341
344
|
grid_pc = rqp.PropertyCollection()
|
342
345
|
grid_pc.set_support(support = grid)
|
343
|
-
grid_pc.add_cached_array_to_imported_list(
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
346
|
+
grid_pc.add_cached_array_to_imported_list(array,
|
347
|
+
f"from find_faces function for {surface.title}",
|
348
|
+
f'{surface.title} {p_name}',
|
349
|
+
discrete = True,
|
350
|
+
property_kind = "grid bisector",
|
351
|
+
facet_type = 'direction',
|
352
|
+
facet = 'raw' if raw_bisector else
|
353
|
+
('vertical' if is_curtain else 'sloping'),
|
354
|
+
realization = realisation,
|
355
|
+
indexable_element = "columns" if is_curtain else "cells",
|
356
|
+
pre_packed = use_pack)
|
354
357
|
elif p_name == 'grid shadow':
|
355
358
|
if grid_pc is None:
|
356
359
|
grid_pc = rqp.PropertyCollection()
|
@@ -101,7 +101,7 @@ class H5Register():
|
|
101
101
|
assert chunks is None or isinstance(chunks, str) or isinstance(chunks, tuple)
|
102
102
|
assert compression is None or (isinstance(compression, str) and compression in ['gzip', 'lzf', 'none'])
|
103
103
|
if str(dtype) == 'pack':
|
104
|
-
a = np.packbits(a, axis = -1)
|
104
|
+
a = np.packbits(a, axis = -1)
|
105
105
|
dtype = 'uint8'
|
106
106
|
elif dtype is not None:
|
107
107
|
a = a.astype(dtype, copy = copy)
|
@@ -199,7 +199,7 @@ def _process_imported_property(collection, attributes, property_kind_uuid, strin
|
|
199
199
|
extra_metadata, expand_const_arrays):
|
200
200
|
(p_uuid, p_file_name, p_keyword, p_cached_name, p_discrete, p_uom, p_time_index, p_null_value, p_min_value,
|
201
201
|
p_max_value, property_kind, facet_type, facet, realization, indexable_element, count, local_property_kind_uuid,
|
202
|
-
const_value, points, p_time_series_uuid, p_string_lookup_uuid) = attributes
|
202
|
+
const_value, points, p_time_series_uuid, p_string_lookup_uuid, pre_packed) = attributes
|
203
203
|
|
204
204
|
log.debug('processing imported property ' + str(p_keyword))
|
205
205
|
assert not points or not p_discrete
|
@@ -214,7 +214,7 @@ def _process_imported_property(collection, attributes, property_kind_uuid, strin
|
|
214
214
|
p_keyword, p_discrete, string_lookup_uuid, points)
|
215
215
|
|
216
216
|
p_array = _process_imported_property_get_p_array(collection, p_cached_name)
|
217
|
-
p_array_bool = isinstance(const_value, bool) if p_array is None else p_array.dtype in [bool, np.int8]
|
217
|
+
p_array_bool = isinstance(const_value, bool) if p_array is None else p_array.dtype in [bool, np.int8, np.uint8]
|
218
218
|
|
219
219
|
add_min_max = pcga._process_imported_property_get_add_min_max(points, property_kind, string_lookup_uuid,
|
220
220
|
local_property_kind_uuid, p_array_bool)
|
@@ -251,7 +251,8 @@ def _process_imported_property(collection, attributes, property_kind_uuid, strin
|
|
251
251
|
find_local_property_kinds = find_local_property_kinds,
|
252
252
|
extra_metadata = extra_metadata,
|
253
253
|
const_value = const_value,
|
254
|
-
expand_const_arrays = expand_const_arrays
|
254
|
+
expand_const_arrays = expand_const_arrays,
|
255
|
+
pre_packed = pre_packed)
|
255
256
|
if p_node is not None:
|
256
257
|
return p_node
|
257
258
|
else:
|
@@ -246,8 +246,10 @@ def _create_xml_facet_node(facet_type, facet, p_node):
|
|
246
246
|
facet_value_node.text = facet
|
247
247
|
|
248
248
|
|
249
|
-
def _check_shape_list(collection, indexable_element, direction, property_array, points, count):
|
249
|
+
def _check_shape_list(collection, indexable_element, direction, property_array, points, count, pre_packed):
|
250
250
|
shape_list = collection.supporting_shape(indexable_element = indexable_element, direction = direction)
|
251
|
+
if pre_packed:
|
252
|
+
shape_list[-1] = (shape_list[-1] - 1) // 8 + 1
|
251
253
|
if shape_list is not None:
|
252
254
|
if count > 1:
|
253
255
|
shape_list.append(count)
|