silencing conversion warning due to double->float#5224
Conversation
when -DBUILD_FLOW_FLOAT_VARIANTS=ON
|
jenkins build this please |
There was a problem hiding this comment.
Pull request overview
This PR addresses build warnings when compiling with -DBUILD_FLOW_FLOAT_VARIANTS=ON by avoiding implicit/narrowing conversions from double-typed deck/component properties into Scalar (e.g., float) when initializing component parameters in GenericOilGasWaterFluidSystem.
Changes:
- Add explicit
static_cast<Scalar>(...)conversions for component properties passed intoComponentParamduringinitFromState(). - Ensure the critical volume scaling (
* 1.e3) is also explicitly converted toScalarbefore being stored.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
now I realized that it shows up when compiling with the PR OPM/opm-simulators#7145 . |
|
looks fine to me, i assume those data tables are doubles because they come from the parser? |
Yes. They are from CompositionalConfig, which uses |
bska
left a comment
There was a problem hiding this comment.
Very good. I'll merge into master.
when -DBUILD_FLOW_FLOAT_VARIANTS=ON