opm-common
Toggle main menu visibility
Loading...
Searching...
No Matches
EclipseIOUtil.hpp
1
#ifndef ECLIPSE_IO_UTIL_HPP
2
#define ECLIPSE_IO_UTIL_HPP
3
4
#include <vector>
5
6
7
namespace
Opm
8
{
9
namespace
EclipseIOUtil
10
{
11
12
template
<
typename
T>
13
void
addToStripedData(
const
std::vector<T>& data, std::vector<T>& result,
size_t
offset,
size_t
stride) {
14
int
dataindex = 0;
15
for
(
size_t
index = offset; index < result.size(); index += stride) {
16
result[index] = data[dataindex];
17
++dataindex;
18
}
19
}
20
21
22
template
<
typename
T>
23
void
extractFromStripedData(
const
std::vector<T>& data, std::vector<T>& result,
size_t
offset,
size_t
stride) {
24
for
(
size_t
index = offset; index < data.size(); index += stride) {
25
result.push_back(data[index]);
26
}
27
}
28
29
30
}
//namespace EclipseIOUtil
31
}
//namespace Opm
32
33
#endif
//ECLIPSE_IO_UTIL_HPP
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition
Exceptions.hpp:30
opm
output
eclipse
EclipseIOUtil.hpp
Generated by
1.17.0