[Dune] Preconditioner
Christian Engwer
christian.engwer at uni-muenster.de
Tue Sep 9 07:55:16 CEST 2025
Dear Mike,
I'm afraid also we DUNE people need to dig deeper into this.
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.
The genetic algorithms usually expect BCRSMatrix to contain dense data, but Matrix dies not where that everything below is dense.
The safe way would be to use BCRSMatrix<FieldMatrix<double,n,n>> and BlockVector<FieldVector<double, n>>
Do you really need the dynamic size?
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.
Best
Christian
Am 6. September 2025 21:04:48 MESZ schrieb Mike Rosing <eresrch at sdf.org>:
>I figured out how to get the MatrixAdaptor to be happy with my structures:
>
>using Occupy = Matrix<double>;
>using ElementVec = BlockVector<double>;
>
> MatrixAdapter<BCRSMatrix<Occupy>, BlockVector<ElementVec>,
> BlockVector<ElementVec>> linearOperator(stiffns);
>
>but none of the preconditioners are happy with this.
>The ILU preconditioner gives the attached error output.
>
>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.
>
>Thanks,
>
>
>Mike Rosing
>Engineering Research
>Madison WI USA
>Elliptic Curve Crypto: http://mng.bz/D9NA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20250909/3c72ec8b/attachment.htm>
More information about the Dune
mailing list