[Dune] build a BCRSMatix C = A + B

Markus Blatt markus at dr-blatt.de
Sat Aug 1 12:16:05 CEST 2015


Hi,

On Fri, Jul 31, 2015 at 10:51:24PM -0400, abdeladhim tahimi wrote:
> 
> I have 3 BCRSMatrix instances A, B and C
> A and B have different sparsity patterns given explicitly and C is the sum
> of A and B. Is there a way to C get built without having to define
> explicitly its sparcity pattern (deduce the sparcity pattern of C
> implicitly through its definition (C = A + B)?
>

No. You have to do this manually, e.g. by looping over the rows of A
and B and computing the union of the nonzero columns. The problem is
that it is hard to guess the total number of nonzeros and you might
need to do the loop twice.

But maybe the information is also given in another way implicitly?

Markus

-- 
Do you need more support with DUNE or HPC in general? 

Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20150801/46d4def5/attachment.sig>


More information about the Dune mailing list