[dune-pdelab] Assigning a BlockVector to an istl VectorBackend container

Oliver Sander oliver.sander at tu-dresden.de
Sat Jun 11 13:35:55 CEST 2016


Hi Andreas,

thanks, that works.  I forgot that free functions are all the rage now.
Too bad they're not really discoverable.

Cheers,
Oliver

On 11.06.2016 13:33, Andreas Nüßing wrote:
> Hi Oliver,
> 
> the plain vector can now been accessed using 'native':
> 
> Dune::PDELab::Backend::native(yourVectorBackendContainer) = yourBlockVector;
> 
> should do the trick.
> 
> Best,
> Andreas
> 
> Am 11. Juni 2016 13:01:08 MESZ, schrieb Oliver Sander <oliver.sander at tu-dresden.de>:
> 
>     Dear pdelab,
> 
>     I have code that assembles an FE problem using pdelab and the istl backend.  Vector stuff ends
>     up in an istl::VectorBackend container type, and all is well.  However, at one point I need
>     to assign a vector given in a plain BlockVector to the istl::VectorBackend container.  This
>     used to be possible with
> 
>      myVectorBackendContainer.base() = myBlockVector;
> 
>     This doesn't work anymore.  I can get the same result with
> 
>      *(xV.storage()) = x;
> 
>     but that's a bit ugly.  What is the official way to assign a BlockVector to the corresponding
>     istl VectorBackend Container type?
> 
>     Thanks,
>     Oliver
> 
>     ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
>     dune-pdelab mailing list
>     dune-pdelab at dune-project.org
>     http://lists.dune-project.org/mailman/listinfo/dune-pdelab
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune-pdelab/attachments/20160611/42a4bfa6/attachment.sig>


More information about the dune-pdelab mailing list