2017-10-04 07:59:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017 Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2017-10-04 07:59:38 -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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2017-10-04 07:59:38 -05: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 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2017-10-04 07:59:38 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-07-25 00:38:46 -05:00
|
|
|
#include "RifReaderRftInterface.h"
|
2017-10-06 06:35:49 -05:00
|
|
|
|
2017-10-04 07:59:38 -05:00
|
|
|
#include <map>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2017-10-05 02:29:19 -05:00
|
|
|
#include "cvfObject.h"
|
|
|
|
|
2017-10-05 14:24:43 -05:00
|
|
|
#include <QDateTime>
|
|
|
|
|
2017-10-11 04:09:51 -05:00
|
|
|
namespace caf
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
class VecIjk;
|
2017-10-11 04:09:51 -05:00
|
|
|
}
|
2017-10-10 04:11:34 -05:00
|
|
|
|
2017-10-04 07:59:38 -05:00
|
|
|
//==================================================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==================================================================================================
|
2019-07-25 00:38:46 -05:00
|
|
|
class RifReaderEclipseRft : public RifReaderRftInterface, public cvf::Object
|
2017-10-04 07:59:38 -05:00
|
|
|
{
|
|
|
|
public:
|
2019-09-06 03:40:57 -05:00
|
|
|
RifReaderEclipseRft( const QString& fileName );
|
2018-10-18 12:45:57 -05:00
|
|
|
~RifReaderEclipseRft() override;
|
2017-10-04 07:59:38 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::set<RifEclipseRftAddress> eclipseRftAddresses() override;
|
2023-02-26 03:48:40 -06:00
|
|
|
void values( const RifEclipseRftAddress& rftAddress, std::vector<double>* values ) override;
|
2023-09-04 03:08:30 -05:00
|
|
|
std::vector<caf::VecIjk> cellIndices( const QString& wellName, const QDateTime& timeStep ) override;
|
2017-10-04 07:59:38 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::set<QDateTime> availableTimeSteps( const QString& wellName ) override;
|
2023-02-26 03:48:40 -06:00
|
|
|
std::set<QDateTime> availableTimeSteps( const QString& wellName,
|
|
|
|
const std::set<RifEclipseRftAddress::RftWellLogChannelType>& relevantChannels ) override;
|
2017-11-13 08:17:49 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::set<QDateTime> availableTimeSteps( const QString& wellName,
|
|
|
|
const RifEclipseRftAddress::RftWellLogChannelType& wellLogChannelName ) override;
|
|
|
|
std::set<RifEclipseRftAddress::RftWellLogChannelType> availableWellLogChannels( const QString& wellName ) override;
|
|
|
|
std::set<QString> wellNames() override;
|
|
|
|
bool wellHasRftData( QString wellName );
|
2017-10-05 14:24:43 -05:00
|
|
|
|
2017-10-04 07:59:38 -05:00
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
void open();
|
|
|
|
int indexFromAddress( const RifEclipseRftAddress& rftAddress ) const;
|
2023-09-04 03:08:30 -05:00
|
|
|
int indexFromAddress( const QString& wellName, const QDateTime& timeStep ) const;
|
2017-10-04 07:59:38 -05:00
|
|
|
|
|
|
|
private:
|
2023-04-14 07:07:45 -05:00
|
|
|
// NOLINTBEGIN(modernize-use-using)
|
2017-10-04 07:59:38 -05:00
|
|
|
// Taken from ecl_rft_file.h and ecl_rft_node.h
|
|
|
|
typedef struct ecl_rft_file_struct ecl_rft_file_type;
|
2023-04-14 07:07:45 -05:00
|
|
|
// NOLINTEND(modernize-use-using)
|
2017-10-04 07:59:38 -05:00
|
|
|
|
2018-02-02 07:17:10 -06:00
|
|
|
QString m_fileName;
|
2017-10-04 07:59:38 -05:00
|
|
|
ecl_rft_file_type* m_ecl_rft_file;
|
2019-07-25 00:38:46 -05:00
|
|
|
std::set<RifEclipseRftAddress> m_eclipseRftAddresses;
|
2017-10-05 14:24:43 -05:00
|
|
|
std::set<QString> m_wellNames;
|
2017-10-04 07:59:38 -05:00
|
|
|
std::map<RifEclipseRftAddress, int> m_rftAddressToLibeclNodeIdx;
|
|
|
|
};
|