mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1967 Curve Calculator : Add RiaSummaryCurveDefinition
This commit is contained in:
parent
5cd7ffc75e
commit
ae915a7898
@ -9,6 +9,7 @@ ${CEE_CURRENT_LIST_DIR}RiaApplication.h
|
||||
${CEE_CURRENT_LIST_DIR}RiaDefines.h
|
||||
${CEE_CURRENT_LIST_DIR}RiaPreferences.h
|
||||
${CEE_CURRENT_LIST_DIR}RiaPorosityModel.h
|
||||
${CEE_CURRENT_LIST_DIR}RiaSummaryCurveDefinition.h
|
||||
)
|
||||
|
||||
set (SOURCE_GROUP_SOURCE_FILES
|
||||
@ -17,6 +18,7 @@ ${CEE_CURRENT_LIST_DIR}RiaDefines.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RiaMain.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RiaPreferences.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RiaPorosityModel.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RiaSummaryCurveDefinition.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
|
57
ApplicationCode/Application/RiaSummaryCurveDefinition.cpp
Normal file
57
ApplicationCode/Application/RiaSummaryCurveDefinition.cpp
Normal file
@ -0,0 +1,57 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017 Statoil ASA
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiaSummaryCurveDefinition.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaSummaryCurveDefinition::RiaSummaryCurveDefinition(RimSummaryCase* summaryCase, const RifEclipseSummaryAddress& summaryAddress)
|
||||
{
|
||||
m_curveDefinition = std::make_pair(summaryCase, summaryAddress);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryCase* RiaSummaryCurveDefinition::summaryCase() const
|
||||
{
|
||||
return m_curveDefinition.first;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RifEclipseSummaryAddress& RiaSummaryCurveDefinition::summaryAddress() const
|
||||
{
|
||||
return m_curveDefinition.second;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaSummaryCurveDefinition::operator<(const RiaSummaryCurveDefinition& other) const
|
||||
{
|
||||
if (m_curveDefinition.first == other.summaryCase())
|
||||
{
|
||||
return (m_curveDefinition.second < other.summaryAddress());
|
||||
}
|
||||
|
||||
return (m_curveDefinition.first < other.summaryCase());
|
||||
}
|
||||
|
42
ApplicationCode/Application/RiaSummaryCurveDefinition.h
Normal file
42
ApplicationCode/Application/RiaSummaryCurveDefinition.h
Normal file
@ -0,0 +1,42 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017 Statoil ASA
|
||||
//
|
||||
// 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 "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
class RimSummaryCase;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RiaSummaryCurveDefinition
|
||||
{
|
||||
public:
|
||||
explicit RiaSummaryCurveDefinition(RimSummaryCase* summaryCase, const RifEclipseSummaryAddress& summaryAddress);
|
||||
|
||||
RimSummaryCase* summaryCase() const;
|
||||
const RifEclipseSummaryAddress& summaryAddress() const;
|
||||
|
||||
bool operator < (const RiaSummaryCurveDefinition& other) const;
|
||||
|
||||
private:
|
||||
std::pair<RimSummaryCase*, RifEclipseSummaryAddress> m_curveDefinition;
|
||||
};
|
Loading…
Reference in New Issue
Block a user