[dune-pdelab] How to get nonzero per row in the initialisation of BCRSMatrixBackend?

Jö Fahlke jorrit at jorrit.de
Tue Jul 23 12:00:52 CEST 2019


Am Di, 23. Jul 2019, 11:22:52 +0200 schrieb Gregor Corbin:
> Hi Ranjeet,
> 
> the number of nonzeros in your stiffness matrix depends on the problem
> and the discretization. I think it is used internally to optimize the
> matrix routines. Do *not* underestimate this number, as it could break
> the code. A too generous estimate will lead to slower code. (@Experts:
> please correct me if i am wrong).

That's basically correct.  Though overestimating should primarily lead to
wasting some memory.  That in turn can lead to slower code in some
circumstances, but that should be rare.

Regards,
Jö.

> In tutorial 0 the Poisson equation is solved with P1 elements, i.e., you
> have one degree of freedom on every vertex in your triangulation. If you
> test the equation with the i-th test function (assuming nice ordering
> this is the hat-function on vertex i) you get nonzeros from every ansatz
> function j that overlaps with the i-th function. That is, in row i you
> get a nonzero for each vertex j that is connected to i with an edge and
> for i itself.
>
> So you have to have some additional information on the grid to guess the
> number of nonzeros. In tutorial 0 someone decided that in 2D they won't
> need triangular grids with more than 7 edges connecting to a single
> vertex (1 << dim+1 = 2^dim+1 = 8).
>
> In tutorial 5 a higher order method is used and so there is more than
> one basis function per element. This is why the number of non-zeros
> depends on the polynomial degree. Because I am not familiar with the
> details of this tutorial (and refinement in general) I can't tell you
> why they chose this estimate in particular.
>
> Cheers,
>
> Gregor

-- 
Jorrit (Jö) Fahlke, Institute for Computational und Applied Mathematics,
University of Münster, Orleans-Ring 10, D-48149 Münster
Tel: +49 251 83 35146 Fax: +49 251 83 32729

This message is protected by DoubleROT13 encryption
Attempting to decode it violates the DMCA/WIPO acts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.dune-project.org/pipermail/dune-pdelab/attachments/20190723/1a8545cb/attachment.sig>


More information about the dune-pdelab mailing list