visit
visit copied to clipboard
Store species mass fractions as doubles internally instead of floats
In my work on Blueprint Species Set Support (#19859), I came across a longstanding bug with species selection.
https://github.com/visit-dav/visit/blob/94abb38624aa3a181be2e604f993c780199af2b3/src/avt/Database/Database/avtGenericDatabase.C#L5860-L5867
If the input data is not represented as a float, nothing is done. This manifested itself as me turning off species and watching as my mesh variables stayed the same. After speaking to @cyrush, we agreed that we can relax this restriction to allow all kinds of data to be affected by species selection. The next thing we discussed is what to do about the output dataset.
Material interface reconstruction species selection sets the output variable as floats: https://github.com/visit-dav/visit/blob/94abb38624aa3a181be2e604f993c780199af2b3/src/avt/MIR/Base/MIR.C#L315
This is the calculation that determines the result: https://github.com/visit-dav/visit/blob/94abb38624aa3a181be2e604f993c780199af2b3/src/avt/MIR/Base/MIR.C#L387
specmf
is declared as a float:
https://github.com/visit-dav/visit/blob/94abb38624aa3a181be2e604f993c780199af2b3/src/avt/MIR/Base/MIR.C#L387
All of the requisite information here is stored as floats. @cyrush and I discussed changing everything with species to be doubles. That would mean changing how the mass fractions are represented in the species objects, adjusting all calculations here in the MIR species selection, and changing the resulting variable to use doubles instead.