fieldScaling : missing for sampling in ensight format
Functionality to add/problem to solve
With commit f8ffee81 field scaling was extended, however it is still missing for ensight format.
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Link issues together to show that they're related. Learn more.
Activity
- Prashant Sonakar added feature label
added feature label
- Prashant Sonakar assigned to @mark
assigned to @mark
- Maintainer
In retrospect it would have been better to have the scaling at the base surfaceWriter level. Makes the base class even fatter still, but avoid having similar copy/paste (and possibly forget) code everywhere.
Makes sense to add in a
fieldLevel
dictionary at the same time. Eg,formatOptions { ensight { fieldLevel { p 1e5; // Absolute to gauge pressure [Pa] T 273.15; } } }
In contrast to the
fieldScale
dictionary, I don't think that we should support wildcards here. The fieldLevel has a type associated with it (scalar, vector, tensor), whereas fieldScale is simply a scalar.Edited by Mark OLESEN - Author Developer
I like the idea. Perhaps just for clarification - level value specified is still a scaling factor and not 'offset' or any other operation...
And also, does it apply for fetched data e.g. normal of face (in case of 'raw' format?)
- Maintainer
The level value is an offset for a particular field, which will be applied after sampling and before scaling.
Eg,
- Temperature: fieldLevel 273.15 -> Kelvin to Celsius conversion
- Pressure: fieldLevel 1e5 -> absolute to gauge pressure
- Pressure: fieldLevel 1e5, fieldScale 0.01 -> absolute to gauge pressure [Pa], followed by [Pa] -> [mbar]
The area normal of the faces is a geometric quantity, not sampled. So unaffected by fieldLevel or fieldScale, but is still adjusted according to
scale
(geometric scale) if the writer supports that. - Maintainer
We can keep things general and allow any fieldLevel - eg,
U (1 0 0)
or we be slightly more restrictive and only permit uniform levels - eg U 1.0 instead of (1 1 1) - maybe could then use a single scalar and allow regex. - Please register or sign in to reply
- Mark OLESEN mentioned in commit 1a55829e
mentioned in commit 1a55829e
- Mark OLESEN closed
closed
- Maintainer
@Prashant noticed a bug during testing: "access of non-const tmp"
- should be fixed now
Edited by Mark OLESEN - Mark OLESEN reopened
reopened
- Mark OLESEN closed
closed
- Prashant Sonakar mentioned in commit eb676f08
mentioned in commit eb676f08