AlgebraicJulia / AlgebraicJulia/Decapodes.jl

Seperate default_dec_generate versions for 1d and 2d

Đang mở
#147 1 bình luận 0 reaction 1 người được giao Được @GeorgeR227 nhận Xem trên GitHub
UI
Ngôn ngữ chính
Julia
Star
91
Fork
18
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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:

```julia

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.