From ca062108e7c3aec2405465aa840f80911e8e1fa9 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Tue, 19 Jun 2018 11:31:56 +0200 Subject: [PATCH] Let Entity return geometry as a copy. Geometry is lightweight enough and this is what DUNE's grid interface mandates. --- opm/grid/cpgrid/Entity.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opm/grid/cpgrid/Entity.hpp b/opm/grid/cpgrid/Entity.hpp index dbc1735aa..f64f7723a 100644 --- a/opm/grid/cpgrid/Entity.hpp +++ b/opm/grid/cpgrid/Entity.hpp @@ -149,7 +149,7 @@ namespace Dune } /// Returns the geometry of the entity (does not depend on its orientation). - const Geometry& geometry() const; + Geometry geometry() const; /// We do not support refinement, so level() is always 0. int level() const @@ -431,7 +431,7 @@ unsigned int Entity::subEntities ( const unsigned int cc ) const } template -const typename Entity::Geometry& Entity::geometry() const +typename Entity::Geometry Entity::geometry() const { return pgrid_->geomVector()[*this]; }