[Dune] Problem with BCRSMatrix

Markus Blatt Markus.Blatt at ipvs.uni-stuttgart.de
Wed Nov 1 20:07:47 CET 2006


On Wed, Nov 01, 2006 at 05:55:59PM +0100, Leidenberger Patrick wrote:
> 
> > Please provide a small testcase where the same problem occurs and maybe
> > create a bug report at http://www.dune-project.org/flyspray.html with
> > the testcase attached.
> 
> thanks for the fast response. I don't know if it is a bug or if I use the BCRSMatrix in the wrong way. If it is a bug I will create a bug report.
> I attached a small test, which show you what I want to do. This test is derived form dune-istl/istl/test/matrixutiltest.cc.
> 

This seems to be problem of your code. (Probably just a typo, see below)
> 
> 
> class Test
> {
> public:
>   int something()
>   {
>        // At that point can I determine the size and structure of the matrix.
>       int i = 10;
>       matrix_.setrowsize(i,i);
>     return 0;
>   };
>   
> private:
>   // Here I don't know anything, except that I need random access.
>   Dune::BCRSMatrix<Dune::FieldMatrix<double,1,1> > matrix_();
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    This is a function declaration! You probably want to skip "()"
    to get a member variable matrix_.

    The compiler complains because matrix_.setrowsize(i,i); means that
    you call the function setrowsize on the function pointer(?) matrix_

> };

Cheers,

Markus




More information about the Dune mailing list