← Back to team overview

dolfin team mailing list archive

Re: Creating tensors of high ranks

 

On Fri, Mar 06, 2009 at 05:22:23PM +0000, A Navaei wrote:
> 2009/3/6 Anders Logg <logg@xxxxxxxxx>:
> > On Fri, Mar 06, 2009 at 03:40:46PM +0000, A Navaei wrote:
> >> Since the backend support in dolfin comes with vectors and matrices,
> >> corresponding to tensors of rank 1 and 2, I was wondering if there is
> >> a standard efficient way of creating higher ranked tensors based on
> >> this.
> >>
> >> For instance, if we are interested in creating sparse tensors of rank
> >> 4, at least in MTL style, should we create a 2D matrix of 2D matrix
> >> type? That is:
> >>
> >> mtl::Matrix< mtl::Matrix< double > >
> >>
> >> I don't expect this to be as efficient as a 4D matrix as this cannot
> >> be converted to a 1D array pointer. Am I missing something here?
> >
> > There is no standard way to create higher ranked tensors, but the
> > GenericTensor interface (and the assembler) supports it so if you
> > should happen to have a data structure for rank 10 tensors, you can
> > assemble forms of arity 10 into it.
> 
> It seems the interface:
> 
> virtual void GenericTensor::resize(uint rank, const uint* dims)
> 
> has not been implemented in dolfin for ranks higher than 2, is that
> right? Are there any 3D matrices used in dolfin?

No, there are no 3D tensors, but it's supported by the interface.

It's the task of the subclass/implementation to implement resize() and
the other functions of the interface.

-- 
Anders


> -Ali
> 
> >
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.9 (GNU/Linux)
> >
> > iEYEARECAAYFAkmxV+UACgkQTuwUCDsYZdET0ACdF8tT77wVI9pPcQFMnbCOMvTz
> > xcsAmgM9Blpph070qlSoaBMXtRjFLFZg
> > =UkD3
> > -----END PGP SIGNATURE-----
> >
> > _______________________________________________
> > DOLFIN-dev mailing list
> > DOLFIN-dev@xxxxxxxxxx
> > http://www.fenics.org/mailman/listinfo/dolfin-dev
> >
> >
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev

Attachment: signature.asc
Description: Digital signature


References