Opm::EclIO Namespace Reference

Namespaces

namespace  OutputStream
 

Classes

class  EclFile
 
class  EclOutput
 
class  EGrid
 
class  EInit
 
class  ERft
 
class  ERsm
 
class  ERst
 
class  ESmry
 
class  PaddedOutputString
 
struct  SummaryNode
 

Typedefs

using ArrSourceEntry = std::tuple< std::string, std::string, int, uint64_t >
 
using TimeStepEntry = std::tuple< int, int, uint64_t >
 

Enumerations

enum  eclArrType {
  INTE , REAL , DOUB , CHAR ,
  LOGI , MESS , C0NN
}
 

Functions

template<>
void EclOutput::write< std::string > (const std::string &name, const std::vector< std::string > &data)
 
int flipEndianInt (int num)
 
int64_t flipEndianLongInt (int64_t num)
 
float flipEndianFloat (float num)
 
double flipEndianDouble (double num)
 
bool isEOF (std::fstream *fileH)
 
bool fileExists (const std::string &filename)
 
bool isFormatted (const std::string &filename)
 
bool is_number (const std::string &numstr)
 
bool isEqualCaseInsensitive (const std::string &string1, const std::string &string2)
 
Opm::filesystem::path findFileCaseInsensitive (const Opm::filesystem::path &folder, const std::string &filename)
 
std::tuple< int, int > block_size_data_binary (eclArrType arrType)
 
std::tuple< int, int, int > block_size_data_formatted (eclArrType arrType)
 
std::string trimr (const std::string &str1)
 
uint64_t sizeOnDiskBinary (int64_t num, Opm::EclIO::eclArrType arrType, int elementSize)
 
uint64_t sizeOnDiskFormatted (const int64_t num, Opm::EclIO::eclArrType arrType, int elementSize)
 
void readBinaryHeader (std::fstream &fileH, std::string &tmpStrName, int &tmpSize, std::string &tmpStrType)
 
void readBinaryHeader (std::fstream &fileH, std::string &arrName, int64_t &size, Opm::EclIO::eclArrType &arrType, int &elementSize)
 
void readFormattedHeader (std::fstream &fileH, std::string &arrName, int64_t &num, Opm::EclIO::eclArrType &arrType, int &elementSize)
 
template<typename T , typename T2 >
std::vector< T > readBinaryArray (std::fstream &fileH, const int64_t size, Opm::EclIO::eclArrType type, std::function< T(T2)> &flip, int elementSize)
 
std::vector< int > readBinaryInteArray (std::fstream &fileH, const int64_t size)
 
std::vector< float > readBinaryRealArray (std::fstream &fileH, const int64_t size)
 
std::vector< double > readBinaryDoubArray (std::fstream &fileH, const int64_t size)
 
std::vector< boolreadBinaryLogiArray (std::fstream &fileH, const int64_t size)
 
std::vector< unsigned int > readBinaryRawLogiArray (std::fstream &fileH, const int64_t size)
 
std::vector< std::stringreadBinaryCharArray (std::fstream &fileH, const int64_t size)
 
std::vector< std::stringreadBinaryC0nnArray (std::fstream &fileH, const int64_t size, int elementSize)
 
template<typename T >
std::vector< T > readFormattedArray (const std::string &file_str, const int size, int64_t fromPos, std::function< T(const std::string &)> &process)
 
std::vector< int > readFormattedInteArray (const std::string &file_str, const int64_t size, int64_t fromPos)
 
std::vector< std::stringreadFormattedCharArray (const std::string &file_str, const int64_t size, int64_t fromPos, int elementSize)
 
std::vector< float > readFormattedRealArray (const std::string &file_str, const int64_t size, int64_t fromPos)
 
std::vector< std::stringreadFormattedRealRawStrings (const std::string &file_str, const int64_t size, int64_t fromPos)
 
std::vector< boolreadFormattedLogiArray (const std::string &file_str, const int64_t size, int64_t fromPos)
 
std::vector< double > readFormattedDoubArray (const std::string &file_str, const int64_t size, int64_t fromPos)
 
bool cmp (const ESmry &esmr, const ERsm &ersm)
 

Variables

const unsigned int true_value_ecl = 0xffffffff
 
const unsigned int true_value_ix = 0x1000000
 
const unsigned int false_value = 0x00000000
 
const int sizeOfInte = 4
 
const int sizeOfReal = 4
 
const int sizeOfDoub = 8
 
const int sizeOfLogi = 4
 
const int sizeOfChar = 8
 
const int MaxBlockSizeInte = 4000
 
const int MaxBlockSizeReal = 4000
 
const int MaxBlockSizeDoub = 8000
 
const int MaxBlockSizeLogi = 4000
 
