<div dir="ltr">Hi Markus,<div><br></div><div>Sorry for not replying yesterday as I was not able to work on it due to personal reasons.</div><div><br></div><div>I went through the bug report I told you about earlier regarding segmentation fault while accessing empty rows in BCRS matrix. </div>

<div><br></div><div>According to me, with reference to the Bug Id 1280., the following changes are to be made:</div><div><br></div><div><pre style="line-height:15px;overflow:auto;font-size:9pt;background-color:rgb(251,252,253);margin:4px 8px 4px 2px;font-family:monospace,fixed;word-wrap:break-word;padding:4px 6px;border:1px solid rgb(196,207,229)">
<span style="color:rgb(224,128,0)">if</span> (row >= n)
<a href="http://www.dune-project.org/doc-2.2.0/doxygen/html/group__Exceptions.html#gad7fce127d6eaabe773adbc409514f21e" style="color:rgb(70,101,162);text-decoration:none" target="_blank">DUNE_THROW</a>(<a href="http://www.dune-project.org/doc-2.2.0/doxygen/html/classDune_1_1ISTLError.html" title="derive error class from the base class in common" style="color:rgb(70,101,162);text-decoration:none" target="_blank">ISTLError</a>,<span style="color:rgb(0,32,128)">"row index exceeds matrix size"</span>);
</pre><div><pre style="line-height:15px;overflow:auto;font-size:9pt;background-color:rgb(251,252,253);margin:4px 8px 4px 2px;font-family:monospace,fixed;word-wrap:break-word;padding:4px 6px;border:1px solid rgb(196,207,229)">
This code is to be added before the following lines in the function 'addindex' in bcrsmatrix.hh:</pre><pre style="line-height:15px;overflow:auto;font-size:9pt;background-color:rgb(251,252,253);margin:4px 8px 4px 2px;font-family:monospace,fixed;word-wrap:break-word;padding:4px 6px;border:1px solid rgb(196,207,229)">
00823           <span style="color:rgb(224,128,0)">if</span> (col >= m)
<a name="13e14cb1c7726ae1_l00824" style="color:rgb(89,116,181)"></a>00824             <a href="http://www.dune-project.org/doc-2.2.0/doxygen/html/group__Exceptions.html#gad7fce127d6eaabe773adbc409514f21e" style="color:rgb(70,101,162);text-decoration:none" target="_blank">DUNE_THROW</a>(<a href="http://www.dune-project.org/doc-2.2.0/doxygen/html/classDune_1_1ISTLError.html" title="derive error class from the base class in common" style="color:rgb(70,101,162);text-decoration:none" target="_blank">ISTLError</a>,<span style="color:rgb(0,32,128)">"column index exceeds matrix size"</span>);
</pre></div><div><br></div><div>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. </div><div>
<br></div><div>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.</div>

<div><br></div><div>I am going through this issue. I'll try to provide a solution as early as possible.</div><div><br></div><div>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.</div>
<div><br></div><div style>Thanking You,</div><div style>Tilak Raj Singh</div>
<div><br></div></div></div>