Skip to content
Snippets Groups Projects

Simplify setup of the transfer operators

Merged oliver.sander_at_tu-dresden.de requested to merge trsolver-simplify-transfer-setup into master
1 file
+ 4
7
Compare changes
  • Side-by-side
  • Inline
@@ -293,6 +293,8 @@ setup(const typename BasisType::GridView::Grid& grid,
std::vector<std::shared_ptr<TruncatedCompressedMGTransfer<CorrectionType>>> transferOperators(isP1Basis ? numLevels-1 : numLevels);
// Here we set up the restriction of the leaf grid space into the leaf grid P1/Q1 space
// TODO: IIRC that move to P1Basis was only implemented because I didn't have general
// prolongation operators between arbitratry FE spaces.
if (not isP1Basis)
{
TransferOperatorType pkToP1TransferMatrix;
@@ -325,13 +327,8 @@ setup(const typename BasisType::GridView::Grid& grid,
for (int i=0; i<numLevels-1; i++) {
// Construct the local multigrid transfer matrix
TruncatedCompressedMGTransfer<CorrectionType>* newTransferOp = new TruncatedCompressedMGTransfer<CorrectionType>;
newTransferOp->setup(*grid_,i,i+1);
auto op = std::make_shared<TruncatedCompressedMGTransfer<CorrectionType>>();
transferOperators[i] = op;
std::shared_ptr<TransferOperatorType> transferOperatorMatrix = std::make_shared<TransferOperatorType>(newTransferOp->getMatrix());
op->setMatrix(transferOperatorMatrix);
transferOperators[i] = std::make_shared<TruncatedCompressedMGTransfer<CorrectionType> >();
transferOperators[i]->setup(*grid_,i,i+1);
}
mmgStep->setTransferOperators(transferOperators);
Loading