changed: avoid use of boost::multi_array in VFPInjTable

This commit is contained in:
Arne Morten Kvarving
2020-02-12 15:04:21 +01:00
parent de39bb5a7c
commit 143c8ec3bf
4 changed files with 39 additions and 53 deletions

View File

@@ -1140,8 +1140,7 @@ VFPINJ \n\
//The data itself
{
typedef Opm::VFPInjTable::array_type::size_type size_type;
const Opm::VFPInjTable::array_type& data = vfpinjTable.getTable();
const size_type* size = data.shape();
const auto size = vfpinjTable.shape();
BOOST_CHECK_EQUAL(size[0], 2);
BOOST_CHECK_EQUAL(size[1], 3);
@@ -1150,10 +1149,10 @@ VFPINJ \n\
double conversion_factor = 100000.0;
double index = 0.5;
for (size_type t=0; t<size[0]; ++t) {
for (size_type f=0; f<size[1]; ++f) {
for (size_type t = 0; t < size[0]; ++t) {
for (size_type f = 0; f < size[1]; ++f) {
index += 1.0;
BOOST_CHECK_EQUAL(data[t][f], index*conversion_factor);
BOOST_CHECK_EQUAL(const_cast<const VFPInjTable&>(vfpinjTable)(t,f), index*conversion_factor);
}
}
}