Skip to content
Snippets Groups Projects
Commit ce4ed4b5 authored by Jonathan Youett's avatar Jonathan Youett
Browse files

make compile

parent 66ac772d
Branches
No related tags found
No related merge requests found
...@@ -16,11 +16,11 @@ preprocess() ...@@ -16,11 +16,11 @@ preprocess()
MultigridStep<MatrixType,VectorType>::preprocess(); MultigridStep<MatrixType,VectorType>::preprocess();
// Then setup the obstacle flags which specify the subset of entries to be reassembled at each iteration // Then setup the obstacle flags which specify the subset of entries to be reassembled at each iteration
for (size_t i=0; i<hasObstacleHierarchy_.size()-1; i++) for (int i=0; i<(int) hasObstacleHierarchy_.size()-1; i++)
if (hasObstacleHierarchy_[i]) if (hasObstacleHierarchy_[i] != nullptr)
delete(hasObstacleHierarchy_[i]); delete(hasObstacleHierarchy_[i]);
hasObstacleHierarchy_.resize(numLevels()); hasObstacleHierarchy_.resize(this->numLevels());
hasObstacleHierarchy_.back() = hasObstacle_; hasObstacleHierarchy_.back() = hasObstacle_;
for (int i=this->mgTransfer_.size()-1; i>=0; i--) { for (int i=this->mgTransfer_.size()-1; i>=0; i--) {
...@@ -38,11 +38,11 @@ preprocess() ...@@ -38,11 +38,11 @@ preprocess()
// Set up base solver // Set up base solver
// ///////////////////////////////////////////// // /////////////////////////////////////////////
for (size_t i=0; i<obstacleHierarchy_.size()-1; i++) for (int i=0; i<(int) obstacleHierarchy_.size()-1; i++)
if (obstacleHierarchy_[i]) if (obstacleHierarchy_[i] != nullptr)
delete(obstacleHierarchy_[i]); delete(obstacleHierarchy_[i]);
obstacleHierarchy_.resize(numLevels()); obstacleHierarchy_.resize(this->numLevels());
obstacleHierarchy_.back() = obstacles_; obstacleHierarchy_.back() = obstacles_;
for (size_t i=0; i<obstacleHierarchy_.size()-1; i++) for (size_t i=0; i<obstacleHierarchy_.size()-1; i++)
...@@ -93,7 +93,7 @@ void MonotoneMGStep<MatrixType, VectorType>::nestedIteration() ...@@ -93,7 +93,7 @@ void MonotoneMGStep<MatrixType, VectorType>::nestedIteration()
// If we start from an infeasible configuration, the restricted // If we start from an infeasible configuration, the restricted
// obstacles may be inconsistent. We do an ad hoc correction here. // obstacles may be inconsistent. We do an ad hoc correction here.
// The true obstacles on the maxlevel are not touched. // The true obstacles on the maxlevel are not touched.
for (size_t i=0; i<(*obstacles_)[this->level_].size(); i++) { for (size_t i=0; i<obstacleHierarchy_[this->level_]->size(); i++) {
BoxConstraint<field_type,dim>& cO = (*obstacleHierarchy_[this->level_])[i]; BoxConstraint<field_type,dim>& cO = (*obstacleHierarchy_[this->level_])[i];
for (int j=0; j<dim; j++) for (int j=0; j<dim; j++)
if (cO.lower(j) > cO.upper(j)) if (cO.lower(j) > cO.upper(j))
...@@ -122,7 +122,7 @@ void MonotoneMGStep<MatrixType, VectorType>::iterate() ...@@ -122,7 +122,7 @@ void MonotoneMGStep<MatrixType, VectorType>::iterate()
std::vector<std::shared_ptr<const MatrixType> >& mat = this->matrixHierarchy_; std::vector<std::shared_ptr<const MatrixType> >& mat = this->matrixHierarchy_;
std::vector<std::shared_ptr<VectorType> >& x = this->xHierarchy_; std::vector<std::shared_ptr<VectorType> >& x = this->xHierarchy_;
std::vector<VectorType>& rhs = this->rhsHierarchy_; std::vector<VectorType>& rhs = this->rhsHierarchy_;
std::vector<ObstacleVectorType* >& obstacles = obstaclesHierarchy_; std::vector<ObstacleVectorType* >& obstacles = obstacleHierarchy_;
Dune::BitSetVector<dim> critical(x[level]->size(), false); Dune::BitSetVector<dim> critical(x[level]->size(), false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment