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