Thread Previous • Date Previous • Date Next • Thread Next |
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 tensors of rank > 2 are implemented in DOLFIN. If you want them, you'll need to implement them.
GenericTensor::resize(...) is unrelated. It's just one of a number of pure virtual functions in GenericTensor.
Garth
-Ali-- Anders -----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
Thread Previous • Date Previous • Date Next • Thread Next |