-
Notifications
You must be signed in to change notification settings - Fork 0
Add primitive float type to the matter models #29
Copy link
Copy link
Open
Labels
MonteCarloTransportIndicated that the issue is related to the upstream usage in a Monte-Carlo Transport Code.Indicated that the issue is related to the upstream usage in a Monte-Carlo Transport Code.enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Description
One should add a type parameter T to AbstractMatterModel and propagate this down to each concrete implementation. This allows for generic but type-aware implementation of the interface functions.
Validation and testing
using ElectronicStructureModels
using Unitful
using Test
ne = 1e23f0u"cm^(-3)"
temp = 1.0f0u"T"
s = IdealElectronGas(ne,temp)
@test temperature(s) isa Float32
@test electron_density(s) isa Float32Motivation
Currently, the primitive floating point types in the matter models are pinned down to float64. This becomes a problem downstream, if differential cross sections need to be computed for a given float precision.
Target audience
Photon transport, XRTSProbing.jl
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
MonteCarloTransportIndicated that the issue is related to the upstream usage in a Monte-Carlo Transport Code.Indicated that the issue is related to the upstream usage in a Monte-Carlo Transport Code.enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers