Skip to content
Snippets Groups Projects
Commit a18b37f4 authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

Adapt to changes in dune-solvers

The hasObstacle_ and obstacles_ fields are now single arrays.
The corresponding fields for the entire grid hierarchy is assembled
within dune-solvers now.

[[Imported from SVN: r9816]]
parent 924813d5
No related merge requests found
...@@ -106,7 +106,6 @@ setup(const GridType& grid, ...@@ -106,7 +106,6 @@ setup(const GridType& grid,
mmgStep->basesolver_ = baseSolver; mmgStep->basesolver_ = baseSolver;
mmgStep->setSmoother(presmoother, postsmoother); mmgStep->setSmoother(presmoother, postsmoother);
mmgStep->obstacleRestrictor_= new MandelObstacleRestrictor<CorrectionType>(); mmgStep->obstacleRestrictor_= new MandelObstacleRestrictor<CorrectionType>();
mmgStep->hasObstacle_ = &hasObstacle_;
mmgStep->verbosity_ = Solver::QUIET; mmgStep->verbosity_ = Solver::QUIET;
// ////////////////////////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////////////////////////
...@@ -226,13 +225,10 @@ setup(const GridType& grid, ...@@ -226,13 +225,10 @@ setup(const GridType& grid,
if (rank==0) if (rank==0)
{ {
hasObstacle_.resize(numLevels); hasObstacle_.resize(guIndex_->nGlobalEntity(), true);
hasObstacle_.back().resize(guIndex_->nGlobalEntity(), true); mmgStep->hasObstacle_ = &hasObstacle_;
// If there is more than one level use the transfer operators to determine the correct coarse level system sizes
for (int i=0; i<hasObstacle_.size()-1; i++)
hasObstacle_[i].resize(dynamic_cast<TruncatedCompressedMGTransfer<CorrectionType>* >(mmgStep->mgTransfer_[i])->getMatrix().M(),true);
} }
} }
...@@ -336,7 +332,7 @@ void RiemannianTrustRegionSolver<GridType,TargetSpace>::solve() ...@@ -336,7 +332,7 @@ void RiemannianTrustRegionSolver<GridType,TargetSpace>::solve()
mgStep->setProblem(stiffnessMatrix, corr_global, rhs_global); mgStep->setProblem(stiffnessMatrix, corr_global, rhs_global);
trustRegionObstacles.back() = trustRegion.obstacles(); trustRegionObstacles.back() = trustRegion.obstacles();
mgStep->obstacles_ = &trustRegionObstacles; mgStep->obstacles_ = &trustRegionObstacles.back();
innerSolver_->preprocess(); innerSolver_->preprocess();
......
...@@ -127,9 +127,8 @@ protected: ...@@ -127,9 +127,8 @@ protected:
/** \brief The solver for the quadratic inner problems */ /** \brief The solver for the quadratic inner problems */
std::shared_ptr<Solver> innerSolver_; std::shared_ptr<Solver> innerSolver_;
/** \brief Dummy fields containing 'true' everywhere. The multigrid step /** \brief Contains 'true' everywhere -- the trust-region is bounded */
expects them :-( */ Dune::BitSetVector<1> hasObstacle_;
std::vector<Dune::BitSetVector<1> > hasObstacle_;
/** \brief The Dirichlet nodes */ /** \brief The Dirichlet nodes */
const Dune::BitSetVector<blocksize>* ignoreNodes_; const Dune::BitSetVector<blocksize>* ignoreNodes_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment