[petsc-users] Tensor product as matrix free method

Jed Brown jed at jedbrown.org
Tue Apr 1 09:10:45 CDT 2014


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 --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140401/4692a2ce/attachment.pgp>


More information about the petsc-users mailing list