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

Use auto

parent f3e63c9e
No related branches found
No related tags found
No related merge requests found
...@@ -302,20 +302,19 @@ int main(int argc, char *argv[]) { ...@@ -302,20 +302,19 @@ int main(int argc, char *argv[]) {
if (parset.get<bool>("useTNNMG")) { if (parset.get<bool>("useTNNMG")) {
// {{{ Linear Solver; // {{{ Linear Solver;
TruncatedBlockGSStep<OperatorType, VectorType> *linearBaseSolverStep = auto linearBaseSolverStep =
new TruncatedBlockGSStep<OperatorType, VectorType>; new TruncatedBlockGSStep<OperatorType, VectorType>;
auto baseEnergyNorm =
EnergyNorm<OperatorType, VectorType> *baseEnergyNorm =
new EnergyNorm<OperatorType, VectorType>(*linearBaseSolverStep); new EnergyNorm<OperatorType, VectorType>(*linearBaseSolverStep);
LoopSolver<VectorType> *linearBaseSolver = new LoopSolver<VectorType>( auto linearBaseSolver = new LoopSolver<VectorType>(
linearBaseSolverStep, solver_maxIterations, solver_tolerance, linearBaseSolverStep, solver_maxIterations, solver_tolerance,
baseEnergyNorm, Solver::QUIET); baseEnergyNorm, Solver::QUIET);
// }}} // }}}
// {{{ Smoothers // {{{ Smoothers
TruncatedBlockGSStep<OperatorType, VectorType> *linearPresmoother = auto linearPresmoother =
new TruncatedBlockGSStep<OperatorType, VectorType>; new TruncatedBlockGSStep<OperatorType, VectorType>;
TruncatedBlockGSStep<OperatorType, VectorType> *linearPostsmoother = auto linearPostsmoother =
new TruncatedBlockGSStep<OperatorType, VectorType>; new TruncatedBlockGSStep<OperatorType, VectorType>;
// }}} // }}}
...@@ -331,8 +330,7 @@ int main(int argc, char *argv[]) { ...@@ -331,8 +330,7 @@ int main(int argc, char *argv[]) {
// {{{ Transfer operators // {{{ Transfer operators
linearIterationStep->mgTransfer_.resize(levels - 1); linearIterationStep->mgTransfer_.resize(levels - 1);
for (size_t i = 0; i < linearIterationStep->mgTransfer_.size(); i++) { for (size_t i = 0; i < linearIterationStep->mgTransfer_.size(); i++) {
CompressedMultigridTransfer<VectorType> *newTransferOp = auto newTransferOp = new CompressedMultigridTransfer<VectorType>;
new CompressedMultigridTransfer<VectorType>;
newTransferOp->setup(grid, i, i + 1); newTransferOp->setup(grid, i, i + 1);
linearIterationStep->mgTransfer_[i] = newTransferOp; linearIterationStep->mgTransfer_[i] = newTransferOp;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment