[Dune-devel] [GSoC 2013]
Tilak Raj Singh
tilak72 at gmail.com
Wed Apr 17 08:26:29 CEST 2013
Hi,
was going through the test given in /dune-istl/dune/istl/test yesterday
night.
In bcrsbuild.cc the function called to print the matrix is printmatrix().
But if any row whose any index has not been added into the matrix and is
printed using the above mentioned function we get a segmentation fault. So
it would be better if we use printSparseMatrix() function instead of just
printmatrix() as the former one seems to be working fine when handling
sparsematrices.
I hope all this solves the problems mentioned in bug report ID 1280. If
some more test have to performed or if m missing some cases I would be
happy to try solving them. :)
Thanking you,
Tilak Raj Singh
and is then printed using this func we are getting a segmentation fa
On Wed, Apr 17, 2013 at 3:12 AM, Tilak Raj Singh <tilak72 at gmail.com> wrote:
> Hi Markus,
>
> Sorry for not replying yesterday as I was not able to work on it due to
> personal reasons.
>
> I went through the bug report I told you about earlier regarding
> segmentation fault while accessing empty rows in BCRS matrix.
>
> According to me, with reference to the Bug Id 1280., the following changes
> are to be made:
>
> if (row >= n)DUNE_THROW <http://www.dune-project.org/doc-2.2.0/doxygen/html/group__Exceptions.html#gad7fce127d6eaabe773adbc409514f21e>(ISTLError <http://www.dune-project.org/doc-2.2.0/doxygen/html/classDune_1_1ISTLError.html>,"row index exceeds matrix size");
>
> This code is to be added before the following lines in the function 'addindex' in bcrsmatrix.hh:
>
> 00823 if (col >= m)00824 DUNE_THROW <http://www.dune-project.org/doc-2.2.0/doxygen/html/group__Exceptions.html#gad7fce127d6eaabe773adbc409514f21e>(ISTLError <http://www.dune-project.org/doc-2.2.0/doxygen/html/classDune_1_1ISTLError.html>,"column index exceeds matrix size");
>
>
> If we are making a matrix of size 4x4 in random built mode and we try
> inserting the index (4,0) or (5,0), then we get a segmentation fault so we
> should add this condition.
>
> As mentioned in the bug report, there is no segmentation fault while
> accessing elements (eg. a[0][1]) but the fault is in the function
> 'printmatrix' in the file io.hh where trying to print a row having no data
> in any of its columns gives a segmentation fault.
>
> I am going through this issue. I'll try to provide a solution as early as
> possible.
>
> Also, according to me, there is no need for the function 'print_row'
> specializations for Field Matrix <K, 1, 1> as its purpose can be solved
> easily using the print_row function just above it.
>
> Thanking You,
> Tilak Raj Singh
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20130417/bc258666/attachment.htm>
More information about the Dune-devel
mailing list