Skip to content

[CLN] Remove unused experimental watertight dual contouring code#52

Open
Leguark wants to merge 25 commits intooptimizefrom
optimize_evaluation
Open

[CLN] Remove unused experimental watertight dual contouring code#52
Leguark wants to merge 25 commits intooptimizefrom
optimize_evaluation

Conversation

@Leguark
Copy link
Member

@Leguark Leguark commented Mar 13, 2026

[CLN] Remove unused experimental watertight dual contouring code

  • Deleted _experimental_water_tight_DC_1.py and _interpolate_on_edges.py as unused and redundant.
  • Removed references to deprecated watertightness-related debug options.
  • Cleaned up legacy logic in multi_scalar_dual_contouring.py.
  • Simplified comments and unused code in interpolation features.

[ENH] Add scalar field verification for graben and simplest models

  • Introduced scalar field sampling and verification for "graben_fault_model" and "simplest_model" tests.
  • Integrated approval tests with gempy_verify_array using GenericDiffReporter.
  • Updated test_public_interface and added _verify_scalar_field for scalar field validation.
  • Improved readability and debugging options for scalar field outputs.

[CLN] Remove unused import for experimental watertight dual contouring

[CLN] Remove unused function interpolate_single_field and clean up related logic

  • Deleted interpolate_single_field as it was redundant and only used in testing.
  • Replaced its test references with a local _interpolate_single_field helper function.
  • Refactored and streamlined the interpolate_scalar_field logic, moving parts to a new foo function for better clarity.
  • Improved code organization by restructuring imports and removing unused dependencies.

[WIP] Towards transposing stack loops

[WIP] SPlitting interpolate feature function

[WIP] Adding input classes for the efficient way of compute stacks

[WIP] Working out the loops

[WIP] Running tests

[WIP] Adding logic for solving faults

[CLN] Move functions to each own module

[CLN] Remove unused local function _grab_stack_fault_data and clean up related logic

  • Deleted _grab_stack_fault_data as it was redundant and unused.
  • Adjusted imports to reflect related changes.
  • Simplified _interpolate_stack by removing unnecessary code.

[CLN] Refactor stack structure logic and simplify interpolation input management

  • Updated stack structure handling to directly use stack_structure.stack_number instead of passing stack_number.
  • Removed redundant conditional in _multi_scalar_field_manager.
  • Streamlined interpolation input creation by eliminating unnecessary function arguments.

[WIP] Debugging interpolation flat

[WIP] Debugging interpolation flat II

[WIP] Fault test runs but with different result

[WIP] Debugging

[WIP] Trying to deal with stacks dependencies

[WIP] Chuncking

[WIP] Tests running

[WIP] cleaning

[ENH] interpolate_stack_flat running

[CLN] Refactor _stack_ops and _multi_scalar_field_manager for clarity and consistency

  • Renamed _InterpolationState to InterpolationState and _process_chunk to process_chunk.
  • Replaced multiple internal functions (e.g., compute_weights_for_stacks, evaluate, segment) with prefixed counterparts (_compute_weights_for_stacks, _evaluate, _segment) for better encapsulation.
  • Simplified fault values update logic within _process_chunk.
  • Removed redundant imports and improved type annotations for consistency across modules.

[ENH] Add external interpolation function support and improve segmentation logic

  • Introduced _scalar_field_segmentation_v2 for segmentation using an activator interface.
  • Added interpolate_feature_with_external_function to handle external interpolation logic.
  • Refactored segmentation into a dedicated _segment function for clarity and reuse.
  • Updated _stack_ops and _multi_scalar_field_manager to support stack-specific interpolation functions and external segmentation.

Copy link
Member Author

Leguark commented Mar 13, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Leguark added 22 commits March 18, 2026 15:42
- Deleted `_experimental_water_tight_DC_1.py` and `_interpolate_on_edges.py` as unused and redundant.
- Removed references to deprecated watertightness-related debug options.
- Cleaned up legacy logic in `multi_scalar_dual_contouring.py`.
- Simplified comments and unused code in interpolation features.
- Introduced scalar field sampling and verification for "graben_fault_model" and "simplest_model" tests.
- Integrated approval tests with `gempy_verify_array` using `GenericDiffReporter`.
- Updated `test_public_interface` and added `_verify_scalar_field` for scalar field validation.
- Improved readability and debugging options for scalar field outputs.
…related logic

- Deleted `interpolate_single_field` as it was redundant and only used in testing.
- Replaced its test references with a local `_interpolate_single_field` helper function.
- Refactored and streamlined the `interpolate_scalar_field` logic, moving parts to a new `foo` function for better clarity.
- Improved code organization by restructuring imports and removing unused dependencies.
… up related logic

- Deleted `_grab_stack_fault_data` as it was redundant and unused.
- Adjusted imports to reflect related changes.
- Simplified `_interpolate_stack` by removing unnecessary code.
… management

- Updated stack structure handling to directly use `stack_structure.stack_number` instead of passing `stack_number`.
- Removed redundant conditional in `_multi_scalar_field_manager`.
- Streamlined interpolation input creation by eliminating unnecessary function arguments.
Leguark added 2 commits March 18, 2026 15:42
…rity and consistency

- Renamed `_InterpolationState` to `InterpolationState` and `_process_chunk` to `process_chunk`.
- Replaced multiple internal functions (e.g., `compute_weights_for_stacks`, `evaluate`, `segment`) with prefixed counterparts (`_compute_weights_for_stacks`, `_evaluate`, `_segment`) for better encapsulation.
- Simplified fault values update logic within `_process_chunk`.
- Removed redundant imports and improved type annotations for consistency across modules.
…ation logic

- Introduced `_scalar_field_segmentation_v2` for segmentation using an activator interface.
- Added `interpolate_feature_with_external_function` to handle external interpolation logic.
- Refactored segmentation into a dedicated `_segment` function for clarity and reuse.
- Updated `_stack_ops` and `_multi_scalar_field_manager` to support stack-specific interpolation functions and external segmentation.
- Updated `gempy_verify_array` to use `PythonNativeReporter` when running in CI environments.
- Retained custom diff tool support for local development with `GenericDiffReporter`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant