[dune-pdelab] ISTLBlockVectorContainer::size() method
Steffen Müthing
steffen.muething at ipvs.uni-stuttgart.de
Fri Sep 2 13:30:24 CEST 2011
Hi,
speaking of alternative backends, I have been hacking up a rudimentary backend
for PETSc this week (PETSc provides the possibility to compose submatrices to a
large nested matrix, which I wanted for my multidomain stuff).
I basically have it working now, but I had to extend the interface of the matrix backend
slightly to achieve acceptable performance during assembly, as PETSc really wants
you to batch matrix access operations or suffer horribly...
Right now I'm off to a conference, but we could perhaps discuss whether we might
incorporate those changes into PDELab when I'm back in Germany in October.
Greetings from Oslo,
Steffen
Am 02.09.2011 um 10:35 schrieb Markus Blatt:
> Hi,
>
> On Fri, Sep 02, 2011 at 10:15:03AM +0200, Oleh Krehel wrote:
>> It just seems to me that GridOperator::Traits::Domain, which is implemented
>> as ISTLBlockVectorContainer, represents the idea of vector of unknowns.
>> And the most basic operation of vector of unknowns is to see how many there are.
>> And it's awkward to call N() instead of size() to find out this
>> information(and unsafe, since
>> GridOperator::Traits::Domain might change to something else).
>
>
> This is exactly why it is not there and not called size().
> size() gives you the size of the container, which for the blockvector
> is the number of blocks and not the number of unknowns (like you assume).
> Depending on how you initialize the backend these might be different.
>
> In the future there might be other backends that do not support
> blocking. Code written for them (or for scalar block) won't work for
> real blocks then. This is what I consider unsafe.
>
> Giving access to the underlying containers is a kind of compromise we
> make, because this is pretty much needed for backend coding. But
> whenever you access the underlying container in the describe way all
> alarm bells should ring in your head as it is potentially dangerous.
>
> Cheers,
>
> Markus
>
> _______________________________________________
> dune-pdelab mailing list
> dune-pdelab at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-pdelab
Steffen Müthing
Universität Stuttgart
Institut für Parallele und Verteilte Systeme
Universitätsstr. 38
70569 Stuttgart
Tel: +49 711 685 88429
Fax: +49 711 685 88340
Email: steffen.muething at ipvs.uni-stuttgart.de
More information about the dune-pdelab
mailing list