diff -Nru dune-grid-2.5.1/debian/changelog dune-grid-2.5.1/debian/changelog --- dune-grid-2.5.1/debian/changelog 2017-08-14 11:39:11.000000000 +0000 +++ dune-grid-2.5.1/debian/changelog 2017-10-20 12:42:04.000000000 +0000 @@ -1,8 +1,8 @@ -dune-grid (2.5.1-1~ubuntu14.04~ab1+build1) trusty; urgency=medium +dune-grid (2.5.1-1~ubuntu14.04~ab2) trusty; urgency=medium - * Rebuild against last dune-uggrid upload. + * Backport: StructuredGridFactory should return unique_ptr - -- Ansgar Burchardt Mon, 14 Aug 2017 13:39:11 +0200 + -- Ansgar Burchardt Fri, 20 Oct 2017 14:42:04 +0200 dune-grid (2.5.1-1~ubuntu14.04~ab1) trusty; urgency=medium diff -Nru dune-grid-2.5.1/debian/patches/0001-StructuredGridFactory-return-unique_ptr-instead-of-s.patch dune-grid-2.5.1/debian/patches/0001-StructuredGridFactory-return-unique_ptr-instead-of-s.patch --- dune-grid-2.5.1/debian/patches/0001-StructuredGridFactory-return-unique_ptr-instead-of-s.patch 1970-01-01 00:00:00.000000000 +0000 +++ dune-grid-2.5.1/debian/patches/0001-StructuredGridFactory-return-unique_ptr-instead-of-s.patch 2017-10-20 12:36:21.000000000 +0000 @@ -0,0 +1,48 @@ +From f96b091d91230438274d2c49a2ed2fef3d52a5fc Mon Sep 17 00:00:00 2001 +From: Ansgar Burchardt +Date: Wed, 20 Sep 2017 14:05:37 +0200 +Subject: [PATCH] StructuredGridFactory: return `unique_ptr` instead of + `shared_ptr` + +--- + dune/grid/utility/structuredgridfactory.hh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/dune/grid/utility/structuredgridfactory.hh ++++ b/dune/grid/utility/structuredgridfactory.hh +@@ -86,7 +86,7 @@ + \param upperRight Upper right corner of the grid + \param elements Number of elements in each coordinate direction + */ +- static std::shared_ptr createCubeGrid(const FieldVector& lowerLeft, ++ static std::unique_ptr createCubeGrid(const FieldVector& lowerLeft, + const FieldVector& upperRight, + const std::array& elements) + { +@@ -145,7 +145,7 @@ + } // if(rank == 0) + + // Create the grid and hand it to the calling method +- return std::shared_ptr(factory.createGrid()); ++ return std::unique_ptr(factory.createGrid()); + + } + +@@ -162,7 +162,7 @@ + \param upperRight Upper right corner of the grid + \param elements Number of elements in each coordinate direction + */ +- static std::shared_ptr createSimplexGrid(const FieldVector& lowerLeft, ++ static std::unique_ptr createSimplexGrid(const FieldVector& lowerLeft, + const FieldVector& upperRight, + const std::array& elements) + { +@@ -222,7 +222,7 @@ + } // if(rank == 0) + + // Create the grid and hand it to the calling method +- return std::shared_ptr(factory.createGrid()); ++ return std::unique_ptr(factory.createGrid()); + } + + }; diff -Nru dune-grid-2.5.1/debian/patches/0002-Yasp-StructuredGridFactory-specialization-should-ret.patch dune-grid-2.5.1/debian/patches/0002-Yasp-StructuredGridFactory-specialization-should-ret.patch --- dune-grid-2.5.1/debian/patches/0002-Yasp-StructuredGridFactory-specialization-should-ret.patch 1970-01-01 00:00:00.000000000 +0000 +++ dune-grid-2.5.1/debian/patches/0002-Yasp-StructuredGridFactory-specialization-should-ret.patch 2017-10-20 12:36:09.000000000 +0000 @@ -0,0 +1,81 @@ +From 553db716d56bd0738cde1b4f196acdc34a38f26c Mon Sep 17 00:00:00 2001 +From: Ansgar Burchardt +Date: Thu, 5 Oct 2017 17:00:42 +0200 +Subject: [PATCH] [Yasp] StructuredGridFactory specialization should return + `unique_ptr` + +f96b091d91230438274d2c49a2ed2fef3d52a5fc changed the +StructuredGridFactory to return a `unique_ptr` instead of a +`shared_ptr`. This patch implements the same change for the +Yasp's specialization of the `StructuredGridFactory`. +--- + dune/grid/yaspgrid/structuredyaspgridfactory.hh | 18 ++++++++---------- + 1 file changed, 8 insertions(+), 10 deletions(-) + +diff --git a/dune/grid/yaspgrid/structuredyaspgridfactory.hh b/dune/grid/yaspgrid/structuredyaspgridfactory.hh +index dba1d459c..a8879f895 100644 +--- a/dune/grid/yaspgrid/structuredyaspgridfactory.hh ++++ b/dune/grid/yaspgrid/structuredyaspgridfactory.hh +@@ -39,7 +39,7 @@ namespace Dune + Use YaspGrid > instead + for non-trivial origin. + */ +- static std::shared_ptr ++ static std::unique_ptr + createCubeGrid(const FieldVector& lowerLeft, + const FieldVector& upperRight, + const std::array& elements) +@@ -56,9 +56,8 @@ namespace Dune + std::array elem; + std::copy(elements.begin(), elements.end(), elem.begin()); + +- return std::shared_ptr +- (new GridType(upperRight, elem, +- std::bitset(), 0)); // default constructor of bitset sets to zero ++ return std::make_unique(upperRight, elem, ++ std::bitset(), 0); // default constructor of bitset sets to zero + } + + /** \brief Create a structured simplex grid +@@ -66,7 +65,7 @@ namespace Dune + \note Simplices are not supported in YaspGrid, so this functions + unconditionally throws a GridError. + */ +- static std::shared_ptr ++ static std::unique_ptr + createSimplexGrid(const FieldVector& lowerLeft, + const FieldVector& upperRight, + const std::array& elements) +@@ -97,7 +96,7 @@ namespace Dune + \param upperRight Upper right corner of the grid + \param elements Number of elements in each coordinate direction + */ +- static std::shared_ptr ++ static std::unique_ptr + createCubeGrid(const FieldVector& lowerLeft, + const FieldVector& upperRight, + const std::array& elements) +@@ -106,9 +105,8 @@ namespace Dune + std::array elem; + std::copy(elements.begin(), elements.end(), elem.begin()); + +- return std::shared_ptr +- (new GridType(lowerLeft, upperRight, elem, +- std::bitset(), 0)); // default constructor of bitset sets to zero ++ return std::make_unique(lowerLeft, upperRight, elem, ++ std::bitset(), 0); // default constructor of bitset sets to zero + } + + /** \brief Create a structured simplex grid +@@ -116,7 +114,7 @@ namespace Dune + \note Simplices are not supported in YaspGrid, so this functions + unconditionally throws a GridError. + */ +- static std::shared_ptr ++ static std::unique_ptr + createSimplexGrid(const FieldVector& lowerLeft, + const FieldVector& upperRight, + const std::array& elements) +-- +2.14.2 + diff -Nru dune-grid-2.5.1/debian/patches/series dune-grid-2.5.1/debian/patches/series --- dune-grid-2.5.1/debian/patches/series 2017-08-11 12:45:35.000000000 +0000 +++ dune-grid-2.5.1/debian/patches/series 2017-10-20 12:36:09.000000000 +0000 @@ -2,3 +2,5 @@ do-not-install-amiramesh-grids.patch example-grids-install-location.patch increase-test-timeouts.patch +0001-StructuredGridFactory-return-unique_ptr-instead-of-s.patch +0002-Yasp-StructuredGridFactory-specialization-should-ret.patch