-
Is there anywhere on the documentation that describes the tensor storage format. @dcwhite |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
Do you want in-memory storage, or on-disk storage? If the latter, which file type? |
Beta Was this translation helpful? Give feedback.
-
What I mean is what are the explicit values you would have assigned to each node of a mesh with tensor data on it. Are the 6 values? 9? What is their order etc. |
Beta Was this translation helpful? Give feedback.
-
The doc for the parser modules has this info, which I think maps onto the in-memory storage scheme:
The first constructor with 6 values is what is used in the code as well, but additional data is stored in memory: a 3x3 matrix, and eigen vectors and value data. Any more thoughts @jessdtate @RubioJr9? |
Beta Was this translation helpful? Give feedback.
-
Ok So I dove into the code and figured it out. Using the tensor() function in the SCIRun API we can create a scirun tensor. There are various inputs but lets say we are using the tensor(vector, vector, scalar, scalar) input.
Scirun then assumes that the tensor is symmetric such that xy = yx, xz = zx, yz = zy. Thus only xx, xy, xz, yy, yz, and zz need to be stored, in that order. |
Beta Was this translation helpful? Give feedback.
Ok So I dove into the code and figured it out. Using the tensor() function in the SCIRun API we can create a scirun tensor. There are various inputs but lets say we are using the tensor(vector, vector, scalar, scalar) input.
T = tesnor(V1,V2,S1,S2)
In this case V1 and V2 are column vectors describing the primary and secondary directions of the tensor, while S1 and S2 are the conductivities/scales for those directions. The match that SCIRun does is equivalent to the following: