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

The SetupSymmetry types should have fields to fully describe setup. #3

Open
arturgower opened this issue Jun 13, 2020 · 0 comments
Open

Comments

@arturgower
Copy link
Member

At present, the subtypes of SetupSymmetry are used only to distinguish what methods to run. They are chosen by analysing the symmetry between the types Source and Material. The code would however be more elegant and easier to generalise if subtypes, such as WithoutSymmetry, had the fields Material, Source, basis_order, basis_field_order. At present several of these are carried with kws, which leads to more hidden behaviour, and some complications with dispatching to different WaveModes.

struct WithoutSymmetry{Dim} <: AbstractSetupSymmetry{Dim} end
"""
An incident plane-wave and halfspace material will result in all fields being plane-waves.
"""
abstract type AbstractPlanarSymmetry{Dim} <: AbstractSetupSymmetry{Dim} end
struct PlanarSymmetry{Dim} <: AbstractPlanarSymmetry{Dim} end
"""
For spatial dimension > 2, we can consider problems that have azimuthal symmetry. For example, a plane-wave incident on a sphere.
"""
abstract type AbstractAzimuthalSymmetry{Dim} <: AbstractSetupSymmetry{Dim} end
struct AzimuthalSymmetry{Dim} <: AbstractAzimuthalSymmetry{Dim} end
AzimuthalSymmetry() = AzimuthalSymmetry{3}()
"""
For example, a plane-wave with direct incidence on a halfspace will have both azimuthal and plane-wave symmetry.
"""
struct PlanarAzimuthalSymmetry{Dim} <: AbstractPlanarSymmetry{Dim} end
PlanarAzimuthalSymmetry() = PlanarAzimuthalSymmetry{3}()

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

No branches or pull requests

1 participant