[petsc-users] Tensor product as matrix free method

Mathis Friesdorf mathisfriesdorf at gmail.com
Tue Apr 1 09:28:08 CDT 2014


Thanks Jed! The libaries you are pointing to look very interesting indeed.
For the particular implementation I have in mind, I was hoping to get away
with something easier, as my time to work on this is a bit limited. All I
really need is a way to construct a block-diagonal matrix where each block
is given by the same matrix and all blocks are on the diagonal. Am I wrong
to assume that this should be possible to implement with TAIJ?

Thanks so much for your help and all the best, Mathis


On Tue, Apr 1, 2014 at 4:10 PM, Jed Brown <jed at jedbrown.org> wrote:

> Mathis Friesdorf <mathisfriesdorf at gmail.com> writes:
>
> > Thanks for the helpful comments. Apparently my first mail was a bit
> > unclear. I have already implemented it as a matrix-free method using
> > MatShell, but currently it is written with a bunch of for loops and is
> > horribly inefficient and in fact a lot slower than my python
> implementation
> > with numpy. I am quite sure that using TAIJ matrices would be the
> solution,
> > but I am unsure on how to do it precisely, since there is so little
> > documentation available.
>
> TAIJ is a very specialized tensor product between a redundantly-stored
> (small) dense matrix and a distributed sparse matrix, with an optional
> shift.  It is useful for implicit Runge-Kutta and some types of
> ensembles, but it's not what it appears you are looking for.
>
> Distributed-memory tensor contractions are challenging to implement well
> and there are several good libraries from the computational chemistry
> community.  I would suggest writing a Mat implementation based on the
> Cyclops Tensor Framework or the Tensor Contraction Engine.
>
>   http://ctf.eecs.berkeley.edu/
>
>   http://www.csc.lsu.edu/~gb/TCE/
>
> This would be a great contribution to PETSc, but you can also just put
> one of these inside MatShell (just a few lines of code) if you don't
> want to make a public interface for tensors.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140401/9c296c1c/attachment.html>


More information about the petsc-users mailing list