From 9967265df5b750c912e584efd1a56f89fb19210d Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Fri, 3 Aug 2018 19:35:40 +0200 Subject: [PATCH 1/2] Revert "Remove meaningless const in front of copied return values." This reverts commit 4d1743867f1732344e4446e69eb8d1858141b0e3, which should have gone to a branch later be published via a PR. --- opm/grid/cpgrid/Geometry.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opm/grid/cpgrid/Geometry.hpp b/opm/grid/cpgrid/Geometry.hpp index bcc1f4b87..79ab748b3 100644 --- a/opm/grid/cpgrid/Geometry.hpp +++ b/opm/grid/cpgrid/Geometry.hpp @@ -262,7 +262,7 @@ namespace Dune /// J^T_{ij} = (dg_j/du_i) /// where g is the mapping from the reference domain, /// and {u_i} are the reference coordinates. - JacobianTransposed + const JacobianTransposed jacobianTransposed(const LocalCoordinate& local_coord) const { static_assert(mydimension == 3, ""); @@ -298,7 +298,7 @@ namespace Dune } /// @brief Inverse of Jacobian transposed. \see jacobianTransposed(). - JacobianInverseTransposed + const JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate& local_coord) const { JacobianInverseTransposed Jti = jacobianTransposed(local_coord); From 0692a604f27a76dc7a7b3ae38629f9b3e3d40664 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Fri, 3 Aug 2018 19:36:28 +0200 Subject: [PATCH 2/2] Revert "Return a copy for Geomerty::center()" This reverts commit e48a468d0916b28e826a67fa9f878502ab120fe2, which should have gone to a branch later be published via a PR. --- opm/grid/cpgrid/Geometry.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/grid/cpgrid/Geometry.hpp b/opm/grid/cpgrid/Geometry.hpp index 79ab748b3..5280d7b07 100644 --- a/opm/grid/cpgrid/Geometry.hpp +++ b/opm/grid/cpgrid/Geometry.hpp @@ -253,7 +253,7 @@ namespace Dune } /// Returns the centroid of the geometry. - GlobalCoordinate center() const + const GlobalCoordinate& center() const { return pos_; }