BEAST.jl icon indicating copy to clipboard operation
BEAST.jl copied to clipboard

Provide type for x̂, ŷ, ẑ

Open sbadrian opened this issue 5 months ago • 1 comments

Currently, x̂, ŷ, ẑ are all SVectors.

However, I would like to extend the cross function such that ẑ × could be applied to a vector of 2D-SVectors (i.e., to get the curl and not the gradient as per default of the potential operators).

In order to avoid type piracy, this would require a dedicated type for ẑ (and to be consistent I would create types for x̂ and ŷ).

To backwards compatible one could provide interfaces for all vector operations (+,*, etc). Alternatively, one could use ẑ() to return the corresponding SVector (which would only lead to minimal changes).

I gravitate to the first option.

sbadrian avatar Aug 26 '25 12:08 sbadrian

The PR https://github.com/krcools/BEAST.jl/pull/164 contains with tests/test_hh2d_mie.jl a unit test that shows my intended usage (lines 219 and 287)

sbadrian avatar Aug 26 '25 13:08 sbadrian