reserve() for wells_rep_radius and wells_perf_length

for more efficient push_back()
This commit is contained in:
Kai Bao 2015-06-02 15:10:09 +02:00
parent 9cc4a5d371
commit 4f44c33c58

View File

@ -166,9 +166,14 @@ namespace Opm
return;
}
const size_t n_perf = wells_rep_radius.size();
wells_rep_radius.clear();
wells_perf_length.clear();
wells_rep_radius.reserve(n_perf);
wells_perf_length.reserve(n_perf);
std::map<int,int> cartesian_to_compressed;
setupCompressedToCartesian(global_cell, number_of_cells,