[ENH] Add automatic grid value updates and improve octree deserialization#1089
Merged
[ENH] Add automatic grid value updates and improve octree deserialization#1089
Conversation
… remove `debug_water_tight`
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Contributor
Graphite Automations"Add gempy label" took an action on this PR • (03/23/26)1 label was added to this PR based on Miguel de la Varga's automation. |
Refactored grid deserialization logic to handle different grid types more robustly. Enhanced octree grid handling by ensuring values are updated correctly during deserialization. Also, improved consistency in formatting and added handling for `active_grids` during grid initialization.
…remove redundant attribute assignment
…ues are updated in `grid_API`
…rigger value refresh
compute_scalar and remove debug_water_tight
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This pull request improves grid value synchronization by adding automatic updates when grid properties change. The changes include:
_update_values()call inset_active_grid()function to ensure grid values are refreshed when active grids are modified__setattr__method in the Grid class to automatically trigger value updates whenactive_gridsproperty is changedset_regular_grid()with proper extent, resolution, and transform parametersAnnotatedtype hint for thevalues_2dfieldcompute_scalar: trueand removal ofdebug_water_tightfieldChecklist
or 2. verifies that outputs are as expected for given inputs (e.g. unit tests).