diff --git a/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.cpp b/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.cpp index fc7060813..8608d1844 100644 --- a/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.cpp +++ b/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.cpp @@ -18,8 +18,9 @@ */ #include - #include +#include + //Anonymous namespace @@ -222,6 +223,13 @@ void VFPProdTable::init(DeckKeywordConstPtr table, std::shared_ptr 1.0e10) { + //TODO: Replace with proper log message + std::cerr << "VFPPROD element [" + << t << "," << w << "," << g << "," << a << "," << f + << "]=" << bhp_tht[f] << " too large" << std::endl; + } m_data[t][w][g][a][f] = table_scaling_factor*bhp_tht[f]; } } @@ -255,11 +263,11 @@ void VFPProdTable::check() { assert(m_alq_data.size() > 0); //Data axis sorted? - assert(is_sorted(m_flo_data.begin(), m_flo_data.end())); - assert(is_sorted(m_thp_data.begin(), m_thp_data.end())); - assert(is_sorted(m_wfr_data.begin(), m_wfr_data.end())); - assert(is_sorted(m_gfr_data.begin(), m_gfr_data.end())); - assert(is_sorted(m_alq_data.begin(), m_alq_data.end())); + assert(std::is_sorted(m_flo_data.begin(), m_flo_data.end())); + assert(std::is_sorted(m_thp_data.begin(), m_thp_data.end())); + assert(std::is_sorted(m_wfr_data.begin(), m_wfr_data.end())); + assert(std::is_sorted(m_gfr_data.begin(), m_gfr_data.end())); + assert(std::is_sorted(m_alq_data.begin(), m_alq_data.end())); //Check data size matches axes assert(m_data.num_dimensions() == 5); @@ -269,7 +277,8 @@ void VFPProdTable::check() { assert(m_data.shape()[3] == m_alq_data.size()); assert(m_data.shape()[4] == m_flo_data.size()); - //Finally, check that all data is within reasonable ranges, defined to be up-to 1.0e10... + + //Check that all elements have been set typedef array_type::size_type size_type; for (size_type t=0; t