<html><head></head><body><div dir="auto">Dear Mike,<br><br>I'm afraid also we DUNE people need to dig deeper into this. <br><br>The issue here is that you're using Matrix for the blocks, which have dynamic size. The usual pattern is to use FieldMatrix, which has static size and a default constructor. The algorithms use this to decide where to invest directly.<br><br>The genetic algorithms usually expect BCRSMatrix to contain dense data, but Matrix dies not where that everything below is dense.<br><br>The safe way would be to use BCRSMatrix<FieldMatrix<double,n,n>> and BlockVector<FieldVector<double, n>><br><br>Do you really need the dynamic size? <br><br>I didn't test myself, but perhaps BCRSMatrix<DynamicMatrix<double,n,n>> and BlockVector<DynamicVector<double, n>> work. I would expect relaxation methods to work, but not AMG. Für ILU it might be a problem, that the constructor of DynamicMatrix needs the size information. <br><br>Best<br>Christian</div><br><br><div class="gmail_quote"><div dir="auto">Am 6. September 2025 21:04:48 MESZ schrieb Mike Rosing <eresrch@sdf.org>:</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail"><div dir="auto">I figured out how to get the MatrixAdaptor to be happy with my structures:<br><br>using Occupy = Matrix<double>;<br>using ElementVec = BlockVector<double>;<br><br>  MatrixAdapter<BCRSMatrix<Occupy>, BlockVector<ElementVec>,<br>                    BlockVector<ElementVec>> linearOperator(stiffns);<br><br>but none of the preconditioners are happy with this.<br>The ILU preconditioner gives the attached error output.<br><br>Does it make any sense to attempt to create a preconditioner that can deal with this structure, or should I just copy all the data into a flat matrix and vector with no sub-structure? Because I haven't gotten to call the solver yet, so this might be a lot deeper than I want to know about.<br><br>Thanks,<br><br><br>Mike Rosing<br>Engineering Research<br>Madison WI USA<br>Elliptic Curve Crypto:  <a href="http://mng.bz/D9NA">http://mng.bz/D9NA</a><br></div></pre></blockquote></div></body></html>