Rename RimWellLogDiffCurve to RimWellLogCalculatedCurve and additional improvements

* Rename from DiffCurve to CalculatedCurve and add operators selection
* Add option to select depth source for resampling in CalculatedCurve

- Select source for depth values for resampling
- Depths from first curve, second curve or union of these
- Added unit tests for function creating union depth values and calculate value with selected operator.

* Guard divide by zero

* Adjust algorithm for union of depths

- Prevent duplicated depth values (no need for enter/exist of k-layer when resampling)
- Add threshold for depth distance
- Update unit tests
This commit is contained in:
Jørgen Herje
2023-05-27 10:30:03 +02:00
committed by GitHub
parent a3efc16615
commit 5975fe6765
13 changed files with 635 additions and 333 deletions

View File

@@ -30,8 +30,8 @@
#include "RimProject.h"
#include "RimSimWellInView.h"
#include "RimSummaryCase.h"
#include "RimWellLogCalculatedCurve.h"
#include "RimWellLogCurveCommonDataSource.h"
#include "RimWellLogDiffCurve.h"
#include "RimWellLogExtractionCurve.h"
#include "RimWellLogFile.h"
#include "RimWellLogFileChannel.h"
@@ -586,12 +586,12 @@ RimWellMeasurementCurve* RicWellLogTools::addWellMeasurementCurve( RimWellLogTra
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellLogDiffCurve* RicWellLogTools::addWellLogDiffCurve( RimWellLogTrack* plotTrack, bool showPlotWindow )
RimWellLogCalculatedCurve* RicWellLogTools::addWellLogCalculatedCurve( RimWellLogTrack* plotTrack, bool showPlotWindow )
{
CVF_ASSERT( plotTrack );
RimWellLogDiffCurve* curve = new RimWellLogDiffCurve();
const cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable( plotTrack->curveCount() );
RimWellLogCalculatedCurve* curve = new RimWellLogCalculatedCurve();
const cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable( plotTrack->curveCount() );
curve->setColor( curveColor );
plotTrack->addCurve( curve );