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>
31 namespace Opm {
namespace EclIO {
namespace OutputStream {
33 class SummarySpecification;
36 namespace Opm {
namespace EclIO {
43 const std::ios_base::openmode mode = std::ios::out);
46 void write(
const std::string& name,
47 const std::vector<T>& data)
49 eclArrType arrType = MESS;
52 if (
typeid(T) ==
typeid(
int))
54 else if (
typeid(T) ==
typeid(
float))
56 else if (
typeid(T) ==
typeid(
double)){
59 }
else if (
typeid(T) ==
typeid(
bool))
61 else if (
typeid(T) ==
typeid(
char))
66 writeFormattedHeader(name, data.size(), arrType, element_size);
68 writeFormattedArray(data);
72 writeBinaryHeader(name, data.size(), arrType, element_size);
74 writeBinaryArray(data);
81 void write(
const std::string& name,
const std::vector<std::string>& data,
int element_size);
83 void message(
const std::string& msg);
86 void set_ix() { ix_standard =
true; }
92 void writeBinaryHeader(
const std::string& arrName, int64_t size, eclArrType arrType,
int element_size);
95 void writeBinaryArray(
const std::vector<T>& data);
97 void writeBinaryCharArray(
const std::vector<std::string>& data,
int element_size);
100 void writeFormattedHeader(
const std::string& arrName,
int size, eclArrType arrType,
int element_size);
102 template <
typename T>
103 void writeFormattedArray(
const std::vector<T>& data);
105 void writeFormattedCharArray(
const std::vector<std::string>& data,
int element_size);
108 void writeArrayType(
const eclArrType arrType);
109 std::string make_real_string_ecl(
float value)
const;
110 std::string make_real_string_ix(
float value)
const;
111 std::string make_doub_string_ecl(
double value)
const;
112 std::string make_doub_string_ix(
double value)
const;
114 bool isFormatted, ix_standard;
115 std::ofstream ofileH;
120 void EclOutput::write<std::string>(
const std::string& name,
121 const std::vector<std::string>& data);
124 void EclOutput::write<PaddedOutputString<8>>
125 (
const std::string& name,
126 const std::vector<PaddedOutputString<8>>& data);
Definition: EclOutput.hpp:39
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:29