Skip to content
Snippets Groups Projects
Commit ddf49c23 authored by Carsten Gräser's avatar Carsten Gräser
Browse files

[test] Test if implicit build works for correct average

If the correct average is provided, compress() may still
fail if more than the average numebr of entries are added
to an early row (e.g. the first one)
parent 82b8300d
No related branches found
No related tags found
No related merge requests found
......@@ -331,6 +331,24 @@ void testImplicitMatrixBuilderExtendedConstructor()
setMatrix(m);
}
void testAverageStorage()
{
using M = Dune::BCRSMatrix<Dune::FieldMatrix<double,1,1>>;
for(auto j : {5, 0})
{
std::cout << j << std::endl;
M m(6, 6, 1, 0.0, M::implicit);
for(std::size_t i=0; i<6; ++i)
m.entry(j,i) = i;
m.compress();
}
}
int main()
{
int ret=0;
......@@ -353,6 +371,7 @@ int main()
ret+=testConstBracketOperatorBeforeCompress();
testImplicitMatrixBuilder();
testImplicitMatrixBuilderExtendedConstructor();
testAverageStorage();
}catch(Dune::Exception& e) {
std::cerr << e <<std::endl;
return 1;
......
  • Elias Pipping @pipping

    Mentioned in merge request !62

    ·

    Mentioned in merge request !62

    Toggle commit list
  • @carsten.graeser Does this test still test the right thing? I gather from @dominic's answer in #21 (comment 19836) that this is really a documentation issue.

    Otherwise, could you revert it? It makes the CI less useful.

  • Carsten Gräser @carsten.graeser ·
    Owner

    @joe : It does, because the behaviour is still inconsistent with the documentation. There are two ways to fix this: Either fix the implementation or be honest and document what it really does and not what we wish it should do. As it is, I consider this a bug that is triggered by the test. We should maybe start a general discussion on the purpose of the CI.

  • Carsten Gräser @carsten.graeser ·
    Owner

    I opened infrastructure/issues#32 in order to discuss the general question how to deal with such cases.

  • Carsten Gräser @carsten.graeser

    Mentioned in commit a5590795

    ·

    Mentioned in commit a5590795

    Toggle commit list
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