Skip to content

Commit 55898bf

Browse files
committed
add EM, State, Domain
1 parent 621a062 commit 55898bf

3 files changed

Lines changed: 39 additions & 2 deletions

File tree

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
version:
14-
- '1.11.1'
14+
- '1.12.6'
1515
os:
1616
- ubuntu-latest
1717
- macOS-latest

.github/workflows/TagBot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ jobs:
1212
- uses: JuliaRegistries/TagBot@v1
1313
with:
1414
token: ${{ secrets.GITHUB_TOKEN }}
15-
ssh: ${{ secrets.DOCUMENTER_KEY }}
15+
# ssh: ${{ secrets.DOCUMENTER_KEY }}

src/AstroSimBase.jl

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ export DeviceType, CPU, GPU
1010
export TimeIntegration, Euler, Leapfrog, RK4
1111
export BoundaryCondition, Periodic, Dirichlet, Vacuum, Newman, Reflective
1212

13+
export AbstractDomain, TimeDomain, FrequencyDomain, conjugated_domain
14+
export MediumState, SolidState, LiquidState, GasState, PlasmaState
15+
export ElectricMagneticMode, TE, TH, TEM, HE, EH, HEM, LSE, LSM
16+
1317
export traitstring, emptyfunction
1418
export randin
1519
export mkpathIfNotExist
@@ -75,6 +79,39 @@ struct Reflective <: BoundaryCondition end
7579
@inline iterate(p::T) where T <: BoundaryCondition = (p,nothing)
7680
@inline iterate(p::T,st) where T <: BoundaryCondition = nothing
7781

82+
abstract type MediumState end
83+
struct SolidState <: MediumState end
84+
struct LiquidState <: MediumState end
85+
struct GasState <: MediumState end
86+
struct PlasmaState <: MediumState end
87+
88+
"https://en.wikipedia.org/wiki/Mode_(electromagnetism)"
89+
abstract type ElectricMagneticMode end
90+
"Transverse electric (TE) modes, only the electric field is entirely transverse. Also notated as H modes to indicate there is a longitudinal magnetic component."
91+
struct TE <: ElectricMagneticMode end
92+
"Transverse magnetic (TM) modes, only the magnetic field is entirely transverse. Also notated as E modes to indicate there is a longitudinal electric component."
93+
struct TM <: ElectricMagneticMode end
94+
"Transverse electromagnetic mode (TEM), as with a free space plane wave, both the electric field and magnetic field are entirely transverse."
95+
struct TEM <: ElectricMagneticMode end
96+
"HE modes, hybrid modes in which the TE component dominates."
97+
struct HE <: ElectricMagneticMode end
98+
"EH modes, hybrid modes in which the TM component dominates."
99+
struct EH <: ElectricMagneticMode end
100+
"Hybrid electromagnetic (HEM) modes, both the electric and magnetic fields have a component in the longitudinal direction. They can be analysed as a linear superposition of the corresponding TE and TM modes"
101+
struct HEM <: ElectricMagneticMode end
102+
"Longitudinal-section electric (LSE) modes, hybrid modes in which the electric field in one of the transverse directions is zero"
103+
struct LSE <: ElectricMagneticMode end
104+
"Longitudinal-section magnetic (LSM) modes, hybrid modes in which the magnetic field in one of the transverse directions is zero"
105+
struct LSM <: ElectricMagneticMode end
106+
107+
abstract type AbstractDomain end
108+
struct TimeDomain <: AbstractDomain end
109+
struct FrequencyDomain <: AbstractDomain end
110+
111+
conjugated_domain(::TimeDomain) = FrequencyDomain()
112+
conjugated_domain(::FrequencyDomain) = TimeDomain()
113+
114+
78115
# Functions
79116
"Better printing of trait types"
80117
traitstring(t) = string(t)[1:end-2]

0 commit comments

Comments
 (0)