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

Seperate default_dec_generate versions for 1d and 2d #147

Open
GeorgeR227 opened this issue Sep 7, 2023 · 1 comment
Open

Seperate default_dec_generate versions for 1d and 2d #147

GeorgeR227 opened this issue Sep 7, 2023 · 1 comment
Assignees
Labels

Comments

@GeorgeR227
Copy link
Collaborator

Since there exist DEC operators that depend on the dimension of the space they are applied on, such as the Lie Derivative and the Interior Product, we should organize these dimension specific implementations by letting the user choose separate default_dec_generate versions for 1d and 2d. Here's an example for 1d:

function default_dec_generate_1d(...)
    op = @match my_symbol begin
        :L => lie_derivative_1d(...)
        :i => interior_product_1d(...)
        ...
        # For any operators that don't depend on dimensions like d, or hodge star
        _ => default_dec_generate(...)
    end
...

While we could do the same by passing a dimension parameter into the current default_dec_generate and then having the Lie Derivative and Interior Product implementations accept that dimension information, I feel this method organizes the operators a bit better for the user.

@GeorgeR227 GeorgeR227 changed the title Seperate default_dec_generate versions for 1d and 2d. Seperate default_dec_generate versions for 1d and 2d Sep 7, 2023
@lukem12345
Copy link
Member

Yes, we should also rethink whether the current method of passing hodge as a named argument to generate is scalable. Since there are also multiple sharps now, for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants