From 196256246674d8a2cc06d0dbf1c5df7f181959d9 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Fri, 6 Feb 2015 16:53:46 +0000 Subject: [PATCH] Replace deprecated auto_ptr by unique_ptr Patch by Jonathan Youett [[Imported from SVN: r10056]] --- dune/gfe/localgeodesicfefunction.hh | 4 ++-- dune/gfe/riemanniantrsolver.cc | 2 +- dune/gfe/riemanniantrsolver.hh | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dune/gfe/localgeodesicfefunction.hh b/dune/gfe/localgeodesicfefunction.hh index b17e057b..8cff20de 100644 --- a/dune/gfe/localgeodesicfefunction.hh +++ b/dune/gfe/localgeodesicfefunction.hh @@ -618,7 +618,7 @@ public: for (size_t i=0; i<coefficients.size(); i++) orientationCoefficients[i] = coefficients[i].q; - orientationFEFunction_ = std::auto_ptr<LocalGeodesicFEFunction<dim,ctype,LocalFiniteElement,Rotation<field_type,3> > > (new LocalGeodesicFEFunction<dim,ctype,LocalFiniteElement,Rotation<field_type,3> >(localFiniteElement,orientationCoefficients)); + orientationFEFunction_ = std::unique_ptr<LocalGeodesicFEFunction<dim,ctype,LocalFiniteElement,Rotation<field_type,3> > > (new LocalGeodesicFEFunction<dim,ctype,LocalFiniteElement,Rotation<field_type,3> >(localFiniteElement,orientationCoefficients)); } @@ -823,7 +823,7 @@ private: std::vector<Dune::FieldVector<field_type,3> > translationCoefficients_; - std::auto_ptr<LocalGeodesicFEFunction<dim,ctype,LocalFiniteElement,Rotation<field_type,3> > > orientationFEFunction_; + std::unique_ptr<LocalGeodesicFEFunction<dim,ctype,LocalFiniteElement,Rotation<field_type,3> > > orientationFEFunction_; }; diff --git a/dune/gfe/riemanniantrsolver.cc b/dune/gfe/riemanniantrsolver.cc index 2681a9da..1702f064 100644 --- a/dune/gfe/riemanniantrsolver.cc +++ b/dune/gfe/riemanniantrsolver.cc @@ -179,7 +179,7 @@ setup(const GridType& grid, // Create Hessian matrix and its occupation structure // //////////////////////////////////////////////////////////// - hessianMatrix_ = std::auto_ptr<MatrixType>(new MatrixType); + hessianMatrix_ = std::unique_ptr<MatrixType>(new MatrixType); Dune::MatrixIndexSet indices(grid_->size(1), grid_->size(1)); assembler_->getNeighborsPerVertex(indices); indices.exportIdx(*hessianMatrix_); diff --git a/dune/gfe/riemanniantrsolver.hh b/dune/gfe/riemanniantrsolver.hh index 87f27bc0..1f2b3aea 100644 --- a/dune/gfe/riemanniantrsolver.hh +++ b/dune/gfe/riemanniantrsolver.hh @@ -80,7 +80,7 @@ public: RiemannianTrustRegionSolver() : IterativeSolver<std::vector<TargetSpace>, Dune::BitSetVector<blocksize> >(0,100,NumProc::FULL), - hessianMatrix_(std::auto_ptr<MatrixType>(NULL)), h1SemiNorm_(NULL) + hessianMatrix_(nullptr), h1SemiNorm_(NULL) { std::fill(scaling_.begin(), scaling_.end(), 1.0); } @@ -155,7 +155,7 @@ protected: double innerTolerance_; /** \brief Hessian matrix */ - std::auto_ptr<MatrixType> hessianMatrix_; + std::unique_ptr<MatrixType> hessianMatrix_; /** \brief The assembler for the material law */ const GeodesicFEAssembler<Basis, TargetSpace>* assembler_; -- GitLab