Skip to content

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

Merged
Leguark merged 27 commits intomainfrom
optimize_evaluation
Mar 20, 2026
Merged

[CLN] Remove unused experimental watertight dual contouring code#52
Leguark merged 27 commits intomainfrom
optimize_evaluation

Conversation

@Leguark
Copy link
Copy Markdown
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
Copy Markdown
Member Author

Leguark commented Mar 13, 2026

Copy link
Copy Markdown
Member Author

Leguark commented Mar 20, 2026

Merge activity

  • Mar 20, 10:28 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 20, 10:42 AM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 20, 10:47 AM UTC: @Leguark merged this pull request with Graphite.

@Leguark Leguark changed the base branch from optimize to graphite-base/52 March 20, 2026 10:29
@Leguark Leguark changed the base branch from graphite-base/52 to main March 20, 2026 10:41
Leguark added 17 commits March 20, 2026 10: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 10 commits March 20, 2026 10: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`.
- Updated `verify` to use a formatted string representation of arrays (`np.array2string`) with precision, separator, and line width for better readability and handling.
@Leguark Leguark force-pushed the optimize_evaluation branch from 56e9c31 to 9aa7aa4 Compare March 20, 2026 10:42
@Leguark Leguark merged commit 3cf7603 into main Mar 20, 2026
2 checks passed
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