[petsc-users] Store type (Eigen::Vector2d) in a petsc vec

Andrew Parker andy.john.parker at gmail.com
Tue Feb 5 03:48:51 CST 2019


Hi,

I have quite a bit of working code that uses eigen vector2d/3d (and some
corresponding matrix3d types) to allow for local linAlg.  I would like to
store these within a petsc vector. So for example to have a vector for all
cells of velocity-vectors in 2d held for each cell within an eigen
vector2d, within a Petsc Vec for all cells.  What would be the best way to
achieve this within petsc? I would like to make full use of petsc
capabilities including parallel (ghost updating, partitioning etc),
likewise those of eigen's for local linAlg on small fixed sized vectors, so
how best to achieve this to allow for both eco-systems?
Thanks,
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190205/0f5ef974/attachment.html>


More information about the petsc-users mailing list