From 708f9a2fa393406dd0b0eebd6d859c41ba8561c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Wed, 5 Feb 2014 13:05:33 +0100 Subject: [PATCH 1/2] Fix initialisation warning. --- opm/core/linalg/LinearSolverUmfpack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/core/linalg/LinearSolverUmfpack.cpp b/opm/core/linalg/LinearSolverUmfpack.cpp index 1139e9c9..8980d4b1 100644 --- a/opm/core/linalg/LinearSolverUmfpack.cpp +++ b/opm/core/linalg/LinearSolverUmfpack.cpp @@ -56,7 +56,7 @@ namespace Opm const_cast(sa) }; call_UMFPACK(&A, rhs, solution); - LinearSolverReport rep = {0}; + LinearSolverReport rep = {}; rep.converged = true; return rep; } From 543230c8cf18bacf2033d73279cdab070ece8343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Wed, 5 Feb 2014 14:27:51 +0100 Subject: [PATCH 2/2] Suppress warnings in unimplemented functions. This prevents warnings from functions that are right now just a throw statement. Also cleaned up a few whitespace issues nearby. --- opm/core/props/pvt/SinglePvtLiveGas.cpp | 24 ++++++++++++------------ opm/core/props/satfunc/SatFuncSimple.hpp | 16 ++++++++-------- opm/core/props/satfunc/SatFuncStone2.hpp | 16 ++++++++-------- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/opm/core/props/pvt/SinglePvtLiveGas.cpp b/opm/core/props/pvt/SinglePvtLiveGas.cpp index 639ee3ac..6a43f475 100644 --- a/opm/core/props/pvt/SinglePvtLiveGas.cpp +++ b/opm/core/props/pvt/SinglePvtLiveGas.cpp @@ -99,12 +99,12 @@ namespace Opm } /// Viscosity and its derivatives as a function of p and r. - void SinglePvtLiveGas::mu(const int n, - const double* p, - const double* r, - double* output_mu, - double* output_dmudp, - double* output_dmudr) const + void SinglePvtLiveGas::mu(const int /*n*/, + const double* /*p*/, + const double* /*r*/, + double* /*output_mu*/, + double* /*output_dmudp*/, + double* /*output_dmudr*/) const { OPM_THROW(std::runtime_error, "The new fluid interface not yet implemented"); } @@ -156,12 +156,12 @@ namespace Opm } /// The inverse of the formation volume factor b = 1 / B, and its derivatives as a function of p and r. - void SinglePvtLiveGas::b(const int n, - const double* p, - const double* r, - double* output_b, - double* output_dbdp, - double* output_dbdr) const + void SinglePvtLiveGas::b(const int /*n*/, + const double* /*p*/, + const double* /*r*/, + double* /*output_b*/, + double* /*output_dbdp*/, + double* /*output_dbdr*/) const { OPM_THROW(std::runtime_error, "The new fluid interface not yet implemented"); diff --git a/opm/core/props/satfunc/SatFuncSimple.hpp b/opm/core/props/satfunc/SatFuncSimple.hpp index b1781ded..f2d58b5a 100644 --- a/opm/core/props/satfunc/SatFuncSimple.hpp +++ b/opm/core/props/satfunc/SatFuncSimple.hpp @@ -31,23 +31,23 @@ namespace Opm void evalKrDeriv(const double* s, double* kr, double* dkrds) const; void evalPc(const double* s, double* pc) const; void evalPcDeriv(const double* s, double* pc, double* dpcds) const; - - void evalKr(const double* s, double* kr, const EPSTransforms* epst) const + + void evalKr(const double* /*s*/, double* /*kr*/, const EPSTransforms* /*epst*/) const {OPM_THROW(std::runtime_error, "SatFuncSimple -- need to be implemented ...");} - void evalKr(const double* s, double* kr, const EPSTransforms* epst, const EPSTransforms* epst_hyst, const SatHyst* sat_hyst) const + void evalKr(const double* /*s*/, double* /*kr*/, const EPSTransforms* /*epst*/, const EPSTransforms* /*epst_hyst*/, const SatHyst* /*sat_hyst*/) const {OPM_THROW(std::runtime_error, "SatFuncSimple -- need to be implemented ...");} void evalKrDeriv(const double* s, double* kr, double* dkrds, const EPSTransforms* epst) const; - void evalKrDeriv(const double* s, double* kr, double* dkrds, const EPSTransforms* epst, const EPSTransforms* epst_hyst, const SatHyst* sat_hyst) const + void evalKrDeriv(const double* /*s*/, double* /*kr*/, double* /*dkrds*/, const EPSTransforms* /*epst*/, const EPSTransforms* /*epst_hyst*/, const SatHyst* /*sat_hyst*/) const {OPM_THROW(std::runtime_error, "SatFuncSimple -- need to be implemented ...");} - void evalPc(const double* s, double* pc, const EPSTransforms* epst) const + void evalPc(const double* /*s*/, double* /*pc*/, const EPSTransforms* /*epst*/) const {OPM_THROW(std::runtime_error, "SatFuncSimple -- need to be implemented ...");} - void evalPcDeriv(const double* s, double* pc, double* dpcds, const EPSTransforms* epst) const + void evalPcDeriv(const double* /*s*/, double* /*pc*/, double* /*dpcds*/, const EPSTransforms* /*epst*/) const {OPM_THROW(std::runtime_error, "SatFuncSimple -- need to be implemented ...");} private: }; - + typedef SatFuncSimple > SatFuncSimpleUniform; typedef SatFuncSimple > SatFuncSimpleNonuniform; @@ -185,7 +185,7 @@ namespace Opm double dkrww = _dsdsw*epst->wat.scaleKrDeriv(s[wpos], this->krw_.derivative(_sw)); double krg = epst->gas.scaleKr(s[gpos], this->krg_(_sg), this->krgr_); double dkrgg = _dsdsg*epst->gas.scaleKrDeriv(s[gpos], this->krg_.derivative(_sg)); - // TODO Check the arguments to the krow- and krog-tables below... + // TODO Check the arguments to the krow- and krog-tables below... double krow = epst->watoil.scaleKr(1.0-s[wpos]-s[gpos], this->krow_(1.0-_sow-this->smin_[gpos]), this->krorw_); // ???? double dkrow = _dsdsow*epst->watoil.scaleKrDeriv(1.0-s[wpos]-s[gpos], this->krow_.derivative(1.0-_sow-this->smin_[gpos])); // ???? //double krog = epst->gasoil.scaleKr(this->krog_(1.0-_sog-this->smin_[wpos]), 1.0-s[wpos]-s[gpos], this->krorg_); // ???? diff --git a/opm/core/props/satfunc/SatFuncStone2.hpp b/opm/core/props/satfunc/SatFuncStone2.hpp index 4eb5e2fd..e22f1e9a 100644 --- a/opm/core/props/satfunc/SatFuncStone2.hpp +++ b/opm/core/props/satfunc/SatFuncStone2.hpp @@ -31,25 +31,25 @@ namespace Opm void evalKrDeriv(const double* s, double* kr, double* dkrds) const; void evalPc(const double* s, double* pc) const; void evalPcDeriv(const double* s, double* pc, double* dpcds) const; - - void evalKr(const double* s, double* kr, const EPSTransforms* epst) const + + void evalKr(const double* /*s*/, double* /*kr*/, const EPSTransforms* /*epst*/) const {OPM_THROW(std::runtime_error, "SatFuncStone2 -- need to be implemented ...");} - void evalKr(const double* s, double* kr, const EPSTransforms* epst, const EPSTransforms* epst_hyst, const SatHyst* sat_hyst) const + void evalKr(const double* /*s*/, double* /*kr*/, const EPSTransforms* /*epst*/, const EPSTransforms* /*epst_hyst*/, const SatHyst* /*sat_hyst*/) const {OPM_THROW(std::runtime_error, "SatFuncStone2 -- need to be implemented ...");} - void evalKrDeriv(const double* s, double* kr, double* dkrds, const EPSTransforms* epst) const + void evalKrDeriv(const double* /*s*/, double* /*kr*/, double* /*dkrds*/, const EPSTransforms* /*epst*/) const {OPM_THROW(std::runtime_error, "SatFuncStone2 -- need to be implemented ...");} - void evalKrDeriv(const double* s, double* kr, double* dkrds, const EPSTransforms* epst, const EPSTransforms* epst_hyst, const SatHyst* sat_hyst) const + void evalKrDeriv(const double* /*s*/, double* /*kr*/, double* /*dkrds*/, const EPSTransforms* /*epst*/, const EPSTransforms* /*epst_hyst*/, const SatHyst* /*sat_hyst*/) const {OPM_THROW(std::runtime_error, "SatFuncStone2 -- need to be implemented ...");} - void evalPc(const double* s, double* pc, const EPSTransforms* epst) const + void evalPc(const double* /*s*/, double* /*pc*/, const EPSTransforms* /*epst*/) const {OPM_THROW(std::runtime_error, "SatFuncStone2 -- need to be implemented ...");} - void evalPcDeriv(const double* s, double* pc, double* dpcds, const EPSTransforms* epst) const + void evalPcDeriv(const double* /*s*/, double* /*pc*/, double* /*dpcds*/, const EPSTransforms* /*epst*/) const {OPM_THROW(std::runtime_error, "SatFuncStone2 -- need to be implemented ...");} private: }; - + typedef SatFuncStone2 > SatFuncStone2Uniform; typedef SatFuncStone2 > SatFuncStone2Nonuniform;