mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Export Sector model: write floats to file instead of doubles
This commit is contained in:
@@ -531,7 +531,13 @@ bool RifReaderEclipseOutput::saveEclipseResults(const QString& resu
|
||||
}
|
||||
else
|
||||
{
|
||||
ecl_kw = ecl_kw_alloc_new(keyword.toLatin1().data(), (int) filteredResults.size(), ECL_DOUBLE, filteredResults.data());
|
||||
std::vector<float> resultValuesFloat;
|
||||
resultValuesFloat.reserve(filteredResults.size());
|
||||
for (double val : filteredResults)
|
||||
{
|
||||
resultValuesFloat.push_back(static_cast<float>(val));
|
||||
}
|
||||
ecl_kw = ecl_kw_alloc_new(keyword.toLatin1().data(), (int) resultValuesFloat.size(), ECL_FLOAT, resultValuesFloat.data());
|
||||
}
|
||||
|
||||
ecl_kw_fprintf_grdecl(ecl_kw, filePtr);
|
||||
|
||||
Reference in New Issue
Block a user