[Dune] Nested BCRSMatrix problems

Patrick Leidenberger patrick.leidenberger at psi.ch
Mon Nov 20 09:47:51 CET 2006


Hi Dune,

using the BCRSMatrix in a nested way shows me some problems:

I create a 4x4 BCRSMatrix of BCRSMatrices. Only in the second line and
column I insert an object, lets say a 5x5 BCRSMatrix. If I look now at
the construct, I get rowdim 10 and coldim 5: In the first row, second
column exists an empty 5x5 Matrix, which I have not created!
This problem can be avoid, if the empty diagonal elements in the 4x4
matrix are initialized with empty BCRSMatrices. If all elements in the
4x4 matrix are initialized with such empty matrices the total dimension
of the matrix is 0x0!
Perhaps this is a bug, if it isn't this behavior should be documented.
I modified the dune-istl/istl/tutorial/example.cc to show the problem.
The file is attached, this is the output:
============================================.
E [n=5,m=5,rowdim=5,coldim=5]
row    0   4.20e+01   4.20e+01   4.20e+01   4.20e+01   4.20e+01
row    1   4.20e+01   4.20e+01   4.20e+01   4.20e+01   4.20e+01
row    2   4.20e+01   4.20e+01   4.20e+01   4.20e+01   4.20e+01
row    3   4.20e+01   4.20e+01   4.20e+01   4.20e+01   4.20e+01
row    4   4.20e+01   4.20e+01   4.20e+01   4.20e+01   4.20e+01
=============================================.
============================================.
D [n=4,m=4,rowdim=10,coldim=5]
row    0          .          .          .          .          .
row    1          .          .          .          .          .
row    2          .          .          .          .          .
row    3          .          .          .          .          .
row    4          .          .          .          .          .
row    5   4.20e+01   4.20e+01   4.20e+01   4.20e+01   4.20e+01
row    6   4.20e+01   4.20e+01   4.20e+01   4.20e+01   4.20e+01
row    7   4.20e+01   4.20e+01   4.20e+01   4.20e+01   4.20e+01
row    8   4.20e+01   4.20e+01   4.20e+01   4.20e+01   4.20e+01
row    9   4.20e+01   4.20e+01   4.20e+01   4.20e+01   4.20e+01
=============================================.


The printmatrix function for this nested BCRSMatrices works fine. But is
it possible to extend the writeMatrixToMatlab function so that it will
works as well?

Regards Patrick
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: example.cc
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20061120/2cd3abca/attachment.ksh>


More information about the Dune mailing list