Skip to content
Snippets Groups Projects
Commit 720ca793 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Use TransferOperatorAssembler

parent c782d75a
Branches
No related tags found
No related merge requests found
......@@ -53,6 +53,8 @@
#include <dune/solvers/transferoperators/compressedmultigridtransfer.hh>
#include <dune/tnnmg/iterationsteps/tnnmgstep.hh>
#include <dune/fufem/assemblers/transferoperatorassembler.hh>
int const dim = 2;
template <class GridView>
......@@ -327,12 +329,14 @@ int main(int argc, char *argv[]) {
linearIterationStep->setSmoother(linearPresmoother, linearPostsmoother);
// {{{ Transfer operators
linearIterationStep->mgTransfer_.resize(levels - 1);
for (size_t i = 0; i < linearIterationStep->mgTransfer_.size(); i++) {
auto newTransferOp = new CompressedMultigridTransfer<VectorType>;
newTransferOp->setup(grid, i, i + 1);
linearIterationStep->mgTransfer_[i] = newTransferOp;
}
std::vector<CompressedMultigridTransfer<VectorType> *> transfer_;
transfer_.resize(levels - 1);
for (auto &x : transfer_)
x = new CompressedMultigridTransfer<VectorType>;
TransferOperatorAssembler<GridType> transferOperatorAssembler(grid);
transferOperatorAssembler.assembleOperatorPointerHierarchy(transfer_);
linearIterationStep->setTransferOperators(transfer_);
// }}}
// Now the actual nonlinear solver
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment