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:
parent
dd5402756c
commit
28e6bf8d2d
@ -205,7 +205,7 @@ QList<caf::PdmOptionItemInfo>
|
||||
std::set<QString> mainKeywords = this->mainKeywords();
|
||||
for (caf::PdmOptionItemInfo option : allOptions)
|
||||
{
|
||||
if (!mainKeywords.count(option.optionUiText()))
|
||||
if (!mainKeywords.count(option.optionUiText()) && option.optionUiText() != "None")
|
||||
{
|
||||
if (option.optionUiText() == "ACTNUM" && exportGrid())
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user