From 8ff8e9bced085f73d3710447fb029c0db36bd00d Mon Sep 17 00:00:00 2001 From: Jonathan Youett <youett@math.fu-berlin.de> Date: Fri, 27 Jun 2014 10:43:32 +0200 Subject: [PATCH] Dune::shared_ptr -> std::shared_ptr --- dune/solvers/iterationsteps/multigridstep.cc | 8 ++++---- dune/solvers/iterationsteps/multigridstep.hh | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dune/solvers/iterationsteps/multigridstep.cc b/dune/solvers/iterationsteps/multigridstep.cc index fcce1b3e..d7f81c26 100644 --- a/dune/solvers/iterationsteps/multigridstep.cc +++ b/dune/solvers/iterationsteps/multigridstep.cc @@ -114,8 +114,8 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess() // ///////////////////////////////////////////////////// for (int i=this->numLevels()-2; i>=0; i--) { - this->matrixHierarchy_[i] = Dune::shared_ptr<MatrixType>(new MatrixType); - this->xHierarchy_[i] = Dune::shared_ptr<VectorType>(new VectorType); + this->matrixHierarchy_[i] = std::shared_ptr<MatrixType>(new MatrixType); + this->xHierarchy_[i] = std::shared_ptr<VectorType>(new VectorType); // Compute which entries are present in the (sparse) coarse grid stiffness // matrices. @@ -209,8 +209,8 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::iterate() int& level = this->level_; // Define references just for ease of notation - std::vector<Dune::shared_ptr<const MatrixType> > const &mat = this->matrixHierarchy_; - std::vector<Dune::shared_ptr<VectorType> >& x = this->xHierarchy_; + std::vector<std::shared_ptr<const MatrixType> > const &mat = this->matrixHierarchy_; + std::vector<std::shared_ptr<VectorType> >& x = this->xHierarchy_; std::vector<VectorType>& rhs = this->rhsHierarchy_; // Solve directly if we're looking at the coarse problem diff --git a/dune/solvers/iterationsteps/multigridstep.hh b/dune/solvers/iterationsteps/multigridstep.hh index 524d8a7e..909cd7b3 100644 --- a/dune/solvers/iterationsteps/multigridstep.hh +++ b/dune/solvers/iterationsteps/multigridstep.hh @@ -102,7 +102,7 @@ * afterwards. This may change in the future. */ template <class DerivedTransfer> - void setTransferOperators(const std::vector<typename Dune::shared_ptr<DerivedTransfer> >& transfer) + void setTransferOperators(const std::vector<typename std::shared_ptr<DerivedTransfer> >& transfer) { mgTransfer_.resize(transfer.size()); for(size_t j=0; j<transfer.size(); ++j) @@ -146,7 +146,7 @@ } /** \brief Set the smoother iteration step from a smart pointer*/ - virtual void setSmoother(Dune::shared_ptr<LinearIterationStep<MatrixType, VectorType> > smoother) + virtual void setSmoother(std::shared_ptr<LinearIterationStep<MatrixType, VectorType> > smoother) { presmootherDefault_ = postsmootherDefault_ = smoother; @@ -170,17 +170,17 @@ } /** \brief Set the smoother iteration step for a particular level, from a smart pointer */ - virtual void setSmoother(Dune::shared_ptr<LinearIterationStep<MatrixType, VectorType> > smoother, std::size_t level) + virtual void setSmoother(std::shared_ptr<LinearIterationStep<MatrixType, VectorType> > smoother, std::size_t level) { levelWiseSmoothers_[level] = smoother; } protected: /** \brief The presmoothers, one for each level */ - std::vector<Dune::shared_ptr<LinearIterationStep<MatrixType, VectorType> > > presmoother_; + std::vector<std::shared_ptr<LinearIterationStep<MatrixType, VectorType> > > presmoother_; /** \brief The postsmoothers, one for each level */ - std::vector<Dune::shared_ptr<LinearIterationStep<MatrixType, VectorType> > > postsmoother_; + std::vector<std::shared_ptr<LinearIterationStep<MatrixType, VectorType> > > postsmoother_; public: /** \brief The base solver */ @@ -200,7 +200,7 @@ int level_; //! The linear operators on each level - std::vector<Dune::shared_ptr<const MatrixType> > matrixHierarchy_; + std::vector<std:shared_ptr<const MatrixType> > matrixHierarchy_; protected: //! Flags specifying the dirichlet nodes on each level @@ -211,7 +211,7 @@ * * on the fine level it contains the iterate, whereas on the coarse levels the corresponding corrections */ - std::vector<Dune::shared_ptr<VectorType> > xHierarchy_; + std::vector<std::shared_ptr<VectorType> > xHierarchy_; std::vector<VectorType> rhsHierarchy_; @@ -220,9 +220,9 @@ protected: - Dune::shared_ptr<LinearIterationStep<MatrixType, VectorType> > presmootherDefault_; - Dune::shared_ptr<LinearIterationStep<MatrixType, VectorType> > postsmootherDefault_; - typedef std::map<std::size_t, Dune::shared_ptr<LinearIterationStep<MatrixType, VectorType> > > SmootherCache; + std::shared_ptr<LinearIterationStep<MatrixType, VectorType> > presmootherDefault_; + std::shared_ptr<LinearIterationStep<MatrixType, VectorType> > postsmootherDefault_; + typedef std::map<std::size_t, std::shared_ptr<LinearIterationStep<MatrixType, VectorType> > > SmootherCache; SmootherCache levelWiseSmoothers_; bool preprocessCalled; -- GitLab