const int MaxBlockSizeChar = 840
 
const int MaxNumBlockInte = 1000
 
const int MaxNumBlockReal = 1000
 
const int MaxNumBlockDoub = 1000
 
const int MaxNumBlockLogi = 1000
 
const int MaxNumBlockChar = 105
 
const int numColumnsInte = 6
 
const int numColumnsReal = 4
 
const int numColumnsDoub = 3
 
const int numColumnsLogi = 25
 
const int numColumnsChar = 7
 
const int columnWidthInte = 12
 
const int columnWidthReal = 17
 
const int columnWidthDoub = 23
 
const int columnWidthLogi = 3
 
const int columnWidthChar = 11
 

Typedef Documentation

◆ ArrSourceEntry

using Opm::EclIO::ArrSourceEntry = typedef std::tuple<std::string, std::string, int, uint64_t>

◆ TimeStepEntry

using Opm::EclIO::TimeStepEntry = typedef std::tuple<int, int, uint64_t>

Enumeration Type Documentation

◆ eclArrType

Enumerator
INTE 
REAL 
DOUB 
CHAR 
LOGI 
MESS 
C0NN 

Function Documentation

◆ block_size_data_binary()

std::tuple< int, int > Opm::EclIO::block_size_data_binary ( eclArrType  arrType)

◆ block_size_data_formatted()

std::tuple< int, int, int > Opm::EclIO::block_size_data_formatted ( eclArrType  arrType)

◆ cmp()

bool Opm::EclIO::cmp ( const ESmry esmr,
const ERsm ersm 
)

◆ EclOutput::write< std::string >()

template<>
void Opm::EclIO::EclOutput::write< std::string > ( const std::string name,
const std::vector< std::string > &  data 
)

◆ fileExists()

bool Opm::EclIO::fileExists ( const std::string filename)

◆ findFileCaseInsensitive()

Opm::filesystem::path Opm::EclIO::findFileCaseInsensitive ( const Opm::filesystem::path &  folder,
const std::string filename 
)

◆ flipEndianDouble()

double Opm::EclIO::flipEndianDouble ( double  num)

◆ flipEndianFloat()

float Opm::EclIO::flipEndianFloat ( float  num)

◆ flipEndianInt()

int Opm::EclIO::flipEndianInt ( int  num)

◆ flipEndianLongInt()

int64_t Opm::EclIO::flipEndianLongInt ( int64_t  num)

◆ is_number()

bool Opm::EclIO::is_number ( const std::string numstr)

◆ isEOF()

bool Opm::EclIO::isEOF ( std::fstream *  fileH)

◆ isEqualCaseInsensitive()

bool Opm::EclIO::isEqualCaseInsensitive ( const std::string string1,
const std::string string2 
)

◆ isFormatted()

bool Opm::EclIO::isFormatted ( const std::string filename)

◆ readBinaryArray()

template<typename T , typename T2 >
std::vector< T > Opm::EclIO::readBinaryArray ( std::fstream &  fileH,
const int64_t  size,
Opm::EclIO::eclArrType  type,
std::function< T(T2)> &  flip,
int  elementSize 
)

◆ readBinaryC0nnArray()

std::vector< std::string > Opm::EclIO::readBinaryC0nnArray ( std::fstream &  fileH,
const int64_t  size,
int  elementSize 
)

◆ readBinaryCharArray()

std::vector< std::string > Opm::EclIO::readBinaryCharArray ( std::fstream &  fileH,
const int64_t  size 
)

◆ readBinaryDoubArray()

std::vector< double > Opm::EclIO::readBinaryDoubArray ( std::fstream &  fileH,
const int64_t  size 
)

◆ readBinaryHeader() [1/2]

void Opm::EclIO::readBinaryHeader ( std::fstream &  fileH,
std::string arrName,
int64_t &  size,
Opm::EclIO::eclArrType arrType,
int &  elementSize 
)

◆ readBinaryHeader() [2/2]

void Opm::EclIO::readBinaryHeader ( std::fstream &  fileH,
std::string tmpStrName,
int &  tmpSize,
std::string tmpStrType 
)

◆ readBinaryInteArray()

std::vector< int > Opm::EclIO::readBinaryInteArray ( std::fstream &  fileH,
const int64_t  size 
)

◆ readBinaryLogiArray()

std::vector< bool > Opm::EclIO::readBinaryLogiArray ( std::fstream &  fileH,
const int64_t  size 
)

◆ readBinaryRawLogiArray()

std::vector< unsigned int > Opm::EclIO::readBinaryRawLogiArray ( std::fstream &  fileH,
const int64_t  size 
)

◆ readBinaryRealArray()

std::vector< float > Opm::EclIO::readBinaryRealArray ( std::fstream &  fileH,
const int64_t  size 
)

