-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Hi @Beforerr, I wanted to offer a few suggestions for the type hierarchy that this package implements. This would help me to incorporate this into the JuliaPlasma/ParticleInCell.jl.
At it's core, I suggest making the type hierarchy something like:
AbstractParticle{M,Z}
└─ Particle{M,Z}
This will allow for dispatch based on the mass number and charge state of the particle. Additionally, I wonder if it would be worth supporting a field in the Particle struct to specify the exact mass of the particle:
struct Particle{M,Z,T} <: AbstractParticle{M,Z,T}
symbol::Symbol
mass::T
end
If storing this information is not desired, the T=Nothing.
Aside: I suggest renaming ChargedParticleImpl to Particle regardless. In my (very) humble opinion, this is a more Julian way to name the type. You could also consider ChargedParticle, but since Z=0 is allowed, I don`t think it makes as much sense.
Regardless of if you accept my suggestions, thanks for the great package!