2015-04-20 02:02:33 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
|
|
|
//
|
|
|
|
// 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
|
2015-07-31 11:58:23 -05:00
|
|
|
|
2015-05-15 11:51:49 -05:00
|
|
|
#include "RimCase.h"
|
2015-04-20 02:02:33 -05:00
|
|
|
|
2018-01-12 07:39:15 -06:00
|
|
|
#include "cafFilePath.h"
|
2015-07-31 11:58:23 -05:00
|
|
|
#include "cafPdmChildArrayField.h"
|
2015-04-20 02:02:33 -05:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
#include "cafPdmPointer.h"
|
2015-07-31 11:58:23 -05:00
|
|
|
|
2015-04-25 01:57:34 -05:00
|
|
|
#include "cvfObject.h"
|
2015-04-20 02:02:33 -05:00
|
|
|
|
2015-11-24 04:35:04 -06:00
|
|
|
#include <QDateTime>
|
|
|
|
|
2015-04-20 02:02:33 -05:00
|
|
|
class RimGeoMechView;
|
2015-04-25 01:57:34 -05:00
|
|
|
class RigGeoMechCaseData;
|
2015-04-30 10:06:01 -05:00
|
|
|
class RifGeoMechReaderInterface;
|
|
|
|
|
2015-04-20 02:02:33 -05:00
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
2015-05-15 11:51:49 -05:00
|
|
|
class RimGeoMechCase : public RimCase
|
2015-04-20 02:02:33 -05:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
public:
|
|
|
|
RimGeoMechCase(void);
|
|
|
|
virtual ~RimGeoMechCase(void);
|
2015-04-25 01:57:34 -05:00
|
|
|
|
2017-06-16 10:20:08 -05:00
|
|
|
void setFileName(const QString& fileName);
|
|
|
|
QString caseFileName() const;
|
2015-06-04 06:08:21 -05:00
|
|
|
bool openGeoMechCase(std::string* errorMessage);
|
2015-04-20 02:02:33 -05:00
|
|
|
|
2017-06-16 10:20:08 -05:00
|
|
|
RigGeoMechCaseData* geoMechData();
|
|
|
|
const RigGeoMechCaseData* geoMechData() const;
|
2015-04-27 06:51:22 -05:00
|
|
|
|
2015-05-06 09:07:30 -05:00
|
|
|
RimGeoMechView* createAndAddReservoirView();
|
2015-04-20 02:02:33 -05:00
|
|
|
|
2015-05-15 11:51:49 -05:00
|
|
|
virtual void updateFilePathsFromProjectPath(const QString& projectPath, const QString& oldProjectPath);
|
2018-01-10 03:43:33 -06:00
|
|
|
virtual std::vector<Rim3dView*> views();
|
2015-05-15 11:51:49 -05:00
|
|
|
|
2017-06-16 10:20:08 -05:00
|
|
|
virtual std::vector<QDateTime> timeStepDates() const override;
|
2017-06-16 09:45:14 -05:00
|
|
|
virtual QStringList timeStepStrings() const override;
|
|
|
|
virtual QString timeStepName(int frameIdx) const override;
|
2015-09-21 04:20:07 -05:00
|
|
|
|
2015-11-16 00:16:30 -06:00
|
|
|
virtual cvf::BoundingBox activeCellsBoundingBox() const;
|
|
|
|
virtual cvf::BoundingBox allCellsBoundingBox() const;
|
|
|
|
|
2017-06-19 13:55:58 -05:00
|
|
|
virtual double characteristicCellSize() const override;
|
|
|
|
|
2017-12-01 06:24:43 -06:00
|
|
|
virtual void setFormationNames(RimFormationNames* formationNames) override;
|
|
|
|
|
2018-01-12 07:39:15 -06:00
|
|
|
void addElementPropertyFiles(const std::vector<caf::FilePath>& filenames);
|
2018-01-10 03:43:33 -06:00
|
|
|
|
2015-05-06 09:07:30 -05:00
|
|
|
// Fields:
|
2015-07-31 11:58:23 -05:00
|
|
|
caf::PdmChildArrayField<RimGeoMechView*> geoMechViews;
|
2015-04-20 02:02:33 -05:00
|
|
|
|
2017-06-19 13:55:58 -05:00
|
|
|
|
2017-06-16 10:20:08 -05:00
|
|
|
private:
|
2015-11-24 04:35:04 -06:00
|
|
|
static std::vector<QDateTime> dateTimeVectorFromTimeStepStrings(const QStringList& timeStepStrings);
|
|
|
|
|
2016-09-06 03:27:30 -05:00
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
2016-10-27 08:01:21 -05:00
|
|
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
2018-01-12 09:18:54 -06:00
|
|
|
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
2018-01-12 07:39:15 -06:00
|
|
|
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
2016-09-06 03:27:30 -05:00
|
|
|
|
|
|
|
virtual void updateFormationNamesData() override;
|
|
|
|
|
2018-01-12 07:39:15 -06:00
|
|
|
virtual void initAfterRead() override;
|
2015-11-24 04:35:04 -06:00
|
|
|
static QString subStringOfDigits(const QString& timeStepString, int numberOfDigitsToFind);
|
|
|
|
|
2018-01-12 09:18:54 -06:00
|
|
|
void closeSelectedElementPropertyFiles();
|
2015-05-06 09:07:30 -05:00
|
|
|
private:
|
2018-01-12 07:39:15 -06:00
|
|
|
cvf::ref<RigGeoMechCaseData> m_geoMechCaseData;
|
|
|
|
caf::PdmField<QString> m_caseFileName;
|
|
|
|
caf::PdmField<double> m_cohesion;
|
|
|
|
caf::PdmField<double> m_frictionAngleDeg;
|
|
|
|
caf::PdmField<std::vector<caf::FilePath>> m_elementPropertyFileNames;
|
2018-01-12 09:18:54 -06:00
|
|
|
caf::PdmField<std::vector<int> > m_elementPropertyFileNameIndexUiSelection;
|
2018-01-12 07:39:15 -06:00
|
|
|
caf::PdmField<bool> m_closeElementPropertyFileCommand;
|
|
|
|
caf::PdmField<bool> m_reloadElementPropertyFileCommand;
|
2015-04-20 02:02:33 -05:00
|
|
|
};
|