2012-05-18 02:45:23 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2014-09-23 08:04:57 -05:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2012-05-18 02:45:23 -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.
|
|
|
|
//
|
|
|
|
// 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"
|
2015-07-31 11:58:23 -05:00
|
|
|
|
|
|
|
#include "RimCase.h"
|
|
|
|
#include "RimEclipseView.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include "cafPdmChildArrayField.h"
|
|
|
|
#include "cafPdmChildField.h"
|
2012-05-18 02:45:23 -05:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
2015-07-31 11:58:23 -05:00
|
|
|
|
2013-03-18 08:34:29 -05:00
|
|
|
#include "RifReaderInterface.h"
|
2015-07-31 11:58:23 -05:00
|
|
|
|
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;
|
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
|
|
|
|
2015-05-15 11:51:49 -05:00
|
|
|
|
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
|
|
|
//==================================================================================================
|
2015-05-15 11:51:49 -05:00
|
|
|
class RimEclipseCase : public RimCase
|
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:
|
2015-05-15 01:40:27 -05:00
|
|
|
RimEclipseCase();
|
|
|
|
virtual ~RimEclipseCase();
|
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:
|
|
|
|
caf::PdmField<bool> releaseResultMemory;
|
2015-07-31 11:58:23 -05:00
|
|
|
caf::PdmChildArrayField<RimEclipseView*> 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
|
|
|
|
2014-08-21 01:39:19 -05:00
|
|
|
bool openReserviorCase();
|
2015-05-15 11:51:49 -05:00
|
|
|
virtual bool openEclipseGridFile() = 0;
|
2013-03-18 08:34:29 -05:00
|
|
|
|
2013-04-11 05:06:38 -05:00
|
|
|
RigCaseData* reservoirData();
|
|
|
|
const RigCaseData* reservoirData() const;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2015-11-16 00:16:30 -06:00
|
|
|
RimReservoirCellResultsStorage* results(RifReaderInterface::PorosityModelResultType porosityModel);
|
2013-03-18 08:34:29 -05:00
|
|
|
|
2015-11-16 00:16:30 -06:00
|
|
|
RimEclipseView* createAndAddReservoirView();
|
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-03-19 06:47:38 -05:00
|
|
|
|
|
|
|
RimCaseCollection* parentCaseCollection();
|
2013-04-08 05:16:38 -05:00
|
|
|
|
2015-05-15 11:51:49 -05:00
|
|
|
virtual std::vector<RimView*> views();
|
2015-09-21 04:20:07 -05:00
|
|
|
virtual QStringList timeStepStrings();
|
2015-11-11 09:21:07 -06:00
|
|
|
virtual QString timeStepName(int frameIdx);
|
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;
|
|
|
|
virtual cvf::Vec3d displayModelOffset() const;
|
|
|
|
|
2013-03-18 08:34:29 -05:00
|
|
|
// Overridden methods from PdmObject
|
|
|
|
public:
|
2015-05-16 01:45:50 -05:00
|
|
|
|
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);
|
2015-05-15 11:51:49 -05: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:
|
2015-07-31 11:58:23 -05:00
|
|
|
caf::PdmChildField<RimReservoirCellResultsStorage*> m_matrixModelResults;
|
|
|
|
caf::PdmChildField<RimReservoirCellResultsStorage*> m_fractureModelResults;
|
2015-11-11 09:21:07 -06:00
|
|
|
QString m_timeStepFormatString;
|
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
|
|
|
};
|