Make constructor take arguments by reference. Silence a warning.

This commit is contained in:
Atgeirr Flø Rasmussen 2012-04-19 11:47:41 +02:00
parent 74b3a40bbf
commit b0c60ee05b
2 changed files with 7 additions and 6 deletions

View File

@ -60,8 +60,8 @@ namespace Opm
}
void PvtPropertiesBasic::init(const int num_phases,
const std::vector<double> rho,
const std::vector<double> mu)
const std::vector<double>& rho,
const std::vector<double>& visc)
{
if (num_phases > 3 || num_phases < 1) {
THROW("PvtPropertiesBasic::init() illegal num_phases: " << num_phases);
@ -70,7 +70,7 @@ namespace Opm
formation_volume_factor_.clear();
formation_volume_factor_.resize(num_phases, 1.0);
density_ = rho;
viscosity_ = mu;
viscosity_ = visc;
}
const double* PvtPropertiesBasic::surfaceDensities() const

View File

@ -44,10 +44,11 @@ namespace Opm
/// mu1 [mu2, mu3] (1.0) Viscosity in cP
void init(const parameter::ParameterGroup& param);
/// Initialize from argument Basic multi phase fluid pvt properties.
/// Initialize from arguments.
/// Basic multi phase fluid pvt properties.
void init(const int num_phases,
const std::vector<double> rho,
const std::vector<double> mu);
const std::vector<double>& rho,
const std::vector<double>& visc);
/// Number of active phases.
int numPhases() const;