createWellsFromSpecs: Use ref-to-const cart2active

This commit tightens the function header of method

    WellsManager::createWellsFromSpecs()

to accept a reference-to-const 'cartesian_to_compressed' map.  It
used to be a complete, copy-constructed object, so this is a slight
performance enhancement as we no longer need to copy a (somewhat)
large object on every call to the method.
This commit is contained in:
Bård Skaflestad 2014-08-29 12:13:38 +02:00
parent 97a8ee630e
commit fda49df8a8
2 changed files with 2 additions and 2 deletions

View File

@ -166,7 +166,7 @@ namespace Opm
std::vector<WellData>& well_data,
std::map<std::string, int> & well_names_to_index,
const PhaseUsage& phaseUsage,
const std::map<int,int> cartesian_to_compressed,
const std::map<int,int>& cartesian_to_compressed,
const double* permeability);
void addChildGroups(GroupTreeNodeConstPtr parentNode, ScheduleConstPtr schedule, size_t timeStep, const PhaseUsage& phaseUsage);

View File

@ -109,7 +109,7 @@ void WellsManager::createWellsFromSpecs(std::vector<WellConstPtr>& wells, size_t
std::vector<WellData>& well_data,
std::map<std::string, int>& well_names_to_index,
const PhaseUsage& phaseUsage,
std::map<int,int> cartesian_to_compressed,
const std::map<int,int>& cartesian_to_compressed,
const double* permeability)
{
std::vector<std::vector<PerfData> > wellperf_data;