18#ifndef OPM_IO_ECLOUTPUT_HPP
19#define OPM_IO_ECLOUTPUT_HPP
27#include <opm/io/eclipse/EclIOdata.hpp>
28#include <opm/io/eclipse/PaddedOutputString.hpp>
30namespace Opm {
namespace EclIO {
namespace OutputStream {
32 class SummarySpecification;
35namespace Opm {
namespace EclIO {
42 const std::ios_base::openmode mode = std::ios::out);
45 void write(
const std::string& name,
46 const std::vector<T>& data)
48 eclArrType arrType = MESS;
51 if (
typeid(T) ==
typeid(
int))
53 else if (
typeid(T) ==
typeid(
float))
55 else if (
typeid(T) ==
typeid(
double)){
58 }
else if (
typeid(T) ==
typeid(
bool))
60 else if (
typeid(T) ==
typeid(
char))
65 writeFormattedHeader(name, data.size(), arrType, element_size);
67 writeFormattedArray(data);
71 writeBinaryHeader(name, data.size(), arrType, element_size);
73 writeBinaryArray(data);
80 void write(
const std::string& name,
const std::vector<std::string>& data,
int element_size);
82 void message(
const std::string& msg);
85 void set_ix() { ix_standard =
true; }
91 void writeBinaryHeader(
const std::string& arrName, int64_t size, eclArrType arrType,
int element_size);
94 void writeBinaryArray(
const std::vector<T>& data);
96 void writeBinaryCharArray(
const std::vector<std::string>& data,
int element_size);
99 void writeFormattedHeader(
const std::string& arrName,
int size, eclArrType arrType,
int element_size);
101 template <
typename T>
102 void writeFormattedArray(
const std::vector<T>& data);
104 void writeFormattedCharArray(
const std::vector<std::string>& data,
int element_size);
107 void writeArrayType(
const eclArrType arrType);
108 std::string make_real_string_ecl(
float value)
const;
109 std::string make_real_string_ix(
float value)
const;
110 std::string make_doub_string_ecl(
double value)
const;
111 std::string make_doub_string_ix(
double value)
const;
113 bool isFormatted, ix_standard;
114 std::ofstream ofileH;
119void EclOutput::write<std::string>(
const std::string& name,
120 const std::vector<std::string>& data);
123void EclOutput::write<PaddedOutputString<8>>
124 (
const std::string& name,
125 const std::vector<PaddedOutputString<8>>& data);
Definition: EclOutput.hpp:38
File manager for restart output streams.
Definition: OutputStream.hpp:136
Definition: OutputStream.hpp:364
Null-terminated, left adjusted, space padded array of N characters.
Definition: PaddedOutputString.hpp:40
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30