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

Store the hasObstacle information component-wise and not node-wise

parent 1029fe84
Branches
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ void ProjectedBlockGSStep<OperatorType, DiscFuncType>::iterate()
VectorBlock& x = (*this->x_)[i];
if ((*hasObstacle_)[i] == false) {
if ((*hasObstacle_)[i].none()) {
// No obstacle --> solve linear problem
mat[i][i].solve(v, r);
......@@ -68,10 +68,12 @@ void ProjectedBlockGSStep<OperatorType, DiscFuncType>::iterate()
v[k] += sr / mat[i][i][k][k];
// Project
if (v[k] < defectObstacle.lower(k))
v[k] = defectObstacle.lower(k);
else if (v[k] > defectObstacle.upper(k))
v[k] = defectObstacle.upper(k);
if (hasObstacle_[i][j]==true) {
if (v[k] < defectObstacle.lower(k))
v[k] = defectObstacle.lower(k);
else if (v[k] > defectObstacle.upper(k))
v[k] = defectObstacle.upper(k);
}
}
......
......@@ -31,7 +31,7 @@ public:
virtual DiscFuncType getSol();
Dune::BitSetVector<1>* hasObstacle_;
const Dune::BitSetVector<BlockSize>* hasObstacle_;
const std::vector<BoxConstraint<field_type,BlockSize> >* obstacles_;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment