2017-06-13 02:58:33 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017 - Statoil ASA
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// 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 "cvfBase.h"
|
|
|
|
#include "cvfObject.h"
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class RigStimPlanFractureDefinition;
|
|
|
|
class QXmlStreamReader;
|
|
|
|
|
|
|
|
class RifStimPlanXmlReader
|
|
|
|
{
|
|
|
|
public:
|
2018-02-08 04:05:01 -06:00
|
|
|
enum MirrorMode { MIRROR_OFF = 0, MIRROR_ON = 1, MIRROR_AUTO = 2};
|
|
|
|
|
|
|
|
static cvf::ref<RigStimPlanFractureDefinition> readStimPlanXMLFile(const QString& stimPlanFileName,
|
|
|
|
double conductivityScalingFactor,
|
|
|
|
MirrorMode mirrorMode,
|
2018-02-20 08:15:06 -06:00
|
|
|
RiaEclipseUnitTools::UnitSystem requiredUnit,
|
2018-02-08 04:05:01 -06:00
|
|
|
QString * errorMessage);
|
2017-06-13 02:58:33 -05:00
|
|
|
|
|
|
|
private:
|
2018-02-08 04:05:01 -06:00
|
|
|
static void readStimplanGridAndTimesteps(QXmlStreamReader &xmlStream,
|
|
|
|
RigStimPlanFractureDefinition* stimPlanFileData,
|
2018-02-20 08:15:06 -06:00
|
|
|
MirrorMode mirrorMode,
|
|
|
|
RiaEclipseUnitTools::UnitSystem requiredUnit);
|
2017-06-13 02:58:33 -05:00
|
|
|
|
|
|
|
static double getAttributeValueDouble(QXmlStreamReader &xmlStream, QString parameterName);
|
|
|
|
static QString getAttributeValueString(QXmlStreamReader &xmlStream, QString parameterName);
|
|
|
|
static void getGriddingValues(QXmlStreamReader &xmlStream, std::vector<double>& gridValues, size_t& startNegValues);
|
|
|
|
|
2018-02-08 04:05:01 -06:00
|
|
|
static std::vector<std::vector<double>> getAllDepthDataAtTimeStep(QXmlStreamReader &xmlStream);
|
2017-06-13 02:58:33 -05:00
|
|
|
|
2018-02-20 08:15:06 -06: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
|
|
|
|
2018-02-20 08:35:08 -06:00
|
|
|
static double valueInRequiredUnitSystem(RiaEclipseUnitTools::UnitSystem sourceUnit,
|
|
|
|
RiaEclipseUnitTools::UnitSystem requiredUnit,
|
|
|
|
double value);
|
|
|
|
};
|