Repository navigation
Fields evaluated where they are read, declared on Space - #362
Merged
Merged
Conversation
Space declares evaluated, continuous, default_subdivision, integration_order, rebind and stored, each with its default, and the algorithms read them directly. integrate takes its quadrature order from the space. A toy space in the tests, a function of position computed where it is read, checks contour, clip, threshold, carry, integrate, statistics, entropy, owned_values and the writers' stored values. threshold now reads such a field at its lattice points rather than as cell data.
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.
Title: Fields evaluated where they are read, declared on Space
Split from #300. Stacked on #357, with #355 merged in.
Problem. A space can compute its field where it is read instead of storing values, as a field expression does. #300 supported that by probing undeclared attributes with getattr, and nothing in Tack tested those paths.
Approach. Space declares six attributes, each with its default:
The algorithms read these directly, and the reference docs have a table of them. threshold now reads an evaluated field at its lattice points instead of treating it as cell data. An unbounded value_range makes clip and threshold cut every cell, so they return the same region in more pieces.
Verified. A toy space in the tests computes x*y + z where it is read. It covers contour, clip, threshold, carry and rebind, integrate (including refusing a space with no order), statistics, entropy, owned_values and the writer’s stored values. Each is compared with the same function stored in order-2 H1, which holds it exactly on these hexahedra.