[Dune-devel] The innards of BlockVector

Markus Blatt markus at dr-blatt.de
Thu Apr 23 09:25:00 CEST 2015


Hi,

On Tue, Apr 21, 2015 at 04:54:38PM +0200, Oliver Sander wrote:
> [the following is a post-2.4 issue]
> I have been trying to understand the inner workings of the
> BlockVector class.  And I failed.

The thing is that it is a subclass of quite a bit of hierachy class
starting from some array like one. Each layer adding some complexity
(math methods, memory management). Part of this hierachy are also use
to implement the sparse matrix classes, and the VariableBlockVector.

> It is a quite complicated combination of several classes that apparently try to implement
> something very similar to the std::vector memory preallocation feature.  What is the reason
> for not using a std::vector for doing the memory management for us
> in the first place?

As I am not the original author, I cannot really comment on this. But
I assume that it is that BCRSMatrix and VariableBlockVector need some
different memory management.

Having said this, does neither mean that this is an optimal design nor
that there should be no refactoring. But as this is an integral part
of dune-istl, care should be taken when doing this and there is a good
chance that one might underestimate the complexity of the task.

Cheers,

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: 836 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20150423/48bf2c0c/attachment.sig>


More information about the Dune-devel mailing list