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
|
|
|
|
|
2017-07-03 04:00:06 -05:00
|
|
|
#include "RiaEclipseUnitTools.h"
|
2017-06-13 02:58:33 -05:00
|
|
|
|
|
|
|
#include "cvfObject.h"
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class RigStimPlanFractureDefinition;
|
|
|
|
class QXmlStreamReader;
|
|
|
|
|
|
|
|
class RifStimPlanXmlReader
|
|
|
|
{
|
|
|
|
public:
|
2019-09-06 03:40:57 -05:00
|
|
|
enum MirrorMode
|
|
|
|
{
|
|
|
|
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,
|
|
|
|
double xScaleFactor,
|
|
|
|
double yScaleFactor,
|
|
|
|
double wellPathIntersectionY,
|
|
|
|
MirrorMode mirrorMode,
|
|
|
|
RiaEclipseUnitTools::UnitSystem requiredUnit,
|
|
|
|
QString* errorMessage );
|
2017-06-13 02:58:33 -05:00
|
|
|
|
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
static void readStimplanGridAndTimesteps( QXmlStreamReader& xmlStream,
|
|
|
|
RigStimPlanFractureDefinition* stimPlanFileData,
|
|
|
|
MirrorMode mirrorMode,
|
|
|
|
RiaEclipseUnitTools::UnitSystem 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
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
static std::vector<double> valuesInRequiredUnitSystem( RiaEclipseUnitTools::UnitSystem sourceUnit,
|
|
|
|
RiaEclipseUnitTools::UnitSystem requiredUnit,
|
|
|
|
const std::vector<double>& values );
|
2017-06-13 02:58:33 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
static double valueInRequiredUnitSystem( RiaEclipseUnitTools::UnitSystem sourceUnit,
|
|
|
|
RiaEclipseUnitTools::UnitSystem requiredUnit,
|
|
|
|
double value );
|
2018-02-20 08:35:08 -06:00
|
|
|
};
|