Thread Previous • Date Previous • Date Next • Thread Next |
Anders Logg wrote:
On Mon, Apr 16, 2007 at 12:25:22PM +0200, Garth N. Wells wrote:For the function Function::dim, /// Return the dimension of the value space for axis i uint dim(unsigned int i) const; what does i correspond to? I don't understand the comment. GarthThe functions can generally be tensor-valued, so say that you have a matrix-valued function. Then rank() returns 2 and dim() can be called with argument i=0 or i=1 to return the number of rows and columns.
ok.
The size of the array values in the interpolate() function (to be used by the file formats for output) should be computed as uint size = 1; for (uint i = 0; i < f.rank(); i++) size *= f.dim(i);
Isn't this for a single cell only? Should the first line be uint size = mesh.numVertices(); Garth
/Anders _______________________________________________ DOLFIN-dev mailing list DOLFIN-dev@xxxxxxxxxx http://www.fenics.org/mailman/listinfo/dolfin-dev
Thread Previous • Date Previous • Date Next • Thread Next |