diff --git a/dune/solvers/iterationsteps/multigridstep.cc b/dune/solvers/iterationsteps/multigridstep.cc index 3985e84ab7a185c095e7fbb02fca6893acead040..e49ad6489a385147c492acc52030cf24f62a0b6a 100644 --- a/dune/solvers/iterationsteps/multigridstep.cc +++ b/dune/solvers/iterationsteps/multigridstep.cc @@ -119,8 +119,8 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess() // ///////////////////////////////////////////////////// for (int i=this->numLevels()-2; i>=0; i--) { - this->matrixHierarchy_[i] = std::shared_ptr<MatrixType>(new MatrixType); - this->xHierarchy_[i] = std::shared_ptr<VectorType>(new VectorType); + this->matrixHierarchy_[i] = std::make_shared<MatrixType>(); + this->xHierarchy_[i] = std::make_shared<VectorType>(); // Compute which entries are present in the (sparse) coarse grid stiffness // matrices.