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

[bugfix] Use FE basis to determine size of toplevel hasObstacles array

After much back and forth: this is the correct way.  This size cannot
be taken from the transfer operators, because these operators exist
only if there is more than one level.

[[Imported from SVN: r9728]]
parent a9877108
No related branches found
No related tags found
No related merge requests found
...@@ -213,7 +213,8 @@ setup(const GridType& grid, ...@@ -213,7 +213,8 @@ setup(const GridType& grid,
if (rank==0) if (rank==0)
{ {
hasObstacle_.resize(numLevels); hasObstacle_.resize(numLevels);
hasObstacle_.back().resize(dynamic_cast<TruncatedCompressedMGTransfer<CorrectionType>* >(mmgStep->mgTransfer_.back())->getMatrix().N(), true); hasObstacle_.back().resize(basis.size(), true);
// 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++) for (int i=0; i<hasObstacle_.size()-1; i++)
hasObstacle_[i].resize(dynamic_cast<TruncatedCompressedMGTransfer<CorrectionType>* >(mmgStep->mgTransfer_[i])->getMatrix().M(),true); hasObstacle_[i].resize(dynamic_cast<TruncatedCompressedMGTransfer<CorrectionType>* >(mmgStep->mgTransfer_[i])->getMatrix().M(),true);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment