Extended data::Wells to inherit from std::map.

This commit is contained in:
Joakim Hove
2016-10-25 11:45:29 +02:00
parent 776094aa2c
commit 08d89858af
5 changed files with 114 additions and 14 deletions

View File

@@ -150,15 +150,30 @@ static data::Wells result_wells() {
crates3.set( rt::gas, 300.2 / day );
crates3.set( rt::solvent, 300.3 / day );
data::Completion comp1 { 1, crates1, 1.9, 123.4 };
data::Completion comp2 { 1, crates2, 1.10, 123.4 };
data::Completion comp3 { 3, crates3, 1.11, 123.4 };
/*
The active index assigned to the completion must be manually
syncronized with the active index in the COMPDAT keyword in the
input deck.
*/
data::Completion well1_comp1 { 0 , crates1, 1.9 , 123.4};
data::Completion well2_comp1 { 1 , crates2, 1.10 , 123.4};
data::Completion well2_comp2 { 101, crates3, 1.11 , 123.4};
data::Completion well3_comp1 { 2 , crates3, 1.11 , 123.4};
data::Well well1 { rates1, 0.1 * ps, 0.2 * ps, 0.3 * ps, 1, { comp1 } };
data::Well well2 { rates2, 1.1 * ps, 1.2 * ps, 1.3 * ps, 2, { comp2 } };
data::Well well3 { rates3, 2.1 * ps, 2.2 * ps, 2.3 * ps, 3, { comp3 } };
/*
The completions
*/
data::Well well1 { rates1, 0.1 * ps, 0.2 * ps, 0.3 * ps, 1, { {well1_comp1} } };
data::Well well2 { rates2, 1.1 * ps, 1.2 * ps, 1.3 * ps, 2, { {well2_comp1 , well2_comp2} } };
data::Well well3 { rates3, 2.1 * ps, 2.2 * ps, 2.3 * ps, 3, { {well3_comp1} } };
return { { "W_1", well1 }, { "W_2", well2 }, { "W_3", well3 } };
data::Wells wellrates;
wellrates["W_1"] = well1;
wellrates["W_2"] = well2;
wellrates["W_3"] = well3;
return wellrates;
}
ERT::ert_unique_ptr< ecl_sum_type, ecl_sum_free > readsum( const std::string& base ) {