Initial refractive index interface and constant refractive index model.
Excuse the MR spam but I'm trying to tick off all the boxes needed for me to start testing my radio emission model #276 (closed) . I'd appreciate any and all feedback on the architecture or implementation.
This MR implements:
- A refractive index interface,
IRefractiveIndexModelthat provides aGetRefractiveIndex(Point const&) -> quantity<dimensionless_d>. I had this return aquantity<>instance to be consistent with all of the other environment interfaces that are unit-full. - Since
phys/unitsdoes not provide any literals forquantity<dimensionless_d>and it is not implicitly constructible from a raw numerical type, the only constructor that I'm aware of is (quantity<corsika::units::si::dimensionless_d> myvalue(phys::units::detail::magnitude_tag, 1.000327)(please let me know if you know a better way). To make this less verbose, I defined a new literal for dimensionsless values of__(i.e.3__is aquantity<dimenionless_d>value). I can change this todimenionlessor something more explicit if people prefer (i.e.3_dimensionless) but that seems excessivey long. Let me know if you have a better suggestion/idea! - I also implemented a simple instance,
UniformRefractiveIndex, that provides a constant refractive index everywhere in the environment. This will be useful for a test case for air showers and is physically useful for in-ice showers. - Several unit tests for the
UniformRefractiveIndexare provided intestEnvironment.cc.
An exponential refractive index model will be provided in a future MR.
Edited by Remy Prechelt