From d9b3e85fcbfbc5ada609d869354e607e829ec159 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt <Ansgar.Burchardt@tu-dresden.de> Date: Wed, 23 Sep 2015 16:34:59 +0200 Subject: [PATCH] Use std::shared_ptr instead of Dune::shared_ptr. --- .../iterationsteps/lineariterationstep.hh | 3 ++- .../iterationsteps/projectedgradientstep.hh | 6 +++++- dune/solvers/norms/blocknorm.hh | 5 ++--- dune/solvers/norms/reorderedblocknorm.hh | 4 ++-- .../compressedmultigridtransfer.hh | 18 ++++++++++-------- 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/dune/solvers/iterationsteps/lineariterationstep.hh b/dune/solvers/iterationsteps/lineariterationstep.hh index 1bf4e857..daf9c0f7 100644 --- a/dune/solvers/iterationsteps/lineariterationstep.hh +++ b/dune/solvers/iterationsteps/lineariterationstep.hh @@ -3,6 +3,7 @@ #ifndef LINEAR_ITERATIONSTEP_HH #define LINEAR_ITERATIONSTEP_HH +#include <memory> #include <vector> #include <dune/common/bitsetvector.hh> @@ -85,7 +86,7 @@ public: const VectorType* rhs_; //! The linear operator - Dune::shared_ptr<const MatrixType> mat_; + std::shared_ptr<const MatrixType> mat_; }; diff --git a/dune/solvers/iterationsteps/projectedgradientstep.hh b/dune/solvers/iterationsteps/projectedgradientstep.hh index 8ecbb99a..11d2f756 100644 --- a/dune/solvers/iterationsteps/projectedgradientstep.hh +++ b/dune/solvers/iterationsteps/projectedgradientstep.hh @@ -8,6 +8,10 @@ box-constraints quadratic problem. */ +#include <memory> + +#include <dune/common/shared_ptr.hh> + #include <dune/solvers/iterationsteps/projectedblockgsstep.hh> #include <dune/solvers/common/boxconstraint.hh> @@ -62,7 +66,7 @@ private: const VectorType* rhs_; //! The linear operator - Dune::shared_ptr<const MatrixType> mat_; + std::shared_ptr<const MatrixType> mat_; }; #include "projectedgradientstep.cc" diff --git a/dune/solvers/norms/blocknorm.hh b/dune/solvers/norms/blocknorm.hh index 54ea121a..b4718f35 100644 --- a/dune/solvers/norms/blocknorm.hh +++ b/dune/solvers/norms/blocknorm.hh @@ -3,11 +3,10 @@ #ifndef BLOCK_NORM_HH #define BLOCK_NORM_HH +#include <memory> #include <vector> #include <cmath> -#include <dune/common/shared_ptr.hh> - #include "norm.hh" //! A norm for blocks of vectors @@ -16,7 +15,7 @@ class BlockNorm: public Norm<VectorType> { public: // typedef typename std::vector<const Norm<typename VectorType::block_type>* > NormPointerVector; - typedef std::vector< Dune::shared_ptr<const Norm<typename VectorType::block_type> > > NormPointerVector; + typedef std::vector< std::shared_ptr<const Norm<typename VectorType::block_type> > > NormPointerVector; BlockNorm(const NormPointerVector& norms) : norms_(norms) diff --git a/dune/solvers/norms/reorderedblocknorm.hh b/dune/solvers/norms/reorderedblocknorm.hh index fa9ecdce..533a6579 100644 --- a/dune/solvers/norms/reorderedblocknorm.hh +++ b/dune/solvers/norms/reorderedblocknorm.hh @@ -3,10 +3,10 @@ #ifndef REORDERED_BLOCK_NORM_HH #define REORDERED_BLOCK_NORM_HH +#include <memory> #include <vector> #include <cmath> -#include <dune/common/shared_ptr.hh> #include <dune/istl/bvector.hh> #include "../common/genericvectortools.hh" @@ -19,7 +19,7 @@ class ReorderedBlockNorm: public Norm<VectorType> public: typedef Dune::BlockVector<ReorderedLocalVector> ReorderedVector; - typedef std::vector< Dune::shared_ptr<const Norm<ReorderedLocalVector> > > NormPointerVector; + typedef std::vector< std::shared_ptr<const Norm<ReorderedLocalVector> > > NormPointerVector; ReorderedBlockNorm(const NormPointerVector& norms) : norms_(norms) diff --git a/dune/solvers/transferoperators/compressedmultigridtransfer.hh b/dune/solvers/transferoperators/compressedmultigridtransfer.hh index 145c4d9e..9f4deeb4 100644 --- a/dune/solvers/transferoperators/compressedmultigridtransfer.hh +++ b/dune/solvers/transferoperators/compressedmultigridtransfer.hh @@ -3,6 +3,8 @@ #ifndef COMPRESSED_MULTIGRID_TRANSFER_HH #define COMPRESSED_MULTIGRID_TRANSFER_HH +#include <memory> + #include <dune/istl/bcrsmatrix.hh> #include <dune/common/fmatrix.hh> #include <dune/common/bitsetvector.hh> @@ -46,10 +48,10 @@ public: CompressedMultigridTransfer() { - matrix_ = Dune::make_shared<TransferOperatorType>(); + matrix_ = std::make_shared<TransferOperatorType>(); } - CompressedMultigridTransfer(typename Dune::shared_ptr<TransferOperatorType>& matrix) : + CompressedMultigridTransfer(typename std::shared_ptr<TransferOperatorType>& matrix) : matrix_(matrix) {} @@ -138,7 +140,7 @@ public: } /** \brief Set matrix! */ - void setMatrix(typename Dune::shared_ptr<TransferOperatorType>& matrix) + void setMatrix(typename std::shared_ptr<TransferOperatorType>& matrix) { matrix_ = matrix; } @@ -153,7 +155,7 @@ public: protected: - typename Dune::shared_ptr<TransferOperatorType> matrix_; + typename std::shared_ptr<TransferOperatorType> matrix_; }; template< @@ -177,10 +179,10 @@ public: CompressedMultigridTransfer() { - matrix_ = Dune::make_shared<TransferOperatorType>(); + matrix_ = std::make_shared<TransferOperatorType>(); } - CompressedMultigridTransfer(typename Dune::shared_ptr<TransferOperatorType>& matrix) : + CompressedMultigridTransfer(typename std::shared_ptr<TransferOperatorType>& matrix) : matrix_(matrix) {} @@ -290,7 +292,7 @@ public: } /** \brief Set matrix! */ - void setMatrix(typename Dune::shared_ptr<TransferOperatorType>& matrix) + void setMatrix(typename std::shared_ptr<TransferOperatorType>& matrix) { matrix_ = matrix; } @@ -305,7 +307,7 @@ public: protected: - typename Dune::shared_ptr<TransferOperatorType> matrix_; + typename std::shared_ptr<TransferOperatorType> matrix_; }; #endif -- GitLab