Skip to content
Snippets Groups Projects
Commit c2444907 authored by Max Kahnt's avatar Max Kahnt
Browse files

Generic resize moved to dune-matrix-vector.

parent 9d8bb052
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@
#include <dune/solvers/solvers/linearsolver.hh>
#include <dune/solvers/common/genericvectortools.hh>
#include <dune/matrix-vector/genericvectortools.hh>
#include <dune/matrix-vector/resize.hh>
//template<class MatrixType, class VectorType, class BitVectorType>
//inline
......@@ -118,7 +119,7 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess()
this->mgTransfer_[i]->galerkinRestrict(*this->matrixHierarchy_[i+1], *std::const_pointer_cast<MatrixType>(this->matrixHierarchy_[i]));
// Set solution vector sizes for the lower levels
GenericVector::resize(*(this->xHierarchy_[i]),*this->matrixHierarchy_[i]);
MatrixVector::resize(*(this->xHierarchy_[i]),*this->matrixHierarchy_[i]);
}
// /////////////////////////////////////////////////////
......
......@@ -55,14 +55,10 @@ struct MultigridTestSuite
typedef MultigridTransfer<Vector, BitVector, Matrix> Transfer;
typedef CompressedMultigridTransfer<Vector, BitVector, Matrix> TransferImplementation;
// we need a vector of pointers to the transfer operator base class
std::vector<Transfer*> transfer(grid.maxLevel());
for (size_t i = 0; i < transfer.size(); ++i)
{
// create transfer operator from level i to i+1 (note that this will only work for either uniformly refined grids or adaptive grids with RefinementType=COPY)
TransferImplementation* t = new TransferImplementation;
t->setup(grid, i, i+1);
transfer[i] = t;
// create transfer operators from level i to i+1 (note that this will only work for either uniformly refined grids or adaptive grids with RefinementType=COPY)
std::vector<Transfer> transfer(grid.maxLevel());
for (size_t i = 0; i < transfer.size(); ++i) {
transfer[i].setup(grid, i, i+1);
}
// set up smoothers and basesolver
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment