#include <EclFile.hpp>

Inheritance diagram for Opm::EclIO::EclFile:
Inheritance graph

Classes

struct  Formatted
 

Public Types

using EclEntry = std::tuple< std::string, eclArrType, int64_t >
 

Public Member Functions

 EclFile (const std::string &filename, bool preload=false)
 
 EclFile (const std::string &filename, Formatted fmt, bool preload=false)
 
bool formattedInput () const
 
void loadData ()
 
void loadData (const std::string &arrName)
 
void loadData (int arrIndex)
 
void loadData (const std::vector< int > &arrIndex)
 
void clearData ()
 
std::vector< EclEntrygetList () const
 
const std::vector< int > & getElementSizeList () const
 
template<typename T >
const std::vector< T > & get (int arrIndex)
 
template<typename T >
const std::vector< T > & get (const std::string &name)
 
bool hasKey (const std::string &name) const
 
std::size_t count (const std::string &name) const
 
const std::vector< std::string > & arrayNames () const
 
std::size_t size () const
 
bool is_ix () const
 

Protected Member Functions

template<class T >
const std::vector< T > & getImpl (int arrIndex, eclArrType type, const std::unordered_map< int, std::vector< T > > &array, const std::string &typeStr)
 
std::streampos seekPosition (const std::vector< std::string >::size_type arrIndex) const
 

Protected Attributes

bool formatted
 
std::string inputFilename
 
std::unordered_map< int, std::vector< int > > inte_array
 
std::unordered_map< int, std::vector< bool > > logi_array
 
std::unordered_map< int, std::vector< double > > doub_array
 
std::unordered_map< int, std::vector< float > > real_array
 
std::unordered_map< int, std::vector< std::string > > char_array
 
std::vector< std::stringarray_name
 
std::vector< eclArrTypearray_type
 
std::vector< int64_t > array_size
 
std::vector< int > array_element_size
 
std::vector< uint64_t > ifStreamPos
 
std::map< std::string, int > array_index
 

Member Typedef Documentation

◆ EclEntry

using Opm::EclIO::EclFile::EclEntry = std::tuple<std::string, eclArrType, int64_t>

Constructor & Destructor Documentation

◆ EclFile() [1/2]

Opm::EclIO::EclFile::EclFile ( const std::string filename,
bool  preload = false 
)
explicit

◆ EclFile() [2/2]

Opm::EclIO::EclFile::EclFile ( const std::string filename,
Formatted  fmt,
bool  preload = false 
)

Member Function Documentation

◆ arrayNames()

const std::vector< std::string > & Opm::EclIO::EclFile::arrayNames ( ) const
inline

References array_name.

◆ clearData()

void Opm::EclIO::EclFile::clearData ( )
inline

◆ count()

std::size_t Opm::EclIO::EclFile::count ( const std::string name) const

◆ formattedInput()

bool Opm::EclIO::EclFile::formattedInput ( ) const
inline

References formatted.

◆ get() [1/2]

template<typename T >
const std::vector< T > & Opm::EclIO::EclFile::get ( const std::string name)

◆ get() [2/2]

template<typename T >
const std::vector< T > & Opm::EclIO::EclFile::get ( int  arrIndex)

◆ getElementSizeList()

const std::vector< int > & Opm::EclIO::EclFile::getElementSizeList ( ) const
inline

References array_element_size.

◆ getImpl()

template<class T >
const std::vector< T > & Opm::EclIO::EclFile::getImpl ( int  arrIndex,
eclArrType  type,
const std::unordered_map< int, std::vector< T > > &  array,
const std::string typeStr 
)
inlineprotected

◆ getList()

std::vector< EclEntry > Opm::EclIO::EclFile::getList ( ) const

◆ hasKey()

bool Opm::EclIO::EclFile::hasKey ( const std::string name) const

◆ is_ix()

bool Opm::EclIO::EclFile::is_ix ( ) const

◆ loadData() [1/4]

void Opm::EclIO::EclFile::loadData ( )

Referenced by getImpl().

◆ loadData() [2/4]

void Opm::EclIO::EclFile::loadData ( const std::string arrName)

◆ loadData() [3/4]

void Opm::EclIO::EclFile::loadData ( const std::vector< int > &  arrIndex)

◆ loadData() [4/4]

void Opm::EclIO::EclFile::loadData ( int  arrIndex)

◆ seekPosition()

std::streampos Opm::EclIO::EclFile::seekPosition ( const std::vector< std::string >::size_type  arrIndex) const
protected

◆ size()

std::size_t Opm::EclIO::EclFile::size ( ) const

Member Data Documentation

◆ array_element_size

std::vector<int> Opm::EclIO::EclFile::array_element_size
protected

Referenced by getElementSizeList().

◆ array_index

std::map<std::string, int> Opm::EclIO::EclFile::array_index
protected

◆ array_name

std::vector<std::string> Opm::EclIO::EclFile::array_name
protected

Referenced by arrayNames().

◆ array_size

std::vector<int64_t> Opm::EclIO::EclFile::array_size
protected

◆ array_type

std::vector<eclArrType> Opm::EclIO::EclFile::array_type
protected

◆ char_array

std::unordered_map<int, std::vector<std::string> > Opm::EclIO::EclFile::char_array
protected

◆ doub_array

std::unordered_map<int, std::vector<double> > Opm::EclIO::EclFile::doub_array
protected

◆ formatted

bool Opm::EclIO::EclFile::formatted
protected

Referenced by formattedInput().

◆ ifStreamPos

std::vector<uint64_t> Opm::EclIO::EclFile::ifStreamPos
protected

◆ inputFilename

std::string Opm::EclIO::EclFile::inputFilename
protected

◆ inte_array

std::unordered_map<int, std::vector<int> > Opm::EclIO::EclFile::inte_array
protected

◆ logi_array

std::unordered_map<int, std::vector<bool> > Opm::EclIO::EclFile::logi_array
protected

◆ real_array

std::unordered_map<int, std::vector<float> > Opm::EclIO::EclFile::real_array
protected

The documentation for this class was generated from the following file: