Merge pull request #1458 from akva2/various_fixes

Various small fixes
This commit is contained in:
Arne Morten Kvarving
2018-04-13 11:47:32 +02:00
committed by GitHub
8 changed files with 9 additions and 8 deletions

View File

@@ -331,7 +331,7 @@ namespace Opm
return primary_variables_evaluation_[GFrac];
}
if (has_solvent && compIdx == contiSolventEqIdx) {
if (has_solvent && compIdx == (unsigned)contiSolventEqIdx) {
return primary_variables_evaluation_[SFrac];
}

View File

@@ -45,7 +45,7 @@ namespace Opm
bool converged;
/// Default constructor initializing all times to 0.0.
SimulatorReport(bool verbose=true);
explicit SimulatorReport(bool verbose=true);
/// Copy constructor
SimulatorReport(const SimulatorReport&) = default;
/// Increment this report's times by those in sr.

View File

@@ -18,7 +18,7 @@
struct SortByAbsFlux
{
SortByAbsFlux(const double* flux)
explicit SortByAbsFlux(const double* flux)
: flux_(flux)
{}
bool operator() (int f1, int f2)

View File

@@ -318,7 +318,6 @@ namespace Opm
//double res_vol;
double tot_sat;
const double epsilon = std::sqrt(std::numeric_limits<double>::epsilon());
for (int c = 0; c < nc; ++c) {
@@ -332,7 +331,7 @@ namespace Opm
dgesv_(&n, &nrhs, &A[0], &lda, &piv[0], &s[0], &ldb, &info);
tot_sat = 0;
double tot_sat = 0;
for (int p = 0; p < np; ++p){
if (s[p] < epsilon) // saturation may be less then zero due to round of errors
s[p] = 0;

View File

@@ -197,7 +197,7 @@ namespace Opm
mu_w_eff = 1./mu_w_eff;
}
void PolymerProperties::effectiveViscWithDer(const double c, const double mu_w, double& mu_w_eff, double dmu_w_eff_dc) const {
void PolymerProperties::effectiveViscWithDer(const double c, const double mu_w, double& mu_w_eff, double& dmu_w_eff_dc) const {
effectiveInvViscWithDer(c, mu_w, mu_w_eff, dmu_w_eff_dc);
mu_w_eff = 1./mu_w_eff;
dmu_w_eff_dc = -dmu_w_eff_dc*mu_w_eff*mu_w_eff;

View File

@@ -283,7 +283,7 @@ namespace Opm
void effectiveViscWithDer(const double c, const double visc
, double& mu_w_eff
, double dmu_w_eff_dc) const;
, double& dmu_w_eff_dc) const;
void effectiveInvVisc(const double c, const double mu_w,
double& inv_mu_w_eff) const;

View File

@@ -306,7 +306,7 @@ namespace Opm
mutable double s; // Mutable in order to change it with every operator() call to be the last computed s value.
TransportSolverTwophaseCompressiblePolymer::ResidualEquation& res_eq_;
explicit ResidualC(TransportSolverTwophaseCompressiblePolymer::ResidualEquation& res_eq)
: res_eq_(res_eq)
: s(0.0), res_eq_(res_eq)
{}
void computeBothResiduals(const double s_arg, const double c_arg, double& res_s, double& res_c, double& mc, double& ff) const

View File

@@ -87,7 +87,9 @@ try
/// We open an output file stream for the output
/// \snippet tutorial1.cpp output stream
/// \internal [output stream]
#ifdef DISABLE_OUTPUT
std::ofstream vtkfile("tutorial1.vtu");
#endif
/// \internal [output stream]
/// \endinternal
/// \page tutorial1