Skip to content

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

Open
@arturgower

Description

@arturgower

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}()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions