mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
#12894 Stimplan model export: make sure MD is always increasing.
The numerical precision in the output was lowered in #11556 since Stimplan was not correctly handling the high precision (requested by Nan). That change leads to the MD not always increasing (which is expected by Stimplan). Added another tweak to the MD values to make sure it increases in the precision range that will be written to file. The original issue asked for improved precision in the output, but that is not a viable option this Stimplan does not use all of the decimal precision. Fixes #12894.
This commit is contained in:
1 parent
5269ba665f
commit
a308eb6419
1 file changed
+9
-1
@@ -88,7 +88,8 @@ void RifStimPlanModelDeviationFrkExporter::appendHeaderToStream( QTextStream& st
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifStimPlanModelDeviationFrkExporter::appendToStream( QTextStream& stream, const QString& label, const std::vector<double>& values )
|
||||
{
|
||||
stream.setRealNumberPrecision( 8 );
|
||||
stream.setRealNumberNotation( QTextStream::FixedNotation );
|
||||
stream.setRealNumberPrecision( 4 );
|
||||
stream << "<cNamedSet>" << '\n'
|
||||
<< "<name>" << '\n'
|
||||
<< label << '\n'
|
||||
@@ -171,6 +172,13 @@ void RifStimPlanModelDeviationFrkExporter::fixupDepthValuesForExport( const std:
|
||||
double wiggle = 0.001;
|
||||
exportMdValues.push_back( exportMdValues[i - 1] + changeTvd + wiggle );
|
||||
}
|
||||
else if ( std::fabs( changeMd ) < 0.001 )
|
||||
{
|
||||
// Stimplan wants the MD to always be increasing.
|
||||
// Add small amount when that is not the case.
|
||||
double wiggle = 0.002;
|
||||
exportMdValues.push_back( exportMdValues[i - 1] + wiggle );
|
||||
}
|
||||
else
|
||||
{
|
||||
exportMdValues.push_back( mdValues[i] );
|
||||
|
||||
Reference in new issue
Block a user