Skip to content
Snippets Groups Projects
Commit 6db38832 authored by Ansgar Burchardt's avatar Ansgar Burchardt
Browse files

multigridstep.cc: use `std::make_shared`

parent b3a40c8d
No related branches found
No related tags found
1 merge request!43Minor cleanup
...@@ -119,8 +119,8 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess() ...@@ -119,8 +119,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] = std::shared_ptr<MatrixType>(new MatrixType); this->matrixHierarchy_[i] = std::make_shared<MatrixType>();
this->xHierarchy_[i] = std::shared_ptr<VectorType>(new VectorType); this->xHierarchy_[i] = std::make_shared<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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment