2017-06-13 02:58:33 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017 - Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2017-06-13 02:58:33 -05:00
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2017-06-13 02:58:33 -05:00
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2017-06-13 02:58:33 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2021-01-21 05:58:46 -06:00
|
|
|
#include "RiaDefines.h"
|
2017-06-13 02:58:33 -05:00
|
|
|
|
|
|
|
#include "cvfObject.h"
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class RigStimPlanFractureDefinition;
|
|
|
|
class QXmlStreamReader;
|
2021-02-02 07:29:17 -06:00
|
|
|
class QStringRef;
|
2017-06-13 02:58:33 -05:00
|
|
|
|
|
|
|
class RifStimPlanXmlReader
|
|
|
|
{
|
|
|
|
public:
|
2021-02-02 07:29:17 -06:00
|
|
|
enum class MirrorMode
|
2019-09-06 03:40:57 -05:00
|
|
|
{
|
|
|
|
MIRROR_OFF = 0,
|
|
|
|
MIRROR_ON = 1,
|
|
|
|
MIRROR_AUTO = 2
|
|
|
|
};
|
2018-02-08 04:05:01 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
static cvf::ref<RigStimPlanFractureDefinition> readStimPlanXMLFile( const QString& stimPlanFileName,
|
|
|
|
double conductivityScalingFactor,
|
|
|
|
MirrorMode mirrorMode,
|
2021-01-21 05:58:46 -06:00
|
|
|
RiaDefines::EclipseUnitSystem requiredUnit,
|
|
|
|
QString* errorMessage );
|
2017-06-13 02:58:33 -05:00
|
|
|
|
|
|
|
private:
|
2021-01-21 05:58:46 -06:00
|
|
|
static void readStimplanGridAndTimesteps( QXmlStreamReader& xmlStream,
|
|
|
|
RigStimPlanFractureDefinition* stimPlanFileData,
|
|
|
|
MirrorMode mirrorMode,
|
|
|
|
RiaDefines::EclipseUnitSystem requiredUnit );
|
2017-06-13 02:58:33 -05:00
|
|
|
|
2019-11-03 07:08:21 -06:00
|
|
|
static double getAttributeValueDouble( QXmlStreamReader& xmlStream, const QString& parameterName );
|
|
|
|
static QString getAttributeValueString( QXmlStreamReader& xmlStream, const QString& parameterName );
|
2019-09-06 03:40:57 -05:00
|
|
|
static void getGriddingValues( QXmlStreamReader& xmlStream, std::vector<double>& gridValues, size_t& startNegValues );
|
2017-06-13 02:58:33 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
static std::vector<std::vector<double>> getAllDepthDataAtTimeStep( QXmlStreamReader& xmlStream );
|
2017-06-13 02:58:33 -05:00
|
|
|
|
2021-01-21 05:58:46 -06:00
|
|
|
static std::vector<double> valuesInRequiredUnitSystem( RiaDefines::EclipseUnitSystem sourceUnit,
|
|
|
|
RiaDefines::EclipseUnitSystem requiredUnit,
|
|
|
|
const std::vector<double>& values );
|
2017-06-13 02:58:33 -05:00
|
|
|
|
2021-01-21 05:58:46 -06:00
|
|
|
static double valueInRequiredUnitSystem( RiaDefines::EclipseUnitSystem sourceUnit,
|
|
|
|
RiaDefines::EclipseUnitSystem requiredUnit,
|
|
|
|
double value );
|
2021-02-02 07:29:17 -06:00
|
|
|
|
|
|
|
static bool isTextEqual( const QStringRef& text, const QString& compareText );
|
2018-02-20 08:35:08 -06:00
|
|
|
};
|