◆ readFormattedArray()

template<typename T >
std::vector< T > Opm::EclIO::readFormattedArray ( const std::string file_str,
const int  size,
int64_t  fromPos,
std::function< T(const std::string &)> &  process 
)

◆ readFormattedCharArray()

std::vector< std::string > Opm::EclIO::readFormattedCharArray ( const std::string file_str,
const int64_t  size,
int64_t  fromPos,
int  elementSize 
)

◆ readFormattedDoubArray()

std::vector< double > Opm::EclIO::readFormattedDoubArray ( const std::string file_str,
const int64_t  size,
int64_t  fromPos 
)

◆ readFormattedHeader()

void Opm::EclIO::readFormattedHeader ( std::fstream &  fileH,
std::string arrName,
int64_t &  num,
Opm::EclIO::eclArrType arrType,
int &  elementSize 
)

◆ readFormattedInteArray()

std::vector< int > Opm::EclIO::readFormattedInteArray ( const std::string file_str,
const int64_t  size,
int64_t  fromPos 
)

◆ readFormattedLogiArray()

std::vector< bool > Opm::EclIO::readFormattedLogiArray ( const std::string file_str,
const int64_t  size,
int64_t  fromPos 
)

◆ readFormattedRealArray()

std::vector< float > Opm::EclIO::readFormattedRealArray ( const std::string file_str,
const int64_t  size,
int64_t  fromPos 
)

◆ readFormattedRealRawStrings()

std::vector< std::string > Opm::EclIO::readFormattedRealRawStrings ( const std::string file_str,
const int64_t  size,
int64_t  fromPos 
)

◆ sizeOnDiskBinary()

uint64_t Opm::EclIO::sizeOnDiskBinary ( int64_t  num,
Opm::EclIO::eclArrType  arrType,
int  elementSize 
)

◆ sizeOnDiskFormatted()

uint64_t Opm::EclIO::sizeOnDiskFormatted ( const int64_t  num,
Opm::EclIO::eclArrType  arrType,
int  elementSize 
)

◆ trimr()

std::string Opm::EclIO::trimr ( const std::string str1)

Variable Documentation

◆ columnWidthChar

const int Opm::EclIO::columnWidthChar = 11

◆ columnWidthDoub

const int Opm::EclIO::columnWidthDoub = 23

◆ columnWidthInte

const int Opm::EclIO::columnWidthInte = 12

◆ columnWidthLogi

const int Opm::EclIO::columnWidthLogi = 3

◆ columnWidthReal

const int Opm::EclIO::columnWidthReal = 17

◆ false_value

const unsigned int Opm::EclIO::false_value = 0x00000000

◆ MaxBlockSizeChar

const int Opm::EclIO::MaxBlockSizeChar = 840

◆ MaxBlockSizeDoub

const int Opm::EclIO::MaxBlockSizeDoub = 8000

◆ MaxBlockSizeInte

const int Opm::EclIO::MaxBlockSizeInte = 4000

◆ MaxBlockSizeLogi

const int Opm::EclIO::MaxBlockSizeLogi = 4000

◆ MaxBlockSizeReal

const int Opm::EclIO::MaxBlockSizeReal = 4000

◆ MaxNumBlockChar

const int Opm::EclIO::MaxNumBlockChar = 105

◆ MaxNumBlockDoub

const int Opm::EclIO::MaxNumBlockDoub = 1000

◆ MaxNumBlockInte

const int Opm::EclIO::MaxNumBlockInte = 1000

◆ MaxNumBlockLogi

const int Opm::EclIO::MaxNumBlockLogi = 1000

◆ MaxNumBlockReal

const int Opm::EclIO::MaxNumBlockReal = 1000

◆ numColumnsChar

const int Opm::EclIO::numColumnsChar = 7

◆ numColumnsDoub

const int Opm::EclIO::numColumnsDoub = 3

◆ numColumnsInte

const int Opm::EclIO::numColumnsInte = 6

◆ numColumnsLogi

const int Opm::EclIO::numColumnsLogi = 25

◆ numColumnsReal

const int Opm::EclIO::numColumnsReal = 4

◆ sizeOfChar

const int Opm::EclIO::sizeOfChar = 8

◆ sizeOfDoub

const int Opm::EclIO::sizeOfDoub = 8

◆ sizeOfInte

const int Opm::EclIO::sizeOfInte = 4

◆ sizeOfLogi

const int Opm::EclIO::sizeOfLogi = 4

◆ sizeOfReal

const int Opm::EclIO::sizeOfReal = 4

◆ true_value_ecl

const unsigned int Opm::EclIO::true_value_ecl = 0xffffffff

◆ true_value_ix

const unsigned int Opm::EclIO::true_value_ix = 0x1000000