ResInsight/ApplicationCode/ProjectDataModel/RimEclipseCase.h

147 lines
6.0 KiB
C
Raw Normal View History

/////////////////////////////////////////////////////////////////////////////////
//
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
//
// 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 "RiaPorosityModel.h"
#include "RimCase.h"
#include "RiaDefines.h"
#include "cafPdmChildArrayField.h"
#include "cafPdmChildField.h"
#include "cafPdmField.h"
#include "cafPdmObject.h"
#include "cvfBase.h"
#include "cvfObject.h"
#include "cvfColor3.h"
class QString;
2012-08-31 12:12:47 -05:00
2017-01-10 02:51:39 -06:00
class RigEclipseCaseData;
class RigCaseCellResultsData;
class RigGridBase;
class RigMainGrid;
class RimCaseCollection;
class RimIdenticalGridCaseGroup;
class RimReservoirCellResultsStorage;
class RimEclipseView;
//==================================================================================================
//
2012-06-26 09:10:41 -05:00
// Interface for reservoirs.
//
//==================================================================================================
class RimEclipseCase : public RimCase
{
CAF_PDM_HEADER_INIT;
public:
RimEclipseCase();
virtual ~RimEclipseCase();
// Fields:
caf::PdmField<bool> releaseResultMemory;
caf::PdmChildArrayField<RimEclipseView*> reservoirViews;
caf::PdmField<bool> flipXAxis;
caf::PdmField<bool> flipYAxis;
std::vector<QString> filesContainingFaults() const;
void setFilesContainingFaults(const std::vector<QString>& val);
2012-06-26 09:10:41 -05:00
bool openReserviorCase();
virtual bool openEclipseGridFile() = 0;
2017-03-15 03:10:16 -05:00
RigEclipseCaseData* eclipseCaseData();
const RigEclipseCaseData* eclipseCaseData() const;
cvf::Color3f defaultWellColor(const QString& wellName);
const RigMainGrid* mainGrid() const;
RigCaseCellResultsData* results(RiaDefines::PorosityModelType porosityModel);
const RigCaseCellResultsData* results(RiaDefines::PorosityModelType porosityModel) const;
RimReservoirCellResultsStorage* resultsStorage(RiaDefines::PorosityModelType porosityModel);
const RimReservoirCellResultsStorage* resultsStorage(RiaDefines::PorosityModelType porosityModel) const;
RimEclipseView* createAndAddReservoirView();
RimEclipseView* createCopyAndAddView(const RimEclipseView* sourceView);
void recalculateCompletionTypeAndRedrawAllViews();
virtual QString locationOnDisc() const { return QString(); }
virtual QString gridFileName() const { return QString(); }
RimCaseCollection* parentCaseCollection();
virtual QStringList timeStepStrings() const override;
virtual QString timeStepName(int frameIdx) const override;
2017-06-16 10:20:08 -05:00
virtual std::vector<QDateTime> timeStepDates() const override;
virtual cvf::BoundingBox activeCellsBoundingBox() const;
virtual cvf::BoundingBox allCellsBoundingBox() const;
virtual cvf::Vec3d displayModelOffset() const;
void reloadDataAndUpdate();
virtual void reloadEclipseGridFile() = 0;
2017-06-19 13:55:58 -05:00
virtual double characteristicCellSize() const override;
virtual void setFormationNames(RimFormationNames* formationNames) override;
protected:
virtual void initAfterRead();
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
virtual void updateFormationNamesData() override;
// Internal methods
protected:
void computeCachedData();
2017-01-10 02:51:39 -06:00
void setReservoirData(RigEclipseCaseData* eclipseCase);
private:
void createTimeStepFormatString();
virtual std::vector<Rim3dView*> allSpecialViews() const override;
private:
cvf::ref<RigEclipseCaseData> m_rigEclipseCase;
QString m_timeStepFormatString;
std::map<QString , cvf::Color3f> m_wellToColorMap;
caf::PdmField<QString > m_filesContainingFaultsSemColSeparated;
caf::PdmChildField<RimReservoirCellResultsStorage*> m_matrixModelResults;
caf::PdmChildField<RimReservoirCellResultsStorage*> m_fractureModelResults;
// Obsolete fields
protected:
2018-01-09 02:57:54 -06:00
caf::PdmField<QString> m_caseName_OBSOLETE;
private:
caf::PdmField<std::vector<QString> > m_filesContainingFaults_OBSOLETE;
};