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

a few more data consistency checks

[[Imported from SVN: r2130]]
parent 9a0115eb
Branches
Tags
No related merge requests found
......@@ -8,7 +8,11 @@ void Dune::TruncatedMGTransfer<DiscFuncType>::prolong(const DiscFuncType& f, Dis
{
if (f.size() != this->matrix_.M())
DUNE_THROW(Dune::Exception, "Number of entries in the coarse grid vector is not equal "
<< "to the number of columns of the interpolation matrix!");
<< "to the number of columns of the prolongation matrix!");
if (this->matrix_.N()*blocksize != critical.size())
DUNE_THROW(Dune::Exception, "Number of entries in the critical is not equal "
<< "to the number of rows of the prolongation matrix!");
t.resize(this->matrix_.N());
......@@ -61,6 +65,10 @@ void Dune::TruncatedMGTransfer<DiscFuncType>::restrict (const DiscFuncType & f,
DUNE_THROW(Dune::Exception, "Fine grid vector has " << f.size() << " entries "
<< "but the interpolation matrix has " << this->matrix_.N() << " rows!");
if (this->matrix_.N()*blocksize != critical.size())
DUNE_THROW(Dune::Exception, "Number of entries in the critical is not equal "
<< "to the number of rows of the prolongation matrix!");
t.resize(this->matrix_.M());
t = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment