Skip to content
Snippets Groups Projects
Commit 8ff8e9bc authored by Jonathan Youett's avatar Jonathan Youett
Browse files

Dune::shared_ptr -> std::shared_ptr

parent 7f25bc50
Branches
No related tags found
No related merge requests found
...@@ -114,8 +114,8 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess() ...@@ -114,8 +114,8 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess()
// ///////////////////////////////////////////////////// // /////////////////////////////////////////////////////
for (int i=this->numLevels()-2; i>=0; i--) for (int i=this->numLevels()-2; i>=0; i--)
{ {
this->matrixHierarchy_[i] = Dune::shared_ptr<MatrixType>(new MatrixType); this->matrixHierarchy_[i] = std::shared_ptr<MatrixType>(new MatrixType);
this->xHierarchy_[i] = Dune::shared_ptr<VectorType>(new VectorType); this->xHierarchy_[i] = std::shared_ptr<VectorType>(new VectorType);
// Compute which entries are present in the (sparse) coarse grid stiffness // Compute which entries are present in the (sparse) coarse grid stiffness
// matrices. // matrices.
...@@ -209,8 +209,8 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::iterate() ...@@ -209,8 +209,8 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::iterate()
int& level = this->level_; int& level = this->level_;
// Define references just for ease of notation // Define references just for ease of notation
std::vector<Dune::shared_ptr<const MatrixType> > const &mat = this->matrixHierarchy_; std::vector<std::shared_ptr<const MatrixType> > const &mat = this->matrixHierarchy_;
std::vector<Dune::shared_ptr<VectorType> >& x = this->xHierarchy_; std::vector<std::shared_ptr<VectorType> >& x = this->xHierarchy_;
std::vector<VectorType>& rhs = this->rhsHierarchy_; std::vector<VectorType>& rhs = this->rhsHierarchy_;
// Solve directly if we're looking at the coarse problem // Solve directly if we're looking at the coarse problem
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
* afterwards. This may change in the future. * afterwards. This may change in the future.
*/ */
template <class DerivedTransfer> 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()); mgTransfer_.resize(transfer.size());
for(size_t j=0; j<transfer.size(); ++j) for(size_t j=0; j<transfer.size(); ++j)
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
} }
/** \brief Set the smoother iteration step from a smart pointer*/ /** \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; presmootherDefault_ = postsmootherDefault_ = smoother;
...@@ -170,17 +170,17 @@ ...@@ -170,17 +170,17 @@
} }
/** \brief Set the smoother iteration step for a particular level, from a smart pointer */ /** \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; levelWiseSmoothers_[level] = smoother;
} }
protected: protected:
/** \brief The presmoothers, one for each level */ /** \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 */ /** \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: public:
/** \brief The base solver */ /** \brief The base solver */
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
int level_; int level_;
//! The linear operators on each level //! The linear operators on each level
std::vector<Dune::shared_ptr<const MatrixType> > matrixHierarchy_; std::vector<std:shared_ptr<const MatrixType> > matrixHierarchy_;
protected: protected:
//! Flags specifying the dirichlet nodes on each level //! Flags specifying the dirichlet nodes on each level
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
* *
* on the fine level it contains the iterate, whereas on the coarse levels the corresponding corrections * 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_; std::vector<VectorType> rhsHierarchy_;
...@@ -220,9 +220,9 @@ ...@@ -220,9 +220,9 @@
protected: protected:
Dune::shared_ptr<LinearIterationStep<MatrixType, VectorType> > presmootherDefault_; std::shared_ptr<LinearIterationStep<MatrixType, VectorType> > presmootherDefault_;
Dune::shared_ptr<LinearIterationStep<MatrixType, VectorType> > postsmootherDefault_; std::shared_ptr<LinearIterationStep<MatrixType, VectorType> > postsmootherDefault_;
typedef std::map<std::size_t, Dune::shared_ptr<LinearIterationStep<MatrixType, VectorType> > > SmootherCache; typedef std::map<std::size_t, std::shared_ptr<LinearIterationStep<MatrixType, VectorType> > > SmootherCache;
SmootherCache levelWiseSmoothers_; SmootherCache levelWiseSmoothers_;
bool preprocessCalled; bool preprocessCalled;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment