[Dune] C++ question
Markus Blatt
markus at dr-blatt.de
Tue Aug 26 09:50:18 CEST 2025
Hi,
Am Tue, Aug 19, 2025 at 04:41:51PM +0200 schrieb Oliver Sander:
>Hi Mike,
>
>thanks for your interest in Dune. Your specific matrix setup is unusual,
>but it should work. Your code looks like a decent start:
>
>> typedef Matrix<double> occupy(np, np);
>
> [snip]
>
>Do you have a copy of the Dune book? It explains how to set up BCRSMatrix
>objects in some detail. Try to start from one of the examples there,
>and modify it to get Matrix<double> matrix entries. Feel free to ask
>again if you get stuck there.
>
>>In dune/istl/bcrsmatrix.hh it says " - VariableBCRSMatrix is not yet implemented." Does that mean I can't do what I'm attempting: to create
>>a BCRSMatrix with variable dimensions?
>
>Yes and no. A BCRSMatrix<Matrix<double> > and a (hypothetical) VariableBCRSMatrix
>both implement the same matrix: A sparse matrix with dense blocks of sizes
>specified at run-time. The difference is the internal memory allocation:
>BCRSMatrix<Matrix<double> > stores each of its entries by a separate heap allocation,
>while VariableBCRSMatrix will store its entire content in a single heap allocation.
>This can have important performance benefits.
>
But isn't the question after setting up the matrix what you do with it afterwards?
Do we have any solvers that one could use with this matrix? Did anyone try this yet?
Mike, maybe you should describe a bit what you want to use the matrix for.
Best,
Markus
--
Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Pedettistr. 38, 85072 Eichstätt, Germany, USt-Id: DE279960836
Tel.: +49 (0) 160 97590858
More information about the Dune
mailing list