[Dune-devel] [GSoC 2013]

Tilak Raj Singh tilak72 at gmail.com
Tue Apr 16 23:42:28 CEST 2013


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/dbc22df9/attachment.htm>


More information about the Dune-devel mailing list