AlgebraicJulia / AlgebraicJulia/Decapodes.jl
Seperate default_dec_generate versions for 1d and 2d
- 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á.