2012-05-18 02:45:23 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2011-2012 Statoil ASA, Ceetron 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
|
|
|
|
|
|
|
|
#include "cvfBase.h"
|
|
|
|
#include "cvfObject.h"
|
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
2013-03-18 08:34:29 -05:00
|
|
|
#include "RifReaderInterface.h"
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
class QString;
|
2012-08-31 12:12:47 -05:00
|
|
|
|
2013-03-22 09:43:42 -05:00
|
|
|
class RigCaseData;
|
2012-05-18 02:45:23 -05:00
|
|
|
class RigGridBase;
|
2012-06-26 09:10:41 -05:00
|
|
|
class RimReservoirView;
|
2013-03-13 05:42:26 -05:00
|
|
|
class RimCaseCollection;
|
2013-04-08 05:16:38 -05:00
|
|
|
class RimIdenticalGridCaseGroup;
|
2013-05-06 03:55:00 -05:00
|
|
|
class RimReservoirCellResultsStorage;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
//
|
2012-06-26 09:10:41 -05:00
|
|
|
// Interface for reservoirs.
|
|
|
|
//
|
2012-05-18 02:45:23 -05:00
|
|
|
//==================================================================================================
|
2013-03-22 09:43:42 -05:00
|
|
|
class RimCase : public caf::PdmObject
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2013-03-18 05:40:39 -05:00
|
|
|
CAF_PDM_HEADER_INIT;
|
2012-05-18 02:45:23 -05:00
|
|
|
public:
|
2013-03-22 09:43:42 -05:00
|
|
|
RimCase();
|
|
|
|
virtual ~RimCase();
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-04-11 05:06:38 -05:00
|
|
|
|
2013-03-18 08:34:29 -05:00
|
|
|
// Fields:
|
2013-04-11 05:06:38 -05:00
|
|
|
caf::PdmField<QString> caseUserDescription;
|
2013-05-08 03:41:56 -05:00
|
|
|
caf::PdmField<int> caseId;
|
2013-03-18 08:34:29 -05:00
|
|
|
caf::PdmField<bool> releaseResultMemory;
|
|
|
|
caf::PdmPointersField<RimReservoirView*> reservoirViews;
|
2013-04-26 06:19:34 -05:00
|
|
|
caf::PdmField<bool> flipXAxis;
|
|
|
|
caf::PdmField<bool> flipYAxis;
|
2013-12-17 04:37:58 -06:00
|
|
|
|
|
|
|
caf::PdmField<std::vector<QString> > filesContainingFaults;
|
2013-04-26 06:19:34 -05:00
|
|
|
|
2012-06-26 09:10:41 -05:00
|
|
|
|
2013-03-18 08:34:29 -05:00
|
|
|
virtual bool openEclipseGridFile() { return false;}; // Should be pure virtual but PDM does not allow that.
|
|
|
|
|
2013-04-11 05:06:38 -05:00
|
|
|
RigCaseData* reservoirData();
|
|
|
|
const RigCaseData* reservoirData() const;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-03-19 04:29:34 -05:00
|
|
|
RimReservoirCellResultsStorage* results(RifReaderInterface::PorosityModelResultType porosityModel);
|
2013-03-18 08:34:29 -05:00
|
|
|
|
|
|
|
RimReservoirView* createAndAddReservoirView();
|
|
|
|
void removeReservoirView(RimReservoirView* reservoirView);
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-03-18 08:34:29 -05:00
|
|
|
void removeResult(const QString& resultName);
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-03-18 08:34:29 -05:00
|
|
|
virtual QString locationOnDisc() const { return QString(); }
|
2013-04-11 05:06:38 -05:00
|
|
|
virtual QString gridFileName() const { return QString(); }
|
|
|
|
|
2013-04-12 01:31:59 -05:00
|
|
|
virtual void updateFilePathsFromProjectPath(const QString& projectPath, const QString& oldProjectPath) { };
|
2013-03-19 06:47:38 -05:00
|
|
|
|
|
|
|
RimCaseCollection* parentCaseCollection();
|
2013-04-08 05:16:38 -05:00
|
|
|
RimIdenticalGridCaseGroup* parentGridCaseGroup();
|
|
|
|
|
2013-03-18 08:34:29 -05:00
|
|
|
|
|
|
|
// Overridden methods from PdmObject
|
|
|
|
public:
|
2013-04-11 05:06:38 -05:00
|
|
|
virtual caf::PdmFieldHandle* userDescriptionField() { return &caseUserDescription; }
|
2012-05-18 02:45:23 -05:00
|
|
|
protected:
|
2013-03-18 08:34:29 -05:00
|
|
|
virtual void initAfterRead();
|
|
|
|
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-03-18 08:34:29 -05:00
|
|
|
// Internal methods
|
|
|
|
protected:
|
|
|
|
void computeCachedData();
|
2013-03-22 09:43:42 -05:00
|
|
|
void setReservoirData(RigCaseData* eclipseCase);
|
2013-04-12 01:31:59 -05:00
|
|
|
static QString relocateFile(const QString& fileName, const QString& newProjectPath, const QString& oldProjectPath,
|
|
|
|
bool* foundFile, std::vector<QString>* searchedPaths);
|
2013-02-14 06:16:56 -06:00
|
|
|
|
2013-03-13 05:42:26 -05:00
|
|
|
private:
|
2013-04-11 05:06:38 -05:00
|
|
|
cvf::ref<RigCaseData> m_rigEclipseCase;
|
2013-03-13 05:42:26 -05:00
|
|
|
|
2013-03-18 08:34:29 -05:00
|
|
|
private:
|
2013-03-19 04:29:34 -05:00
|
|
|
caf::PdmField<RimReservoirCellResultsStorage*> m_matrixModelResults;
|
|
|
|
caf::PdmField<RimReservoirCellResultsStorage*> m_fractureModelResults;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-04-11 05:06:38 -05:00
|
|
|
// Obsolete fields
|
|
|
|
protected:
|
|
|
|
caf::PdmField<QString> caseName;
|
2013-03-18 05:40:39 -05:00
|
|
|
};
|