Skip to content
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

Implement simple linear primal-primal flat #115

Merged
merged 1 commit into from
Oct 18, 2024
Merged

Conversation

lukem12345
Copy link
Member

Currently, we support a flat operation from dual vector-fields to primal one-forms. However, it is sometimes convenient to have a flat operation from primal vector-fields to primal one-forms.

So, this PR adds an implementation of such a flat operation. It is pedagogically simple to understand, and is quick to implement. It assumes that a the values of a primal vector-field can be linearly-interpolated along primal edges. Integrating such a vector-field along one of these primal edges (line-segments) is equivalent to taking the dot-product of the average value of the vector-field with the vector represented by that line segment. This scheme perfectly flattens static vector-fields, of course.

Future PRs can add a cached version of this operation, as in the other "flat matrix" operation, or as a kernel. The interpolation scheme can be improved by doing a modicum of algebra to determine appropriate weights concerning more samples of the vector-field.

@lukem12345 lukem12345 self-assigned this Oct 18, 2024
@lukem12345 lukem12345 added the enhancement New feature or request label Oct 18, 2024
@lukem12345 lukem12345 merged commit 09795f2 into main Oct 18, 2024
8 of 9 checks passed
@lukem12345 lukem12345 deleted the llm/simple-flat branch October 18, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant