-
Notifications
You must be signed in to change notification settings - Fork 0
Redesign of continuous and discrete fields #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
biancagi
wants to merge
34
commits into
main
Choose a base branch
from
fields-redesign
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Fields are now simply a concept of functions defined on a set of coordinates. This leads to major simplifications in the api.
It was redundant with respect to {derivative} from the {functions} namespace.
It was redundant with respect to {determinant} from the {functions} namespace.
Can be replaced by {functions::identity}, no need to bother fields.
In most cases, a 'literal constant' can be directly used. In other cases, it can be replaced by {functions::constant}.
No need to bother fields.
Can be replaced by {functions::constant}, no need to bother fields.
… field The test is equivalent but now easier to read. Also, quadrature fields will be removed eventually.
Better to use the more explanatory {component} equivalent.
…instead of {operator[]}
{emplace} is more appropriate here because: 1) it does not need the value type to implement a default constructor; 2) it does not overwrite existing entries.
This coordinate resolves to 1-xi0-xi1-..., consistently with what expected for barycentric coordinates.
…arycentric coordinates of the reference simplex
…from the underlying {GeometricSimplex}
Instances of this class can be localized on finite elements via the {localize} method.
… as functions of tensors
Fem fields should be handed out by the function space.
…nstance as opposed to a nodal field
Nodal fields are now handed out by the function space.
…ions
These functions should not be tied to the {DiscreteSystem}.
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.
This PR addresses two major issues in the previous design:
mito::fields::Fieldwas a wrapper aroundmito::functions::Function, even though “field-ness” was already fully expressible as a type-level property of functions defined on coordinates.To address the points above, this PR:
Field<F>wrapper and introduces thefield_cconcept to express “functions defined on a coordinate system” directly at the type level. Differential operators (grad, div, …) now operate on field_c functions, eliminating redundant wrappers and clarifying the separation between symbolic functions and geometric operations.