diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index 2455bd5b543d03648bdf606ab988f7d44699d180..8877245a776297b6fb5394fb1f6f3d5f2d6b290d 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -330,14 +330,16 @@ int main(int argc, char *argv[]) { linearIterationStep->setSmoother(linearPresmoother, linearPostsmoother); // {{{ Transfer operators - std::vector<CompressedMultigridTransfer<VectorType> *> transfer_; - transfer_.resize(refinements); - for (auto &x : transfer_) + std::vector<CompressedMultigridTransfer<VectorType> *> + transferOperators; + transferOperators.resize(refinements); + for (auto &x : transferOperators) x = new CompressedMultigridTransfer<VectorType>; TransferOperatorAssembler<GridType> transferOperatorAssembler(grid); - transferOperatorAssembler.assembleOperatorPointerHierarchy(transfer_); - linearIterationStep->setTransferOperators(transfer_); + transferOperatorAssembler.assembleOperatorPointerHierarchy( + transferOperators); + linearIterationStep->setTransferOperators(transferOperators); // }}} typedef GenericNonlinearGS<MyBlockProblemType> NonlinearSmootherType; @@ -369,7 +371,7 @@ int main(int argc, char *argv[]) { delete linearBaseSolver; delete linearPresmoother; delete linearPostsmoother; - for (auto &x : transfer_) + for (auto &x : transferOperators) delete x; delete linearIterationStep; delete myBlockProblem;