2019-01-22 15:22:45 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2019- Equinor ASA
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2019-01-22 15:22:45 +01: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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2019-01-22 15:22:45 +01:00
|
|
|
// 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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2019-01-22 15:22:45 +01:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "RiaDefines.h"
|
2019-02-12 12:48:18 +01:00
|
|
|
|
2019-01-22 15:22:45 +01:00
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
|
|
class RigEclipseResultAddress
|
|
|
|
|
{
|
|
|
|
|
public:
|
2025-08-27 14:22:11 +02:00
|
|
|
RigEclipseResultAddress();
|
|
|
|
|
explicit RigEclipseResultAddress( const QString& resultName );
|
2019-09-06 10:40:57 +02:00
|
|
|
explicit RigEclipseResultAddress( RiaDefines::ResultCatType type,
|
|
|
|
|
const QString& resultName,
|
|
|
|
|
int timeLapseBaseTimeStep = NO_TIME_LAPSE,
|
2021-02-11 03:01:17 +01:00
|
|
|
int differenceCaseId = NO_CASE_DIFF,
|
2025-08-27 14:22:11 +02:00
|
|
|
bool divideByCellFaceArea = false );
|
|
|
|
|
explicit RigEclipseResultAddress( RiaDefines::ResultCatType type, RiaDefines::ResultDataType dataType, const QString& resultName );
|
2019-02-12 12:48:18 +01:00
|
|
|
|
2025-08-27 14:22:11 +02:00
|
|
|
bool isValid() const;
|
2019-01-22 15:22:45 +01:00
|
|
|
|
2023-05-09 11:41:56 +02:00
|
|
|
void setDataType( RiaDefines::ResultDataType dataType ) { m_resultDataType = dataType; }
|
|
|
|
|
RiaDefines::ResultDataType dataType() const { return m_resultDataType; }
|
|
|
|
|
|
2021-02-11 03:01:17 +01:00
|
|
|
// Delta Time Step
|
2025-08-27 14:22:11 +02:00
|
|
|
bool isDeltaTimeStepActive() const;
|
|
|
|
|
void setDeltaTimeStepIndex( int timeStepIndex );
|
|
|
|
|
int deltaTimeStepIndex() const;
|
|
|
|
|
bool representsAllTimeLapses() const;
|
2020-02-12 11:13:38 +01:00
|
|
|
static constexpr int allTimeLapsesValue() { return ALL_TIME_LAPSES; }
|
|
|
|
|
static constexpr int noTimeLapseValue() { return NO_TIME_LAPSE; }
|
2021-02-11 03:01:17 +01:00
|
|
|
// Delta Grid Case
|
2025-08-27 14:22:11 +02:00
|
|
|
bool isDeltaCaseActive() const;
|
|
|
|
|
void setDeltaCaseId( int caseId );
|
|
|
|
|
int deltaCaseId() const;
|
2020-02-12 11:13:38 +01:00
|
|
|
static constexpr int noCaseDiffValue() { return NO_CASE_DIFF; }
|
2019-01-29 12:44:23 +01:00
|
|
|
|
2021-02-11 03:01:17 +01:00
|
|
|
// Divide by Cell Face Area
|
2025-08-27 14:22:11 +02:00
|
|
|
void enableDivideByCellFaceArea( bool enable );
|
|
|
|
|
bool isDivideByCellFaceAreaActive() const;
|
2019-01-22 15:22:45 +01:00
|
|
|
|
2025-08-27 14:22:11 +02:00
|
|
|
bool operator<( const RigEclipseResultAddress& other ) const;
|
|
|
|
|
bool operator==( const RigEclipseResultAddress& other ) const;
|
2019-01-29 12:44:23 +01:00
|
|
|
|
2025-08-27 14:22:11 +02:00
|
|
|
const QString& resultName() const;
|
|
|
|
|
void setResultName( QString name );
|
2019-09-06 10:40:57 +02:00
|
|
|
|
2025-08-27 14:22:11 +02:00
|
|
|
RiaDefines::ResultCatType resultCatType() const;
|
|
|
|
|
void setResultCatType( RiaDefines::ResultCatType catType );
|
2019-04-03 11:46:26 +02:00
|
|
|
|
|
|
|
|
private:
|
2023-05-09 11:41:56 +02:00
|
|
|
RiaDefines::ResultCatType m_resultCatType;
|
|
|
|
|
RiaDefines::ResultDataType m_resultDataType;
|
|
|
|
|
QString m_resultName;
|
|
|
|
|
int m_timeLapseBaseFrameIdx;
|
|
|
|
|
int m_differenceCaseId;
|
|
|
|
|
bool m_divideByCellFaceArea;
|
2021-02-11 03:01:17 +01:00
|
|
|
|
2019-04-03 11:46:26 +02:00
|
|
|
static const int ALL_TIME_LAPSES = -2;
|
|
|
|
|
static const int NO_TIME_LAPSE = -1;
|
|
|
|
|
static const int NO_CASE_DIFF = -1;
|
2019-01-22 15:22:45 +01:00
|
|
|
};
|