Skip to content
Snippets Groups Projects
Commit d7410cac authored by graeser's avatar graeser Committed by graeser
Browse files

Remove setNumberOfLevels, fix nested iteration for single level grids

[[Imported from SVN: r8216]]
parent b014e93b
No related branches found
No related tags found
No related merge requests found
...@@ -150,7 +150,6 @@ class ObstacleTNNMGStep ...@@ -150,7 +150,6 @@ class ObstacleTNNMGStep
coarseCorrection_.resize(x_->size()); coarseCorrection_.resize(x_->size());
temp_.resize(x_->size()); temp_.resize(x_->size());
linearMGStep_.setNumberOfLevels(transfer_.size()+1);
linearMGStep_.setTransferOperators(transfer_); linearMGStep_.setTransferOperators(transfer_);
linearMGStep_.setSmoother(&linearSmoother_); linearMGStep_.setSmoother(&linearSmoother_);
linearMGStep_.basesolver_ = &baseSolver_; linearMGStep_.basesolver_ = &baseSolver_;
...@@ -359,6 +358,11 @@ class ObstacleTNNMGStep ...@@ -359,6 +358,11 @@ class ObstacleTNNMGStep
void nestedIteration(int coarseIterationSteps=2) void nestedIteration(int coarseIterationSteps=2)
{ {
int maxLevel = transfer_.size(); int maxLevel = transfer_.size();
if (maxLevel==0)
{
*x_ = 0.0;
return;
}
std::vector<Matrix> coarseMatrix(maxLevel); std::vector<Matrix> coarseMatrix(maxLevel);
std::vector<Vector> coarseSolution(maxLevel); std::vector<Vector> coarseSolution(maxLevel);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment